-
1. Re: JBoss using cached .jar??
jonlee Nov 13, 2003 10:23 PM (in response to tonic889)It is a bit difficult to tell as you have provided no log output. However, it may be that the deployment problem is the declaration of a method in the interface that has no match in the implementation. Otherwise post the relevant log sections with errors.
-
2. Re: JBoss using cached .jar??
tonic889 Nov 14, 2003 12:26 PM (in response to tonic889)I have attached a log file and the .jar file in question for reference. Deploying the .jar file generates many errors, but of particular concern to me is the error on lines 144-148:
2003-11-14 10:28:52,454 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
Bean : User
Method : public String ejbCreate(String, String, String, int, String, String, String, String) throws RemoteException, CreateException
Section: 10.6.4
Warning: The return type of an ejbCreate(...) method must be the entity bean's primary key type.
As you will see from the attached .jar file the ejbCreate method in UserBean accepts Integer parameters instead of int parameters and returns an Integer instead of a String. Only when I first deployed the .jar did the ejbCreate method listed in the log file exist. What gives? -
3. Re: JBoss using cached .jar??
jonlee Nov 14, 2003 6:19 PM (in response to tonic889)You need to explicitly declare the FQDN for the return class.
<?xml version="1.0"?> <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> <ejb-jar> <enterprise-beans> <entity> <ejb-name>User</ejb-name> <home>org.voodoochild.ejb.UserHome</home> <remote>org.voodoochild.ejb.User</remote> <ejb-class>org.voodoochild.ejb.UserBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <cmp-field><field-name>accessLevel</field-name></cmp-field> <cmp-field><field-name>email</field-name></cmp-field> <cmp-field><field-name>firstname</field-name></cmp-field> <cmp-field><field-name>lastname</field-name></cmp-field> <cmp-field><field-name>hostname</field-name></cmp-field> <cmp-field><field-name>lastlogin</field-name></cmp-field> <cmp-field><field-name>password</field-name></cmp-field> <cmp-field><field-name>passcode</field-name></cmp-field> <cmp-field><field-name>userid</field-name></cmp-field> <cmp-field><field-name>username</field-name></cmp-field> <primkey-field>userid</primkey-field> <abstract-schema-name>users</abstract-schema-name> </entity> </enterprise-beans> </ejb-jar>
Also, your signatures don't match and that is causing the remainder of the errors. lastname does not translate to setLastName. It translates to setLastname. And so on.
Especially, user_id <> setUserID.
Also your postcreate will need to be fixed once you've repaired the rest.
Hope that gets you under way. -
4. Re: JBoss using cached .jar??
tonic889 Nov 14, 2003 6:56 PM (in response to tonic889)Thanks. I think I can fix the errors, but my question is why does the log file say:
2003-11-14 19:46:00,768 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
Bean : User
Method : public String ejbCreate(String, String, String, int, String, String, String, String) throws RemoteException, CreateException
Section: 10.6.4
...When the only ejbCreate method in my source code are:
public Integer ejbCreate(String firstName, String lastName, String email, Integer accessLevel, String password, String passcode, String userName, String hostname) throws RemoteException, CreateException {
and
public Integer ejbCreate() throws CreateException {
return null;
}
? -
5. Re: JBoss using cached .jar??
jonlee Nov 14, 2003 7:11 PM (in response to tonic889)It is possible the redeploy conditions caused a mangling from the past deployment. However, I haven't seen this issue on my deployment, even switching around values from java.lang.String. It is possible that the JBoss deployer got confused.
If you can reproduce it, log it as a bug at SourceForge. -
6. Re: JBoss using cached .jar??
tonic889 Nov 14, 2003 8:58 PM (in response to tonic889)Is there a way to force the deployer into redeploying everything? I restarted the JBoss server, but I'm still getting this problem.
-
7. Re: JBoss using cached .jar??
jonlee Nov 14, 2003 9:17 PM (in response to tonic889)On a reboot of JBoss, everything is redeployed. There is no caching. So I would look very carefully at your build, perhaps inspect the classes to see that the class method signatures match your source methods. I would also check the JAR deployment log to make sure the JAR name matches the one you think is being deployed when the problem occurs.
-
8. Re: JBoss using cached .jar??
jonlee Nov 14, 2003 10:19 PM (in response to tonic889)Your example in a deployable state.
-
9. Re: JBoss using cached .jar??
tonic889 Nov 21, 2003 12:16 AM (in response to tonic889)Unfortunately, it's still not working for me. Amazingly I'm still getting the same error messages as before. I can only guess that there is something wrong my version of JBoss (or installation/configuration thereof). Thanks anyway for your help.