OK - I made a meticulous review of deployment logs and of my build setup within Eclipse - and you know, I noticed that the import I did long ago of the ASMIGRATE'd EAR file did infact have a curiosity I had overlooked. There is no BEAN ICON over the EJB Project representations. I know from previous projects working in Eclipse, there are certain artifacts and structures for EJB projects that are different from application projects. I am assuming the import of the migrated EAR did not correctly identify the EJBs as Bean Projects and rather setup their structure within Ecplise as a POJO. <br><br>
So, I took apart the originally migrated EAR in DOS, expanding it using the JAR facility, then copying the EJB JARs to a separate area, expanding them. I recall I had to drill down into their structure and delete the websphere's RMI-generated stub classes in order to get the EJBs to compile in the project - so I did this again. Then, I rebuilt the EJBs into JARs and imported them (after changing names of the old ejb projects within the Eclipse structure). I fixed all build paths and made all facets and compile properties consistent with rest of the Application. Copied all the DEBUG messages I had in the CWMManager bean classes, then rebuilt the entire project and deployed it. (I attached a snapshot of the Eclipse Project Explorer after I finished and before running)<br><br>
Voila! I get a bean created (based on the log file); but, now I am getting a ClassCastException thrown complaining about a Home bean's Dynamic Stub:<br><br>
[code][#|2008-11-12T09:48:27.646-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.save() - attempts to create CWMManagerBean object|#]
[#|2008-11-12T09:48:27.646-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.getBean() for ejb/CWMManager - bean is null, retrying|#]
[#|2008-11-12T09:48:27.646-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
BaseBeanHandler-CWMManagerBeanHandler.getBean() for ejb/CWMManager - attempt no-arg bean creation|#]
[#|2008-11-12T09:48:27.662-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
BaseBeanHandler-CWMManagerBeanHandler.getBean() for ejb/CWMManager - bean is created and returned|#][/code]
<br> [B]^-- YES!!! Bean Object is returned from BaseBeanHandler class[/B]<br><br>
[code]
[#|2008-11-12T09:48:27.662-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.save() - Elapsed time = 00:00:00.016 - Exception: java.lang.ClassCastException: CWM.CWMManager.ejb._CWMManagerHome_DynamicStub|#]
[#|2008-11-12T09:48:27.677-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
java.lang.ClassCastException: CWM.CWMManager.ejb._CWMManagerHome_DynamicStub
at CWM.CWMManagerBeanHandler.getCWMManagerBean(CWMManagerBeanHandler.java:240)
at CWM.CWMManagerBeanHandler.save(CWMManagerBeanHandler.java:207)
at utils.servlet.BaseServlet.updateMonitorData(BaseServlet.java:1082)
at utils.servlet.BaseServlet.incrRequest(BaseServlet.java:1139)
at utils.servlet.BaseServlet.doPost(BaseServlet.java:433)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)[/code]
<br>GRRR!!! One baby step forward, another problem...
<br><br>
So, does not the AppServer generate the RMI stubs automatically??? Or am I missing something again? Or, was I not supposed to delete the RMI stub classes created by Websphere?
<br><br>
I looked in the deployed domain folder of the appserver, within the applications/j2ee-apps folder and saw the [ejbname]_ejb_jar folders and drilled down. And sure enough, there are NO stub classes generated... So much for assumptions.
<br><br>
What's your take on this??? I am gonna experiement with manually adding the stubs I removed; I noticed that the Websphere versions had saved uncompiled .JAVA classes...
<br><br>
Da Lizard
[Message sent by forum member 'loungelizard' (loungelizard)]
http://forums.java.net/jive/thread.jspa?messageID=316330