For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 4 replies, 4 voices, and was last updated 21 years, 2 months ago by
Greg.
-
AuthorPosts
-
APA-ITMemberHi,
I’m using MyEclipse 3.8 Beta. I created an EJB-Project and an Session-Bean using the MyEclipse-Wizards and followed the tutorials. But I always get a NullPointerException due deployment:
<16.08.2004 10.12 Uhr CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating Deploy task for application _appsdir_HelloWorld_jar.>
<16.08.2004 10.12 Uhr CEST> <Error> <Deployer> <BEA-149201> <Failed to complete the deployment task with ID 1 for the application _appsdir_HelloWorld_jar.
weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: prepare failed for HelloWorld
Module: HelloWorld Error: Exception preparing module: EJBModule(HelloWorld,status=NEW)Unable to deploy EJB: C:\Programme\bea\user_projects\domains\examples\examplesServer\stage\_appsdir_HelloWorld_jar\HelloWorld.jar from HelloWorld.jar:
java.lang.NullPointerException
at weblogic.ejb20.deployer.SessionBeanInfoImpl.assignDefaultTXAttributesIfNecessary(SessionBeanInfoImpl.java:295)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:807)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:240)
at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1302)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3101)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1560)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1208)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1051)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2444)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2394)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2310)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2398)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2310)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
————— nested within: ——————
weblogic.management.ManagementException: – with nested exception:
[weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: prepare failed for HelloWorld
Module: HelloWorld Error: Exception preparing module: EJBModule(HelloWorld,status=NEW)Unable to deploy EJB: C:\Programme\bea\user_projects\domains\examples\examplesServer\stage\_appsdir_HelloWorld_jar\HelloWorld.jar from HelloWorld.jar:
java.lang.NullPointerException
at weblogic.ejb20.deployer.SessionBeanInfoImpl.assignDefaultTXAttributesIfNecessary(SessionBeanInfoImpl.java:295)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:807)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:240)
at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1302)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3101)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1560)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1208)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1051)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2444)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2394)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2310)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)]
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2327)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>I used the JBuilder-Trial to build another HelloWorld.jar and this could be deployed fine. So I think there is something missing, but what?
Here is my xdoclet-build.xml:
<?xml version=”1.0″ encoding=”UTF-8″?>
<project default=”_generation_” name=”XDoclet Generator”>
<path id=”xdoclet.classpath”>
<fileset dir=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.jboss.ide.eclipse.xdoclet.core_3.7.200″>
<include name=”*.jar”/>
</fileset><pathelement location=”C:/Projekte/HelloWorld/classes”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/rt.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/sunrsasign.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/jsse.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/jce.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/charsets.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/ext/dnsns.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/ext/ldapsec.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/ext/localedata.jar”/>
<pathelement location=”C:/j2sdk1.4.2_04/jre/lib/ext/sunjce_provider.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/activation.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/javax.servlet.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jboss-j2ee.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jboss-jaas.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jsse.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jts.jar”/>
<pathelement location=”C:/Programme/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/mail.jar”/>
</path>
<target name=”_generation_” depends=”N10004″/>
<target name=”N10004″ description=”Standard EJB”>
<taskdef classpathref=”xdoclet.classpath” classname=”xdoclet.modules.ejb.EjbDocletTask” name=”ejbdoclet”/><ejbdoclet ejbSpec=”2.0″ excludedTags=”@version,@author,@todo” destDir=”src” verbose=”true” addedTags=”@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}” >
<fileset dir=”src” includes=”**/*.java” >
</fileset>
<packageSubstitution packages=”ejb” substituteWith=”interfaces” >
</packageSubstitution>
<remoteinterface>
</remoteinterface>
<homeinterface>
</homeinterface>
<session>
</session>
<deploymentdescriptor validateXML=”true” destDir=”src/META-INF” >
</deploymentdescriptor>
<weblogic>
</weblogic>
</ejbdoclet></target>
</project>I hope you can help 🙄
Stephan
August 16, 2004 at 8:34 am #212101
Scott AndersonParticipantStephan,
It’s most likely an XDoclet configuration issue. I’d compare the deployment descriptors in the jar that does load to those in the jar that doesn’t in order to find out what’s missing, since the WebLogic error is far from illuminating. Once you know the difference, it should be easy to correct it.
December 28, 2004 at 2:57 pm #221925
reza shahbaziMemberIn my case,
view-type=”remote” is not working properly,When view-type is local, It generates local interfaces, but when view-type is remote, remote interfaces are not generates and we will see NullPointerException
December 28, 2004 at 3:16 pm #221926
reza shahbaziMemberI found out why it is not generating the remoteinterface.
Make sure Bean class name is not same as name tag (@ejb.bean name=””)For example: MyEjbEean.java should have @ejb.bean name=”MyEjb”
I also add transaction-type = “Container” to prevent assignDefaultTXAttributesIfNecessary exception.
December 28, 2004 at 6:53 pm #221933
GregMemberrshahbazi,
I’m glad you got it working. I would recommend upgrading to MyEclipse 3.8.3 for future projects because the new EJB wizards will handle this MyEjbBean.java -> @ejb.bean name=”MyEJB” correctly now. They also support EJB named with a suffix of EJB, ie, PersonEJB.java. The other behavior you were seeing could have been due to having a package name that ended with .ejb. The Standard EJB configuration is expecting a “.ejb” suffix in the package name to work correctly. I problem you could see if you don’t use this suffix is the Remote Interface wouldn’t be created. The new 3.8.3 EJB wizards take care of this by warning the user if the package name doesn’t end with “.ejb”.
-
AuthorPosts
