-
1. Re: EJB3 Session Bean Container error
jaikiran Feb 24, 2010 9:16 AM (in response to julianovidal)Can you post your client code? Is it some remote client? How is the application packaged? And please post the logs from the console when the application is being deployed.
-
2. Re: EJB3 Session Bean Container error
julianovidal Feb 24, 2010 9:51 AM (in response to jaikiran)Hey! Thanks for the quick reply!
The error ocurrs when I try to access a Remote SessionBean.
The weird thing is that I actually get the instance when I do the lookup:
public CategoryRemote getCategory() throws CMSException { Object obj = CMSServiceLocator.getInstance().getObject(CategoryRemote.REMOTE); return (CategoryRemote) PortableRemoteObject.narrow(obj, CategoryRemote.class); }
The getObject method is the lookup and I'm doing it the classic way...
InitialContext... blah, blah,blah...
I get the instance... but when I try to call a method from the SessionBean, I get that error.
Thanks in advance for your help!
Regards,
Juliano Vidal
-
console.log.zip 25.7 KB
-
-
3. Re: EJB3 Session Bean Container error
jaikiran Feb 24, 2010 10:18 AM (in response to julianovidal)julianovidal wrote:
The error ocurrs when I try to access a Remote SessionBean.
You mean the client is not in the same JVM as the deployed bean, right? (Just trying to get a better picture of what's happening)
julianovidal wrote:
The weird thing is that I actually get the instance when I do the lookup:
public CategoryRemote getCategory() throws CMSException { Object obj = CMSServiceLocator.getInstance().getObject(CategoryRemote.REMOTE); return (CategoryRemote) PortableRemoteObject.narrow(obj, CategoryRemote.class); }
The interceptor is considering it to be a in-JVM call (i.e. client and bean are in same JVM). Before i look into the details, can you remove that PortableRemoteObject.narrow call? It's not required in EJB3. (I have a suspicion that it's messing up with the returned proxy - although i am not sure yet).
-
4. Re: EJB3 Session Bean Container error
julianovidal Feb 24, 2010 10:25 AM (in response to jaikiran)They are in the sabe JVM, I think.
Diferent ears but in the same JVM and deployed in the same application server.
Removed thePortableRemoteObject.narrow, and got the same error...
Any other ideas?
-
5. Re: EJB3 Session Bean Container error
jaikiran Feb 24, 2010 11:06 AM (in response to julianovidal)Looking at the stacktrace, its a servlet calling bean1 which then calls bean2. And the system is a MacOS with Apple JVM. I don't see a reason why this would fail. Can you attach application(s) which can reproduce this issue? By the way, have you patched the server with the latest EJB3 plugin or is it just a clean AS 5.1.0?
-
6. Re: EJB3 Session Bean Container error
julianovidal Feb 26, 2010 3:33 PM (in response to jaikiran)Hey man!
After build a new EJB project and ran it in another JBoss 5.1, I got it working.
When I ran in my old one I found that it did not work. So I started to seach for it's diferences.
I added a jar: jboss-aspect-jdk50-client.jar in my common/lib beacuse I was getting a ClassDefNotFoundException exception. And the solution I found was to copy that jar from the JBoss 4.2.3 to the JBoss 5.1.0
That caused the Countainer error...
After I removed it from the common/lib I got that working!!The error I was getting before did not appear again.... yet...
Thanks for your help!