[ http://jira.codehaus.org/browse/JIBX-33?page=history ]
     
Dennis Sosnoski resolved JIBX-33:
---------------------------------

    Resolution: Cannot Reproduce
     Assign To: Dennis Sosnoski

I've fixed some problems in the package selection with the current CVS code, 
but I don't know why these would have caused this type of problem in the first 
place. If you can reproduce it with the current CVS code (or upcoming RC0) 
please submit a zip or tgz with Ant build.xml to reproduce it.

> java.lang.VerifyError when trying to run an application; possibly a problem 
> with a class being in other than "default" package.
> -------------------------------------------------------------------------------------------------------------------------------
>
>          Key: JIBX-33
>          URL: http://jira.codehaus.org/browse/JIBX-33
>      Project: JiBX
>         Type: Bug
>   Components: core
>     Versions: 1.0-beta3c
>  Environment: Windows 2000, sp4; Eclipse 3.0.0 
>     Reporter: Oleg Berfirer
>     Assignee: Dennis Sosnoski
>     Priority: Minor

>
>
> I'm not entirely sure it's a bug, most likely I'm just doing something wrong, 
> but the FAQ says if I see this error - report it as  a bug, so here it goes: 
> >>>>>>>>>>>>>>>>>>
> java.lang.VerifyError: (class: 
> com/riskmetrics/processmanagement/ca/servicedesk/domain/RMGSDOrganization, 
> method: JiBX_RMGSDOrganizationBinding_marshal_1_1 signature: 
> (Lorg/jibx/runtime/impl/MarshallingContext;)V) Incompatible type for getting 
> or setting field
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Unknown Source)
>       at TestJibxOtherPackage.createOrganization(TestJibxOtherPackage.java:64)
>       at TestJibxOtherPackage.main(TestJibxOtherPackage.java:31)
> Exception in thread "main" 
> >>>>>>>>>>>>>>>>>>
> This is what I'm trying to do:
> I have a data xml that looks like this 
> <?xml version="1.0" encoding="UTF-8"?>
>   <RMGSDOrganization xmlns="">
>     <Handle>org:401346</Handle> 
>     <Attributes>
>       <last_mod DataType="2004">1084823216</last_mod>
>       <service_type DataType="2005">0</service_type>
>       <name DataType="2002">3M Company (3)</name>
>       <delete_flag DataType="2005">0</delete_flag>
>       <org_num DataType="2002">3</org_num>
>       <alt_phone DataType="2002"/>
>       <phone_number DataType="2002"/>
>       <id DataType="2001">401346</id>
>       <location DataType="2005">0</location>
>       <billing_code DataType="2002"/>
>       <email_addr DataType="2002"/>
>       <fax_phone DataType="2002"/>
>       <contact DataType="2005">0</contact>
>       <alias DataType="2001">-1</alias>
>       <pemail_addr DataType="2002"/>
>       <description DataType="2002"/>
>       <persistent_id DataType="2002">org:401346</persistent_id>
>     </Attributes>
>   </RMGSDOrganization>
> I have a class RMGSDOrganization to mirror the XML structure. The class is 
> located in the package com.riskmetrics.processmanagement.ca.servicedesk.domain
> public class RMGSDOrganization {
>       private String last_mod;
>       private String service_type;
>       private String name;
>       private String delete_flag;
>       private String org_num;
>       private String alt_phone;
>       private String phone_number;
>       private String id;
>       private String location;
>       private String billing_code;
>       private String email_addr;
>       private String fax_phone;
>       private String contact;
>       private String alias;
>       private String pemail_addr;
>       private String description;
>       private String persistent_id;
>       private String handle;
> // getters and setters ommited
> }
> The binding is in the file RMGSDOrganizationBin
> ding.xml and looks like this:  
> <?xml version="1.0" encoding="UTF-8"?>
> <binding package="com.riskmetrics.processmanagement.ca.servicedesk.domain">   
>                                   
>     <mapping name="RMGSDOrganization" class="RMGSDOrganization">
>         <value name="Handle" field="handle" usage="optional"/>
>         <structure name="Attributes">
>           <value name="last_mod" field="last_mod"/>
>           <value name="service_type" field="service_type"/>
>           <value name="name" field="name"/>
>           <value name="delete_flag" field="delete_flag"/>
>           <value name="org_num" field="org_num"/>
>           <value name="alt_phone" field="alt_phone"/>
>           <value name="phone_number" field="phone_number"/>
>           <value name="id" field="id"/>
>           <value name="location" field="location"/>
>           <value name="billing_code" field="billing_code"/>
>           <value name="email_addr" field="email_addr"/>
>           <value name="fax_phone" field="fax_phone"/>
>           <value name="contact" field="contact"/>
>           <value name="alias" field="alias"/>
>           <value name="pemail_addr" field="pemail_addr"/>
>           <value name="description" field="description"/>
>           <value name="persistent_id" field="persistent_id"/>
>         </structure>
>     </mapping>  
>   </binding>
> ****************************
> I compiled the binding 
> by executing this line from the package location of the class file:
> C:\eclipse\plugins\jibx\lib\jibx-bind.jar RMGSDOrganizationBin
> ding.xml
> The compilation goes on without errors and files 
> JiBX_RMGSDOrganizationBindingFactory.class and 
> JiBX_RMGSDOrganizationBindingRMGSDOrganization_access.class get generated in 
> the package location. 
> My test driver is TestJibxOtherPackage in the default package. 
> The error is caused by this line: 
> IBindingFactory bfact = 
> BindingDirectory.getFactory(com.riskmetrics.processmanagement.ca.servicedesk.domain.RMGSDOrganization.class);
> *****************************
> NOTE: 
> If all the files (RMGSDOrganization.class, RMGSDOrganizationBin
> ding.xml and the files generated by the binding compilation) are located in 
> the default package, the test runs fine!
> The FAQ suggests to specify the package in the binding definition, which I 
> did, but it doesn't seem to fix the problem. I also tried to fully qualify 
> the class name in the mapping definition, but still no luck:
>  
> <mapping name="RMGSDOrganization" 
> class="com.riskmetrics.processmanagement.ca.servicedesk.domain.RMGSDOrganization">
> Thank you very much,
> Oleg.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to