WAS 5.1 app startup problem with wsejbdeploy generated code


EJB programming & troubleshooting: WAS 5.1 app startup problem with wsejbdeploy generated code

  1. Hi, I am trying to use apache ant 1.6.2 to build a EAR outside of any IDE. I have built an EAR which has the following structure: At EAR root - One WAR, One EJB Jar and two utility JARS At /lib - some more utility and common jars To create the EJB jar, I first compile all the concerned home,remote,bean and utility classes using javac task. Following this I generate the deployment and stub code in the following manner: ------------------------------------------------------------------------------- -------------------------------------------------------------------------------- When I check the jar thus created, I can see that the stub and rmic code have been properly generated. However, when I install this application on WAS 5.1 and then try to start it, I get errors on the console which point out that the ejbs could not be loaded as some related rmic class could not be found. This is an example: I have a stateless session bean called ReferenceDataFacadeBean with the home interface and the remote interface being named as ReferenceDataFacadeHome and ReferenceDataFacade respectively. Now when I compile these and then generate deployment and stub code using the wsejbdeploy task, I can see that the following files have been generated: 1. _ReferenceData_stub.class 2. _ReferenceDataHome_stub.class 3. _EJSRemoteStatelessReferenceDataFacade_d3395beb_Tie.class 4. _EJSRemoteStatelessReferenceDataFacadeHome_d3395beb_Tie.class 5. EJSRemoteStatelessReferenceDataFacade_d3395beb.class 6. EJSRemoteStatelessReferenceDataFacadeHome_d3395beb.class 7. EJSRemoteStatelessReferenceDataFacadeHomeBean_d3395beb.class Now when I install this EAR and try to start it, I get this error: [6/20/07 10:53:59:774 IST] 32411f52 BeanMetaData E CNTR0075E: The user-provided class "com.rbsg.cactus.core.facade.referencedata.EJSStatelessReferenceDataFacadeHomeBean_d3395beb" needed by the EnterpriseBean could not be found or loaded. [6/20/07 10:53:59:789 IST] 32411f52 EJBContainerI E WSVR0209E: Unable to prepare EJB jar CactusCore.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl], enterprise bean com.ibm.etools.ejb.impl.SessionImpl(ReferenceDataFacade) (transactionType: Container, sessionType: Stateless) java.lang.ClassNotFoundException: com.rbsg.cactus.core.facade.referencedata.EJSStatelessReferenceDataFacadeHomeBean_9c0e8dfe What I am not able to figure out is why is WAS looking for EJSStatelessReferenceDataFacadeHomeBean_9c0e8dfe.class while trying to load EJSStatelessReferenceDataFacadeHomeBean_d3395beb.class ? I have been struggling with this for almost a week now. Any help is greatly appreciated. A funny thing that I've observed is that when I compare the EAR generated by using ant as described above and one which we generate using the "projectBuild" task in RSA, the two EAR's look exactly the same. While the one created in RSA starts fine, the one created externally by ant does not. Thanks, Subhashish
  2. See if this helps. generate the stub , skeleton from WSAD and then run the buid script to pack everyhting. ciao
  3. It actually was a WAS related issue. I was trying this out on the WAS that comes bundled with RSA 6.0. When I deployed the same EJB JAR on a standalone WAS 5.1/AIX installation, the JAR started fine. I think WAS creates some rmic code too during installation and I think this option wasn't turned on on my local install. Unfortulately, I don't quite know what the option is. I tried with "Deploy EJBs" selected on my local install but that didn't work.
  4. Same symptoms as yours using IBM RAD and WAS 6.0 runtime. In my case I had referenced externally some *ejb.jar Seeing that: - it was trying to create again the existing jars - it was trying to access them with not proper numeration I tried to look at the JAR DEPENDENCIES, but there is a problem waiting to be fixed: http://www.ibm.com/developerworks/forums/dw_thread.jsp?forum=430&message=13968284&thread=167285&cat=24 .classpath file was ok. So why was not seeing the jars? 1. I removed the external references to the jars. 2. Imported the system folder containing them to the project. 3. Added them as jars(not external) and it worked (I am new in this environment so there may be a better solution). It worked! Not understanding why, I looked more deeply in the web and found it here: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/topic/com.ibm.wp.ent.doc/wp_trouble_pdf.pdf "This error indicates that the class: com.ibm.websphere.startupservice.AppStartUpHome could not be located while defining the class: com.ibm.websphere.startupservice.EJSRemoteStatelessPznSchedulerInitializerBeanHome_92051795 This is often caused by having the class at a higher point in the classloader hierarchy. To eliminate the error, the pznscheduler.ear may be uninstalled." Luckily I solved my problem already, because i don't yet understand why to uninstall the ear i want to build. Any hints?
  5. Sorry, my environment is: WebSphere Platform 5.1 [BASE 5.1.1 a0426.01] [JDK 1.4.2 cn1420-20040626] Java version = J2RE 1.4.2 IBM Windows 32 build cn1420-20040626 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM And not was6.0 as I stated on previous post.
  6. I can take a guess. .classpath is only for build and not used at runtime. At runtime, WAS would look into the Manifest file of your ejb jar (or ejb project in this case since you are running within RAD) to check jar dependencies. I think the required jars need to be within RAD for WAS to be able to pick them up. If however you were building an ear yourself and then deploying on WAS using admin console, you'd have to have all your external jars in the ear and their entries in the manifest file of the ejb jar.