Hi,
 
I have been banging my head against a wall trying to upgrade our XDoclet from 1.2.0 Beta 2 to 1.2.2.
 
I fear that this is a trivial oversight, but I can't seem to figure it out.
 
All I did for the upgrade is replace the XDoclet jars in our lib directory. I verified that taskdefs haven't changed in the XDoclet docs.
 <target name="init.xdoclet" depends="init">
  <taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="lib.classpath"/>
  <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="lib.classpath"/>
  <taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask" classpathref="lib.classpath"/>
 </target>
 
I really dumbed down one of current tasks that uses XDoclet to this:
<target name="short.xdoclet" depends="init.xdoclet">
  <ejbdoclet destdir="${src.root}" mergedir="parent-fake-to-debug" excludedtags="@author,@todo,@copyright" addedtags="@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}" ejbspec="2.0" force="false" verbose="true">
    <fileset dir="${src.root}">
       <include name="com/mentor/supportnet/profile/ProfileBean.java"/>
    </fileset>
    <valueobject/>
    <localinterface/>
    <localhomeinterface/>
    <remoteinterface/>
    <homeinterface/>
    <entitypk/>
    <entitybmp/>
    <deploymentdescriptor destdir="${tmp.root}/supportnet/profile/meta-inf" validatexml="true" mergedir="${tmp.root}/supportnet/profile"/>
    <weblogic version="8.1" xmlencoding="UTF-8"  createtables="Disabled" destdir="${tmp.root}/supportnet/profile/meta-inf" validatexml="true" persistence="weblogic"/>
  </ejbdoclet>
</target>
 
The error I get is:
[ejbdoclet] Generating Local interface for 'com.mentor.supportnet.profile.ProfileBean'.
[ejbdoclet] java.lang.NullPointerException
[ejbdoclet]     at xdoclet.template.TemplateEngine.start(TemplateEngine.java:424)
[ejbdoclet]     at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:561)
[ejbdoclet]     at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:778)
[ejbdoclet]     at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:678)
[ejbdoclet]     at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:595)
[ejbdoclet]     at xdoclet.TemplateSubTask.execute(TemplateSubTask.java:487)
[ejbdoclet]     at xdoclet.XDocletMain.start(XDocletMain.java:48)
[ejbdoclet]     at xdoclet.DocletTask.start(DocletTask.java:468)
[ejbdoclet]     at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
[ejbdoclet]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[ejbdoclet]     at org.apache.tools.ant.Task.perform(Task.java:364)
[ejbdoclet]     at org.apache.tools.ant.Target.execute(Target.java:301)
[ejbdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java:328)
[ejbdoclet]     at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[ejbdoclet]     at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[ejbdoclet]     at org.apache.tools.ant.Main.runBuild(Main.java:632)
[ejbdoclet]     at org.apache.tools.ant.Main.startAnt(Main.java:183)
[ejbdoclet]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[ejbdoclet]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
 
The reason I think it is probably something trivial is I took this bean (ProfileBean) and put it in the sample directory that came with the XDoclet distro. It generated it ok. I also took the sample beans from the sample and put them in our src directory. This failed the same way.
 
I appreciate your help.
 
Mike
 
 

Reply via email to