Also here is my target for binding :

<target name="bind" depends="check-binding">
  <echo message="Running JiBX binding xml generator"/>
     <java jar="${jibx-home}/lib/jibx-bind.jar"
           dir="${basedir}/classes" fork="true" failonerror="true">
       <classpath refid="classpath" />
      <arg value="${basedir}/binding.xml" />
      <arg value="${basedir}/src/Publication" />

     </java>
     <echo message="Generated binding xml file"/>
   </target>

Its actually giving me this error when i include the PUblication file ..

error :

JibxSMT\src\Publication (The system cannot find the file specified)

On Thu, Jun 12, 2008 at 2:01 PM, AD <[EMAIL PROTECTED]> wrote:

> now its givingme this error :
>
> Unable to access binding information for class Publication
> Make sure classes generated by the binding compiler are available at
> runtime
> java.lang.ClassNotFoundException:
> JiBX_bindingFactory=JiBX_JibxSMT_bindingFactory
>  at java.net.URLClassLoader$1.run(Unknown Source)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(Unknown Source)
>  at java.lang.ClassLoader.loadClass(Unknown Source)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>  at java.lang.ClassLoader.loadClass(Unknown Source)
>  at
> org.jibx.runtime.BindingDirectory.getFactoryFromName(BindingDirectory.java:106)
>  at org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:211)
>  at Test.main(Test.java:27)
>
>   On Thu, Jun 12, 2008 at 1:51 PM, Harp, George <[EMAIL PROTECTED]>
> wrote:
>
>>  What does your binding file look like?
>>
>>
>>  ------------------------------
>>
>> *From:* [EMAIL PROTECTED] [mailto:
>> [EMAIL PROTECTED] *On Behalf Of *AD
>> *Sent:* Thursday, June 12, 2008 2:45 PM
>> *To:* JiBX users
>>
>> *Subject:* Re: [jibx-users] Jibx Usage - new to Jibx
>>
>>
>>
>> My xmllooks like this :
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Publication>
>> <Subscriber>
>> <ACCTNBR>960767010</ACCTNBR>
>>   <CURRTRNCD>5S</CURRTRNCD>
>>   <BILLSTAT />
>>   <DOLAMT>0.00</DOLAMT>
>>   <CURPROMKEY />
>>   <XFIRSTNAME>MARK</XFIRSTNAME>
>>   <XLASTNAME>RANDALL</XLASTNAME>
>>
>> </Subscriber>
>>
>>   <COMPANY>SERIOUS MAGIC</COMPANY>
>>   <ADDR2>101 PARKSHORE DRIVE, SUITE</ADDR2>
>>   <CITY>FOLSOM</CITY>
>>   <FORNCNTRY />
>>   <STAPROV>CA</STAPROV>
>>   <ZIPCODE>956304726</ZIPCODE>
>>   <LASTACT>LC5509</LASTACT>
>>   <CLASS>2</CLASS>
>>   <PAYSTAT>0</PAYSTAT>
>>   <SUBTYPE>0</SUBTYPE>
>>   <MAILADDRCD>1</MAILADDRCD>
>>   <GRPCODE />
>>   <PHONENBR>9139858000</PHONENBR>
>>   <FAXNUMBR>9139858090</FAXNUMBR>
>>   <ENGTITLE>PRESIDENT</ENGTITLE>
>>   <PERSONLQ />
>>   <MEDIACOD />
>> </Publication>
>>
>> On Thu, Jun 12, 2008 at 1:39 PM, AD <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for reply george .
>>
>>
>>
>> In this line : <mapping name="publication" class="Publication">
>>
>>
>>
>> you mean the class Publication is not there ?
>>
>>
>>
>> i do have compiled class under projectname/classes ..
>>
>> On Thu, Jun 12, 2008 at 1:24 PM, Harp, George <[EMAIL PROTECTED]>
>> wrote:
>>
>> Look at line 2(column14) in your binding file.
>>
>> I think it is saying that you have no definition of Publication.
>>
>>
>>  ------------------------------
>>
>> *From:* [EMAIL PROTECTED] [mailto:
>> [EMAIL PROTECTED] *On Behalf Of *AD
>> *Sent:* Thursday, June 12, 2008 2:22 PM
>> *To:* [EMAIL PROTECTED]; JiBX users
>> *Subject:* Re: [jibx-users] Jibx Usage - new to Jibx
>>
>>
>>
>> hello
>>
>>
>>
>> I am getting this error :
>>
>>
>>
>> org.jibx.runtime.JiBXException: No unmarshaller for element "Publication"
>> (line 2, col 14)
>>  at
>> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2534)
>>  at
>> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2680)
>>  at Test.main(Test.java:34)
>>
>>
>>
>>
>>
>>
>>
>> not sure why it is giving me this error . I have the mapping , binding
>> everything workin ok ..any inputs will be highly appreciated .
>>
>>
>>
>> Thanks
>>
>> -Ajay
>>
>> On Tue, Jun 10, 2008 at 7:33 AM, AD <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for responding
>>
>>
>>
>>
>>
>> I added the classpath entry  and imported the required classes ...but
>> still it says : i am I missing something here ?
>>
>>
>>
>> IBindingFactory cannot be resolved to a type
>>  BindingDirectory cannot be resolved
>>  IUnmarshallingContext cannot be resolved to a type
>>  JiBXException cannot be resolved to a type
>>  e cannot be resolved
>>
>> On Tue, Jun 10, 2008 at 12:16 AM, Varghese C V <[EMAIL PROTECTED]>
>> wrote:
>>
>> It looks like you have dont have jibx-run.jar in your classpath
>>
>>
>> Ajay Deshpande wrote:
>> > Hello
>> >
>> > My source code looks like this : ..When i try to compile : It gives me
>> > an error saying :
>> >
>> > IBindingFactory cannot be resolved to a type
>> >  BindingDirectory cannot be resolved
>> >  IUnmarshallingContext cannot be resolved to a type
>> >  JiBXException cannot be resolved to a type
>> >  e cannot be resolved
>> >
>> > How do i declare the BindingDirectory ..so that i can compile
>> > succesfullY ?
>> >
>> > Inputs will be highly appreciated .
>> >
>> > import org.jibx.runtime.BindingDirectory;
>> > import org.jibx.runtime.IBindingFactory;
>> > import org.jibx.runtime.IMarshallingContext;
>> > import org.jibx.runtime.IUnmarshallingContext;
>> >
>> > import java.io.FileNotFoundException;
>> > public class Test
>> > {
>> >
>> >  //Unmarshall the sample document from a file
>> >  public static void main(String[] args)
>> >  {
>> >   if (args.length < 2)
>> >   {
>> >   System.out.println("Usage: java -cp ... " + "org.jibx.starter.Test
>> > input-file output-file");
>> >   System.exit(0);
>> >   }
>> >   try
>> >   {
>> >           IBindingFactory bfact =
>> > BindingDirectory.getFactory(Publication.class);
>> >             //  unmarshal  information from file
>> >           IUnmarshallingContext uctx =
>> > bfact.createUnmarshallingContext();
>> >           //FileInputStream in = new FileInputStream(args[0]);
>> >           //Object obj = uctx.unmarshalDocument(new
>> > FileInputStream("data.xml"), null);
>> >           Publication publication =
>> > (Publication)uctx.unmarshalDocument("data.xml", null);
>> >
>> >           // we can add code here to alter the unmarshalled question
>> >   }
>> >   catch (FileNotFoundException e)
>> >   {
>> >    e.printStackTrace();
>> >    System.exit(1);
>> >   }
>> >   catch (JiBXException e)
>> >   {
>> >      e.printStackTrace();
>> >      System.exit(1);
>> >   }
>> >   }
>> > }
>>
>> > ------------------------------------------------------------------------
>> >
>> >
>> -------------------------------------------------------------------------
>> > Check out the new SourceForge.net Marketplace.
>> > It's the best place to buy or sell services for
>> > just about anything Open Source.
>> > http://sourceforge.net/services/buy/index.php
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > jibx-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/jibx-users
>> >
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> jibx-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>
>>
>>
>>
>>  ------------------------------
>>
>> The information contained in this communication may be CONFIDENTIAL and is
>> intended only for the use of the recipient(s) named above. If you are not
>> the intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this communication, or any of its contents, is
>> strictly prohibited. If you have received this communication in error,
>> please notify the sender and delete/destroy the original message and any
>> copy of it from your computer or paper files.
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> jibx-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>
>>
>>
>>
>>
>> ------------------------------
>> The information contained in this communication may be CONFIDENTIAL and is
>> intended only for the use of the recipient(s) named above. If you are not
>> the intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this communication, or any of its contents, is
>> strictly prohibited. If you have received this communication in error,
>> please notify the sender and delete/destroy the original message and any
>> copy of it from your computer or paper files.
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> jibx-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>
>>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to