Okay, I am trying to move some code from XDoclet 1.2.x to XDoclet2 1.0.2. It is not going well. I started simple by just trying to generate the support files for one EJB. No matter what I write in the doclet tags, the behavior is always the same: generate four empty classes, HelloLocal.java, HelloLocalHome.java, HelloRemote.java, and HelloRemoteHome.java. Here is the body of one of those classes:
 
 
 
// Generated file. Do not edit.
// Generated by org.xdoclet.plugin.ejb.interfaces.LocalInterfacePlugin from examples.ch03.HelloBean
package examples.ch03;
 
public interface HelloLocal extends javax.ejb.EJBLocalObject {
}
Any help would be appreciated. I was interested in XDoclet2 because I have a lot of custom templating to do and assumed that it would be easier with XDoclet2, but I can't even get it to do the basic things I need.
 
Thanks,
Stan
 
 
Here is my ant target:
 

    <target name="xdoclet-ejb" depends="prepare">

 <taskdef name="xdoclet"
   classname="org.xdoclet.ant.XDocletTask"
   classpathref="xdoclet.classpath"/> 

 <xdoclet>      
     <!-- specifies the file-set that carry xdoclet2 tags-->
     <fileset dir="${source.home}">
  <include name="**/*.java"/>       
     </fileset>     

     <!-- invoke the plugin --> 
     <component classname="org.xdoclet.plugin.ejb.EjbConfig"/>
    
     <component classname="org.xdoclet.plugin.ejb.interfaces.RemoteHomeInterfacePlugin"
         destdir="${generated.xdoclet}"/>
    
     <component classname="org.xdoclet.plugin.ejb.interfaces.LocalHomeInterfacePlugin"
         destdir="${generated.xdoclet}"/>
    
     <component classname="org.xdoclet.plugin.ejb.interfaces.RemoteInterfacePlugin"
         destdir="${generated.xdoclet}"/>
    
     <component classname="org.xdoclet.plugin.ejb.interfaces.LocalInterfacePlugin"
         destdir="${generated.xdoclet}"/>
    
 </xdoclet>
    </target>

 

 

 

Here is the comment section of my code:

/**
 * Demonstration stateless session bean.
 *
 * @ejb.bean
 *      generate="true"
 *      name="HelloWorld"
 *      type="Stateless"
 *      jndi-name="ejb/Hello"
 *
 * @ejb.interface
 *      remote-class="examples.ch03.Hello"
 *      local-class="examples.ch03.HelloLocalXN"
 *
 * @ejb.home
 *      remote-class="examples.ch03.HelloHome"
 *      local-class="examples.ch03.HelloHomeLocalXN"
 *
 */
public class HelloBean implements javax.ejb.SessionBean

 

 

 

Here is the velocity.log file contents:

2005-11-03 09:45:39,274 - SimpleLog4JLogSystem initialized using logfile 'velocity.log'
2005-11-03 09:45:39,276 - **************************************************************
2005-11-03 09:45:39,276 - Starting Jakarta Velocity v1.4
2005-11-03 09:45:39,276 - RuntimeInstance initializing.
2005-11-03 09:45:39,276 - Default Properties File: org/apache/velocity/runtime/defaults/velocity.propert
ies
2005-11-03 09:45:39,276 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogSystem
2005-11-03 09:45:39,276 - Couldn't find class org.apache.velocity.runtime.log.AvalonLogSystem or necessa
ry supporting classes in classpath. Exception : java.lang.NoClassDefFoundError: org/apache/log/format/Fo
rmatter
2005-11-03 09:45:39,276 - Trying to use logger class org.apache.velocity.runtime.log.SimpleLog4JLogSyste
m
2005-11-03 09:45:39,277 - Using logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem
2005-11-03 09:45:39,296 - Default ResourceManager initializing. (class org.apache.velocity.runtime.resou
rce.ResourceManagerImpl)
2005-11-03 09:45:39,313 - Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.Clas
spathResourceLoader
2005-11-03 09:45:39,314 - ClasspathResourceLoader : initialization starting.
2005-11-03 09:45:39,314 - ClasspathResourceLoader : initialization complete.
2005-11-03 09:45:39,329 - ResourceCache : initialized. (class org.apache.velocity.runtime.resource.Resou
rceCacheImpl)
2005-11-03 09:45:39,329 - Default ResourceManager initialization complete.
2005-11-03 09:45:39,345 - Loaded System Directive: org.apache.velocity.runtime.directive.Literal
2005-11-03 09:45:39,361 - Loaded System Directive: org.apache.velocity.runtime.directive.Macro
2005-11-03 09:45:39,386 - Loaded System Directive: org.apache.velocity.runtime.directive.Parse
2005-11-03 09:45:39,402 - Loaded System Directive: org.apache.velocity.runtime.directive.Include
2005-11-03 09:45:39,412 - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
2005-11-03 09:45:39,634 - Created: 20 parsers.
2005-11-03 09:45:39,712 - Velocimacro : initialization starting.
2005-11-03 09:45:39,713 - Velocimacro : adding VMs from VM library template : VM_global_library.vm
2005-11-03 09:45:40,563 - ResourceManager : unable to find resource 'VM_global_library.vm' in any resour
ce loader.
2005-11-03 09:45:40,563 - Velocimacro : error using  VM library template VM_global_library.vm : org.apac
he.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
2005-11-03 09:45:40,563 - Velocimacro :  VM library template macro registration complete.
2005-11-03 09:45:40,564 - Velocimacro : allowInline = true : VMs can be defined inline in templates
2005-11-03 09:45:40,564 - Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT repla
ce previous VM definitions
2005-11-03 09:45:40,564 - Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in
 scope if allowed.
2005-11-03 09:45:40,564 - Velocimacro : messages on  : VM system will output logging messages
2005-11-03 09:45:40,564 - Velocimacro : autoload off  : VM system will not automatically reload global l
ibrary macros
2005-11-03 09:45:40,564 - Velocimacro : initialization complete.
2005-11-03 09:45:40,564 - Velocity successfully started.
2005-11-03 09:45:49,319 - ResourceManager : found org/xdoclet/plugin/ejb/interfaces/RemoteHomeInterfaceP
lugin.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2005-11-03 09:45:53,801 - ResourceManager : found org/xdoclet/plugin/ejb/interfaces/LocalHomeInterfacePl
ugin.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2005-11-03 09:45:56,629 - ResourceManager : found org/xdoclet/plugin/ejb/interfaces/RemoteInterfacePlugi
n.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2005-11-03 09:45:58,391 - ResourceManager : found org/xdoclet/plugin/ejb/interfaces/LocalInterfacePlugin
.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

 


Reply via email to