Hi,

My application which use JibX 1.0 runs fine with JRE 1.5.0_xx. When I try running the application on JRE 6.0, the following exception is thrown:

{code}

java.lang.IllegalAccessError: tried to access method 
com.waveman.campaign.jibx.BindingUtils.findWarfighter(Ljava/lang/String;)Lcom/waveman/campaign/entity/Warfighter;
 from class com.waveman.campaign.entity.WarfighterLineItem
        at 
com.waveman.campaign.entity.WarfighterLineItem.JiBX_unit_binding_unmarshal_1_0(WarfighterLineItem.java)
        at 
com.waveman.campaign.entity.JiBX_unit_bindingWarfighterLineItem_access.unmarshal()
        at 
com.waveman.campaign.entity.JiBX_MungeAdapter.JiBX_unit_binding_unmarshal_1_0()
        at 
com.waveman.campaign.entity.Unit.JiBX_unit_binding_unmarshal_1_0(Unit.java)
        at com.waveman.campaign.entity.JiBX_unit_bindingUnit_access.unmarshal()
        at 
com.waveman.campaign.entity.Template.JiBX_unit_binding_unmarshal_1_0(Template.java)
        at 
com.waveman.campaign.entity.JiBX_unit_bindingTemplate_access.unmarshal()
        at 
com.waveman.campaign.entity.TemplateLibrary.JiBX_unit_binding_unmarshal_1_0(TemplateLibrary.java)
        at 
com.waveman.campaign.entity.JiBX_unit_bindingTemplateLibrary_access.unmarshal()
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unknown 
Source)
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unknown 
Source)
        at 
com.waveman.campaign.jibx.JibxXmlConverter.convertXmlToLibrary(JibxXmlConverter.java:108)
        at 
com.waveman.campaign.manager.LibraryManager.openLibrary(LibraryManager.java:144)
        at 
com.waveman.campaign.ui.LibraryDocumentModel$OpenLibraryAction.actionPerformed(LibraryDocumentModel.java:240)

{code}

The method BindingUtils.findWarfighter is my custom deserializer. When I look into the problem, this exception makes sense because findWarfighter has package-level visibility and it is on a different package to WarfighterLineItem. Therefore, this method's visibility-level should be changed to public (I don't recall the reason I make them package-private). However, what I'm curious is that why it does work when running with JRE 5.0?

Cheers,
Vairoj

**

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to