You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Luke Noel-Storr <lu...@dsl.pipex.com> on 2004/12/09 11:16:31 UTC

Error using XMLBeans and WebStart

Hi,

When trying to use XMLBeans with Java WebStart I get the following 
errors (someone else reported something similar but didn't post their 
solution):

java.lang.ExceptionInInitializerError

    at 
uk.co.integrate.shared.util.xmlbeans.DataStoreDefinitionDocument.<clinit>(Unknown 
Source)

    at 
uk.co.integrate.shared.util.xmlbeans.DataStoreDefinitionDocument$Factory.parse(Unknown 
Source)

    at 
uk.co.integrate.shared.util.GeneralPurposeDataStore.<init>(GeneralPurposeDataStore.java:38)

    at 
uk.co.integrate.iplus.server.dataaccess.ClientIPlusData.selectDataItemTypes(ClientIPlusData.java:39)

    at 
uk.co.integrate.factsheetdesigner.model.Project.initialiseDataItemTypes(Project.java:516)

    at 
uk.co.integrate.factsheetdesigner.model.Project.getDataItemTypeCache(Project.java:546)

    at 
uk.co.integrate.factsheetdesigner.model.Project.getDataItemTypesList(Project.java:560)

    at 
uk.co.integrate.factsheetdesigner.designer.DataList.<init>(DataList.java:34)

    at 
uk.co.integrate.factsheetdesigner.designer.EditingPanel.<init>(EditingPanel.java:35)

    at 
uk.co.integrate.factsheetdesigner.designer.FactsheetDesigner.actionPerformed(FactsheetDesigner.java:572)

    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

    at 
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown 
Source)

    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown 
Source)

    at java.awt.Component.processMouseEvent(Unknown Source)

    at java.awt.Component.processEvent(Unknown Source)

    at java.awt.Container.processEvent(Unknown Source)

    at java.awt.Component.dispatchEventImpl(Unknown Source)

    at java.awt.Container.dispatchEventImpl(Unknown Source)

    at java.awt.Component.dispatchEvent(Unknown Source)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

    at java.awt.Container.dispatchEventImpl(Unknown Source)

    at java.awt.Window.dispatchEventImpl(Unknown Source)

    at java.awt.Component.dispatchEvent(Unknown Source)

    at java.awt.EventQueue.dispatchEvent(Unknown Source)

    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.awt.EventDispatchThread.run(Unknown Source)

Caused by: java.lang.RuntimeException: Could not instantiate 
SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is 
the version of xbean.jar correct?

    at 
schema.system.s633A805CA0765D743D91E72540DB1CBB.TypeSystemHolder.loadTypeSystem(Unknown 
Source)

    at 
schema.system.s633A805CA0765D743D91E72540DB1CBB.TypeSystemHolder.<clinit>(Unknown 
Source)

    ... 33 more

Caused by: java.lang.reflect.InvocationTargetException

    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)

    ... 35 more

Caused by: java.lang.ExceptionInInitializerError

    at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:146)

    ... 39 more

Caused by: java.security.AccessControlException: access denied 
(java.util.PropertyPermission org.apache.xmlbeans.impl.debug read)

    at java.security.AccessControlContext.checkPermission(Unknown Source)

    at java.security.AccessController.checkPermission(Unknown Source)

    at java.lang.SecurityManager.checkPermission(Unknown Source)

    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

    at java.lang.System.getProperty(Unknown Source)

    at 
org.apache.xmlbeans.impl.common.XBeanDebug.initializeBitsFromProperty(XBeanDebug.java:36)

    at 
org.apache.xmlbeans.impl.common.XBeanDebug.<clinit>(XBeanDebug.java:29)

    ... 40 more



I'd greatly appreciate any help


Cheers

Luke.
-----


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: Error using XMLBeans and WebStart

Posted by Luke Noel-Storr <lu...@dsl.pipex.com>.
OK,

It seems there were some security issues with some of the getProperty 
statements, to provide a work around for this I downloaded the source 
and put try catch blocks around the getProperty statements that caused 
the errors, I then just used the default properties instead in these cases.

The only one that didn't provide a default was on line 2723 in 
org.apache.xmlbeans.impl.store.Root:

        if (!"true".equals( System.getProperty( "treeasserts" )))
            disableStoreValidation();

So I assume this would default to null and set my changes to act 
accordingly.


Can anyone see any potential pitfalls in this solution?

Also, would it be worth adding this to the default source code?


Cheers

Luke.
-----


Jean-Christophe Pazzaglia wrote:

>
>
> Never try JWS with xmlbean,
>
> but it looks like you do not have granted enough privileges,
> to your java web start application.
>
> JWS apps are running, by default,  within the sandbox (ie applet alike),
> => they do not have any privilege
>
> you should modify your .jnlp or the way you access the properties
>
> jc
>
>>
>> Caused by: java.security.AccessControlException: access denied 
>> (java.util.PropertyPermission org.apache.xmlbeans.impl.debug read)
>>
>>    at java.security.AccessControlContext.checkPermission(Unknown Source)
>>
>>    at java.security.AccessController.checkPermission(Unknown Source)
>>
>>    at java.lang.SecurityManager.checkPermission(Unknown Source)
>>
>>    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
>>
>>    at java.lang.System.getProperty(Unknown Source)
>>
>>    at 
>> org.apache.xmlbeans.impl.common.XBeanDebug.initializeBitsFromProperty(XBeanDebug.java:36) 
>>
>>
>>    at 
>> org.apache.xmlbeans.impl.common.XBeanDebug.<clinit>(XBeanDebug.java:29)
>>
>>    ... 40 more
>>
>>
>>
>> I'd greatly appreciate any help
>>
>>
>> Cheers
>>
>> Luke.
>> -----
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
>> For additional commands, e-mail: user-help@xmlbeans.apache.org
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: Error using XMLBeans and WebStart

Posted by Jean-Christophe Pazzaglia <Je...@eurecom.fr>.

Never try JWS with xmlbean,

but it looks like you do not have granted enough privileges,
 to your java web start application.

JWS apps are running, by default,  within the sandbox (ie applet alike),
=> they do not have any privilege

you should modify your .jnlp or the way you access the properties

jc

>
> Caused by: java.security.AccessControlException: access denied 
> (java.util.PropertyPermission org.apache.xmlbeans.impl.debug read)
>
>    at java.security.AccessControlContext.checkPermission(Unknown Source)
>
>    at java.security.AccessController.checkPermission(Unknown Source)
>
>    at java.lang.SecurityManager.checkPermission(Unknown Source)
>
>    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
>
>    at java.lang.System.getProperty(Unknown Source)
>
>    at 
> org.apache.xmlbeans.impl.common.XBeanDebug.initializeBitsFromProperty(XBeanDebug.java:36) 
>
>
>    at 
> org.apache.xmlbeans.impl.common.XBeanDebug.<clinit>(XBeanDebug.java:29)
>
>    ... 40 more
>
>
>
> I'd greatly appreciate any help
>
>
> Cheers
>
> Luke.
> -----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>


-- 
Jean-Christophe.Pazzaglia@eurecom.fr
Corporate communications
Tel: (+33) 4-93-00-26-78 
PGP Key available : http://www.eurecom.fr/~pazzagli/publickey.pgp
--
Institut Eurécom - Office 029
http://www.eurecom.fr/
2229 Route des Crêtes 
BP 193 
06904 Sophia Antipolis, France
Fax: (+33) 4-93-00-26-27
















---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: Error using XMLBeans and WebStart

Posted by Serge <te...@udm.ru>.
Luke, I encountered the similar error some days ago. I
wrote in the list, but I have discovered the reason of
exception some minutes later. It was completely my fault.
Please, check if you are using
org.apache.xmlbeans.impl.tool.SchemaCompiler for compiling
schemas, or you are doing it yourself, for example with
javac?
SchemaCompiler creates additional *.xsb files and javac
does not. I got the same stack trace as you, so may be your
problem is the same as mine?
But there are some strange lines in your stacktrace. Seems
as if there are insufficient rights to perform some
actions. Check your security settings.

Hope it will help.

Best regards, Serge.

> Hi,
> 
> When trying to use XMLBeans with Java WebStart I get the
> following errors (someone else reported something similar
> but didn't post their solution):
> 
> java.lang.ExceptionInInitializerError
> 
>     at 
>
uk.co.integrate.shared.util.xmlbeans.DataStoreDefinitionDocument.<clinit>(Unknown
> Source)
> 
>     at 
>
uk.co.integrate.shared.util.xmlbeans.DataStoreDefinitionDocument$Factory.parse(Unknown
> Source)
> 
>     at 
>
uk.co.integrate.shared.util.GeneralPurposeDataStore.<init>(GeneralPurposeDataStore.java:38)
> 
>     at 
>
uk.co.integrate.iplus.server.dataaccess.ClientIPlusData.selectDataItemTypes(ClientIPlusData.java:39)
> 
>     at 
>
uk.co.integrate.factsheetdesigner.model.Project.initialiseDataItemTypes(Project.java:516)
> 
>     at 
>
uk.co.integrate.factsheetdesigner.model.Project.getDataItemTypeCache(Project.java:546)
> 
>     at 
>
uk.co.integrate.factsheetdesigner.model.Project.getDataItemTypesList(Project.java:560)
> 
>     at 
>
uk.co.integrate.factsheetdesigner.designer.DataList.<init>(DataList.java:34)
> 
>     at 
>
uk.co.integrate.factsheetdesigner.designer.EditingPanel.<init>(EditingPanel.java:35)
> 
>     at 
>
uk.co.integrate.factsheetdesigner.designer.FactsheetDesigner.actionPerformed(FactsheetDesigner.java:572)
> 
>     at
> javax.swing.AbstractButton.fireActionPerformed(Unknown
> Source)
> 
>     at 
>
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
> Source)
> 
>     at
>
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
> Source)
> 
>     at javax.swing.DefaultButtonModel.setPressed(Unknown
> Source)
> 
>     at
>
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
> 
> Source)
> 
>     at java.awt.Component.processMouseEvent(Unknown
> Source)
> 
>     at java.awt.Component.processEvent(Unknown Source)
> 
>     at java.awt.Container.processEvent(Unknown Source)
> 
>     at java.awt.Component.dispatchEventImpl(Unknown
> Source)
> 
>     at java.awt.Container.dispatchEventImpl(Unknown
> Source)
> 
>     at java.awt.Component.dispatchEvent(Unknown Source)
> 
>     at
> java.awt.LightweightDispatcher.retargetMouseEvent(Unknown
> Source)
> 
>     at
> java.awt.LightweightDispatcher.processMouseEvent(Unknown
> Source)
> 
>     at
> java.awt.LightweightDispatcher.dispatchEvent(Unknown
> Source)
> 
>     at java.awt.Container.dispatchEventImpl(Unknown
> Source)
> 
>     at java.awt.Window.dispatchEventImpl(Unknown Source)
> 
>     at java.awt.Component.dispatchEvent(Unknown Source)
> 
>     at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 
>     at
>
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
> Source)
> 
>     at
>
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
> Source)
> 
>     at java.awt.EventDispatchThread.pumpEvents(Unknown
> Source)
> 
>     at java.awt.EventDispatchThread.pumpEvents(Unknown
> Source)
> 
>     at java.awt.EventDispatchThread.run(Unknown Source)
> 
> Caused by: java.lang.RuntimeException: Could not
> instantiate SchemaTypeSystemImpl
> (java.lang.reflect.InvocationTargetException): is the
> version of xbean.jar correct?
> 
>     at 
>
schema.system.s633A805CA0765D743D91E72540DB1CBB.TypeSystemHolder.loadTypeSystem(Unknown
> Source)
> 
>     at 
>
schema.system.s633A805CA0765D743D91E72540DB1CBB.TypeSystemHolder.<clinit>(Unknown
> Source)
> 
>     ... 33 more
> 
> Caused by: java.lang.reflect.InvocationTargetException
> 
>     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)
> 
>     ... 35 more
> 
> Caused by: java.lang.ExceptionInInitializerError
> 
>     at 
>
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:146)
> 
>     ... 39 more
> 
> Caused by: java.security.AccessControlException: access
> denied (java.util.PropertyPermission
> org.apache.xmlbeans.impl.debug read)
> 
>     at
>
java.security.AccessControlContext.checkPermission(Unknown
> Source)
> 
>     at
> java.security.AccessController.checkPermission(Unknown
> Source)
> 
>     at java.lang.SecurityManager.checkPermission(Unknown
> Source)
> 
>     at
> java.lang.SecurityManager.checkPropertyAccess(Unknown
> Source)
> 
>     at java.lang.System.getProperty(Unknown Source)
> 
>     at 
>
org.apache.xmlbeans.impl.common.XBeanDebug.initializeBitsFromProperty(XBeanDebug.java:36)
> 
>     at 
>
org.apache.xmlbeans.impl.common.XBeanDebug.<clinit>(XBeanDebug.java:29)
> 
>     ... 40 more
> 
> 
> 
> I'd greatly appreciate any help
> 
> 
> Cheers
> 
> Luke.
> -----
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail:
> user-help@xmlbeans.apache.org
> 

_____
Best Regards, Serge.
mailto:teron@udm.ru
ICQ 315293596

"СОЛО на клавиатуре" - обучение слепому десятипальцевому
набору
Для получения информации посетите, пожалуйста, сайт
http://www.ergosolo.ru
----------------------------------------------------
DialNet - выделенная линия с тарификацией по времени соединения без учёта трафика!!!http://izhevsk.net

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org