I have partially solved this by explicitly giving read access to the
schema jar in the policy (even though it is already in the classpath).
However I now get:
org.apache.xmlbeans.XmlException: Thread main: The 0th supplied input is
not a schema document: its type is N=
Any ideas?
Thanks
PS. The exception I was previously getting (without schema jar read
permissions) was:
Exception in thread "main" java.lang.ExceptionInInitializerError
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
at java.lang.reflect.Field.get(Field.java:357)
at
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:770)
at
uk.gov.hmgcc.security.validation.content.ffel.xml.configV10.ConfigDocument.<clinit>(Unknown
Source)
at
uk.gov.hmgcc.security.validation.content.ffel.xml.configV10.ConfigDocument$Factory.parse(Unknown
Source)
...
Caused by: java.lang.RuntimeException: Could not instantiate
SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is
the version of xbean.jar correct?
at
schemaorg_apache_xmlbeans.system.s457B0D8569445C47A0044AA43DF0EE45.TypeSystemHolder.loadTypeSystem(Unknown
Source)
at
schemaorg_apache_xmlbeans.system.s457B0D8569445C47A0044AA43DF0EE45.TypeSystemHolder.<clinit>(Unknown
Source)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
... 14 more
Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS
compiled schema: Could not locate compiled schema resource
schemaorg_apache_xmlbeans/system/s457B0D8569445C47A0044AA43DF0EE45/index.xsb
(schemaorg_apache_xmlbeans.system.s457B0D8569445C47A0044AA43DF0EE45.index)
- code 0
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1506)
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:260)
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:183)
... 18 more
Radu Preotiuc-Pietro wrote:
Well, no longer remember how the security managers exactly work, but
XMLBeans will need to be able to load the .xsb files from the classpath,
in addition to your .xml files.
What is the exception?
Radu
On Wed, 2006-10-18 at 13:09 +0100, Chris wrote:
Has anyone looked into the use of xml beans with a security manager
running? Anyone know what the required permissions are?
I have an app that works normally but I get exceptions loading the xsb
from a pre-compiled jar when the security manager is running.
I think it may be to do with reflection but if I give it permission to
read <<ALL FILES>> (not just the xml files I want it to read), it works...
Any ideas?
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET.
On entering the GSI, this email was scanned for viruses by the Government Secure
Intranet (GSi) virus scanning service supplied exclusively by Cable & Wireless
in partnership with MessageLabs.
In case of problems, please call your organisational IT Helpdesk.
The MessageLabs Anti Virus Service is the first managed service to achieve the
CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007), the UK
Government quality mark initiative for information security products and
services. For more information about this please visit www.cctmark.gov.uk
--
Chris
HMGCC
The information contained in this message (and any attachments) may
be confidential and is intended for the sole use of the named addressee.
Access, copying, alteration or re-use of the e-mail by anyone other
than the intended recipient is unauthorised. If you are not the intended
recipient please advise the sender immediately by returning the e-mail
and deleting it from your system.
This information may be exempt from disclosure under Freedom Of Information
Act 2000 and may be subject to exemption under other UK information
legislation. Refer disclosure requests to the Information Officer.
The original of this email was scanned for viruses by Government Secure Intranet
(GSi) virus scanning service supplied exclusively by Cable & Wireless in
partnership with MessageLabs.
On leaving the GSI this email was certified virus free.
The MessageLabs Anti Virus Service is the first managed service to achieve the
CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007), the UK
Government quality mark initiative for information security products and
services. For more information about this please visit www.cctmark.gov.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]