[ http://jira.codehaus.org/browse/JIBX-299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Sosnoski reopened JIBX-299: ---------------------------------- Assignee: Dennis Sosnoski This comes up regularly, so I'll take a look to see if I can build a workaround. It seems like I should be able to get the classpath used to load the jibx-run.jar classes and automatically add that to the classpath specified by the user. > 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 > Assignee: Dennis Sosnoski > > 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 ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ jibx-devs mailing list jibx-devs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-devs