PDA

View Full Version : Having trouble with custom beans



JulieR
03-31-2003, 04:37 PM
Hello all,

Sorry for such a mudane question, but I can not figure out what I am doing wrong and am getting really frustrated, so hopefully someone here can help me out.

I have been trying to write my first custom bean, so to learn I figure I would start by going through the examples. I took the sample code as presented in the manual on pg 649 Creating a Custom Wizard Action and copied word for word and named my file CustWizardAction.java. The file compiles fine with no errors, but I can not register it, it keeps saying to enter a vaild classname.

If I name the file ExecWizardAction.java and replace all instances of CustWizardAction with ExecWizardAction it compiles and registers with no errors.

Why will it not take the file when it is named CustWizardAction? The only difference between the two files is the class name.

Yes, I put the file under the classes directory. I put both class files in the same place and it will register one, but not the other.

Does anyone have any clues? Thanks for the help.
Julie

Jeff Dillon
04-01-2003, 03:14 PM
You have to make sure that your package structures match. For example, if your custom bean has its first line of...

package com.mycompany;

Then your class file must go into the directory...

classes/com/mycompany/MyClass

Then you would register the class like...

com.mycompany.MyClass

JulieR
04-01-2003, 03:25 PM
I have done that and it still does not work. I can register the beans fine in 4.53 but they will not register in 5.0.

I have named my file ExecWizardAction and changed the class name to ExecWizardAction and it registers it, when I change it to anything else it will not register at all. Since I can not use it as ExecWizardAction, it is pointless, but leads me to believe the code is fine, but then why can I not get the custom bean to register.

I have several swing beans from my 4.53 project that I can not register in 5.0 even after I recompile against the new libraries and all. Nothing will register, so I am starting to wonder if I have a bad install. I am running this on Solaris 2.8 (same as my 4.5 installation.) Can the problem be that I have both versions installed on the same machine, but in different locations, I am completely at a loss here, I have tried everything and have gone over all the documentation I can find.

Any clues?

JulieR
04-01-2003, 04:04 PM
I have just installed ISMP 5 on Windows and my custom bean installs just fine. Still having problems with registering the bean on Solaris 2.8. I still do not know what the problem is but at least I have a clue as to where to start debugging.

Jeff Dillon
04-01-2003, 04:09 PM
Run with "ismpg" launcher instead of "ismp". This will display the java console and should show you a stack trace if there is a problem.