For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 2 replies, 2 voices, and was last updated 22 years ago by
Riyad Kalla.
-
AuthorPosts
-
ScottMemberHow do I get myeclipse to write the weblogic specific weblogic-ejb-jar.xml? I am repeatedly getting an error when attempting to compile a weblogic split directory structure via the wlappc ant task. I have verified that my ant script is creating the structure correctly (all the other modules – including other ejb modules – build fine). I created by hand an initial weblogic-ejb-jar.xml file, but there is not alot in it (this is a simple ejb module that contains three session beans). It would appear by the error that something is up with my transaction statements but I think they are correct. Im wondering what the <weblogic/> xdoclet task would do for specific deployment descriptors but do not see where to enable it in the xdoclet project properties settings? So how do I get it to be automatically created?
Thanks in advance,
Scott
The xdoclet generated ejb.xml file is as such:
————————————————————————————-<?xml version=”1.0″ encoding=”UTF-8″?>
<!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 >
<description><![CDATA[No Description.]]></description>
<display-name>Generated by XDoclet</display-name><enterprise-beans>
<!– Session Beans –>
<session >
<description><![CDATA[AdministrationManager EJB]]></description>
<display-name>AdministrationManager</display-name><ejb-name>AdministrationManager</ejb-name>
<home>com.jnj.depuy.wwl.ejb.administrationmanager.AdministrationManagerHome</home>
<remote>com.jnj.depuy.wwl.ejb.administrationmanager.AdministrationManager</remote>
<local-home>com.jnj.depuy.wwl.ejb.administrationmanager.AdministrationManagerLocalHome</local-home>
<local>com.jnj.depuy.wwl.ejb.administrationmanager.AdministrationManagerLocal</local>
<ejb-class>com.jnj.depuy.wwl.ejb.administrationmanager.AdministrationManager</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type></session>
<session >
<description><![CDATA[SequenceManager EJB]]></description>
<display-name>SequenceManager</display-name><ejb-name>SequenceManager</ejb-name>
<home>com.jnj.depuy.wwl.ejb.sequencemanager.SequenceManagerHome</home>
<remote>com.jnj.depuy.wwl.ejb.sequencemanager.SequenceManager</remote>
<local-home>com.jnj.depuy.wwl.ejb.sequencemanager.SequenceManagerLocalHome</local-home>
<local>com.jnj.depuy.wwl.ejb.sequencemanager.SequenceManagerLocal</local>
<ejb-class>com.jnj.depuy.wwl.ejb.sequencemanager.SequenceManager</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type></session>
<session >
<description><![CDATA[]]></description><ejb-name>GlossaryManager</ejb-name>
<home>com.jnj.depuy.wwl.ejb.glossarymanager.GlossaryManagerHome</home>
<remote>com.jnj.depuy.wwl.ejb.glossarymanager.GlossaryManager</remote>
<local-home>com.jnj.depuy.wwl.ejb.glossarymanager.GlossaryManagerLocalHome</local-home>
<local>com.jnj.depuy.wwl.ejb.glossarymanager.GlossaryManagerLocal</local>
<ejb-class>com.jnj.depuy.wwl.ejb.glossarymanager.GlossaryManager</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type></session>
<!–
To add session beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
–><!– Entity Beans –>
<!–
To add entity beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
–><!– Message Driven Beans –>
<!–
To add message driven beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
–></enterprise-beans>
<!– Relationships –>
<!– Assembly Descriptor –>
<assembly-descriptor >
<container-transaction>
<method>
<ejb-name>AdministrationManager</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>SequenceManager</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>GlossaryManager</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction><!– finder permissions –>
<!– finder permissions –>
<!– finder permissions –>
<!– transactions –>
<!– finder transactions –>
</assembly-descriptor></ejb-jar>
The weblogic-ejb-jar file is as such:
————————————————————————————-<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE weblogic-ejb-jar PUBLIC “-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN” “http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd” ><!– Generated XML! –>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>AdministrationManager</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<jndi-name>ejb.AdministrationManagerHome</jndi-name>
<local-jndi-name>ejb.AdministrationManagerLocalHome</local-jndi-name>
</weblogic-enterprise-bean><weblogic-enterprise-bean>
<ejb-name>SequenceManager</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<jndi-name>ejb.SequenceManagerHome</jndi-name>
<local-jndi-name>ejb.SequenceManagerLocalHome</local-jndi-name>
</weblogic-enterprise-bean><weblogic-enterprise-bean>
<ejb-name>GlossaryManager</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<jndi-name>ejb/GlossaryManagerHome</jndi-name>
<local-jndi-name>ejb/GlossaryManagerLocalHome</local-jndi-name>
</weblogic-enterprise-bean></weblogic-ejb-jar>
The error I keep getting is:
————————————————————————————-BUILD FAILED
file:C:/My Sources/WWL/wwlear/build.xml:211: weblogic.utils.compiler.ToolFailureException: [J2EE:160119]Appc is unable to process the file ‘C:\My Builds\WWL\build’. The following error occurred:java.lang.NullPointerException
at weblogic.ejb20.deployer.SessionBeanInfoImpl.assignDefaultTXAttributesIfNecessary(SessionBeanInfoImpl.java:291)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:807)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:240)
at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:155)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:415)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:387)
at weblogic.appc.compileEJB(appc.java:802)
at weblogic.appc.compileModules(appc.java:621)
at weblogic.appc.compileEAR(appc.java:733)
at weblogic.appc.compileInput(appc.java:458)
at weblogic.appc.runBody(appc.java:184)
at weblogic.utils.compiler.Tool.run(Tool.java:146)
at weblogic.utils.compiler.Tool.run(Tool.java:103)
at weblogic.appc.main(appc.java:1028)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:164)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:415)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:387)
at weblogic.appc.compileEJB(appc.java:802)
at weblogic.appc.compileModules(appc.java:621)
at weblogic.appc.compileEAR(appc.java:733)
at weblogic.appc.compileInput(appc.java:458)
at weblogic.appc.runBody(appc.java:184)
at weblogic.utils.compiler.Tool.run(Tool.java:146)
at weblogic.utils.compiler.Tool.run(Tool.java:103)
at weblogic.appc.main(appc.java:1028)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)August 11, 2004 at 9:29 pm #211896
ScottMemberOk so I missed the <weblogic/> xdoclet ant task … I have it working now … The null pointer exceptions from wlappc appear to be caused by the myeclipse ejb creation wizard creating one of the interface class names the same as the bean class.
August 12, 2004 at 10:31 am #211924
Riyad KallaMemberGreat, thank you for closing the loop with us.
-
AuthorPosts
