Tracked as #1196:
https://sourceforge.net/apps/trac/jooq/ticket/1196

2012/2/29 Lukas Eder <[email protected]>:
> Hi Christopher,
>
> Thanks for this input. Do you use the JDK 6 to run the ant script?
> jOOQ uses JAXB to unmarshal XML configuration files. Since Java 6,
> JAXB is included in the JDK...
> Anyway, I'll add your input to the manual
>
> Thanks
> Lukas
>
> 2012/2/28 Christopher Deckers <[email protected]>:
>> Hi all,
>>
>> This is just for information in case someone has the same issue when
>> trying to create a model through Ant script the way I do it.
>>
>> I have an Ant script that builds my model by directly calling java.
>>
>> This was working:
>>
>>    <target name="generate" description="Generate the classes">
>>        <java
>>            
>> classpath="jars/jooq-2.0.4.jar;jars/jooq-meta-2.0.4.jar;jars/jooq-codegen-2.0.4.jar;jars/jtds.jar;."
>>            classname="org.jooq.util.GenerationTool">
>>            <arg value="/test.properties"/>
>>        </java>
>>    </target>
>>
>> This fails:
>>
>>    <target name="generate" description="Generate the classes">
>>        <java
>>            
>> classpath="jars/jooq-2.0.5.jar;jars/jooq-meta-2.0.5.jar;jars/jooq-codegen-2.0.5.jar;jars/jtds.jar;."
>>            classname="org.jooq.util.GenerationTool">
>>            <arg value="/test.xml"/>
>>        </java>
>>    </target>
>>
>> with the following exception (full log attached):
>> java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
>>
>> The key to solve this is to add this property to the Java task: fork="true"
>>
>>    <target name="generate" description="Generate the classes">
>>        <java fork="true"
>>            
>> classpath="jars/jooq-2.0.5.jar;jars/jooq-meta-2.0.5.jar;jars/jooq-codegen-2.0.5.jar;jars/jtds.jar;."
>>            classname="org.jooq.util.GenerationTool">
>>            <arg value="/test.xml"/>
>>        </java>
>>    </target>
>>
>> The reason seems to be that the system class loader is not able to
>> find the ContextFactory class or something.
>>
>> Hope this helps,
>> -Christopher

Reply via email to