Hi Dennis,
I have tried running the application compiled with JDK 5 and 5 on JRE 6
and they all both produce the same result. So yes, it seems like the JRE
implementation might has been changed. However, I tried searching for a
reference on this issue but still could not find one yet.
Regards,
Dennis Sosnoski wrote:
Hi Vairoj,
JVMs (at least earlier ones from Sun) did not enforce the access
controls when loaded directly from the local disk. This was not a
"bug", but rather a "feature" (according to Sun - see
http://tinyurl.com/2losm7 for some details).
From your experience I suspect this has changed in Java 6. I haven't
tried researching the details of any change - if you find out, I'd
appreciate it if you'd post back here so I know.
- Dennis
Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
Vairoj A. wrote:
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
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
------------------------------------------------------------------------
-------------------------------------------------------------------------
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
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
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
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users