logo       

Re: Re: [Xdoclet-user] problem trying to run ejbdoclet with xdoclet1.2: msg#00031

java.jboss.user

Subject: Re: Re: [Xdoclet-user] problem trying to run ejbdoclet with xdoclet1.2

Oops; sorry to tek1 and jboss-user subscribers.

When I re-added the user list address, I forgot my context and typed in jboss-user when I meant to type in xdoclet-user.

Silly me,
David

--

David Ward wrote:
Please do a "Reply-All" not just "Reply" to user list emails. That way everyone can benefit from the discussion.

Concerning your problem:

1) Don't use classpathref in ejbdoclet; you only need it in taskdef.
2) Don't use sourcepaths in 1.2. Use nested filesets.

Here are some snippets from one of my working xdoclet 1.2 build files:

In ${lib.home}, I have:
commons-logging.jar
xdoclet-ejb-module.jar
xdoclet.jar
xdoclet-jboss-module.jar
xdoclet-jmx-module.jar
xdoclet-web-module.jar
xjavadoc.jar

...
<path id="xdoclet.classpath">
<fileset dir="${lib.home}" includes="*.jar"/>
<pathelement location="${jboss.lib}/log4j.jar"/>
<pathelement location="${jboss.lib}/jboss-j2ee.jar"/>
<pathelement location="${jboss.lib}/javax.servlet.jar"/>
</path>

<path id="build.classpath">

<pathelement location="${build.home}"/>
<pathelement location="${jboss.lib}/jboss-j2ee.jar"/>
<pathelement location="${jboss.lib}/javax.servlet.jar"/>
<pathelement location="${jboss.lib}/axis.jar"/>
</path>

<target name="init">
<taskdef
name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="xdoclet.classpath"/>
<taskdef
name="webdoclet"
classname="xdoclet.modules.web.WebDocletTask"
classpathref="xdoclet.classpath"/>

</target>

<target name="prepare" depends="init">
<mkdir dir="${build.home}"/>
<mkdir dir="${dist.home}"/>
<mkdir dir="${javadoc.home}"/>
<mkdir dir="${gen.etc.home}/META-INF"/>
<mkdir dir="${gen.etc.home}/WEB-INF"/>
<mkdir dir="${gen.src.home}"/>

</target>
<target name="generate" depends="prepare">
<ejbdoclet destdir="${gen.src.home}" ejbspec="2.0" verbose="true">
<fileset dir="${src.home}" includes="**/ejb/*Bean.java"/>
<remoteinterface/>
<homeinterface/>
<localinterface/>
<localhomeinterface/>

<valueobject pattern="{0}Data">
<packageSubstitution packages="ejb" substituteWith="data"/>
</valueobject>
<utilobject/>
<deploymentdescriptor destdir="${gen.etc.home}/META-INF"/>
<jboss version="3.0"
destdir="${gen.etc.home}/META-INF"
debug="true"
datasource="java:/DefaultDS"
typemapping="Hypersonic SQL"/>
</ejbdoclet>
...

xdoclet.classpath is used for java and xml generation, and build.classpath is used for compilation (where I don't need xdoclet anymore).

Hope this helps,
David

--


tek1 wrote:

thank you for your reply david.

i tried putting commons-logging.jar in my classpathref of both ejbdoclet and the taskdef defining the class that used for ejbdoclet, as follows:

<target name="castor" depends="clean">

<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="classpath.main"/>

<ejbdoclet sourcepath="${src.dir}" destdir="${config_gen.dir}" classpathref="classpath.main">

<fileset dir="${src.dir}">
<include name="entity/*.java" />
</fileset>

<castormapping/>

</ejbdoclet>
</target>


however, i'm still getting the following error:

BUILD FAILED
d:\dev\samples\castor\user2\build.xml:175: Could not create task of type: ejbdoc
let due to org.apache.commons.logging.LogConfigurationException: java.lang.Class
NotFoundException: org.apache.commons.logging.impl.LogFactoryImpl



any ideas? thanks.




At 09:39 02/07/01 -0400, you wrote:

XDoclet 1.2 uses Jakarta Commons Logging, (http://jakarta.apache.org/commons/logging/api/index.html) which can use JDK1.4 logging or Log4J logging (which was chosen) under the hood.

Thus, you need commons-logging.jar in your claspathref in your ejbdoclet taskdef. You can get it from your xdoclet cvs workspace in xdoclet-all/xdoclet/lib/commons-logging.jar.

David









-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise