Hi again!
I'm using the latest version of JiBX (1.1.6a) and also tried the
verbose="true"-option which only showed me some used paths:
[bind] Using the following paths:
[bind] D:\...\antlr-2.7.6.jar
[bind] .
[bind] .
[bind] .
[bind] D:\...\ojdbc14.jar
[bind] D:\Eigene Dateien von Stefan\workspace\project\build
[bind] Using the following binding paths:
[bind] src/de/project/business/quality/constraints/binding.xml
[bind] Running binding compiler version jibx_1_1_6a
Since this was not very informative I added some text-output to the JiBX
code and used the altered libs. By doing that at least I found out, that the
reason for the error is that the m_isWritable-flag in the class ClassFile is
false and therefore the method isModifiable() also returns false. I just can
not figure out why. The constructor used for creating the ClassFile-instance
is the fourth, that sets the m_isWritable flag to true and I did not find
any code by that this value could be altered afterwards (of course there
must me some).
Well summing up the problem seems to be, that JiBX can not write to the
class, now I have to find out why. I would be very grateful for any help.
By the way I also tried to use the binding-file in the working project and
just altered the path to classes in the build.xml -> same error. I also
tried to use a part of the binding.xml of the working project in the new
project and pointed to classes in the new project -< same error. The only
way it works is using only files of the already working project :(
Greetings
Stefan
> ------------------------------
>
> Message: 4
> Date: Mon, 15 Sep 2008 22:32:03 +1200
> From: Nigel Charman <[EMAIL PROTECTED]>
> Subject: Re: [jibx-users] One or more <mapping> elements for
> modifiable classes must be defined in <binding>
> To: JiBX users <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> Hi Stefan
>
> Your binding works fine for me, using the Eclipse JiBX 1.1.6 plugin on
> Linux.
>
> Try adding verbose=true to your ant bind task to generate extra debug
> information. Also, if you're not using the latest version (1.1.6a), you
> should try it with that version.
>
> nigel.
>
>
> Stefan Zauner wrote:
> > Hello!
> >
> > I used Jibx in a project and it worked well for my purpose so that I
> want to
> > use it again in the next project. But using the same configuration I now
> > have big problems getting it to work again.
> > Starting with a very simple binding every try to compile results in the
> > following exception:
> >
> > [echo] Running JiBX binding compiler
> > [bind] Error running binding compiler
> > [bind]
> > [bind] *** Error during code generation for file
> > 'src/de/project/business/quality/constraints/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: One or more <mapping>
> elements
> > for modifiable classes must be defined in <binding>
> > [bind] at
> org.jibx.binding.Utility.loadBinding(Utility.java:317)
> > [bind] at
> > org.jibx.binding.Utility.loadFileBinding(Utility.java:408)
> > [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.GeneratedMethodAccessor1.invoke(Unknown
> > Source)
> > [bind] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> > Source)
> > [bind] at java.lang.reflect.Method.invoke(Unknown Source)
> > [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
> .j
> > ava:41)
> > [bind] at
> >
> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTarge
> ts
> > (EclipseDefaultExecutor.java:32)
> > [bind] at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> > [bind] at
> >
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRu
> nn
> > er.java:423)
> > [bind] at
> >
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntR
> un
> > ner.java:137)
> >
> >
> > Here's my binding file:
> >
> > <binding direction="input">
> > <mapping name="constraint"
> > class="de.project.business.quality.constraints.Constraint">
> > <value name="message" field="message"/>
> > </mapping>
> > </binding>
> >
> > And the corresponding java-class:
> >
> > package de.project.business.quality.constraints;
> >
> > public class Constraint {
> > protected String message;
> >
> > public static String serializeCompValue(Comparable<Object> value) {
> > return value.toString();
> > }
> >
> > public String getMessage() {
> > return message;
> > }
> >
> > public void setMessage(String message) {
> > this.message = message;
> > }
> > }
> >
> > Jibx obviously finds the class-file for this code, because it doesn't
> > complain about not finding the file which it does if I alter the path in
> the
> > binding file. So what remains is that the file is not modifiable, but I
> can
> > not imagine why it should not be.
> > Any suggestion?
> >
> > (Actually my whole binding is much more complex but I continuously
> removed
> > items from it to find out the cause for the exception till I ended here)
> >
> >
> > ------------------------------------------------------------------------
> -
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > jibx-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jibx-users
> >
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users