facebook

XDoclet failing

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #220161 Reply

    Scott
    Member

    When 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,
    Scott

    #220203 Reply

    Greg
    Member

    Is 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"
    #220229 Reply

    Scott
    Member

    Hey 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

    #220253 Reply

    Riyad Kalla
    Member

    Scott,
    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?

    #220267 Reply

    Scott
    Member

    I used the wizard and filled in the blanks. The XDoclet block of annotation was written by the plug-in.

    #220270 Reply

    Riyad Kalla
    Member

    The XDoclet block of annotation was written by the plug-in.

    Now-now, don’t blame the plugin.

    I’m kidding, I have no clue.

    #220276 Reply

    Scott
    Member

    Riyad —

    Now-now, don’t say you have no clue.

    I’m kidding, why doesn’t this work?

    Scott

    #220281 Reply

    Greg
    Member

    Scott,

    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.

    #220344 Reply

    Scott
    Member

    Greg —

    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

    #220345 Reply

    Riyad Kalla
    Member

    Scott,
    Switch to the Navigator view, look in your project root, is there a .xdoclet file?

    #220348 Reply

    Scott
    Member

    <?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>

    #220445 Reply

    Scott
    Member

    Any ideas?

    #220448 Reply

    Greg
    Member

    I 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.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: XDoclet failing

You must be logged in to post in the forum log in