- This topic has 12 replies, 3 voices, and was last updated 20 years, 7 months ago by
Greg.
-
AuthorPosts
-
ScottMemberWhen I run XDoclet over an EJB, I am getting the following error:
Buildfile: C:\eclipse\workspace\CallCenterEJB\xdoclet-build.xml
N65541:
[ejbdoclet] Deploy TEMPLATE URL: jar:file:/C:/eclipse/plugins/com.genuitec.jboss.ide.eclipse.xdoclet.core_3.8.1/xdoclet-apache-module-1.2.jar!/xdoclet/modules/apache/axis/ejb/resources/axis-deploy_wsdd.xdt
[ejbdoclet] Undeploy TEMPLATE URL: jar:file:/C:/eclipse/plugins/com.genuitec.jboss.ide.eclipse.xdoclet.core_3.8.1/xdoclet-apache-module-1.2.jar!/xdoclet/modules/apache/axis/ejb/resources/axis-undeploy_wsdd.xdt
[ejbdoclet] (XDocletMain.start 47 ) Running <remoteinterface/>
[ejbdoclet] (XDocletMain.start 47 ) Running <localinterface/>
[ejbdoclet] (XDocletMain.start 47 ) Running <homeinterface/>
[ejbdoclet] (XDocletMain.start 47 ) Running <localhomeinterface/>
[ejbdoclet] (XDocletMain.start 47 ) Running <dataobject/>
[ejbdoclet] (XDocletMain.start 47 ) Running <valueobject/>
[ejbdoclet] (XDocletMain.start 47 ) Running <entitypk/>
[ejbdoclet] (XDocletMain.start 47 ) Running <entitycmp/>
[ejbdoclet] (XDocletMain.start 47 ) Running <entitybmp/>
[ejbdoclet] (XDocletMain.start 47 ) Running <session/>
[ejbdoclet] (XDocletMain.start 47 ) Running <dao/>
[ejbdoclet] (XDocletMain.start 47 ) Running <utilobject/>
[ejbdoclet] (XDocletMain.start 47 ) Running <deploymentdescriptor/>
[ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
[ejbdoclet] org.xml.sax.SAXParseException: The content of element type “enterprise-beans” is incomplete, it must match “(session|entity|message-driven)+”.My EJB annotations are as follows:
@ejb.bean name = “CustomerBean”
* type = “CMP”
* cmp-version = “2.x”
* display-name = “CustomerBean”
* description = “CustomerBean EJB”
* view-type = “both”
* jndi-name = “ejb/CustomerBeanHome”
* local-jndi-name = “ejb/CustomerBeanLocalHome”
* primkey-field = “id”
*
* @ejb:util
* generate=”physical”
*
* @ejb.persistence table-name = “customer”
*
* @ejb.finder signature = “eclipse.kickstart.ejb.CustomerBean
* findByPhoneNumber(String phoneNumber)
*
* query = “SELECT OBJECT(c) FROM CustomerBean AS c WHERE c.phoneNumber = ?1”Do you see what I do not? I’m using Weblogic 8.1sp2
Thanks,
ScottNovember 29, 2004 at 11:07 pm #220203
GregMemberIs the @ejb.finder signature=” missing a closing quote? Should it be
* @ejb.finder signature = "eclipse.kickstart.ejb.CustomerBean * findByPhoneNumber(String phoneNumber)" * query = "SELECT OBJECT(c) FROM CustomerBean AS c WHERE c.phoneNumber = ?1"
November 30, 2004 at 9:33 am #220229
ScottMemberHey Greg —
The finder was missing an ending quote! However, after correcting it, I am still getting the same exception. This seems to be the crux of the matter:
[ejbdoclet] org.xml.sax.SAXParseException: The content of element type “enterprise-beans” is incomplete, it must match “(session|entity|message-driven)+”.
Scott
November 30, 2004 at 11:02 am #220253
Riyad KallaMemberScott,
I don’t know EJBs but the DTD wants a session, entity or message-driven bean, where is this type defined in your XDoclet def?November 30, 2004 at 12:21 pm #220267
ScottMemberI used the wizard and filled in the blanks. The XDoclet block of annotation was written by the plug-in.
November 30, 2004 at 12:26 pm #220270
Riyad KallaMemberThe XDoclet block of annotation was written by the plug-in.
Now-now, don’t blame the plugin.
I’m kidding, I have no clue.
November 30, 2004 at 1:31 pm #220276
ScottMemberRiyad —
Now-now, don’t say you have no clue.
I’m kidding, why doesn’t this work?
Scott
November 30, 2004 at 1:52 pm #220281
GregMemberScott,
Could you post your EJB source file along with your .xdoclet file contents so we can see your xdoclet configuration. This should help us debug this problem. If you don’t want to post the entire EJB file, just post the top portion including all of the xdoclet tags.
December 1, 2004 at 10:01 am #220344
ScottMemberGreg —
You will find the “top portion” of my EJB if you scroll up. As far as my .xdoclet file, I’m not sure what you mean.
Scott
December 1, 2004 at 10:02 am #220345
Riyad KallaMemberScott,
Switch to the Navigator view, look in your project root, is there a .xdoclet file?December 1, 2004 at 10:13 am #220348
ScottMember<?xml version=”1.0″ encoding=”UTF-8″?>
<project name=”XDoclet Generator” default=”_generation_”>
<path id=”xdoclet.classpath”>
<fileset dir=”c:/eclipse/plugins/com.genuitec.jboss.ide.eclipse.xdoclet.core_3.8.1″>
<include name=”*.jar”/>
</fileset><pathelement location=”C:/eclipse/workspace/CallCenterEJB/classes”/>
<pathelement location=”C:/java5/jre/lib/rt.jar”/>
<pathelement location=”C:/java5/jre/lib/jsse.jar”/>
<pathelement location=”C:/java5/jre/lib/jce.jar”/>
<pathelement location=”C:/java5/jre/lib/charsets.jar”/>
<pathelement location=”C:/java5/jre/lib/ext/dnsns.jar”/>
<pathelement location=”C:/java5/jre/lib/ext/localedata.jar”/>
<pathelement location=”C:/java5/jre/lib/ext/sunjce_provider.jar”/>
<pathelement location=”C:/java5/jre/lib/ext/sunpkcs11.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/activation.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/javax.servlet.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/javax.servlet.jsp.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-j2ee.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-jaxrpc.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-jsr77.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/jboss-saaj.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/mail.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/namespace.jar”/>
<pathelement location=”c:/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.8.2/data/libraryset/1.4/xml-apis.jar”/>
</path>
<target name=”_generation_” depends=”N65541″/>
<target name=”N65541″ description=”Standard EJB”>
<taskdef name=”ejbdoclet” classname=”xdoclet.modules.ejb.EjbDocletTask” classpathref=”xdoclet.classpath”/><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>
<localinterface></localinterface>
<homeinterface></homeinterface>
<localhomeinterface></localhomeinterface>
<dataobject></dataobject>
<valueobject></valueobject>
<entitypk></entitypk>
<entitycmp></entitycmp>
<entitybmp></entitybmp>
<session></session>
<dao><PackageSubstitution packages=”ejb” substituteWith=”dao” >
</PackageSubstitution>
</dao>
<utilobject includeGUID=”true” cacheHomes=”true” ></utilobject>
<deploymentdescriptor validateXML=”true” destDir=”src/META-INF” ></deploymentdescriptor>
<weblogic poolname=”MySqlConnectionPool” destDir=”src/META-INF” ></weblogic>
</ejbdoclet></target>
</project>December 2, 2004 at 10:41 am #220445
ScottMemberAny ideas?
December 2, 2004 at 10:56 am #220448
GregMemberI used your xdoclet tags with my own entity bean. Plus I added an Xdoclet configuration that matches yours. You could post your .xdoclet file just so I could make sure. But anyways, xdoclet ran fine. The only difference in my environment is that I’m using jdk 1.4.2, not jdk1.5. You could try with a 1.4 jdk just to rule that out.
-
AuthorPosts