Hi all!

I have found the reason fort he problem by myself. It was a classpath issue.
In the <bind>-element of the ant-task I have a reference to my classpath
definition:

    <bind binding="${src.dir}/de/project/.../binding.xml">
      <classpath refid="classpath"/>
    </bind>

Of course this definition is different in the second project I integrated
JiBX into. What is required is a classpath entry that points exactly to the
directory where the package-definition starts. So you store the classes of
your build in /project/build/classes/de/project/... and your packages start
with de.project... there must be an entry like

  <pathelement path="${build.dir}/classes"/>

If ${build.dir} is /build. In my project there was only

  <pathelement path="${build.dir} "/>

So I added the new entry and then it worked. This might look like a simple
issue but the JiBX-exception message misdirected me a bit, since it looked
like it would find the file but could not write to it. Maybe someone should
add some more differentiated error messages, to give the users better hints
what they're doing wrong.

Greetings
 
Stefan

> -----Ursprüngliche Nachricht-----
> Date: Tue, 16 Sep 2008 11:26:11 +0200
> From: "Stefan Zauner" <[EMAIL PROTECTED]>
> Subject: Re: [jibx-users] One or more <mapping> elements for
>       modifiable      classes must be defined in <binding>
> To: <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain;     charset="us-ascii"
> 
> 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


-------------------------------------------------------------------------
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

Reply via email to