Hello,

I am trying to generate Hibernate doc from annotated classes but I get
an exception (see end of message). What can I do?
Is it a problem: in my pom.xml? in Maven Hibernate plugin? in Hibernate Tools?

Maven configuration:
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <components>                                
                        <component>
                            <name>hbm2doc</name>

<implementation>annotationconfiguration</implementation>

<outputDirectory>target/hibernate3/hbm2doc</outputDirectory>
                        </component>
                    </components>
                    <componentProperties>

<configurationfile>hibernateConfig.xml</configurationfile>
                        <jdk5>true</jdk5>
                    </componentProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.oracle</groupId>
                        <artifactId>ojdbc14</artifactId>
                        <version>10.2.0.3.0</version>
                    </dependency>
                </dependencies>
            </plugin>


Exception Stack Trace
org.hibernate.tool.hbm2x.ExporterException: Error while processing
template doc/tables/table.ftl
        at 
org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:257)
        at 
org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67)
        at 
org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28)
        at 
org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:97)
        at 
org.hibernate.tool.hbm2x.DocExporter.processTemplate(DocExporter.java:614)
        at 
org.hibernate.tool.hbm2x.DocExporter.generateTablesDetails(DocExporter.java:415)
        at org.hibernate.tool.hbm2x.DocExporter.doStart(DocExporter.java:154)
        at 
org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
        at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExporterMojo.java:268)
        at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:140)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: freemarker.template.TemplateModelException: Method public
java.lang.String
org.hibernate.tool.hbm2x.doc.DocFileManager.getRef(org.hibernate.tool.hbm2x.doc.DocFile,org.hibernate.tool.hbm2x.doc.DocFile)
threw an exception when invoked on
[EMAIL PROTECTED]
        at 
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
        at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        at freemarker.core.Expression.getStringValue(Expression.java:93)
        at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)
        at freemarker.core.Environment.visit(Environment.java:351)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:196)
        at freemarker.core.Environment.process(Environment.java:176)
        at freemarker.template.Template.process(Template.java:232)
        at 
org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:251)
        ... 27 more
Caused by: java.lang.IllegalArgumentException: To cannot be null.
        at 
org.hibernate.tool.hbm2x.doc.DocFileManager.getRef(DocFileManager.java:466)
        at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:616)
        at 
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113)
        ... 47 more

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to