471,316 Members | 989 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

Java security Exception

Hi, I'm writing a program for PPC and I use IBM's Websphere Device
Developper PPRO1.0 java VM. This vm is much smaller and simple than standard
vm as it has to run on small devices as handhelds. And lot of java standard
base classes are not present. I needed package java.nio.* to run stax (a xml
utility) so I copied-pasted from rt.jar the package java.nio.* and imported
it in the classpath of my project. But when I ran my class I got this error:

Exception in thread "main" java.lang.SecurityException:
java.nio.charset.Charset - protected system package 'java.nio.charset'
at java.lang.ClassLoader.checkClassName(ClassLoader.j ava:167)
at java.lang.ClassLoader.defineClass(ClassLoader.java :208)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:109)
at java.net.URLClassLoader.findClassImpl(URLClassLoad er.java:1026)
at java.net.URLClassLoader$4.run(URLClassLoader.java: 557)
at java.security.AccessController.doPrivileged(Access Controller.java:167)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:555)
at
com.ibm.oti.vm.URLSystemClassLoader.findClass(URLS ystemClassLoader.java:32)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 02)
at
com.ibm.oti.vm.URLSystemClassLoader.loadClass(URLS ystemClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:5 61)
at com.bea.xml.stream.XMLWriterBase.setWriter(XMLWrit erBase.java:54)
at com.bea.xml.stream.XMLWriterBase.<init>(XMLWriterB ase.java:46)
at
com.bea.xml.stream.XMLOutputFactoryBase.createXMLS treamWriter(XMLOutputFactoryBase.java:28)
at
com.bea.xml.stream.XMLOutputFactoryBase.createXMLS treamWriter(XMLOutputFactoryBase.java:37)
at unused.LoadXML.main(LoadXML.java:40)

How can I solve it? Is it concerned with java.policy and java.security
files?
Thanks
Faabio
Jul 17 '05 #1
0 2981

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Lorenzo | last post: by
13 posts views Thread by Ash | last post: by
2 posts views Thread by Tim Murray | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.