[ http://jira.codehaus.org/browse/JIBX-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=180632#action_180632 ]
Nigel Charman commented on JIBX-299: ------------------------------------ I'm guessing you're missing jibx-run.jar from the classpath passed to the bind task. See the following from http://jibx.sourceforge.net/bindcomp.html: One issue to note with the Ant task is that if you're using default values you'll need to include the jibx-run.jar from the distribution in the classpath passed when you invoke the task: <!-- Run JiBX binding compiler --> <bind verbose="true" load="true" binding="binding.xml"> <classpath> <pathelement path="classes"/> <pathelement location="${jibx-lib}/jibx-run.jar"/> </classpath> </bind> > Setting default on an optional boolean value causes compiler error > ------------------------------------------------------------------ > > Key: JIBX-299 > URL: http://jira.codehaus.org/browse/JIBX-299 > Project: JiBX > Issue Type: Bug > Components: core > Affects Versions: JiBX 1.1.6 > Environment: Ubuntu 9.04, running Ant build from Eclipse as a project > builder. > Reporter: Colin Sharples > > I have an optional boolean property where I want the default value to be true > rather than false, so I put in a binding like this: > <value name="stationary" field="stationary" style="attribute" > usage="optional" default="true" /> > This gave the following compiler error: > [bind] *** Error during code generation for file 'binding.xml' - please > enter a bug report for this error in Jira if the problem is not listed as > fixed on the online status page *** > [bind] org.jibx.runtime.JiBXException: Deserializer class > org.jibx.runtime.Utility not found for converting default value > [bind] at > org.jibx.binding.def.PrimitiveStringConversion.convertDefault(PrimitiveStringConversion.java:412) > [bind] at > org.jibx.binding.def.PrimitiveStringConversion.derive(PrimitiveStringConversion.java:508) > [bind] at > org.jibx.binding.def.BindingBuilder.unmarshalValue(BindingBuilder.java:650) > [bind] at > org.jibx.binding.def.BindingBuilder.unmarshalStructureChildren(BindingBuilder.java:848) > [bind] at > org.jibx.binding.def.BindingBuilder.unmarshalMapping(BindingBuilder.java:1651) > [bind] at > org.jibx.binding.def.BindingBuilder.unmarshalMappings(BindingBuilder.java:983) > [bind] at > org.jibx.binding.def.BindingBuilder.unmarshalBindingDefinition(BindingBuilder.java:1799) > [bind] at org.jibx.binding.Utility.loadBinding(Utility.java:293) > [bind] at org.jibx.binding.Utility.loadFileBinding(Utility.java:413) > [bind] at org.jibx.binding.Compile.compile(Compile.java:296) > [bind] at > org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248) > [bind] at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > [bind] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [bind] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [bind] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [bind] at java.lang.reflect.Method.invoke(Method.java:597) > [bind] at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > [bind] at org.apache.tools.ant.Task.perform(Task.java:348) > [bind] at org.apache.tools.ant.Target.execute(Target.java:357) > [bind] at org.apache.tools.ant.Target.performTasks(Target.java:385) > [bind] at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > [bind] at org.apache.tools.ant.Project.executeTarget(Project.java:1298) > [bind] at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > [bind] at > org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) > [bind] at > org.apache.tools.ant.Project.executeTargets(Project.java:1181) > [bind] at > org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423) > [bind] at > org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137) > I then put in the type as follows, and got: > <value name="stationary" field="stationary" style="attribute" > usage="optional" default="true" type="boolean.default" /> > [bind] Error: Unable to load class boolean.default; on value element at > (line 95, col 124, in binding.xml) > It sounds like something is up with the classpath, but both the bind and the > runtime jars are definitely on the ant task's classpath. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ jibx-devs mailing list jibx-devs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-devs