[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: XMLBeans + security manager
From:       "Radu Preotiuc-Pietro" <radup () bea ! com>
Date:       2006-10-19 20:00:48
Message-ID: 99479F4D39C9244F8E17E688193A3DD8BD7D06 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

I wish I knew more about the subject. From what you are saying it looks
like you are also trying to compile Schemas at runtime. If that is the
case, then you will need to enable read access for xbean.jar as well
(even though it is already in the classpath).

Radu

-----Original Message-----
From: Chris [mailto:chrishe@hmgcc.gsi.gov.uk] 
Sent: Thursday, October 19, 2006 2:40 AM
To: dev@xmlbeans.apache.org
Subject: Re: XMLBeans + security manager

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(UnsafeFieldAcces
sorFactory.java:25)
	at
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:12
2)
	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.ConfigDocume
nt.<clinit>(Unknown
Source)
	at
uk.gov.hmgcc.security.validation.content.ffel.xml.configV10.ConfigDocume
nt$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.TypeS
ystemHolder.loadTypeSystem(Unknown
Source)
	at
schemaorg_apache_xmlbeans.system.s457B0D8569445C47A0044AA43DF0EE45.TypeS
ystemHolder.<clinit>(Unknown
Source)
	... 12 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.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.inde
x)
- code 0
	at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(Sc
hemaTypeSystemImpl.java:1506)
	at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(Sche
maTypeSystemImpl.java:260)
	at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSy
stemImpl.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: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
> 
> 
> 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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

_______________________________________________________________________
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic