wood burning stoves 2.0*
The moose likes JNLP and Web Start and the fly likes JTidy and java.lang.IllegalAccessError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "JTidy and java.lang.IllegalAccessError" Watch "JTidy and java.lang.IllegalAccessError" New topic
Author

JTidy and java.lang.IllegalAccessError

Tony Mandatori
Greenhorn

Joined: Oct 26, 2002
Posts: 19
When I rin my application as a standard Java application things work fine. However, when I run it in Java Web Start, I get the following error:
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.casebank.spotlight.app.spotlightAction.ActionFactory.createAction(ActionFactory.java:49)
at com.casebank.spotlight.gui.SpotlightFrame$1.construct(SpotlightFrame.java:78)
at com.casebank.spotlight.gui.SwingWorker$2.run(SwingWorker.java:109)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalAccessError: try to access field org.w3c.tidy.ParserImpl._parseHead from class org.w3c.tidy.ParserImpl$ParseHTML
at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
at org.w3c.tidy.Tidy.parse(Tidy.java)
at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
Any ideas?
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
It might help if you could poste the code at this line. (I suppose this is one of your classes?!)

com.casebank.spotlight.app.spotlightAction.ActionFactory.createAction(ActionFactory.java:49)

JWS has more security restrictions than a "normally" started Java app. Probably you are accessing resources that underly these restrictions.
Chantal
Tony Mandatori
Greenhorn

Joined: Oct 26, 2002
Posts: 19
I force the user to agree to allowing all permissions on initial startup.
I simply had to recompile the jar file and things work well now.
Thanks.
amit-walia
Greenhorn

Joined: Nov 08, 2004
Posts: 2
hi thr
how canu force the user to agree upon all the permissions . well i am new to java so plz tell how can i do it
thanx
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTidy and java.lang.IllegalAccessError