You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by caseyd418 <ca...@gmail.com> on 2009/12/30 20:11:41 UTC

AccessControlException using CXF in Web Start App

I have a web start app that is all packaged and signed as a single jar (with
a couple of dependent jars). This is all being deployed as a WAR to a
Glassfish server for right now. Eventually will be deployed to a tomcat
server. 

I have generated a CXF client using wsdl2java (CXF version 2.2.5) specifying
the wsdlLocation as "classpath:example.wsdl". 
My example.wsdl is located at the root of my jar at the same level as my
topmost package. This is within the jar that is being deployed as the web
start application. When I try to run it, I get the following exception:

Exception in thread "AWT-EventQueue-0" java.security.AccessControlException:
access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
	at java.io.Win32FileSystem.resolve(Unknown Source)
	at java.io.File.getCanonicalPath(Unknown Source)
	at java.io.File.getCanonicalFile(Unknown Source)
	at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
	at javax.xml.ws.Service.<init>(Unknown Source)

I have other files in this same location (mostly images) that I am accessing
just fine. 

Any ideas? I've been working at this for a couple of days now.

Thanks!

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
I moved the wsdl to my web server docroot so I can access it from the web,
and set the wsdllocation to that address,
http://localhost:8080/example.wsdl.

This works so far but than I get this exception when trying to run it as a
web start application:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
	at
com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
	at javax.xml.ws.Service.<init>(Unknown Source)


Is this related to signing of the jars? I am pretty sure all the jars that
need to be signed are currently getting signed.


caseyd418 wrote:
> 
> I have a web start app that is all packaged and signed as a single jar
> (with a couple of dependent jars). This is all being deployed as a WAR to
> a Glassfish server for right now. Eventually will be deployed to a tomcat
> server. 
> 
> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
> specifying the wsdlLocation as "classpath:example.wsdl". 
> My example.wsdl is located at the root of my jar at the same level as my
> topmost package. This is within the jar that is being deployed as the web
> start application. When I try to run it, I get the following exception:
> 
> Exception in thread "AWT-EventQueue-0"
> java.security.AccessControlException: access denied
> (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
> 	at java.io.Win32FileSystem.resolve(Unknown Source)
> 	at java.io.File.getCanonicalPath(Unknown Source)
> 	at java.io.File.getCanonicalFile(Unknown Source)
> 	at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown Source)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> Source)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> Source)
> 	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
> 	at javax.xml.ws.Service.<init>(Unknown Source)
> 
> I have other files in this same location (mostly images) that I am
> accessing just fine. 
> 
> Any ideas? I've been working at this for a couple of days now.
> 
> Thanks!
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980457.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Casey Dunham <ca...@gmail.com>.
It was the wsdl4j jar.  I didn't need any of the spring jars.

Thanks!


dkulp wrote:
> 
> 
> 
> On Wed January 6 2010 8:44:08 am Casey Dunham wrote:
>> I just recently came back to the problem. As everyone said my classpath
>> was
>> wrong. It was an issue in my ant build. I fixed it now, and at the same
>> place (instantiating the client), setting the WSDL is now throwing this
>> exception:
> 
> Two thoughts:
> 
> 1) You don't have the spring jars on the classpath.   Possibly not a big
> deal.  
> You may not be using anything that needs it.
> 
> 2) You don't have the wsdl4j jar on the classpath or you have a very old 
> version.    That is needed.    
> 
> 
> Dan
> 
> 
>> 
>> bimargulies wrote:
>> > So, classpath is wrong. Best to compare to the samples in the CXF
>> distro.
>> >
>> > Can not initialize the default wsdl from classpath:example.wsdl
>> > Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
>> > javax/wsdl/xml/WSDLLocator
>> > 	at java.lang.Class.getDeclaredConstructors0(Native Method)
>> > 	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
>> > 	at java.lang.Class.getConstructor0(Unknown Source)
>> > 	at java.lang.Class.newInstance0(Unknown Source)
>> > 	at java.lang.Class.newInstance(Unknown Source)
>> > 	at org.apache.cxf.bus.extension.Extension.load(Extension.java:98)
>> > 	at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(Extensi
>> >onManagerImpl.java:166) at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerImpl.processExtension(Extens
>> >ionManagerImpl.java:142) at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadFragment(ExtensionM
>> >anagerImpl.java:135) at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerImpl.load(ExtensionManagerIm
>> >pl.java:127) at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerImpl.<init>(ExtensionManager
>> >Impl.java:84) at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerImpl.<init>(ExtensionManager
>> >Impl.java:58) at
>> >
>> org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerB
>> >us.java:91) at
>> > org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:41) at
>> > org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:37) at
>> > org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:33) at
>> > org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
>> > 	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
>> > 	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
>> > 	at
>> >
>> org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.
>> >java:64) at javax.xml.ws.Service.<init>(Unknown Source)
>> >
>> > I am specifying the wsdlLocation as "classpath:example.wsdl". Any
>> ideas?
>> >
>> > I appreciate all of your time and input! Thanks!
>> >
>> > On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
>> >
>> > wrote:
>> >> Ok, so right now, running standalone with the wsdl accessible from my
>> >> http://localhost path, I get the following exception:
>> >>
>> >> Exception in thread "AWT-EventQueue-0"
>> >> com.sun.xml.internal.ws.client.ClientTransportException: The server
>> sent
>> >> HTTP status code 404: Not Found
>> >>        at
>> >>
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkSta
>> >>tusCode(Unknown Source)
>> >>        at
>> >>
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(
>> >>Unknown Source)
>> >>        at
>> >>
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processR
>> >>equest(Unknown Source)
>> >>        at
>> >>
>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(U
>> >>nknown Source)
>> >>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown
>> Source)
>> >>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown
>> Source)
>> >>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>> >>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown
>> Source)
>> >>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>> >>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>> >> Source)
>> >>        at
>> >> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>> >> Source)
>> >>        at
>> >> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>> >> Source)
>> >>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>> >> Source)
>> >>        at $Proxy33.execute(Unknown Source)
>> >>
>> >> which is fine, because the service isn't running there yet. When
>> running
>> >> as
>> >> a web start app, I get the following exception:
>> >>
>> >> Exception in thread "AWT-EventQueue-0"
>> >> java.lang.ExceptionInInitializerError
>> >>        at
>> >>
>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Un
>> >>known Source)
>> >>        at
>> >> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>> >> Source)
>> >>        at
>> >> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>> >>        at
>> >> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>> >>        at
>> >> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> >> Source)
>> >>        at javax.xml.ws.Service.<init>(Unknown Source)
>> >>
>> >> bimargulies wrote:
>> >>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect
>> a
>> >>> glassfish issue. I've lost track, have you tried this standalone and
>> >>> gotten the same backtrace?
>> >>>
>> >>> The CXF samples are a good place to look to see the necessary
>> >>> classpath.
>> >>>
>> >>>
>> >>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>> >>>
>> >>> wrote:
>> >>>> I am using jdk1.6.0_17. I did read that link you sent on the
>> >>>> migration, but
>> >>>> didn't see anything that is relevant. Or am I missing something?
>> >>>>
>> >>>> I see that I have two problems.
>> >>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>> >>>> packaged
>> >>>> within the jar.
>> >>>> - what am I missing from the classpath that CXF is not being invoked
>> >>>> properly.
>> >>>>
>> >>>> bimargulies wrote:
>> >>>>> What JDK version are you using?
>> >>>>>
>> >>>>> Did you read that page I sent you about 'endorsed'?
>> >>>>>
>> >>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418
>> <ca...@gmail.com>
>> >>>>>
>> >>>>> wrote:
>> >>>>>> When I run it as a standalone application I get the following
>> >>>>>> similar exception:
>> >>>>>>
>> >>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>> >>>>>> Exception in thread "AWT-EventQueue-0"
>> >>>>>> javax.xml.ws.WebServiceException:
>> >>>>>> Invalid WSDL URL: classpath:example.wsdl
>> >>>>>>        at
>> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> >>>>>> Source)
>> >>>>>>        at
>> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> >>>>>> Source)
>> >>>>>>        at
>> >>>>>>
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unkno
>> >>>>>>wn Source)
>> >>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>> >>>>>>
>> >>>>>> I have also included the following jars in my classpath:
>> >>>>>>
>> >>>>>> - cxf.jar
>> >>>>>> - commons-logging.jar
>> >>>>>> - neethi.jar
>> >>>>>> - XmlSchema.jar
>> >>>>>> - wsdl4j.jar
>> >>>>>> - jaxb-xjc.jar
>> >>>>>> - velocity.jar
>> >>>>>> - commons-collections.jar
>> >>>>>> - commons-lang.jar
>> >>>>>>
>> >>>>>> bimargulies wrote:
>> >>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>> >>>>>>>
>> >>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418
>> >>>>>>> <ca...@gmail.com>
>> >>>>>>>
>> >>>>>>> wrote:
>> >>>>>>>> To recap, I am not deploying a CXF service, just using a
>> generated
>> >>>>>>>> client. I
>> >>>>>>>> also missed a line in the exception, I am apparently still not
>> >>>>>>>> able to
>> >>>>>>>> reference the wsdl correctly:
>> >>>>>>>>
>> >>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>> >>>>>>>> Exception in thread "AWT-EventQueue-0"
>> >>>>>>>> java.security.AccessControlException:
>> >>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>> >>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>> >>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>> >>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>> >>>>>>>>        at
>> >>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>> >>>>>>>> Source)
>> >>>>>>>>        at
>> >>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> >>>>>>>> Source)
>> >>>>>>>>        at
>> >>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> >>>>>>>> Source)
>> >>>>>>>>        at
>> >>>>>>>>
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unk
>> >>>>>>>>nown Source)
>> >>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>> >>>>>>>>
>> >>>>>>>> This is being generated from the static initializer block from
>> my
>> >>>>>>>> service
>> >>>>>>>> implementation:
>> >>>>>>>>
>> >>>>>>>>  static {
>> >>>>>>>>        URL url = null;
>> >>>>>>>>        try {
>> >>>>>>>>            url = new URL("classpath:example.wsdl");
>> >>>>>>>>        } catch (MalformedURLException e) {
>> >>>>>>>>            System.err.println("Can not initialize the default
>> wsdl
>> >>>>>>>> from
>> >>>>>>>> classpath:WEXAuth.wsdl");
>> >>>>>>>>            // e.printStackTrace();
>> >>>>>>>>        }
>> >>>>>>>>        WSDL_LOCATION = url;
>> >>>>>>>>    }
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> I am also using java 1.6. Are there any jars I need to include
>> for
>> >>>>>>>> CXF
>> >>>>>>>> to
>> >>>>>>>> use a generated client?
>> >>>>>>>>
>> >>>>>>>> Thanks.
>> >>>>>>>>
>> >>>>>>>> bimargulies wrote:
>> >>>>>>>>> This is about the code, not the WSDL.
>> >>>>>>>>>
>> >>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>> >>>>>>>>> provided
>> >>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you
>> have
>> >>>>>>>>> you
>> >>>>>>>>> to make sure that you are calling CXF's version.
>> >>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be
>> relevant,
>> >>>>>>>>> or
>> >>>>>>>>> not, depending on what precise version of Java you've got.
>> >>>>>>>>>
>> >>>>>>>>> What exactly is in your classpath.
>> >>>>>>>>>
>> >>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>> >>>>>>>>> <ca...@gmail.com>
>> >>>>>>>>>
>> >>>>>>>>> wrote:
>> >>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
>> >>>>>>>>>> for
>> >>>>>>>>>> web
>> >>>>>>>>>> services in general so if you could be a bit more detailed I
>> >>>>>>>>>> would
>> >>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
>> >>>>>>>>>> wsdl
>> >>>>>>>>>> and
>> >>>>>>>>>> I
>> >>>>>>>>>> am
>> >>>>>>>>>> using that to access the service. As far as I understand it,
>> the
>> >>>>>>>>>> location
>> >>>>>>>>>> of
>> >>>>>>>>>> the wsdl is in my classpath as I am referencing other files
>> from
>> >>>>>>>>>> that
>> >>>>>>>>>> location as well.
>> >>>>>>>>>>
>> >>>>>>>>>> bimargulies wrote:
>> >>>>>>>>>>> No, that it is a problem with your classpath. If you're
>> trying
>> >>>>>>>>>>> to
>> >>>>>>>>>>> use
>> >>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java
>> 1.6
>> >>>>>>>>>>> or
>> >>>>>>>>>>> Glassfish / Metro versions instead.
>> >>>>>>>>>>>
>> >>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the
>> >>>>>>>>>>> symptom, I
>> >>>>>>>>>>> think.
>> >>>>>>>>>>>
>> >>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>> >>>>>>>>>>> <ca...@gmail.com>
>> >>>>>>>>>>>
>> >>>>>>>>>>> wrote:
>> >>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>> >>>>>>>>>>>> suppose
>> >>>>>>>>>>>> I
>> >>>>>>>>>>>> can
>> >>>>>>>>>>>> get
>> >>>>>>>>>>>> tomcat up and running locally and try it there.
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> bimargulies wrote:
>> >>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>> >>>>>>>>>>>>> implementation
>> >>>>>>>>>>>>> at
>> >>>>>>>>>>>>> work.
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>> >>>>>>>>>>>>> <ca...@gmail.com>
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> wrote:
>> >>>>>>>>>>>>>> I have a web start app that is all packaged and signed as
>> a
>> >>>>>>>>>>>>>> single
>> >>>>>>>>>>>>>> jar
>> >>>>>>>>>>>>>> (with
>> >>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as
>> a
>> >>>>>>>>>>>>>> WAR
>> >>>>>>>>>>>>>> to
>> >>>>>>>>>>>>>> a
>> >>>>>>>>>>>>>> Glassfish server for right now. Eventually will be
>> deployed
>> >>>>>>>>>>>>>> to
>> >>>>>>>>>>>>>> a
>> >>>>>>>>>>>>>> tomcat
>> >>>>>>>>>>>>>> server.
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>> >>>>>>>>>>>>>> 2.2.5)
>> >>>>>>>>>>>>>> specifying
>> >>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>> >>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the
>> same
>> >>>>>>>>>>>>>> level
>> >>>>>>>>>>>>>> as
>> >>>>>>>>>>>>>> my
>> >>>>>>>>>>>>>> topmost package. This is within the jar that is being
>> >>>>>>>>>>>>>> deployed
>> >>>>>>>>>>>>>> as
>> >>>>>>>>>>>>>> the
>> >>>>>>>>>>>>>> web
>> >>>>>>>>>>>>>> start application. When I try to run it, I get the
>> following
>> >>>>>>>>>>>>>> exception:
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>> >>>>>>>>>>>>>> java.security.AccessControlException:
>> >>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown
>> >>>>>>>>>>>>>> Source) at java.io.Win32FileSystem.resolve(Unknown Source)
>> >>>>>>>>>>>>>> at java.io.File.getCanonicalPath(Unknown Source) at
>> >>>>>>>>>>>>>> java.io.File.getCanonicalFile(Unknown Source) at
>> >>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>> >>>>>>>>>>>>>> Source)
>> >>>>>>>>>>>>>>        at
>> >>>>>>>>>>>>>>
>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unkn
>> >>>>>>>>>>>>>>own Source)
>> >>>>>>>>>>>>>>        at
>> >>>>>>>>>>>>>>
>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unkn
>> >>>>>>>>>>>>>>own Source)
>> >>>>>>>>>>>>>>        at
>> >>>>>>>>>>>>>>
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelega
>> >>>>>>>>>>>>>>te(Unknown Source)
>> >>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> I have other files in this same location (mostly images)
>> >>>>>>>>>>>>>> that I
>> >>>>>>>>>>>>>> am
>> >>>>>>>>>>>>>> accessing
>> >>>>>>>>>>>>>> just fine.
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>> >>>>>>>>>>>>>> now.
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> Thanks!
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> --
>> >>>>>>>>>>>>>> View this message in context:
>> >>>>>>>>>>>>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-We
>> >>>>>>>>>>>>>>b-Start-App-tp26971079p26971079.html Sent from the cxf-user
>> >>>>>>>>>>>>>> mailing list archive at Nabble.com.
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> --
>> >>>>>>>>>>>> View this message in context:
>> >>>>>>>>>>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-
>> >>>>>>>>>>>>Start-App-tp26971079p26971622.html Sent from the cxf-user
>> >>>>>>>>>>>> mailing list archive at Nabble.com.
>> >>>>>>>>>>
>> >>>>>>>>>> --
>> >>>>>>>>>> View this message in context:
>> >>>>>>>>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-St
>> >>>>>>>>>>art-App-tp26971079p26971789.html Sent from the cxf-user mailing
>> >>>>>>>>>> list archive at Nabble.com.
>> >>>>>>>>
>> >>>>>>>> --
>> >>>>>>>> View this message in context:
>> >>>>>>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Star
>> >>>>>>>>t-App-tp26971079p26979446.html Sent from the cxf-user mailing
>> list
>> >>>>>>>> archive at Nabble.com.
>> >>>>>>
>> >>>>>> --
>> >>>>>> View this message in context:
>> >>>>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-
>> >>>>>>App-tp26971079p26980160.html Sent from the cxf-user mailing list
>> >>>>>> archive at Nabble.com.
>> >>>>
>> >>>> --
>> >>>> View this message in context:
>> >>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-Ap
>> >>>>p-tp26971079p26980556.html Sent from the cxf-user mailing list
>> archive
>> >>>> at Nabble.com.
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-
>> >>tp26971079p26980737.html Sent from the cxf-user mailing list archive at
>> >> Nabble.com.
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p27076319.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Daniel Kulp <dk...@apache.org>.

On Wed January 6 2010 8:44:08 am Casey Dunham wrote:
> I just recently came back to the problem. As everyone said my classpath was
> wrong. It was an issue in my ant build. I fixed it now, and at the same
> place (instantiating the client), setting the WSDL is now throwing this
> exception:

Two thoughts:

1) You don't have the spring jars on the classpath.   Possibly not a big deal.  
You may not be using anything that needs it.

2) You don't have the wsdl4j jar on the classpath or you have a very old 
version.    That is needed.    


Dan


> 
> bimargulies wrote:
> > So, classpath is wrong. Best to compare to the samples in the CXF distro.
> >
> > Can not initialize the default wsdl from classpath:example.wsdl
> > Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
> > javax/wsdl/xml/WSDLLocator
> > 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> > 	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> > 	at java.lang.Class.getConstructor0(Unknown Source)
> > 	at java.lang.Class.newInstance0(Unknown Source)
> > 	at java.lang.Class.newInstance(Unknown Source)
> > 	at org.apache.cxf.bus.extension.Extension.load(Extension.java:98)
> > 	at
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(Extensi
> >onManagerImpl.java:166) at
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.processExtension(Extens
> >ionManagerImpl.java:142) at
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.loadFragment(ExtensionM
> >anagerImpl.java:135) at
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.load(ExtensionManagerIm
> >pl.java:127) at
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.<init>(ExtensionManager
> >Impl.java:84) at
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.<init>(ExtensionManager
> >Impl.java:58) at
> > org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerB
> >us.java:91) at
> > org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:41) at
> > org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:37) at
> > org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:33) at
> > org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
> > 	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
> > 	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
> > 	at
> > org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.
> >java:64) at javax.xml.ws.Service.<init>(Unknown Source)
> >
> > I am specifying the wsdlLocation as "classpath:example.wsdl". Any ideas?
> >
> > I appreciate all of your time and input! Thanks!
> >
> > On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
> >
> > wrote:
> >> Ok, so right now, running standalone with the wsdl accessible from my
> >> http://localhost path, I get the following exception:
> >>
> >> Exception in thread "AWT-EventQueue-0"
> >> com.sun.xml.internal.ws.client.ClientTransportException: The server sent
> >> HTTP status code 404: Not Found
> >>        at
> >> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkSta
> >>tusCode(Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(
> >>Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processR
> >>equest(Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(U
> >>nknown Source)
> >>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
> >>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
> >>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
> >>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
> >>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
> >>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
> >> Source)
> >>        at
> >> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
> >> Source)
> >>        at
> >> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
> >> Source)
> >>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
> >> Source)
> >>        at $Proxy33.execute(Unknown Source)
> >>
> >> which is fine, because the service isn't running there yet. When running
> >> as
> >> a web start app, I get the following exception:
> >>
> >> Exception in thread "AWT-EventQueue-0"
> >> java.lang.ExceptionInInitializerError
> >>        at
> >> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Un
> >>known Source)
> >>        at
> >> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
> >> Source)
> >>        at
> >> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> >> Source)
> >>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>
> >> bimargulies wrote:
> >>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
> >>> glassfish issue. I've lost track, have you tried this standalone and
> >>> gotten the same backtrace?
> >>>
> >>> The CXF samples are a good place to look to see the necessary
> >>> classpath.
> >>>
> >>>
> >>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
> >>>
> >>> wrote:
> >>>> I am using jdk1.6.0_17. I did read that link you sent on the
> >>>> migration, but
> >>>> didn't see anything that is relevant. Or am I missing something?
> >>>>
> >>>> I see that I have two problems.
> >>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
> >>>> packaged
> >>>> within the jar.
> >>>> - what am I missing from the classpath that CXF is not being invoked
> >>>> properly.
> >>>>
> >>>> bimargulies wrote:
> >>>>> What JDK version are you using?
> >>>>>
> >>>>> Did you read that page I sent you about 'endorsed'?
> >>>>>
> >>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
> >>>>>
> >>>>> wrote:
> >>>>>> When I run it as a standalone application I get the following
> >>>>>> similar exception:
> >>>>>>
> >>>>>> Can not initialize the default wsdl from classpath:example.wsdl
> >>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>> javax.xml.ws.WebServiceException:
> >>>>>> Invalid WSDL URL: classpath:example.wsdl
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unkno
> >>>>>>wn Source)
> >>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>
> >>>>>> I have also included the following jars in my classpath:
> >>>>>>
> >>>>>> - cxf.jar
> >>>>>> - commons-logging.jar
> >>>>>> - neethi.jar
> >>>>>> - XmlSchema.jar
> >>>>>> - wsdl4j.jar
> >>>>>> - jaxb-xjc.jar
> >>>>>> - velocity.jar
> >>>>>> - commons-collections.jar
> >>>>>> - commons-lang.jar
> >>>>>>
> >>>>>> bimargulies wrote:
> >>>>>>> Yes, but your generated client is not invoking the CXF runtime.
> >>>>>>>
> >>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418
> >>>>>>> <ca...@gmail.com>
> >>>>>>>
> >>>>>>> wrote:
> >>>>>>>> To recap, I am not deploying a CXF service, just using a generated
> >>>>>>>> client. I
> >>>>>>>> also missed a line in the exception, I am apparently still not
> >>>>>>>> able to
> >>>>>>>> reference the wsdl correctly:
> >>>>>>>>
> >>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
> >>>>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>>>> java.security.AccessControlException:
> >>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
> >>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
> >>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
> >>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
> >>>>>>>>        at
> >>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
> >>>>>>>> Source)
> >>>>>>>>        at
> >>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>>>> Source)
> >>>>>>>>        at
> >>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>>>> Source)
> >>>>>>>>        at
> >>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unk
> >>>>>>>>nown Source)
> >>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>>>
> >>>>>>>> This is being generated from the static initializer block from my
> >>>>>>>> service
> >>>>>>>> implementation:
> >>>>>>>>
> >>>>>>>>  static {
> >>>>>>>>        URL url = null;
> >>>>>>>>        try {
> >>>>>>>>            url = new URL("classpath:example.wsdl");
> >>>>>>>>        } catch (MalformedURLException e) {
> >>>>>>>>            System.err.println("Can not initialize the default wsdl
> >>>>>>>> from
> >>>>>>>> classpath:WEXAuth.wsdl");
> >>>>>>>>            // e.printStackTrace();
> >>>>>>>>        }
> >>>>>>>>        WSDL_LOCATION = url;
> >>>>>>>>    }
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> I am also using java 1.6. Are there any jars I need to include for
> >>>>>>>> CXF
> >>>>>>>> to
> >>>>>>>> use a generated client?
> >>>>>>>>
> >>>>>>>> Thanks.
> >>>>>>>>
> >>>>>>>> bimargulies wrote:
> >>>>>>>>> This is about the code, not the WSDL.
> >>>>>>>>>
> >>>>>>>>> You are making a call to a JAX-WS standard API. That API is
> >>>>>>>>> provided
> >>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have
> >>>>>>>>> you
> >>>>>>>>> to make sure that you are calling CXF's version.
> >>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant,
> >>>>>>>>> or
> >>>>>>>>> not, depending on what precise version of Java you've got.
> >>>>>>>>>
> >>>>>>>>> What exactly is in your classpath.
> >>>>>>>>>
> >>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
> >>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>
> >>>>>>>>> wrote:
> >>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
> >>>>>>>>>> for
> >>>>>>>>>> web
> >>>>>>>>>> services in general so if you could be a bit more detailed I
> >>>>>>>>>> would
> >>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
> >>>>>>>>>> wsdl
> >>>>>>>>>> and
> >>>>>>>>>> I
> >>>>>>>>>> am
> >>>>>>>>>> using that to access the service. As far as I understand it, the
> >>>>>>>>>> location
> >>>>>>>>>> of
> >>>>>>>>>> the wsdl is in my classpath as I am referencing other files from
> >>>>>>>>>> that
> >>>>>>>>>> location as well.
> >>>>>>>>>>
> >>>>>>>>>> bimargulies wrote:
> >>>>>>>>>>> No, that it is a problem with your classpath. If you're trying
> >>>>>>>>>>> to
> >>>>>>>>>>> use
> >>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6
> >>>>>>>>>>> or
> >>>>>>>>>>> Glassfish / Metro versions instead.
> >>>>>>>>>>>
> >>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the
> >>>>>>>>>>> symptom, I
> >>>>>>>>>>> think.
> >>>>>>>>>>>
> >>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
> >>>>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>>>
> >>>>>>>>>>> wrote:
> >>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
> >>>>>>>>>>>> suppose
> >>>>>>>>>>>> I
> >>>>>>>>>>>> can
> >>>>>>>>>>>> get
> >>>>>>>>>>>> tomcat up and running locally and try it there.
> >>>>>>>>>>>>
> >>>>>>>>>>>> bimargulies wrote:
> >>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
> >>>>>>>>>>>>> implementation
> >>>>>>>>>>>>> at
> >>>>>>>>>>>>> work.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
> >>>>>>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
> >>>>>>>>>>>>>> single
> >>>>>>>>>>>>>> jar
> >>>>>>>>>>>>>> (with
> >>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a
> >>>>>>>>>>>>>> WAR
> >>>>>>>>>>>>>> to
> >>>>>>>>>>>>>> a
> >>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed
> >>>>>>>>>>>>>> to
> >>>>>>>>>>>>>> a
> >>>>>>>>>>>>>> tomcat
> >>>>>>>>>>>>>> server.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
> >>>>>>>>>>>>>> 2.2.5)
> >>>>>>>>>>>>>> specifying
> >>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
> >>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
> >>>>>>>>>>>>>> level
> >>>>>>>>>>>>>> as
> >>>>>>>>>>>>>> my
> >>>>>>>>>>>>>> topmost package. This is within the jar that is being
> >>>>>>>>>>>>>> deployed
> >>>>>>>>>>>>>> as
> >>>>>>>>>>>>>> the
> >>>>>>>>>>>>>> web
> >>>>>>>>>>>>>> start application. When I try to run it, I get the following
> >>>>>>>>>>>>>> exception:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>>>>>>>>>> java.security.AccessControlException:
> >>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown
> >>>>>>>>>>>>>> Source) at java.io.Win32FileSystem.resolve(Unknown Source)
> >>>>>>>>>>>>>> at java.io.File.getCanonicalPath(Unknown Source) at
> >>>>>>>>>>>>>> java.io.File.getCanonicalFile(Unknown Source) at
> >>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
> >>>>>>>>>>>>>> Source)
> >>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unkn
> >>>>>>>>>>>>>>own Source)
> >>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unkn
> >>>>>>>>>>>>>>own Source)
> >>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelega
> >>>>>>>>>>>>>>te(Unknown Source)
> >>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I have other files in this same location (mostly images)
> >>>>>>>>>>>>>> that I
> >>>>>>>>>>>>>> am
> >>>>>>>>>>>>>> accessing
> >>>>>>>>>>>>>> just fine.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
> >>>>>>>>>>>>>> now.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Thanks!
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> --
> >>>>>>>>>>>>>> View this message in context:
> >>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-We
> >>>>>>>>>>>>>>b-Start-App-tp26971079p26971079.html Sent from the cxf-user
> >>>>>>>>>>>>>> mailing list archive at Nabble.com.
> >>>>>>>>>>>>
> >>>>>>>>>>>> --
> >>>>>>>>>>>> View this message in context:
> >>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-
> >>>>>>>>>>>>Start-App-tp26971079p26971622.html Sent from the cxf-user
> >>>>>>>>>>>> mailing list archive at Nabble.com.
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> View this message in context:
> >>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-St
> >>>>>>>>>>art-App-tp26971079p26971789.html Sent from the cxf-user mailing
> >>>>>>>>>> list archive at Nabble.com.
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> View this message in context:
> >>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Star
> >>>>>>>>t-App-tp26971079p26979446.html Sent from the cxf-user mailing list
> >>>>>>>> archive at Nabble.com.
> >>>>>>
> >>>>>> --
> >>>>>> View this message in context:
> >>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-
> >>>>>>App-tp26971079p26980160.html Sent from the cxf-user mailing list
> >>>>>> archive at Nabble.com.
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-Ap
> >>>>p-tp26971079p26980556.html Sent from the cxf-user mailing list archive
> >>>> at Nabble.com.
> >>
> >> --
> >> View this message in context:
> >> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-
> >>tp26971079p26980737.html Sent from the cxf-user mailing list archive at
> >> Nabble.com.
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: AccessControlException using CXF in Web Start App

Posted by Daniel Kulp <dk...@apache.org>.
You need to double check that the full cxf jar (should be about 4.5MB is size 
or similar) is being picked up from the classpath.   As long as you see:

com.sun.xml.internal.ws.

in the stack trace, CXF is not being picked up.   You are picking up the jaxws 
RI from the Java6 JDK and not the CXF version.


One thing to try is in your "main" method or whatever, just try a:

org.apache.cxf.BusFactory.getDefaultBus();

as the first line.   My gut feeling is that with your classpath, that will 
throw a ClassNotFound or similar.    That's the first thing to overcome.   

Dan





On Mon January 4 2010 8:31:13 am caseyd418 wrote:
> So as far as a client is concerned, what jars contain the "runtime"?  I am
> instantiating the class that extends javax.xml.ws.Service. This exception
>  is thrown before the class is finished being constructed, during the
>  static initializer block that handles setting the WSDL_URL. I'm not even
>  getting to the point where I am calling anything.
> 
> bimargulies wrote:
> > Still you are not calling into CXF, somehow.
> >
> > On Thu, Dec 31, 2009 at 3:32 PM, caseyd418 <ca...@gmail.com> wrote:
> >> Here is the stack trace from when the service gets instantiated:
> >>
> >> Can not initialize the default wsdl from classpath:example.wsdl
> >> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
> >> Invalid WSDL URL: classpath:example.wsdl
> >>        at
> >> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
> >>        at
> >> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> >> Source)
> >>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>
> >> Thanks!
> >>
> >> bimargulies wrote:
> >>> I need the backtrace to get a clue.
> >>>
> >>> On Thu, Dec 31, 2009 at 3:08 PM, caseyd418 <ca...@gmail.com>
> >>>
> >>> wrote:
> >>>> Alright, so I made some progress. I had a typo in the security
> >>>> settings for
> >>>> my jnlp file that was causing that part of the xml to be skipped. Not
> >>>> sure
> >>>> why nothing complained about it. I fixed that. I also had to fix my
> >>>> build
> >>>> file based on some of the samples in the CXF distro. I just wasn't
> >>>> including
> >>>> them properly.
> >>>>
> >>>> Now, the next part of this that is still giving me trouble, is that I
> >>>> want
> >>>> to reference the wsdl packaged inside my web start jar, and not from a
> >>>> web
> >>>> location. Using "classpath:example.wsdl" gives me this exception now:
> >>>>
> >>>> Can not initialize the default wsdl from classpath:WEXAuth.wsdl
> >>>> Exception in thread "AWT-EventQueue-0"
> >>>> javax.xml.ws.WebServiceException:
> >>>> Invalid WSDL URL: classpath:example.wsdl
> >>>>
> >>>> What is the correct way to do this?  If I can avoid having to pull the
> >>>> wsdl
> >>>> from a web address I would like to do that.
> >>>>
> >>>> Thanks for all the help!
> >>>>
> >>>> bimargulies wrote:
> >>>>> So, classpath is wrong. Best to compare to the samples in the CXF
> >>>>> distro.
> >>>>>
> >>>>>
> >>>>> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
> >>>>>
> >>>>> wrote:
> >>>>>> Ok, so right now, running standalone with the wsdl accessible from
> >>>>>> my http://localhost path, I get the following exception:
> >>>>>>
> >>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>> com.sun.xml.internal.ws.client.ClientTransportException: The server
> >>>>>> sent
> >>>>>> HTTP status code 404: Not Found
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.chec
> >>>>>>kStatusCode(Unknown Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.proc
> >>>>>>ess(Unknown Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.proc
> >>>>>>essRequest(Unknown Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processReque
> >>>>>>st(Unknown Source)
> >>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown
> >>>>>> Source)
> >>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown
> >>>>>> Source)
> >>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown
> >>>>>> Source)
> >>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown
> >>>>>> Source)
> >>>>>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown
> >>>>>> Source) at
> >>>>>> com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
> >>>>>> Source)
> >>>>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
> >>>>>> Source)
> >>>>>>        at $Proxy33.execute(Unknown Source)
> >>>>>>
> >>>>>> which is fine, because the service isn't running there yet. When
> >>>>>> running
> >>>>>> as
> >>>>>> a web start app, I get the following exception:
> >>>>>>
> >>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>> java.lang.ExceptionInInitializerError
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolve
> >>>>>>r(Unknown Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unkno
> >>>>>>wn Source)
> >>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>
> >>>>>> bimargulies wrote:
> >>>>>>> Hmm. That's new enough to supposedly not need Endorsed, so I
> >>>>>>> suspect a
> >>>>>>> glassfish issue. I've lost track, have you tried this standalone
> >>>>>>> and gotten the same backtrace?
> >>>>>>>
> >>>>>>> The CXF samples are a good place to look to see the necessary
> >>>>>>> classpath.
> >>>>>>>
> >>>>>>>
> >>>>>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418
> >>>>>>> <ca...@gmail.com>
> >>>>>>>
> >>>>>>> wrote:
> >>>>>>>> I am using jdk1.6.0_17. I did read that link you sent on the
> >>>>>>>> migration,
> >>>>>>>> but
> >>>>>>>> didn't see anything that is relevant. Or am I missing something?
> >>>>>>>>
> >>>>>>>> I see that I have two problems.
> >>>>>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
> >>>>>>>> packaged
> >>>>>>>> within the jar.
> >>>>>>>> - what am I missing from the classpath that CXF is not being
> >>>>>>>> invoked
> >>>>>>>> properly.
> >>>>>>>>
> >>>>>>>> bimargulies wrote:
> >>>>>>>>> What JDK version are you using?
> >>>>>>>>>
> >>>>>>>>> Did you read that page I sent you about 'endorsed'?
> >>>>>>>>>
> >>>>>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418
> >>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>
> >>>>>>>>> wrote:
> >>>>>>>>>> When I run it as a standalone application I get the following
> >>>>>>>>>> similar
> >>>>>>>>>> exception:
> >>>>>>>>>>
> >>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
> >>>>>>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>>>>>> javax.xml.ws.WebServiceException:
> >>>>>>>>>> Invalid WSDL URL: classpath:example.wsdl
> >>>>>>>>>>        at
> >>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>>>>>> Source)
> >>>>>>>>>>        at
> >>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>>>>>> Source)
> >>>>>>>>>>        at
> >>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(U
> >>>>>>>>>>nknown Source)
> >>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>>>>>
> >>>>>>>>>> I have also included the following jars in my classpath:
> >>>>>>>>>>
> >>>>>>>>>> - cxf.jar
> >>>>>>>>>> - commons-logging.jar
> >>>>>>>>>> - neethi.jar
> >>>>>>>>>> - XmlSchema.jar
> >>>>>>>>>> - wsdl4j.jar
> >>>>>>>>>> - jaxb-xjc.jar
> >>>>>>>>>> - velocity.jar
> >>>>>>>>>> - commons-collections.jar
> >>>>>>>>>> - commons-lang.jar
> >>>>>>>>>>
> >>>>>>>>>> bimargulies wrote:
> >>>>>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
> >>>>>>>>>>>
> >>>>>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418
> >>>>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>>>
> >>>>>>>>>>> wrote:
> >>>>>>>>>>>> To recap, I am not deploying a CXF service, just using a
> >>>>>>>>>>>> generated
> >>>>>>>>>>>> client. I
> >>>>>>>>>>>> also missed a line in the exception, I am apparently still not
> >>>>>>>>>>>> able
> >>>>>>>>>>>> to
> >>>>>>>>>>>> reference the wsdl correctly:
> >>>>>>>>>>>>
> >>>>>>>>>>>> Can not initialize the default wsdl from
> >>>>>>>>>>>> classpath:example.wsdl Exception in thread "AWT-EventQueue-0"
> >>>>>>>>>>>> java.security.AccessControlException:
> >>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
> >>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
> >>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
> >>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
> >>>>>>>>>>>>        at
> >>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
> >>>>>>>>>>>> Source)
> >>>>>>>>>>>>        at
> >>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknow
> >>>>>>>>>>>>n Source)
> >>>>>>>>>>>>        at
> >>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknow
> >>>>>>>>>>>>n Source)
> >>>>>>>>>>>>        at
> >>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate
> >>>>>>>>>>>>(Unknown Source)
> >>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>>>>>>>
> >>>>>>>>>>>> This is being generated from the static initializer block from
> >>>>>>>>>>>> my
> >>>>>>>>>>>> service
> >>>>>>>>>>>> implementation:
> >>>>>>>>>>>>
> >>>>>>>>>>>>  static {
> >>>>>>>>>>>>        URL url = null;
> >>>>>>>>>>>>        try {
> >>>>>>>>>>>>            url = new URL("classpath:example.wsdl");
> >>>>>>>>>>>>        } catch (MalformedURLException e) {
> >>>>>>>>>>>>            System.err.println("Can not initialize the default
> >>>>>>>>>>>> wsdl
> >>>>>>>>>>>> from
> >>>>>>>>>>>> classpath:WEXAuth.wsdl");
> >>>>>>>>>>>>            // e.printStackTrace();
> >>>>>>>>>>>>        }
> >>>>>>>>>>>>        WSDL_LOCATION = url;
> >>>>>>>>>>>>    }
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> I am also using java 1.6. Are there any jars I need to include
> >>>>>>>>>>>> for
> >>>>>>>>>>>> CXF
> >>>>>>>>>>>> to
> >>>>>>>>>>>> use a generated client?
> >>>>>>>>>>>>
> >>>>>>>>>>>> Thanks.
> >>>>>>>>>>>>
> >>>>>>>>>>>> bimargulies wrote:
> >>>>>>>>>>>>> This is about the code, not the WSDL.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
> >>>>>>>>>>>>> provided
> >>>>>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you
> >>>>>>>>>>>>> have
> >>>>>>>>>>>>> you
> >>>>>>>>>>>>> to make sure that you are calling CXF's version.
> >>>>>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be
> >>>>>>>>>>>>> relevant,
> >>>>>>>>>>>>> or
> >>>>>>>>>>>>> not, depending on what precise version of Java you've got.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> What exactly is in your classpath.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
> >>>>>>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>> I don't think I am following you. I'm fairly new to using
> >>>>>>>>>>>>>> Java
> >>>>>>>>>>>>>> for
> >>>>>>>>>>>>>> web
> >>>>>>>>>>>>>> services in general so if you could be a bit more detailed I
> >>>>>>>>>>>>>> would
> >>>>>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from
> >>>>>>>>>>>>>> the
> >>>>>>>>>>>>>> wsdl
> >>>>>>>>>>>>>> and
> >>>>>>>>>>>>>> I
> >>>>>>>>>>>>>> am
> >>>>>>>>>>>>>> using that to access the service. As far as I understand it,
> >>>>>>>>>>>>>> the
> >>>>>>>>>>>>>> location
> >>>>>>>>>>>>>> of
> >>>>>>>>>>>>>> the wsdl is in my classpath as I am referencing other files
> >>>>>>>>>>>>>> from
> >>>>>>>>>>>>>> that
> >>>>>>>>>>>>>> location as well.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> bimargulies wrote:
> >>>>>>>>>>>>>>> No, that it is a problem with your classpath. If you're
> >>>>>>>>>>>>>>> trying
> >>>>>>>>>>>>>>> to
> >>>>>>>>>>>>>>> use
> >>>>>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java
> >>>>>>>>>>>>>>> 1.6
> >>>>>>>>>>>>>>> or
> >>>>>>>>>>>>>>> Glassfish / Metro versions instead.
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the
> >>>>>>>>>>>>>>> symptom,
> >>>>>>>>>>>>>>> I
> >>>>>>>>>>>>>>> think.
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
> >>>>>>>>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
> >>>>>>>>>>>>>>>> suppose
> >>>>>>>>>>>>>>>> I
> >>>>>>>>>>>>>>>> can
> >>>>>>>>>>>>>>>> get
> >>>>>>>>>>>>>>>> tomcat up and running locally and try it there.
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> bimargulies wrote:
> >>>>>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
> >>>>>>>>>>>>>>>>> implementation
> >>>>>>>>>>>>>>>>> at
> >>>>>>>>>>>>>>>>> work.
> >>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
> >>>>>>>>>>>>>>>>> <ca...@gmail.com>
> >>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>>>>>> I have a web start app that is all packaged and signed
> >>>>>>>>>>>>>>>>>> as a
> >>>>>>>>>>>>>>>>>> single
> >>>>>>>>>>>>>>>>>> jar
> >>>>>>>>>>>>>>>>>> (with
> >>>>>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed
> >>>>>>>>>>>>>>>>>> as
> >>>>>>>>>>>>>>>>>> a
> >>>>>>>>>>>>>>>>>> WAR
> >>>>>>>>>>>>>>>>>> to
> >>>>>>>>>>>>>>>>>> a
> >>>>>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be
> >>>>>>>>>>>>>>>>>> deployed
> >>>>>>>>>>>>>>>>>> to
> >>>>>>>>>>>>>>>>>> a
> >>>>>>>>>>>>>>>>>> tomcat
> >>>>>>>>>>>>>>>>>> server.
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF
> >>>>>>>>>>>>>>>>>> version
> >>>>>>>>>>>>>>>>>> 2.2.5)
> >>>>>>>>>>>>>>>>>> specifying
> >>>>>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
> >>>>>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the
> >>>>>>>>>>>>>>>>>> same
> >>>>>>>>>>>>>>>>>> level
> >>>>>>>>>>>>>>>>>> as
> >>>>>>>>>>>>>>>>>> my
> >>>>>>>>>>>>>>>>>> topmost package. This is within the jar that is being
> >>>>>>>>>>>>>>>>>> deployed
> >>>>>>>>>>>>>>>>>> as
> >>>>>>>>>>>>>>>>>> the
> >>>>>>>>>>>>>>>>>> web
> >>>>>>>>>>>>>>>>>> start application. When I try to run it, I get the
> >>>>>>>>>>>>>>>>>> following
> >>>>>>>>>>>>>>>>>> exception:
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>>>>>>>>>>>>>> java.security.AccessControlException:
> >>>>>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir
> >>>>>>>>>>>>>>>>>> read)
> >>>>>>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>>>>>> java.security.AccessControlContext.checkPermission(Unkno
> >>>>>>>>>>>>>>>>>>wn 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 java.io.Win32FileSystem.getUserPath(Unknown
> >>>>>>>>>>>>>>>>>> Source)
> >>>>>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown
> >>>>>>>>>>>>>>>>>> Source) at java.io.File.getCanonicalPath(Unknown Source)
> >>>>>>>>>>>>>>>>>> at java.io.File.getCanonicalFile(Unknown Source) at
> >>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unkno
> >>>>>>>>>>>>>>>>>>wn Source)
> >>>>>>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(
> >>>>>>>>>>>>>>>>>>Unknown Source)
> >>>>>>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(
> >>>>>>>>>>>>>>>>>>Unknown Source)
> >>>>>>>>>>>>>>>>>>        at
> >>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDe
> >>>>>>>>>>>>>>>>>>legate(Unknown Source)
> >>>>>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> I have other files in this same location (mostly images)
> >>>>>>>>>>>>>>>>>> that
> >>>>>>>>>>>>>>>>>> I
> >>>>>>>>>>>>>>>>>> am
> >>>>>>>>>>>>>>>>>> accessing
> >>>>>>>>>>>>>>>>>> just fine.
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of
> >>>>>>>>>>>>>>>>>> days now.
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> Thanks!
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> --
> >>>>>>>>>>>>>>>>>> View this message in context:
> >>>>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-i
> >>>>>>>>>>>>>>>>>>n-Web-Start-App-tp26971079p26971079.html Sent from the
> >>>>>>>>>>>>>>>>>> cxf-user mailing list archive at
> >>>>>>>>>>>>>>>>>> Nabble.com.
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> --
> >>>>>>>>>>>>>>>> View this message in context:
> >>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-
> >>>>>>>>>>>>>>>>Web-Start-App-tp26971079p26971622.html Sent from the
> >>>>>>>>>>>>>>>> cxf-user mailing list archive at Nabble.com.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> --
> >>>>>>>>>>>>>> View this message in context:
> >>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-We
> >>>>>>>>>>>>>>b-Start-App-tp26971079p26971789.html Sent from the cxf-user
> >>>>>>>>>>>>>> mailing list archive at Nabble.com.
> >>>>>>>>>>>>
> >>>>>>>>>>>> --
> >>>>>>>>>>>> View this message in context:
> >>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-
> >>>>>>>>>>>>Start-App-tp26971079p26979446.html Sent from the cxf-user
> >>>>>>>>>>>> mailing list archive at Nabble.com.
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> View this message in context:
> >>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-St
> >>>>>>>>>>art-App-tp26971079p26980160.html Sent from the cxf-user mailing
> >>>>>>>>>> list archive at Nabble.com.
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> View this message in context:
> >>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Star
> >>>>>>>>t-App-tp26971079p26980556.html Sent from the cxf-user mailing list
> >>>>>>>> archive at Nabble.com.
> >>>>>>
> >>>>>> --
> >>>>>> View this message in context:
> >>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-
> >>>>>>App-tp26971079p26980737.html Sent from the cxf-user mailing list
> >>>>>> archive at Nabble.com.
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-Ap
> >>>>p-tp26971079p26981870.html Sent from the cxf-user mailing list archive
> >>>> at Nabble.com.
> >>
> >> --
> >> View this message in context:
> >> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-
> >>tp26971079p26981990.html Sent from the cxf-user mailing list archive at
> >> Nabble.com.
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.

So as far as a client is concerned, what jars contain the "runtime"?  I am
instantiating the class that extends javax.xml.ws.Service. This exception is
thrown before the class is finished being constructed, during the static
initializer block that handles setting the WSDL_URL. I'm not even getting to
the point where I am calling anything.


bimargulies wrote:
> 
> Still you are not calling into CXF, somehow.
> 
> On Thu, Dec 31, 2009 at 3:32 PM, caseyd418 <ca...@gmail.com> wrote:
>>
>> Here is the stack trace from when the service gets instantiated:
>>
>> Can not initialize the default wsdl from classpath:example.wsdl
>> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
>> Invalid WSDL URL: classpath:example.wsdl
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>> Thanks!
>>
>>
>> bimargulies wrote:
>>>
>>> I need the backtrace to get a clue.
>>>
>>> On Thu, Dec 31, 2009 at 3:08 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> Alright, so I made some progress. I had a typo in the security settings
>>>> for
>>>> my jnlp file that was causing that part of the xml to be skipped. Not
>>>> sure
>>>> why nothing complained about it. I fixed that. I also had to fix my
>>>> build
>>>> file based on some of the samples in the CXF distro. I just wasn't
>>>> including
>>>> them properly.
>>>>
>>>> Now, the next part of this that is still giving me trouble, is that I
>>>> want
>>>> to reference the wsdl packaged inside my web start jar, and not from a
>>>> web
>>>> location. Using "classpath:example.wsdl" gives me this exception now:
>>>>
>>>> Can not initialize the default wsdl from classpath:WEXAuth.wsdl
>>>> Exception in thread "AWT-EventQueue-0"
>>>> javax.xml.ws.WebServiceException:
>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>
>>>> What is the correct way to do this?  If I can avoid having to pull the
>>>> wsdl
>>>> from a web address I would like to do that.
>>>>
>>>> Thanks for all the help!
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> So, classpath is wrong. Best to compare to the samples in the CXF
>>>>> distro.
>>>>>
>>>>>
>>>>> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Ok, so right now, running standalone with the wsdl accessible from my
>>>>>> http://localhost path, I get the following exception:
>>>>>>
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> com.sun.xml.internal.ws.client.ClientTransportException: The server
>>>>>> sent
>>>>>> HTTP status code 404: Not Found
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
>>>>>> Source)
>>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown
>>>>>> Source)
>>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown
>>>>>> Source)
>>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown
>>>>>> Source)
>>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown
>>>>>> Source)
>>>>>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>>>>> Source)
>>>>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>>>>>> Source)
>>>>>>        at $Proxy33.execute(Unknown Source)
>>>>>>
>>>>>> which is fine, because the service isn't running there yet. When
>>>>>> running
>>>>>> as
>>>>>> a web start app, I get the following exception:
>>>>>>
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> java.lang.ExceptionInInitializerError
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>> Source)
>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect
>>>>>>> a
>>>>>>> glassfish issue. I've lost track, have you tried this standalone and
>>>>>>> gotten the same backtrace?
>>>>>>>
>>>>>>> The CXF samples are a good place to look to see the necessary
>>>>>>> classpath.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I am using jdk1.6.0_17. I did read that link you sent on the
>>>>>>>> migration,
>>>>>>>> but
>>>>>>>> didn't see anything that is relevant. Or am I missing something?
>>>>>>>>
>>>>>>>> I see that I have two problems.
>>>>>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>>>>>>>> packaged
>>>>>>>> within the jar.
>>>>>>>> - what am I missing from the classpath that CXF is not being
>>>>>>>> invoked
>>>>>>>> properly.
>>>>>>>>
>>>>>>>>
>>>>>>>> bimargulies wrote:
>>>>>>>>>
>>>>>>>>> What JDK version are you using?
>>>>>>>>>
>>>>>>>>> Did you read that page I sent you about 'endorsed'?
>>>>>>>>>
>>>>>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418
>>>>>>>>> <ca...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> When I run it as a standalone application I get the following
>>>>>>>>>> similar
>>>>>>>>>> exception:
>>>>>>>>>>
>>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>> javax.xml.ws.WebServiceException:
>>>>>>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>
>>>>>>>>>> I have also included the following jars in my classpath:
>>>>>>>>>>
>>>>>>>>>> - cxf.jar
>>>>>>>>>> - commons-logging.jar
>>>>>>>>>> - neethi.jar
>>>>>>>>>> - XmlSchema.jar
>>>>>>>>>> - wsdl4j.jar
>>>>>>>>>> - jaxb-xjc.jar
>>>>>>>>>> - velocity.jar
>>>>>>>>>> - commons-collections.jar
>>>>>>>>>> - commons-lang.jar
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>
>>>>>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418
>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> To recap, I am not deploying a CXF service, just using a
>>>>>>>>>>>> generated
>>>>>>>>>>>> client. I
>>>>>>>>>>>> also missed a line in the exception, I am apparently still not
>>>>>>>>>>>> able
>>>>>>>>>>>> to
>>>>>>>>>>>> reference the wsdl correctly:
>>>>>>>>>>>>
>>>>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>
>>>>>>>>>>>> This is being generated from the static initializer block from
>>>>>>>>>>>> my
>>>>>>>>>>>> service
>>>>>>>>>>>> implementation:
>>>>>>>>>>>>
>>>>>>>>>>>>  static {
>>>>>>>>>>>>        URL url = null;
>>>>>>>>>>>>        try {
>>>>>>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>>>>>>            System.err.println("Can not initialize the default
>>>>>>>>>>>> wsdl
>>>>>>>>>>>> from
>>>>>>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>>>>>>            // e.printStackTrace();
>>>>>>>>>>>>        }
>>>>>>>>>>>>        WSDL_LOCATION = url;
>>>>>>>>>>>>    }
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I am also using java 1.6. Are there any jars I need to include
>>>>>>>>>>>> for
>>>>>>>>>>>> CXF
>>>>>>>>>>>> to
>>>>>>>>>>>> use a generated client?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>>>>>>
>>>>>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>>>>>>>>>>>>> provided
>>>>>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you
>>>>>>>>>>>>> have
>>>>>>>>>>>>> you
>>>>>>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be
>>>>>>>>>>>>> relevant,
>>>>>>>>>>>>> or
>>>>>>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>>>>>>
>>>>>>>>>>>>> What exactly is in your classpath.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I don't think I am following you. I'm fairly new to using
>>>>>>>>>>>>>> Java
>>>>>>>>>>>>>> for
>>>>>>>>>>>>>> web
>>>>>>>>>>>>>> services in general so if you could be a bit more detailed I
>>>>>>>>>>>>>> would
>>>>>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> wsdl
>>>>>>>>>>>>>> and
>>>>>>>>>>>>>> I
>>>>>>>>>>>>>> am
>>>>>>>>>>>>>> using that to access the service. As far as I understand it,
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> location
>>>>>>>>>>>>>> of
>>>>>>>>>>>>>> the wsdl is in my classpath as I am referencing other files
>>>>>>>>>>>>>> from
>>>>>>>>>>>>>> that
>>>>>>>>>>>>>> location as well.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> No, that it is a problem with your classpath. If you're
>>>>>>>>>>>>>>> trying
>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>> use
>>>>>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java
>>>>>>>>>>>>>>> 1.6
>>>>>>>>>>>>>>> or
>>>>>>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the
>>>>>>>>>>>>>>> symptom,
>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>> think.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>>>>>>> suppose
>>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>>> can
>>>>>>>>>>>>>>>> get
>>>>>>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>>>>>>> implementation
>>>>>>>>>>>>>>>>> at
>>>>>>>>>>>>>>>>> work.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I have a web start app that is all packaged and signed as
>>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>>> single
>>>>>>>>>>>>>>>>>> jar
>>>>>>>>>>>>>>>>>> (with
>>>>>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed
>>>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>>> WAR
>>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be
>>>>>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF
>>>>>>>>>>>>>>>>>> version
>>>>>>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>>>>>>> specifying
>>>>>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the
>>>>>>>>>>>>>>>>>> same
>>>>>>>>>>>>>>>>>> level
>>>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>>>> my
>>>>>>>>>>>>>>>>>> topmost package. This is within the jar that is being
>>>>>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>> web
>>>>>>>>>>>>>>>>>> start application. When I try to run it, I get the
>>>>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir
>>>>>>>>>>>>>>>>>> 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 java.io.Win32FileSystem.getUserPath(Unknown
>>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I have other files in this same location (mostly images)
>>>>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>>>>> am
>>>>>>>>>>>>>>>>>> accessing
>>>>>>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>>>>>>>>>>>>>>>>>> now.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at
>>>>>>>>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981870.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981990.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p27012929.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
Still you are not calling into CXF, somehow.

On Thu, Dec 31, 2009 at 3:32 PM, caseyd418 <ca...@gmail.com> wrote:
>
> Here is the stack trace from when the service gets instantiated:
>
> Can not initialize the default wsdl from classpath:example.wsdl
> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
> Invalid WSDL URL: classpath:example.wsdl
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
>        at javax.xml.ws.Service.<init>(Unknown Source)
>
> Thanks!
>
>
> bimargulies wrote:
>>
>> I need the backtrace to get a clue.
>>
>> On Thu, Dec 31, 2009 at 3:08 PM, caseyd418 <ca...@gmail.com> wrote:
>>>
>>> Alright, so I made some progress. I had a typo in the security settings
>>> for
>>> my jnlp file that was causing that part of the xml to be skipped. Not
>>> sure
>>> why nothing complained about it. I fixed that. I also had to fix my build
>>> file based on some of the samples in the CXF distro. I just wasn't
>>> including
>>> them properly.
>>>
>>> Now, the next part of this that is still giving me trouble, is that I
>>> want
>>> to reference the wsdl packaged inside my web start jar, and not from a
>>> web
>>> location. Using "classpath:example.wsdl" gives me this exception now:
>>>
>>> Can not initialize the default wsdl from classpath:WEXAuth.wsdl
>>> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
>>> Invalid WSDL URL: classpath:example.wsdl
>>>
>>> What is the correct way to do this?  If I can avoid having to pull the
>>> wsdl
>>> from a web address I would like to do that.
>>>
>>> Thanks for all the help!
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> So, classpath is wrong. Best to compare to the samples in the CXF
>>>> distro.
>>>>
>>>>
>>>> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Ok, so right now, running standalone with the wsdl accessible from my
>>>>> http://localhost path, I get the following exception:
>>>>>
>>>>> Exception in thread "AWT-EventQueue-0"
>>>>> com.sun.xml.internal.ws.client.ClientTransportException: The server
>>>>> sent
>>>>> HTTP status code 404: Not Found
>>>>>        at
>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
>>>>> Source)
>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown
>>>>> Source)
>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown
>>>>> Source)
>>>>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>>>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>>>> Source)
>>>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>>>>> Source)
>>>>>        at $Proxy33.execute(Unknown Source)
>>>>>
>>>>> which is fine, because the service isn't running there yet. When
>>>>> running
>>>>> as
>>>>> a web start app, I get the following exception:
>>>>>
>>>>> Exception in thread "AWT-EventQueue-0"
>>>>> java.lang.ExceptionInInitializerError
>>>>>        at
>>>>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>> Source)
>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
>>>>>> glassfish issue. I've lost track, have you tried this standalone and
>>>>>> gotten the same backtrace?
>>>>>>
>>>>>> The CXF samples are a good place to look to see the necessary
>>>>>> classpath.
>>>>>>
>>>>>>
>>>>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I am using jdk1.6.0_17. I did read that link you sent on the
>>>>>>> migration,
>>>>>>> but
>>>>>>> didn't see anything that is relevant. Or am I missing something?
>>>>>>>
>>>>>>> I see that I have two problems.
>>>>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>>>>>>> packaged
>>>>>>> within the jar.
>>>>>>> - what am I missing from the classpath that CXF is not being invoked
>>>>>>> properly.
>>>>>>>
>>>>>>>
>>>>>>> bimargulies wrote:
>>>>>>>>
>>>>>>>> What JDK version are you using?
>>>>>>>>
>>>>>>>> Did you read that page I sent you about 'endorsed'?
>>>>>>>>
>>>>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> When I run it as a standalone application I get the following
>>>>>>>>> similar
>>>>>>>>> exception:
>>>>>>>>>
>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>> javax.xml.ws.WebServiceException:
>>>>>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>
>>>>>>>>> I have also included the following jars in my classpath:
>>>>>>>>>
>>>>>>>>> - cxf.jar
>>>>>>>>> - commons-logging.jar
>>>>>>>>> - neethi.jar
>>>>>>>>> - XmlSchema.jar
>>>>>>>>> - wsdl4j.jar
>>>>>>>>> - jaxb-xjc.jar
>>>>>>>>> - velocity.jar
>>>>>>>>> - commons-collections.jar
>>>>>>>>> - commons-lang.jar
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> bimargulies wrote:
>>>>>>>>>>
>>>>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>>>>>
>>>>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418
>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> To recap, I am not deploying a CXF service, just using a
>>>>>>>>>>> generated
>>>>>>>>>>> client. I
>>>>>>>>>>> also missed a line in the exception, I am apparently still not
>>>>>>>>>>> able
>>>>>>>>>>> to
>>>>>>>>>>> reference the wsdl correctly:
>>>>>>>>>>>
>>>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>
>>>>>>>>>>> This is being generated from the static initializer block from my
>>>>>>>>>>> service
>>>>>>>>>>> implementation:
>>>>>>>>>>>
>>>>>>>>>>>  static {
>>>>>>>>>>>        URL url = null;
>>>>>>>>>>>        try {
>>>>>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>>>>>            System.err.println("Can not initialize the default
>>>>>>>>>>> wsdl
>>>>>>>>>>> from
>>>>>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>>>>>            // e.printStackTrace();
>>>>>>>>>>>        }
>>>>>>>>>>>        WSDL_LOCATION = url;
>>>>>>>>>>>    }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I am also using java 1.6. Are there any jars I need to include
>>>>>>>>>>> for
>>>>>>>>>>> CXF
>>>>>>>>>>> to
>>>>>>>>>>> use a generated client?
>>>>>>>>>>>
>>>>>>>>>>> Thanks.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>>>>>
>>>>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>>>>>>>>>>>> provided
>>>>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have
>>>>>>>>>>>> you
>>>>>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant,
>>>>>>>>>>>> or
>>>>>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>>>>>
>>>>>>>>>>>> What exactly is in your classpath.
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
>>>>>>>>>>>>> for
>>>>>>>>>>>>> web
>>>>>>>>>>>>> services in general so if you could be a bit more detailed I
>>>>>>>>>>>>> would
>>>>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
>>>>>>>>>>>>> wsdl
>>>>>>>>>>>>> and
>>>>>>>>>>>>> I
>>>>>>>>>>>>> am
>>>>>>>>>>>>> using that to access the service. As far as I understand it,
>>>>>>>>>>>>> the
>>>>>>>>>>>>> location
>>>>>>>>>>>>> of
>>>>>>>>>>>>> the wsdl is in my classpath as I am referencing other files
>>>>>>>>>>>>> from
>>>>>>>>>>>>> that
>>>>>>>>>>>>> location as well.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> No, that it is a problem with your classpath. If you're trying
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> use
>>>>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6
>>>>>>>>>>>>>> or
>>>>>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the
>>>>>>>>>>>>>> symptom,
>>>>>>>>>>>>>> I
>>>>>>>>>>>>>> think.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>>>>>> suppose
>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>> can
>>>>>>>>>>>>>>> get
>>>>>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>>>>>> implementation
>>>>>>>>>>>>>>>> at
>>>>>>>>>>>>>>>> work.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>>>>>>> single
>>>>>>>>>>>>>>>>> jar
>>>>>>>>>>>>>>>>> (with
>>>>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as
>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>> WAR
>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed
>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>>>>>> specifying
>>>>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the
>>>>>>>>>>>>>>>>> same
>>>>>>>>>>>>>>>>> level
>>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>>> my
>>>>>>>>>>>>>>>>> topmost package. This is within the jar that is being
>>>>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>> web
>>>>>>>>>>>>>>>>> start application. When I try to run it, I get the
>>>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown
>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I have other files in this same location (mostly images)
>>>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>>>> am
>>>>>>>>>>>>>>>>> accessing
>>>>>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>>>>>>>>>>>>>>>>> now.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context:
>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981870.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981990.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
Here is the stack trace from when the service gets instantiated:

Can not initialize the default wsdl from classpath:example.wsdl
Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
Invalid WSDL URL: classpath:example.wsdl
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
	at javax.xml.ws.Service.<init>(Unknown Source)

Thanks!


bimargulies wrote:
> 
> I need the backtrace to get a clue.
> 
> On Thu, Dec 31, 2009 at 3:08 PM, caseyd418 <ca...@gmail.com> wrote:
>>
>> Alright, so I made some progress. I had a typo in the security settings
>> for
>> my jnlp file that was causing that part of the xml to be skipped. Not
>> sure
>> why nothing complained about it. I fixed that. I also had to fix my build
>> file based on some of the samples in the CXF distro. I just wasn't
>> including
>> them properly.
>>
>> Now, the next part of this that is still giving me trouble, is that I
>> want
>> to reference the wsdl packaged inside my web start jar, and not from a
>> web
>> location. Using "classpath:example.wsdl" gives me this exception now:
>>
>> Can not initialize the default wsdl from classpath:WEXAuth.wsdl
>> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
>> Invalid WSDL URL: classpath:example.wsdl
>>
>> What is the correct way to do this?  If I can avoid having to pull the
>> wsdl
>> from a web address I would like to do that.
>>
>> Thanks for all the help!
>>
>>
>> bimargulies wrote:
>>>
>>> So, classpath is wrong. Best to compare to the samples in the CXF
>>> distro.
>>>
>>>
>>> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> Ok, so right now, running standalone with the wsdl accessible from my
>>>> http://localhost path, I get the following exception:
>>>>
>>>> Exception in thread "AWT-EventQueue-0"
>>>> com.sun.xml.internal.ws.client.ClientTransportException: The server
>>>> sent
>>>> HTTP status code 404: Not Found
>>>>        at
>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
>>>> Source)
>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown
>>>> Source)
>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown
>>>> Source)
>>>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>>> Source)
>>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>>>> Source)
>>>>        at $Proxy33.execute(Unknown Source)
>>>>
>>>> which is fine, because the service isn't running there yet. When
>>>> running
>>>> as
>>>> a web start app, I get the following exception:
>>>>
>>>> Exception in thread "AWT-EventQueue-0"
>>>> java.lang.ExceptionInInitializerError
>>>>        at
>>>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>> Source)
>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
>>>>> glassfish issue. I've lost track, have you tried this standalone and
>>>>> gotten the same backtrace?
>>>>>
>>>>> The CXF samples are a good place to look to see the necessary
>>>>> classpath.
>>>>>
>>>>>
>>>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> I am using jdk1.6.0_17. I did read that link you sent on the
>>>>>> migration,
>>>>>> but
>>>>>> didn't see anything that is relevant. Or am I missing something?
>>>>>>
>>>>>> I see that I have two problems.
>>>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>>>>>> packaged
>>>>>> within the jar.
>>>>>> - what am I missing from the classpath that CXF is not being invoked
>>>>>> properly.
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> What JDK version are you using?
>>>>>>>
>>>>>>> Did you read that page I sent you about 'endorsed'?
>>>>>>>
>>>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> When I run it as a standalone application I get the following
>>>>>>>> similar
>>>>>>>> exception:
>>>>>>>>
>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>> javax.xml.ws.WebServiceException:
>>>>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>> Source)
>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>
>>>>>>>> I have also included the following jars in my classpath:
>>>>>>>>
>>>>>>>> - cxf.jar
>>>>>>>> - commons-logging.jar
>>>>>>>> - neethi.jar
>>>>>>>> - XmlSchema.jar
>>>>>>>> - wsdl4j.jar
>>>>>>>> - jaxb-xjc.jar
>>>>>>>> - velocity.jar
>>>>>>>> - commons-collections.jar
>>>>>>>> - commons-lang.jar
>>>>>>>>
>>>>>>>>
>>>>>>>> bimargulies wrote:
>>>>>>>>>
>>>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>>>>
>>>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418
>>>>>>>>> <ca...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> To recap, I am not deploying a CXF service, just using a
>>>>>>>>>> generated
>>>>>>>>>> client. I
>>>>>>>>>> also missed a line in the exception, I am apparently still not
>>>>>>>>>> able
>>>>>>>>>> to
>>>>>>>>>> reference the wsdl correctly:
>>>>>>>>>>
>>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>
>>>>>>>>>> This is being generated from the static initializer block from my
>>>>>>>>>> service
>>>>>>>>>> implementation:
>>>>>>>>>>
>>>>>>>>>>  static {
>>>>>>>>>>        URL url = null;
>>>>>>>>>>        try {
>>>>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>>>>            System.err.println("Can not initialize the default
>>>>>>>>>> wsdl
>>>>>>>>>> from
>>>>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>>>>            // e.printStackTrace();
>>>>>>>>>>        }
>>>>>>>>>>        WSDL_LOCATION = url;
>>>>>>>>>>    }
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I am also using java 1.6. Are there any jars I need to include
>>>>>>>>>> for
>>>>>>>>>> CXF
>>>>>>>>>> to
>>>>>>>>>> use a generated client?
>>>>>>>>>>
>>>>>>>>>> Thanks.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>
>>>>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>>>>
>>>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>>>>>>>>>>> provided
>>>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have
>>>>>>>>>>> you
>>>>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant,
>>>>>>>>>>> or
>>>>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>>>>
>>>>>>>>>>> What exactly is in your classpath.
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
>>>>>>>>>>>> for
>>>>>>>>>>>> web
>>>>>>>>>>>> services in general so if you could be a bit more detailed I
>>>>>>>>>>>> would
>>>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
>>>>>>>>>>>> wsdl
>>>>>>>>>>>> and
>>>>>>>>>>>> I
>>>>>>>>>>>> am
>>>>>>>>>>>> using that to access the service. As far as I understand it,
>>>>>>>>>>>> the
>>>>>>>>>>>> location
>>>>>>>>>>>> of
>>>>>>>>>>>> the wsdl is in my classpath as I am referencing other files
>>>>>>>>>>>> from
>>>>>>>>>>>> that
>>>>>>>>>>>> location as well.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> No, that it is a problem with your classpath. If you're trying
>>>>>>>>>>>>> to
>>>>>>>>>>>>> use
>>>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6
>>>>>>>>>>>>> or
>>>>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>>>>
>>>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the
>>>>>>>>>>>>> symptom,
>>>>>>>>>>>>> I
>>>>>>>>>>>>> think.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>>>>> suppose
>>>>>>>>>>>>>> I
>>>>>>>>>>>>>> can
>>>>>>>>>>>>>> get
>>>>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>>>>> implementation
>>>>>>>>>>>>>>> at
>>>>>>>>>>>>>>> work.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>>>>>> single
>>>>>>>>>>>>>>>> jar
>>>>>>>>>>>>>>>> (with
>>>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as
>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>> WAR
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>>>>> specifying
>>>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the
>>>>>>>>>>>>>>>> same
>>>>>>>>>>>>>>>> level
>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>> my
>>>>>>>>>>>>>>>> topmost package. This is within the jar that is being
>>>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>> web
>>>>>>>>>>>>>>>> start application. When I try to run it, I get the
>>>>>>>>>>>>>>>> following
>>>>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown
>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I have other files in this same location (mostly images)
>>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>>> am
>>>>>>>>>>>>>>>> accessing
>>>>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>>>>>>>>>>>>>>>> now.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981870.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981990.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
I need the backtrace to get a clue.

On Thu, Dec 31, 2009 at 3:08 PM, caseyd418 <ca...@gmail.com> wrote:
>
> Alright, so I made some progress. I had a typo in the security settings for
> my jnlp file that was causing that part of the xml to be skipped. Not sure
> why nothing complained about it. I fixed that. I also had to fix my build
> file based on some of the samples in the CXF distro. I just wasn't including
> them properly.
>
> Now, the next part of this that is still giving me trouble, is that I want
> to reference the wsdl packaged inside my web start jar, and not from a web
> location. Using "classpath:example.wsdl" gives me this exception now:
>
> Can not initialize the default wsdl from classpath:WEXAuth.wsdl
> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
> Invalid WSDL URL: classpath:example.wsdl
>
> What is the correct way to do this?  If I can avoid having to pull the wsdl
> from a web address I would like to do that.
>
> Thanks for all the help!
>
>
> bimargulies wrote:
>>
>> So, classpath is wrong. Best to compare to the samples in the CXF distro.
>>
>>
>> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
>> wrote:
>>>
>>> Ok, so right now, running standalone with the wsdl accessible from my
>>> http://localhost path, I get the following exception:
>>>
>>> Exception in thread "AWT-EventQueue-0"
>>> com.sun.xml.internal.ws.client.ClientTransportException: The server sent
>>> HTTP status code 404: Not Found
>>>        at
>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
>>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
>>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>>> Source)
>>>        at $Proxy33.execute(Unknown Source)
>>>
>>> which is fine, because the service isn't running there yet. When running
>>> as
>>> a web start app, I get the following exception:
>>>
>>> Exception in thread "AWT-EventQueue-0"
>>> java.lang.ExceptionInInitializerError
>>>        at
>>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>> Source)
>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
>>>> glassfish issue. I've lost track, have you tried this standalone and
>>>> gotten the same backtrace?
>>>>
>>>> The CXF samples are a good place to look to see the necessary classpath.
>>>>
>>>>
>>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> I am using jdk1.6.0_17. I did read that link you sent on the migration,
>>>>> but
>>>>> didn't see anything that is relevant. Or am I missing something?
>>>>>
>>>>> I see that I have two problems.
>>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>>>>> packaged
>>>>> within the jar.
>>>>> - what am I missing from the classpath that CXF is not being invoked
>>>>> properly.
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> What JDK version are you using?
>>>>>>
>>>>>> Did you read that page I sent you about 'endorsed'?
>>>>>>
>>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> When I run it as a standalone application I get the following similar
>>>>>>> exception:
>>>>>>>
>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>> javax.xml.ws.WebServiceException:
>>>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>> Source)
>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>
>>>>>>> I have also included the following jars in my classpath:
>>>>>>>
>>>>>>> - cxf.jar
>>>>>>> - commons-logging.jar
>>>>>>> - neethi.jar
>>>>>>> - XmlSchema.jar
>>>>>>> - wsdl4j.jar
>>>>>>> - jaxb-xjc.jar
>>>>>>> - velocity.jar
>>>>>>> - commons-collections.jar
>>>>>>> - commons-lang.jar
>>>>>>>
>>>>>>>
>>>>>>> bimargulies wrote:
>>>>>>>>
>>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>>>
>>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> To recap, I am not deploying a CXF service, just using a generated
>>>>>>>>> client. I
>>>>>>>>> also missed a line in the exception, I am apparently still not able
>>>>>>>>> to
>>>>>>>>> reference the wsdl correctly:
>>>>>>>>>
>>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>> java.security.AccessControlException:
>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>
>>>>>>>>> This is being generated from the static initializer block from my
>>>>>>>>> service
>>>>>>>>> implementation:
>>>>>>>>>
>>>>>>>>>  static {
>>>>>>>>>        URL url = null;
>>>>>>>>>        try {
>>>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>>>            System.err.println("Can not initialize the default wsdl
>>>>>>>>> from
>>>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>>>            // e.printStackTrace();
>>>>>>>>>        }
>>>>>>>>>        WSDL_LOCATION = url;
>>>>>>>>>    }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am also using java 1.6. Are there any jars I need to include for
>>>>>>>>> CXF
>>>>>>>>> to
>>>>>>>>> use a generated client?
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> bimargulies wrote:
>>>>>>>>>>
>>>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>>>
>>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>>>>>>>>>> provided
>>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have
>>>>>>>>>> you
>>>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant,
>>>>>>>>>> or
>>>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>>>
>>>>>>>>>> What exactly is in your classpath.
>>>>>>>>>>
>>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
>>>>>>>>>>> for
>>>>>>>>>>> web
>>>>>>>>>>> services in general so if you could be a bit more detailed I
>>>>>>>>>>> would
>>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
>>>>>>>>>>> wsdl
>>>>>>>>>>> and
>>>>>>>>>>> I
>>>>>>>>>>> am
>>>>>>>>>>> using that to access the service. As far as I understand it, the
>>>>>>>>>>> location
>>>>>>>>>>> of
>>>>>>>>>>> the wsdl is in my classpath as I am referencing other files from
>>>>>>>>>>> that
>>>>>>>>>>> location as well.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> No, that it is a problem with your classpath. If you're trying
>>>>>>>>>>>> to
>>>>>>>>>>>> use
>>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6
>>>>>>>>>>>> or
>>>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>>>
>>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom,
>>>>>>>>>>>> I
>>>>>>>>>>>> think.
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>>>> suppose
>>>>>>>>>>>>> I
>>>>>>>>>>>>> can
>>>>>>>>>>>>> get
>>>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>>>> implementation
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> work.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>>>>> single
>>>>>>>>>>>>>>> jar
>>>>>>>>>>>>>>> (with
>>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a
>>>>>>>>>>>>>>> WAR
>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed
>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>>>> specifying
>>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>>>>>>> level
>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>> my
>>>>>>>>>>>>>>> topmost package. This is within the jar that is being
>>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>>> as
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> web
>>>>>>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I have other files in this same location (mostly images) that
>>>>>>>>>>>>>>> I
>>>>>>>>>>>>>>> am
>>>>>>>>>>>>>>> accessing
>>>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>>>>>>>>>>>>>>> now.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context:
>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981870.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
Alright, so I made some progress. I had a typo in the security settings for
my jnlp file that was causing that part of the xml to be skipped. Not sure
why nothing complained about it. I fixed that. I also had to fix my build
file based on some of the samples in the CXF distro. I just wasn't including
them properly.

Now, the next part of this that is still giving me trouble, is that I want
to reference the wsdl packaged inside my web start jar, and not from a web
location. Using "classpath:example.wsdl" gives me this exception now:

Can not initialize the default wsdl from classpath:WEXAuth.wsdl
Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
Invalid WSDL URL: classpath:example.wsdl

What is the correct way to do this?  If I can avoid having to pull the wsdl
from a web address I would like to do that.

Thanks for all the help!


bimargulies wrote:
> 
> So, classpath is wrong. Best to compare to the samples in the CXF distro.
> 
> 
> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
> wrote:
>>
>> Ok, so right now, running standalone with the wsdl accessible from my
>> http://localhost path, I get the following exception:
>>
>> Exception in thread "AWT-EventQueue-0"
>> com.sun.xml.internal.ws.client.ClientTransportException: The server sent
>> HTTP status code 404: Not Found
>>        at
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>> Source)
>>        at $Proxy33.execute(Unknown Source)
>>
>> which is fine, because the service isn't running there yet. When running
>> as
>> a web start app, I get the following exception:
>>
>> Exception in thread "AWT-EventQueue-0"
>> java.lang.ExceptionInInitializerError
>>        at
>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>>
>>
>> bimargulies wrote:
>>>
>>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
>>> glassfish issue. I've lost track, have you tried this standalone and
>>> gotten the same backtrace?
>>>
>>> The CXF samples are a good place to look to see the necessary classpath.
>>>
>>>
>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> I am using jdk1.6.0_17. I did read that link you sent on the migration,
>>>> but
>>>> didn't see anything that is relevant. Or am I missing something?
>>>>
>>>> I see that I have two problems.
>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>>>> packaged
>>>> within the jar.
>>>> - what am I missing from the classpath that CXF is not being invoked
>>>> properly.
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> What JDK version are you using?
>>>>>
>>>>> Did you read that page I sent you about 'endorsed'?
>>>>>
>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> When I run it as a standalone application I get the following similar
>>>>>> exception:
>>>>>>
>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> javax.xml.ws.WebServiceException:
>>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>> Source)
>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>
>>>>>> I have also included the following jars in my classpath:
>>>>>>
>>>>>> - cxf.jar
>>>>>> - commons-logging.jar
>>>>>> - neethi.jar
>>>>>> - XmlSchema.jar
>>>>>> - wsdl4j.jar
>>>>>> - jaxb-xjc.jar
>>>>>> - velocity.jar
>>>>>> - commons-collections.jar
>>>>>> - commons-lang.jar
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>>
>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> To recap, I am not deploying a CXF service, just using a generated
>>>>>>>> client. I
>>>>>>>> also missed a line in the exception, I am apparently still not able
>>>>>>>> to
>>>>>>>> reference the wsdl correctly:
>>>>>>>>
>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>> java.security.AccessControlException:
>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>> Source)
>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>
>>>>>>>> This is being generated from the static initializer block from my
>>>>>>>> service
>>>>>>>> implementation:
>>>>>>>>
>>>>>>>>  static {
>>>>>>>>        URL url = null;
>>>>>>>>        try {
>>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>>            System.err.println("Can not initialize the default wsdl
>>>>>>>> from
>>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>>            // e.printStackTrace();
>>>>>>>>        }
>>>>>>>>        WSDL_LOCATION = url;
>>>>>>>>    }
>>>>>>>>
>>>>>>>>
>>>>>>>> I am also using java 1.6. Are there any jars I need to include for
>>>>>>>> CXF
>>>>>>>> to
>>>>>>>> use a generated client?
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>>
>>>>>>>> bimargulies wrote:
>>>>>>>>>
>>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>>
>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>>>>>>>>> provided
>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have
>>>>>>>>> you
>>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant,
>>>>>>>>> or
>>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>>
>>>>>>>>> What exactly is in your classpath.
>>>>>>>>>
>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>>>>>>>>> <ca...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
>>>>>>>>>> for
>>>>>>>>>> web
>>>>>>>>>> services in general so if you could be a bit more detailed I
>>>>>>>>>> would
>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
>>>>>>>>>> wsdl
>>>>>>>>>> and
>>>>>>>>>> I
>>>>>>>>>> am
>>>>>>>>>> using that to access the service. As far as I understand it, the
>>>>>>>>>> location
>>>>>>>>>> of
>>>>>>>>>> the wsdl is in my classpath as I am referencing other files from
>>>>>>>>>> that
>>>>>>>>>> location as well.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>
>>>>>>>>>>> No, that it is a problem with your classpath. If you're trying
>>>>>>>>>>> to
>>>>>>>>>>> use
>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6
>>>>>>>>>>> or
>>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>>
>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom,
>>>>>>>>>>> I
>>>>>>>>>>> think.
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>>> suppose
>>>>>>>>>>>> I
>>>>>>>>>>>> can
>>>>>>>>>>>> get
>>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>>> implementation
>>>>>>>>>>>>> at
>>>>>>>>>>>>> work.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>>>> single
>>>>>>>>>>>>>> jar
>>>>>>>>>>>>>> (with
>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a
>>>>>>>>>>>>>> WAR
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> a
>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> a
>>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>>> specifying
>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>>>>>> level
>>>>>>>>>>>>>> as
>>>>>>>>>>>>>> my
>>>>>>>>>>>>>> topmost package. This is within the jar that is being
>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>> as
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> web
>>>>>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have other files in this same location (mostly images) that
>>>>>>>>>>>>>> I
>>>>>>>>>>>>>> am
>>>>>>>>>>>>>> accessing
>>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>>>>>>>>>>>>>> now.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26981870.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Casey Dunham <ca...@gmail.com>.
I just recently came back to the problem. As everyone said my classpath was
wrong. It was an issue in my ant build. I fixed it now, and at the same
place (instantiating the client), setting the WSDL is now throwing this
exception:



bimargulies wrote:
> 
> So, classpath is wrong. Best to compare to the samples in the CXF distro.
> 
> Can not initialize the default wsdl from classpath:example.wsdl
> Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
> javax/wsdl/xml/WSDLLocator
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> 	at java.lang.Class.getConstructor0(Unknown Source)
> 	at java.lang.Class.newInstance0(Unknown Source)
> 	at java.lang.Class.newInstance(Unknown Source)
> 	at org.apache.cxf.bus.extension.Extension.load(Extension.java:98)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:166)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.processExtension(ExtensionManagerImpl.java:142)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadFragment(ExtensionManagerImpl.java:135)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.load(ExtensionManagerImpl.java:127)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.<init>(ExtensionManagerImpl.java:84)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.<init>(ExtensionManagerImpl.java:58)
> 	at
> org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:91)
> 	at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:41)
> 	at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:37)
> 	at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:33)
> 	at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
> 	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
> 	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
> 	at
> org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:64)
> 	at javax.xml.ws.Service.<init>(Unknown Source)
> 
> I am specifying the wsdlLocation as "classpath:example.wsdl". Any ideas? 
> 
> I appreciate all of your time and input! Thanks!
> 
> On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com>
> wrote:
>>
>> Ok, so right now, running standalone with the wsdl accessible from my
>> http://localhost path, I get the following exception:
>>
>> Exception in thread "AWT-EventQueue-0"
>> com.sun.xml.internal.ws.client.ClientTransportException: The server sent
>> HTTP status code 404: Not Found
>>        at
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
>>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown
>> Source)
>>        at $Proxy33.execute(Unknown Source)
>>
>> which is fine, because the service isn't running there yet. When running
>> as
>> a web start app, I get the following exception:
>>
>> Exception in thread "AWT-EventQueue-0"
>> java.lang.ExceptionInInitializerError
>>        at
>> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>>
>>
>> bimargulies wrote:
>>>
>>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
>>> glassfish issue. I've lost track, have you tried this standalone and
>>> gotten the same backtrace?
>>>
>>> The CXF samples are a good place to look to see the necessary classpath.
>>>
>>>
>>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> I am using jdk1.6.0_17. I did read that link you sent on the migration,
>>>> but
>>>> didn't see anything that is relevant. Or am I missing something?
>>>>
>>>> I see that I have two problems.
>>>> - how do I correctly specify the wsdlLocation to refer to a wsdl
>>>> packaged
>>>> within the jar.
>>>> - what am I missing from the classpath that CXF is not being invoked
>>>> properly.
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> What JDK version are you using?
>>>>>
>>>>> Did you read that page I sent you about 'endorsed'?
>>>>>
>>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> When I run it as a standalone application I get the following similar
>>>>>> exception:
>>>>>>
>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> javax.xml.ws.WebServiceException:
>>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>> Source)
>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>
>>>>>> I have also included the following jars in my classpath:
>>>>>>
>>>>>> - cxf.jar
>>>>>> - commons-logging.jar
>>>>>> - neethi.jar
>>>>>> - XmlSchema.jar
>>>>>> - wsdl4j.jar
>>>>>> - jaxb-xjc.jar
>>>>>> - velocity.jar
>>>>>> - commons-collections.jar
>>>>>> - commons-lang.jar
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>>
>>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> To recap, I am not deploying a CXF service, just using a generated
>>>>>>>> client. I
>>>>>>>> also missed a line in the exception, I am apparently still not able
>>>>>>>> to
>>>>>>>> reference the wsdl correctly:
>>>>>>>>
>>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>> java.security.AccessControlException:
>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>> Source)
>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>
>>>>>>>> This is being generated from the static initializer block from my
>>>>>>>> service
>>>>>>>> implementation:
>>>>>>>>
>>>>>>>>  static {
>>>>>>>>        URL url = null;
>>>>>>>>        try {
>>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>>            System.err.println("Can not initialize the default wsdl
>>>>>>>> from
>>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>>            // e.printStackTrace();
>>>>>>>>        }
>>>>>>>>        WSDL_LOCATION = url;
>>>>>>>>    }
>>>>>>>>
>>>>>>>>
>>>>>>>> I am also using java 1.6. Are there any jars I need to include for
>>>>>>>> CXF
>>>>>>>> to
>>>>>>>> use a generated client?
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>>
>>>>>>>> bimargulies wrote:
>>>>>>>>>
>>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>>
>>>>>>>>> You are making a call to a JAX-WS standard API. That API is
>>>>>>>>> provided
>>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have
>>>>>>>>> you
>>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant,
>>>>>>>>> or
>>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>>
>>>>>>>>> What exactly is in your classpath.
>>>>>>>>>
>>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418
>>>>>>>>> <ca...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> I don't think I am following you. I'm fairly new to using Java
>>>>>>>>>> for
>>>>>>>>>> web
>>>>>>>>>> services in general so if you could be a bit more detailed I
>>>>>>>>>> would
>>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the
>>>>>>>>>> wsdl
>>>>>>>>>> and
>>>>>>>>>> I
>>>>>>>>>> am
>>>>>>>>>> using that to access the service. As far as I understand it, the
>>>>>>>>>> location
>>>>>>>>>> of
>>>>>>>>>> the wsdl is in my classpath as I am referencing other files from
>>>>>>>>>> that
>>>>>>>>>> location as well.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>
>>>>>>>>>>> No, that it is a problem with your classpath. If you're trying
>>>>>>>>>>> to
>>>>>>>>>>> use
>>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6
>>>>>>>>>>> or
>>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>>
>>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom,
>>>>>>>>>>> I
>>>>>>>>>>> think.
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>>> suppose
>>>>>>>>>>>> I
>>>>>>>>>>>> can
>>>>>>>>>>>> get
>>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>>> implementation
>>>>>>>>>>>>> at
>>>>>>>>>>>>> work.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>>>> single
>>>>>>>>>>>>>> jar
>>>>>>>>>>>>>> (with
>>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a
>>>>>>>>>>>>>> WAR
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> a
>>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> a
>>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>>> specifying
>>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>>>>>> level
>>>>>>>>>>>>>> as
>>>>>>>>>>>>>> my
>>>>>>>>>>>>>> topmost package. This is within the jar that is being
>>>>>>>>>>>>>> deployed
>>>>>>>>>>>>>> as
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> web
>>>>>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at
>>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have other files in this same location (mostly images) that
>>>>>>>>>>>>>> I
>>>>>>>>>>>>>> am
>>>>>>>>>>>>>> accessing
>>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days
>>>>>>>>>>>>>> now.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p27026861.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
So, classpath is wrong. Best to compare to the samples in the CXF distro.


On Thu, Dec 31, 2009 at 12:56 PM, caseyd418 <ca...@gmail.com> wrote:
>
> Ok, so right now, running standalone with the wsdl accessible from my
> http://localhost path, I get the following exception:
>
> Exception in thread "AWT-EventQueue-0"
> com.sun.xml.internal.ws.client.ClientTransportException: The server sent
> HTTP status code 404: Not Found
>        at
> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
> Source)
>        at
> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
> Source)
>        at
> com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
> Source)
>        at
> com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
> Source)
>        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
>        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
>        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
>        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
>        at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
>        at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source)
>        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
> Source)
>        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
> Source)
>        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
>        at $Proxy33.execute(Unknown Source)
>
> which is fine, because the service isn't running there yet. When running as
> a web start app, I get the following exception:
>
> Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
>        at
> com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
> Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
> Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
>        at javax.xml.ws.Service.<init>(Unknown Source)
>
>
>
> bimargulies wrote:
>>
>> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
>> glassfish issue. I've lost track, have you tried this standalone and
>> gotten the same backtrace?
>>
>> The CXF samples are a good place to look to see the necessary classpath.
>>
>>
>> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
>> wrote:
>>>
>>> I am using jdk1.6.0_17. I did read that link you sent on the migration,
>>> but
>>> didn't see anything that is relevant. Or am I missing something?
>>>
>>> I see that I have two problems.
>>> - how do I correctly specify the wsdlLocation to refer to a wsdl packaged
>>> within the jar.
>>> - what am I missing from the classpath that CXF is not being invoked
>>> properly.
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> What JDK version are you using?
>>>>
>>>> Did you read that page I sent you about 'endorsed'?
>>>>
>>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> When I run it as a standalone application I get the following similar
>>>>> exception:
>>>>>
>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>> Exception in thread "AWT-EventQueue-0"
>>>>> javax.xml.ws.WebServiceException:
>>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>> Source)
>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>
>>>>> I have also included the following jars in my classpath:
>>>>>
>>>>> - cxf.jar
>>>>> - commons-logging.jar
>>>>> - neethi.jar
>>>>> - XmlSchema.jar
>>>>> - wsdl4j.jar
>>>>> - jaxb-xjc.jar
>>>>> - velocity.jar
>>>>> - commons-collections.jar
>>>>> - commons-lang.jar
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>>
>>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> To recap, I am not deploying a CXF service, just using a generated
>>>>>>> client. I
>>>>>>> also missed a line in the exception, I am apparently still not able
>>>>>>> to
>>>>>>> reference the wsdl correctly:
>>>>>>>
>>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>> java.security.AccessControlException:
>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>> Source)
>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>
>>>>>>> This is being generated from the static initializer block from my
>>>>>>> service
>>>>>>> implementation:
>>>>>>>
>>>>>>>  static {
>>>>>>>        URL url = null;
>>>>>>>        try {
>>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>>        } catch (MalformedURLException e) {
>>>>>>>            System.err.println("Can not initialize the default wsdl
>>>>>>> from
>>>>>>> classpath:WEXAuth.wsdl");
>>>>>>>            // e.printStackTrace();
>>>>>>>        }
>>>>>>>        WSDL_LOCATION = url;
>>>>>>>    }
>>>>>>>
>>>>>>>
>>>>>>> I am also using java 1.6. Are there any jars I need to include for
>>>>>>> CXF
>>>>>>> to
>>>>>>> use a generated client?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>>
>>>>>>> bimargulies wrote:
>>>>>>>>
>>>>>>>> This is about the code, not the WSDL.
>>>>>>>>
>>>>>>>> You are making a call to a JAX-WS standard API. That API is provided
>>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have you
>>>>>>>> to make sure that you are calling CXF's version.
>>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>>
>>>>>>>> What exactly is in your classpath.
>>>>>>>>
>>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> I don't think I am following you. I'm fairly new to using Java for
>>>>>>>>> web
>>>>>>>>> services in general so if you could be a bit more detailed I would
>>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the wsdl
>>>>>>>>> and
>>>>>>>>> I
>>>>>>>>> am
>>>>>>>>> using that to access the service. As far as I understand it, the
>>>>>>>>> location
>>>>>>>>> of
>>>>>>>>> the wsdl is in my classpath as I am referencing other files from
>>>>>>>>> that
>>>>>>>>> location as well.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> bimargulies wrote:
>>>>>>>>>>
>>>>>>>>>> No, that it is a problem with your classpath. If you're trying to
>>>>>>>>>> use
>>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>>
>>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>>>>>>>> think.
>>>>>>>>>>
>>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>>> suppose
>>>>>>>>>>> I
>>>>>>>>>>> can
>>>>>>>>>>> get
>>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>>> implementation
>>>>>>>>>>>> at
>>>>>>>>>>>> work.
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>>> single
>>>>>>>>>>>>> jar
>>>>>>>>>>>>> (with
>>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a
>>>>>>>>>>>>> WAR
>>>>>>>>>>>>> to
>>>>>>>>>>>>> a
>>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed to
>>>>>>>>>>>>> a
>>>>>>>>>>>>> tomcat
>>>>>>>>>>>>> server.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>>> specifying
>>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>>>>> level
>>>>>>>>>>>>> as
>>>>>>>>>>>>> my
>>>>>>>>>>>>> topmost package. This is within the jar that is being deployed
>>>>>>>>>>>>> as
>>>>>>>>>>>>> the
>>>>>>>>>>>>> web
>>>>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>>>>> exception:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>>> Source)
>>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have other files in this same location (mostly images) that I
>>>>>>>>>>>>> am
>>>>>>>>>>>>> accessing
>>>>>>>>>>>>> just fine.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context:
>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
Ok, so right now, running standalone with the wsdl accessible from my
http://localhost path, I get the following exception:

Exception in thread "AWT-EventQueue-0"
com.sun.xml.internal.ws.client.ClientTransportException: The server sent
HTTP status code 404: Not Found
	at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
Source)
	at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
Source)
	at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
Source)
	at
com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
Source)
	at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
	at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
	at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
	at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
	at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
	at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown
Source)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
	at $Proxy33.execute(Unknown Source)

which is fine, because the service isn't running there yet. When running as
a web start app, I get the following exception:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
	at
com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
	at javax.xml.ws.Service.<init>(Unknown Source)



bimargulies wrote:
> 
> Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
> glassfish issue. I've lost track, have you tried this standalone and
> gotten the same backtrace?
> 
> The CXF samples are a good place to look to see the necessary classpath.
> 
> 
> On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com>
> wrote:
>>
>> I am using jdk1.6.0_17. I did read that link you sent on the migration,
>> but
>> didn't see anything that is relevant. Or am I missing something?
>>
>> I see that I have two problems.
>> - how do I correctly specify the wsdlLocation to refer to a wsdl packaged
>> within the jar.
>> - what am I missing from the classpath that CXF is not being invoked
>> properly.
>>
>>
>> bimargulies wrote:
>>>
>>> What JDK version are you using?
>>>
>>> Did you read that page I sent you about 'endorsed'?
>>>
>>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> When I run it as a standalone application I get the following similar
>>>> exception:
>>>>
>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>> Exception in thread "AWT-EventQueue-0"
>>>> javax.xml.ws.WebServiceException:
>>>> Invalid WSDL URL: classpath:example.wsdl
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>> Source)
>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>
>>>> I have also included the following jars in my classpath:
>>>>
>>>> - cxf.jar
>>>> - commons-logging.jar
>>>> - neethi.jar
>>>> - XmlSchema.jar
>>>> - wsdl4j.jar
>>>> - jaxb-xjc.jar
>>>> - velocity.jar
>>>> - commons-collections.jar
>>>> - commons-lang.jar
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>>
>>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> To recap, I am not deploying a CXF service, just using a generated
>>>>>> client. I
>>>>>> also missed a line in the exception, I am apparently still not able
>>>>>> to
>>>>>> reference the wsdl correctly:
>>>>>>
>>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> java.security.AccessControlException:
>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>> Source)
>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>
>>>>>> This is being generated from the static initializer block from my
>>>>>> service
>>>>>> implementation:
>>>>>>
>>>>>>  static {
>>>>>>        URL url = null;
>>>>>>        try {
>>>>>>            url = new URL("classpath:example.wsdl");
>>>>>>        } catch (MalformedURLException e) {
>>>>>>            System.err.println("Can not initialize the default wsdl
>>>>>> from
>>>>>> classpath:WEXAuth.wsdl");
>>>>>>            // e.printStackTrace();
>>>>>>        }
>>>>>>        WSDL_LOCATION = url;
>>>>>>    }
>>>>>>
>>>>>>
>>>>>> I am also using java 1.6. Are there any jars I need to include for
>>>>>> CXF
>>>>>> to
>>>>>> use a generated client?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> This is about the code, not the WSDL.
>>>>>>>
>>>>>>> You are making a call to a JAX-WS standard API. That API is provided
>>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have you
>>>>>>> to make sure that you are calling CXF's version.
>>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>>>>>>> not, depending on what precise version of Java you've got.
>>>>>>>
>>>>>>> What exactly is in your classpath.
>>>>>>>
>>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I don't think I am following you. I'm fairly new to using Java for
>>>>>>>> web
>>>>>>>> services in general so if you could be a bit more detailed I would
>>>>>>>> appreciate it. I created a client (wsdl2java -client) from the wsdl
>>>>>>>> and
>>>>>>>> I
>>>>>>>> am
>>>>>>>> using that to access the service. As far as I understand it, the
>>>>>>>> location
>>>>>>>> of
>>>>>>>> the wsdl is in my classpath as I am referencing other files from
>>>>>>>> that
>>>>>>>> location as well.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> bimargulies wrote:
>>>>>>>>>
>>>>>>>>> No, that it is a problem with your classpath. If you're trying to
>>>>>>>>> use
>>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>>
>>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>>>>>>> think.
>>>>>>>>>
>>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418
>>>>>>>>> <ca...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> So are you saying that this is a problem with Glassfish? I
>>>>>>>>>> suppose
>>>>>>>>>> I
>>>>>>>>>> can
>>>>>>>>>> get
>>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> bimargulies wrote:
>>>>>>>>>>>
>>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>>> implementation
>>>>>>>>>>> at
>>>>>>>>>>> work.
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>>> single
>>>>>>>>>>>> jar
>>>>>>>>>>>> (with
>>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a
>>>>>>>>>>>> WAR
>>>>>>>>>>>> to
>>>>>>>>>>>> a
>>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed to
>>>>>>>>>>>> a
>>>>>>>>>>>> tomcat
>>>>>>>>>>>> server.
>>>>>>>>>>>>
>>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version
>>>>>>>>>>>> 2.2.5)
>>>>>>>>>>>> specifying
>>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>>>> level
>>>>>>>>>>>> as
>>>>>>>>>>>> my
>>>>>>>>>>>> topmost package. This is within the jar that is being deployed
>>>>>>>>>>>> as
>>>>>>>>>>>> the
>>>>>>>>>>>> web
>>>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>>>> exception:
>>>>>>>>>>>>
>>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at
>>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>>> Source)
>>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>>
>>>>>>>>>>>> I have other files in this same location (mostly images) that I
>>>>>>>>>>>> am
>>>>>>>>>>>> accessing
>>>>>>>>>>>> just fine.
>>>>>>>>>>>>
>>>>>>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980737.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
Hmm. That's new enough to supposedly not need Endorsed, so I suspect a
glassfish issue. I've lost track, have you tried this standalone and
gotten the same backtrace?

The CXF samples are a good place to look to see the necessary classpath.


On Thu, Dec 31, 2009 at 12:31 PM, caseyd418 <ca...@gmail.com> wrote:
>
> I am using jdk1.6.0_17. I did read that link you sent on the migration, but
> didn't see anything that is relevant. Or am I missing something?
>
> I see that I have two problems.
> - how do I correctly specify the wsdlLocation to refer to a wsdl packaged
> within the jar.
> - what am I missing from the classpath that CXF is not being invoked
> properly.
>
>
> bimargulies wrote:
>>
>> What JDK version are you using?
>>
>> Did you read that page I sent you about 'endorsed'?
>>
>> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
>> wrote:
>>>
>>> When I run it as a standalone application I get the following similar
>>> exception:
>>>
>>> Can not initialize the default wsdl from classpath:example.wsdl
>>> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
>>> Invalid WSDL URL: classpath:example.wsdl
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>> Source)
>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>
>>> I have also included the following jars in my classpath:
>>>
>>> - cxf.jar
>>> - commons-logging.jar
>>> - neethi.jar
>>> - XmlSchema.jar
>>> - wsdl4j.jar
>>> - jaxb-xjc.jar
>>> - velocity.jar
>>> - commons-collections.jar
>>> - commons-lang.jar
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> Yes, but your generated client is not invoking the CXF runtime.
>>>>
>>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> To recap, I am not deploying a CXF service, just using a generated
>>>>> client. I
>>>>> also missed a line in the exception, I am apparently still not able to
>>>>> reference the wsdl correctly:
>>>>>
>>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>>> Exception in thread "AWT-EventQueue-0"
>>>>> java.security.AccessControlException:
>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>> Source)
>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>
>>>>> This is being generated from the static initializer block from my
>>>>> service
>>>>> implementation:
>>>>>
>>>>>  static {
>>>>>        URL url = null;
>>>>>        try {
>>>>>            url = new URL("classpath:example.wsdl");
>>>>>        } catch (MalformedURLException e) {
>>>>>            System.err.println("Can not initialize the default wsdl from
>>>>> classpath:WEXAuth.wsdl");
>>>>>            // e.printStackTrace();
>>>>>        }
>>>>>        WSDL_LOCATION = url;
>>>>>    }
>>>>>
>>>>>
>>>>> I am also using java 1.6. Are there any jars I need to include for CXF
>>>>> to
>>>>> use a generated client?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> This is about the code, not the WSDL.
>>>>>>
>>>>>> You are making a call to a JAX-WS standard API. That API is provided
>>>>>> in Java 1.6. If you want to use CXF's version, instead, you have you
>>>>>> to make sure that you are calling CXF's version.
>>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>>>>>> not, depending on what precise version of Java you've got.
>>>>>>
>>>>>> What exactly is in your classpath.
>>>>>>
>>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I don't think I am following you. I'm fairly new to using Java for
>>>>>>> web
>>>>>>> services in general so if you could be a bit more detailed I would
>>>>>>> appreciate it. I created a client (wsdl2java -client) from the wsdl
>>>>>>> and
>>>>>>> I
>>>>>>> am
>>>>>>> using that to access the service. As far as I understand it, the
>>>>>>> location
>>>>>>> of
>>>>>>> the wsdl is in my classpath as I am referencing other files from that
>>>>>>> location as well.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> bimargulies wrote:
>>>>>>>>
>>>>>>>> No, that it is a problem with your classpath. If you're trying to
>>>>>>>> use
>>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>>>>>> Glassfish / Metro versions instead.
>>>>>>>>
>>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>>>>>> think.
>>>>>>>>
>>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> So are you saying that this is a problem with Glassfish? I suppose
>>>>>>>>> I
>>>>>>>>> can
>>>>>>>>> get
>>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> bimargulies wrote:
>>>>>>>>>>
>>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>>> implementation
>>>>>>>>>> at
>>>>>>>>>> work.
>>>>>>>>>>
>>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>>> <ca...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>>> single
>>>>>>>>>>> jar
>>>>>>>>>>> (with
>>>>>>>>>>> a couple of dependent jars). This is all being deployed as a WAR
>>>>>>>>>>> to
>>>>>>>>>>> a
>>>>>>>>>>> Glassfish server for right now. Eventually will be deployed to a
>>>>>>>>>>> tomcat
>>>>>>>>>>> server.
>>>>>>>>>>>
>>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>>>>>>>> specifying
>>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>>> level
>>>>>>>>>>> as
>>>>>>>>>>> my
>>>>>>>>>>> topmost package. This is within the jar that is being deployed as
>>>>>>>>>>> the
>>>>>>>>>>> web
>>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>>> exception:
>>>>>>>>>>>
>>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at
>>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>>
>>>>>>>>>>> I have other files in this same location (mostly images) that I
>>>>>>>>>>> am
>>>>>>>>>>> accessing
>>>>>>>>>>> just fine.
>>>>>>>>>>>
>>>>>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>>>>>
>>>>>>>>>>> Thanks!
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context:
>>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
I am using jdk1.6.0_17. I did read that link you sent on the migration, but
didn't see anything that is relevant. Or am I missing something?

I see that I have two problems.
- how do I correctly specify the wsdlLocation to refer to a wsdl packaged
within the jar.
- what am I missing from the classpath that CXF is not being invoked
properly.


bimargulies wrote:
> 
> What JDK version are you using?
> 
> Did you read that page I sent you about 'endorsed'?
> 
> On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com>
> wrote:
>>
>> When I run it as a standalone application I get the following similar
>> exception:
>>
>> Can not initialize the default wsdl from classpath:example.wsdl
>> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
>> Invalid WSDL URL: classpath:example.wsdl
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>> I have also included the following jars in my classpath:
>>
>> - cxf.jar
>> - commons-logging.jar
>> - neethi.jar
>> - XmlSchema.jar
>> - wsdl4j.jar
>> - jaxb-xjc.jar
>> - velocity.jar
>> - commons-collections.jar
>> - commons-lang.jar
>>
>>
>> bimargulies wrote:
>>>
>>> Yes, but your generated client is not invoking the CXF runtime.
>>>
>>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> To recap, I am not deploying a CXF service, just using a generated
>>>> client. I
>>>> also missed a line in the exception, I am apparently still not able to
>>>> reference the wsdl correctly:
>>>>
>>>> Can not initialize the default wsdl from classpath:example.wsdl
>>>> Exception in thread "AWT-EventQueue-0"
>>>> java.security.AccessControlException:
>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>> Source)
>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>
>>>> This is being generated from the static initializer block from my
>>>> service
>>>> implementation:
>>>>
>>>>  static {
>>>>        URL url = null;
>>>>        try {
>>>>            url = new URL("classpath:example.wsdl");
>>>>        } catch (MalformedURLException e) {
>>>>            System.err.println("Can not initialize the default wsdl from
>>>> classpath:WEXAuth.wsdl");
>>>>            // e.printStackTrace();
>>>>        }
>>>>        WSDL_LOCATION = url;
>>>>    }
>>>>
>>>>
>>>> I am also using java 1.6. Are there any jars I need to include for CXF
>>>> to
>>>> use a generated client?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> This is about the code, not the WSDL.
>>>>>
>>>>> You are making a call to a JAX-WS standard API. That API is provided
>>>>> in Java 1.6. If you want to use CXF's version, instead, you have you
>>>>> to make sure that you are calling CXF's version.
>>>>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>>>>> not, depending on what precise version of Java you've got.
>>>>>
>>>>> What exactly is in your classpath.
>>>>>
>>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> I don't think I am following you. I'm fairly new to using Java for
>>>>>> web
>>>>>> services in general so if you could be a bit more detailed I would
>>>>>> appreciate it. I created a client (wsdl2java -client) from the wsdl
>>>>>> and
>>>>>> I
>>>>>> am
>>>>>> using that to access the service. As far as I understand it, the
>>>>>> location
>>>>>> of
>>>>>> the wsdl is in my classpath as I am referencing other files from that
>>>>>> location as well.
>>>>>>
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> No, that it is a problem with your classpath. If you're trying to
>>>>>>> use
>>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>>>>> Glassfish / Metro versions instead.
>>>>>>>
>>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>>>>> think.
>>>>>>>
>>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> So are you saying that this is a problem with Glassfish? I suppose
>>>>>>>> I
>>>>>>>> can
>>>>>>>> get
>>>>>>>> tomcat up and running locally and try it there.
>>>>>>>>
>>>>>>>>
>>>>>>>> bimargulies wrote:
>>>>>>>>>
>>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>>> implementation
>>>>>>>>> at
>>>>>>>>> work.
>>>>>>>>>
>>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418
>>>>>>>>> <ca...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> I have a web start app that is all packaged and signed as a
>>>>>>>>>> single
>>>>>>>>>> jar
>>>>>>>>>> (with
>>>>>>>>>> a couple of dependent jars). This is all being deployed as a WAR
>>>>>>>>>> to
>>>>>>>>>> a
>>>>>>>>>> Glassfish server for right now. Eventually will be deployed to a
>>>>>>>>>> tomcat
>>>>>>>>>> server.
>>>>>>>>>>
>>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>>>>>>> specifying
>>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>>> My example.wsdl is located at the root of my jar at the same
>>>>>>>>>> level
>>>>>>>>>> as
>>>>>>>>>> my
>>>>>>>>>> topmost package. This is within the jar that is being deployed as
>>>>>>>>>> the
>>>>>>>>>> web
>>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>>> exception:
>>>>>>>>>>
>>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>>> java.security.AccessControlException:
>>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at
>>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>>> Source)
>>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>>
>>>>>>>>>> I have other files in this same location (mostly images) that I
>>>>>>>>>> am
>>>>>>>>>> accessing
>>>>>>>>>> just fine.
>>>>>>>>>>
>>>>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980556.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
What JDK version are you using?

Did you read that page I sent you about 'endorsed'?

On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 <ca...@gmail.com> wrote:
>
> When I run it as a standalone application I get the following similar
> exception:
>
> Can not initialize the default wsdl from classpath:example.wsdl
> Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
> Invalid WSDL URL: classpath:example.wsdl
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
>        at javax.xml.ws.Service.<init>(Unknown Source)
>
> I have also included the following jars in my classpath:
>
> - cxf.jar
> - commons-logging.jar
> - neethi.jar
> - XmlSchema.jar
> - wsdl4j.jar
> - jaxb-xjc.jar
> - velocity.jar
> - commons-collections.jar
> - commons-lang.jar
>
>
> bimargulies wrote:
>>
>> Yes, but your generated client is not invoking the CXF runtime.
>>
>> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
>> wrote:
>>>
>>> To recap, I am not deploying a CXF service, just using a generated
>>> client. I
>>> also missed a line in the exception, I am apparently still not able to
>>> reference the wsdl correctly:
>>>
>>> Can not initialize the default wsdl from classpath:example.wsdl
>>> Exception in thread "AWT-EventQueue-0"
>>> java.security.AccessControlException:
>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>> Source)
>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>
>>> This is being generated from the static initializer block from my service
>>> implementation:
>>>
>>>  static {
>>>        URL url = null;
>>>        try {
>>>            url = new URL("classpath:example.wsdl");
>>>        } catch (MalformedURLException e) {
>>>            System.err.println("Can not initialize the default wsdl from
>>> classpath:WEXAuth.wsdl");
>>>            // e.printStackTrace();
>>>        }
>>>        WSDL_LOCATION = url;
>>>    }
>>>
>>>
>>> I am also using java 1.6. Are there any jars I need to include for CXF to
>>> use a generated client?
>>>
>>> Thanks.
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> This is about the code, not the WSDL.
>>>>
>>>> You are making a call to a JAX-WS standard API. That API is provided
>>>> in Java 1.6. If you want to use CXF's version, instead, you have you
>>>> to make sure that you are calling CXF's version.
>>>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>>>> not, depending on what precise version of Java you've got.
>>>>
>>>> What exactly is in your classpath.
>>>>
>>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> I don't think I am following you. I'm fairly new to using Java for web
>>>>> services in general so if you could be a bit more detailed I would
>>>>> appreciate it. I created a client (wsdl2java -client) from the wsdl and
>>>>> I
>>>>> am
>>>>> using that to access the service. As far as I understand it, the
>>>>> location
>>>>> of
>>>>> the wsdl is in my classpath as I am referencing other files from that
>>>>> location as well.
>>>>>
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> No, that it is a problem with your classpath. If you're trying to use
>>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>>>> Glassfish / Metro versions instead.
>>>>>>
>>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>>>> think.
>>>>>>
>>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> So are you saying that this is a problem with Glassfish? I suppose I
>>>>>>> can
>>>>>>> get
>>>>>>> tomcat up and running locally and try it there.
>>>>>>>
>>>>>>>
>>>>>>> bimargulies wrote:
>>>>>>>>
>>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>>> implementation
>>>>>>>> at
>>>>>>>> work.
>>>>>>>>
>>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> I have a web start app that is all packaged and signed as a single
>>>>>>>>> jar
>>>>>>>>> (with
>>>>>>>>> a couple of dependent jars). This is all being deployed as a WAR to
>>>>>>>>> a
>>>>>>>>> Glassfish server for right now. Eventually will be deployed to a
>>>>>>>>> tomcat
>>>>>>>>> server.
>>>>>>>>>
>>>>>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>>>>>> specifying
>>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>>> My example.wsdl is located at the root of my jar at the same level
>>>>>>>>> as
>>>>>>>>> my
>>>>>>>>> topmost package. This is within the jar that is being deployed as
>>>>>>>>> the
>>>>>>>>> web
>>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>>> exception:
>>>>>>>>>
>>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>>> java.security.AccessControlException:
>>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at
>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>>> Source)
>>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>>
>>>>>>>>> I have other files in this same location (mostly images) that I am
>>>>>>>>> accessing
>>>>>>>>> just fine.
>>>>>>>>>
>>>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
When I run it as a standalone application I get the following similar
exception:

Can not initialize the default wsdl from classpath:example.wsdl
Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException:
Invalid WSDL URL: classpath:example.wsdl
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
	at javax.xml.ws.Service.<init>(Unknown Source)

I have also included the following jars in my classpath:

- cxf.jar
- commons-logging.jar
- neethi.jar
- XmlSchema.jar
- wsdl4j.jar
- jaxb-xjc.jar
- velocity.jar
- commons-collections.jar
- commons-lang.jar


bimargulies wrote:
> 
> Yes, but your generated client is not invoking the CXF runtime.
> 
> On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com>
> wrote:
>>
>> To recap, I am not deploying a CXF service, just using a generated
>> client. I
>> also missed a line in the exception, I am apparently still not able to
>> reference the wsdl correctly:
>>
>> Can not initialize the default wsdl from classpath:example.wsdl
>> Exception in thread "AWT-EventQueue-0"
>> java.security.AccessControlException:
>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>        at java.io.File.getCanonicalPath(Unknown Source)
>>        at java.io.File.getCanonicalFile(Unknown Source)
>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>> This is being generated from the static initializer block from my service
>> implementation:
>>
>>  static {
>>        URL url = null;
>>        try {
>>            url = new URL("classpath:example.wsdl");
>>        } catch (MalformedURLException e) {
>>            System.err.println("Can not initialize the default wsdl from
>> classpath:WEXAuth.wsdl");
>>            // e.printStackTrace();
>>        }
>>        WSDL_LOCATION = url;
>>    }
>>
>>
>> I am also using java 1.6. Are there any jars I need to include for CXF to
>> use a generated client?
>>
>> Thanks.
>>
>>
>> bimargulies wrote:
>>>
>>> This is about the code, not the WSDL.
>>>
>>> You are making a call to a JAX-WS standard API. That API is provided
>>> in Java 1.6. If you want to use CXF's version, instead, you have you
>>> to make sure that you are calling CXF's version.
>>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>>> not, depending on what precise version of Java you've got.
>>>
>>> What exactly is in your classpath.
>>>
>>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> I don't think I am following you. I'm fairly new to using Java for web
>>>> services in general so if you could be a bit more detailed I would
>>>> appreciate it. I created a client (wsdl2java -client) from the wsdl and
>>>> I
>>>> am
>>>> using that to access the service. As far as I understand it, the
>>>> location
>>>> of
>>>> the wsdl is in my classpath as I am referencing other files from that
>>>> location as well.
>>>>
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> No, that it is a problem with your classpath. If you're trying to use
>>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>>> Glassfish / Metro versions instead.
>>>>>
>>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>>> think.
>>>>>
>>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> So are you saying that this is a problem with Glassfish? I suppose I
>>>>>> can
>>>>>> get
>>>>>> tomcat up and running locally and try it there.
>>>>>>
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> That's not a CXF stack trace! That's the Sun reference
>>>>>>> implementation
>>>>>>> at
>>>>>>> work.
>>>>>>>
>>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I have a web start app that is all packaged and signed as a single
>>>>>>>> jar
>>>>>>>> (with
>>>>>>>> a couple of dependent jars). This is all being deployed as a WAR to
>>>>>>>> a
>>>>>>>> Glassfish server for right now. Eventually will be deployed to a
>>>>>>>> tomcat
>>>>>>>> server.
>>>>>>>>
>>>>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>>>>> specifying
>>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>>> My example.wsdl is located at the root of my jar at the same level
>>>>>>>> as
>>>>>>>> my
>>>>>>>> topmost package. This is within the jar that is being deployed as
>>>>>>>> the
>>>>>>>> web
>>>>>>>> start application. When I try to run it, I get the following
>>>>>>>> exception:
>>>>>>>>
>>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>>> java.security.AccessControlException:
>>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>>> Source)
>>>>>>>>        at
>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>>> Source)
>>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>>
>>>>>>>> I have other files in this same location (mostly images) that I am
>>>>>>>> accessing
>>>>>>>> just fine.
>>>>>>>>
>>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980160.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
Yes, but your generated client is not invoking the CXF runtime.

On Thu, Dec 31, 2009 at 10:39 AM, caseyd418 <ca...@gmail.com> wrote:
>
> To recap, I am not deploying a CXF service, just using a generated client. I
> also missed a line in the exception, I am apparently still not able to
> reference the wsdl correctly:
>
> Can not initialize the default wsdl from classpath:example.wsdl
> Exception in thread "AWT-EventQueue-0" java.security.AccessControlException:
> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>        at java.io.Win32FileSystem.resolve(Unknown Source)
>        at java.io.File.getCanonicalPath(Unknown Source)
>        at java.io.File.getCanonicalFile(Unknown Source)
>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
>        at javax.xml.ws.Service.<init>(Unknown Source)
>
> This is being generated from the static initializer block from my service
> implementation:
>
>  static {
>        URL url = null;
>        try {
>            url = new URL("classpath:example.wsdl");
>        } catch (MalformedURLException e) {
>            System.err.println("Can not initialize the default wsdl from
> classpath:WEXAuth.wsdl");
>            // e.printStackTrace();
>        }
>        WSDL_LOCATION = url;
>    }
>
>
> I am also using java 1.6. Are there any jars I need to include for CXF to
> use a generated client?
>
> Thanks.
>
>
> bimargulies wrote:
>>
>> This is about the code, not the WSDL.
>>
>> You are making a call to a JAX-WS standard API. That API is provided
>> in Java 1.6. If you want to use CXF's version, instead, you have you
>> to make sure that you are calling CXF's version.
>> http://cxf.apache.org/21-migration-guide.html might be relevant, or
>> not, depending on what precise version of Java you've got.
>>
>> What exactly is in your classpath.
>>
>> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com> wrote:
>>>
>>> I don't think I am following you. I'm fairly new to using Java for web
>>> services in general so if you could be a bit more detailed I would
>>> appreciate it. I created a client (wsdl2java -client) from the wsdl and I
>>> am
>>> using that to access the service. As far as I understand it, the location
>>> of
>>> the wsdl is in my classpath as I am referencing other files from that
>>> location as well.
>>>
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> No, that it is a problem with your classpath. If you're trying to use
>>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>>> Glassfish / Metro versions instead.
>>>>
>>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>>> think.
>>>>
>>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> So are you saying that this is a problem with Glassfish? I suppose I
>>>>> can
>>>>> get
>>>>> tomcat up and running locally and try it there.
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> That's not a CXF stack trace! That's the Sun reference implementation
>>>>>> at
>>>>>> work.
>>>>>>
>>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I have a web start app that is all packaged and signed as a single
>>>>>>> jar
>>>>>>> (with
>>>>>>> a couple of dependent jars). This is all being deployed as a WAR to a
>>>>>>> Glassfish server for right now. Eventually will be deployed to a
>>>>>>> tomcat
>>>>>>> server.
>>>>>>>
>>>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>>>> specifying
>>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>>> My example.wsdl is located at the root of my jar at the same level as
>>>>>>> my
>>>>>>> topmost package. This is within the jar that is being deployed as the
>>>>>>> web
>>>>>>> start application. When I try to run it, I get the following
>>>>>>> exception:
>>>>>>>
>>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>>> java.security.AccessControlException:
>>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>>> Source)
>>>>>>>        at
>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>>> Source)
>>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>>
>>>>>>> I have other files in this same location (mostly images) that I am
>>>>>>> accessing
>>>>>>> just fine.
>>>>>>>
>>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
You can't use this in a static context. The class hasn't been constructet
yet. I did try to get a ClassLoader instance from the current thread, but
that just resulted in the same exception.


Craig Tataryn wrote:
> 
> Perhaps this is as simple as referencing the wsdl via:
> 
> URL url = this.getClass().getResource("example.wsdl") ??
> 
> Craig.
> 
> -- 
> Craig Tataryn
> site: http://www.basementcoders.com/
> podcast:http://feeds.feedburner.com/TheBasementCoders
> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> twitter: craiger
> 
> On Thu, Dec 31, 2009 at 9:39 AM, caseyd418 <ca...@gmail.com> wrote:
> 
>>
>> To recap, I am not deploying a CXF service, just using a generated
>> client.
>> I
>> also missed a line in the exception, I am apparently still not able to
>> reference the wsdl correctly:
>>
>> Can not initialize the default wsdl from classpath:example.wsdl
>> Exception in thread "AWT-EventQueue-0"
>> java.security.AccessControlException:
>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>        at java.io.File.getCanonicalPath(Unknown Source)
>>        at java.io.File.getCanonicalFile(Unknown Source)
>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>> This is being generated from the static initializer block from my service
>> implementation:
>>
>>  static {
>>        URL url = null;
>>        try {
>>            url = new URL("classpath:example.wsdl");
>>        } catch (MalformedURLException e) {
>>            System.err.println("Can not initialize the default wsdl from
>> classpath:WEXAuth.wsdl");
>>            // e.printStackTrace();
>>        }
>>        WSDL_LOCATION = url;
>>    }
>>
>>
>> I am also using java 1.6. Are there any jars I need to include for CXF to
>> use a generated client?
>>
>> Thanks.
>>
>>
>> bimargulies wrote:
>> >
>> > This is about the code, not the WSDL.
>> >
>> > You are making a call to a JAX-WS standard API. That API is provided
>> > in Java 1.6. If you want to use CXF's version, instead, you have you
>> > to make sure that you are calling CXF's version.
>> > http://cxf.apache.org/21-migration-guide.html might be relevant, or
>> > not, depending on what precise version of Java you've got.
>> >
>> > What exactly is in your classpath.
>> >
>> > On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
>> wrote:
>> >>
>> >> I don't think I am following you. I'm fairly new to using Java for web
>> >> services in general so if you could be a bit more detailed I would
>> >> appreciate it. I created a client (wsdl2java -client) from the wsdl
>> and
>> I
>> >> am
>> >> using that to access the service. As far as I understand it, the
>> location
>> >> of
>> >> the wsdl is in my classpath as I am referencing other files from that
>> >> location as well.
>> >>
>> >>
>> >>
>> >> bimargulies wrote:
>> >>>
>> >>> No, that it is a problem with your classpath. If you're trying to use
>> >>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>> >>> Glassfish / Metro versions instead.
>> >>>
>> >>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>> >>> think.
>> >>>
>> >>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> So are you saying that this is a problem with Glassfish? I suppose I
>> >>>> can
>> >>>> get
>> >>>> tomcat up and running locally and try it there.
>> >>>>
>> >>>>
>> >>>> bimargulies wrote:
>> >>>>>
>> >>>>> That's not a CXF stack trace! That's the Sun reference
>> implementation
>> >>>>> at
>> >>>>> work.
>> >>>>>
>> >>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>> >>>>> wrote:
>> >>>>>>
>> >>>>>> I have a web start app that is all packaged and signed as a single
>> >>>>>> jar
>> >>>>>> (with
>> >>>>>> a couple of dependent jars). This is all being deployed as a WAR
>> to
>> a
>> >>>>>> Glassfish server for right now. Eventually will be deployed to a
>> >>>>>> tomcat
>> >>>>>> server.
>> >>>>>>
>> >>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>> >>>>>> specifying
>> >>>>>> the wsdlLocation as "classpath:example.wsdl".
>> >>>>>> My example.wsdl is located at the root of my jar at the same level
>> as
>> >>>>>> my
>> >>>>>> topmost package. This is within the jar that is being deployed as
>> the
>> >>>>>> web
>> >>>>>> start application. When I try to run it, I get the following
>> >>>>>> exception:
>> >>>>>>
>> >>>>>> Exception in thread "AWT-EventQueue-0"
>> >>>>>> java.security.AccessControlException:
>> >>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>> >>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>> >>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>> >>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>> >>>>>>        at
>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>> >>>>>> Source)
>> >>>>>>        at
>> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> >>>>>> Source)
>> >>>>>>        at
>> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> >>>>>> Source)
>> >>>>>>        at
>> >>>>>>
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> >>>>>> Source)
>> >>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>> >>>>>>
>> >>>>>> I have other files in this same location (mostly images) that I am
>> >>>>>> accessing
>> >>>>>> just fine.
>> >>>>>>
>> >>>>>> Any ideas? I've been working at this for a couple of days now.
>> >>>>>>
>> >>>>>> Thanks!
>> >>>>>>
>> >>>>>> --
>> >>>>>> View this message in context:
>> >>>>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>> >>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> --
>> >>>> View this message in context:
>> >>>>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>> >>>> Sent from the cxf-user mailing list archive at Nabble.com.
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>> >> Sent from the cxf-user mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26980183.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Craig Tataryn <cr...@tataryn.net>.
Perhaps this is as simple as referencing the wsdl via:

URL url = this.getClass().getResource("example.wsdl") ??

Craig.

-- 
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
twitter: craiger

On Thu, Dec 31, 2009 at 9:39 AM, caseyd418 <ca...@gmail.com> wrote:

>
> To recap, I am not deploying a CXF service, just using a generated client.
> I
> also missed a line in the exception, I am apparently still not able to
> reference the wsdl correctly:
>
> Can not initialize the default wsdl from classpath:example.wsdl
> Exception in thread "AWT-EventQueue-0"
> java.security.AccessControlException:
> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>        at java.io.Win32FileSystem.resolve(Unknown Source)
>        at java.io.File.getCanonicalPath(Unknown Source)
>        at java.io.File.getCanonicalFile(Unknown Source)
>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
> Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> Source)
>        at
> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
>        at javax.xml.ws.Service.<init>(Unknown Source)
>
> This is being generated from the static initializer block from my service
> implementation:
>
>  static {
>        URL url = null;
>        try {
>            url = new URL("classpath:example.wsdl");
>        } catch (MalformedURLException e) {
>            System.err.println("Can not initialize the default wsdl from
> classpath:WEXAuth.wsdl");
>            // e.printStackTrace();
>        }
>        WSDL_LOCATION = url;
>    }
>
>
> I am also using java 1.6. Are there any jars I need to include for CXF to
> use a generated client?
>
> Thanks.
>
>
> bimargulies wrote:
> >
> > This is about the code, not the WSDL.
> >
> > You are making a call to a JAX-WS standard API. That API is provided
> > in Java 1.6. If you want to use CXF's version, instead, you have you
> > to make sure that you are calling CXF's version.
> > http://cxf.apache.org/21-migration-guide.html might be relevant, or
> > not, depending on what precise version of Java you've got.
> >
> > What exactly is in your classpath.
> >
> > On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com>
> wrote:
> >>
> >> I don't think I am following you. I'm fairly new to using Java for web
> >> services in general so if you could be a bit more detailed I would
> >> appreciate it. I created a client (wsdl2java -client) from the wsdl and
> I
> >> am
> >> using that to access the service. As far as I understand it, the
> location
> >> of
> >> the wsdl is in my classpath as I am referencing other files from that
> >> location as well.
> >>
> >>
> >>
> >> bimargulies wrote:
> >>>
> >>> No, that it is a problem with your classpath. If you're trying to use
> >>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
> >>> Glassfish / Metro versions instead.
> >>>
> >>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
> >>> think.
> >>>
> >>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
> >>> wrote:
> >>>>
> >>>> So are you saying that this is a problem with Glassfish? I suppose I
> >>>> can
> >>>> get
> >>>> tomcat up and running locally and try it there.
> >>>>
> >>>>
> >>>> bimargulies wrote:
> >>>>>
> >>>>> That's not a CXF stack trace! That's the Sun reference implementation
> >>>>> at
> >>>>> work.
> >>>>>
> >>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
> >>>>> wrote:
> >>>>>>
> >>>>>> I have a web start app that is all packaged and signed as a single
> >>>>>> jar
> >>>>>> (with
> >>>>>> a couple of dependent jars). This is all being deployed as a WAR to
> a
> >>>>>> Glassfish server for right now. Eventually will be deployed to a
> >>>>>> tomcat
> >>>>>> server.
> >>>>>>
> >>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
> >>>>>> specifying
> >>>>>> the wsdlLocation as "classpath:example.wsdl".
> >>>>>> My example.wsdl is located at the root of my jar at the same level
> as
> >>>>>> my
> >>>>>> topmost package. This is within the jar that is being deployed as
> the
> >>>>>> web
> >>>>>> start application. When I try to run it, I get the following
> >>>>>> exception:
> >>>>>>
> >>>>>> Exception in thread "AWT-EventQueue-0"
> >>>>>> java.security.AccessControlException:
> >>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
> >>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
> >>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
> >>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
> >>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
> >>>>>> Source)
> >>>>>>        at
> >>>>>>
> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> >>>>>> Source)
> >>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
> >>>>>>
> >>>>>> I have other files in this same location (mostly images) that I am
> >>>>>> accessing
> >>>>>> just fine.
> >>>>>>
> >>>>>> Any ideas? I've been working at this for a couple of days now.
> >>>>>>
> >>>>>> Thanks!
> >>>>>>
> >>>>>> --
> >>>>>> View this message in context:
> >>>>>>
> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
> >>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
> >>>> Sent from the cxf-user mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
To recap, I am not deploying a CXF service, just using a generated client. I
also missed a line in the exception, I am apparently still not able to
reference the wsdl correctly:

Can not initialize the default wsdl from classpath:example.wsdl
Exception in thread "AWT-EventQueue-0" java.security.AccessControlException:
access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
	at java.io.Win32FileSystem.resolve(Unknown Source)
	at java.io.File.getCanonicalPath(Unknown Source)
	at java.io.File.getCanonicalFile(Unknown Source)
	at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
Source)
	at javax.xml.ws.Service.<init>(Unknown Source)

This is being generated from the static initializer block from my service
implementation:

 static {
        URL url = null;
        try {
            url = new URL("classpath:example.wsdl");
        } catch (MalformedURLException e) {
            System.err.println("Can not initialize the default wsdl from
classpath:WEXAuth.wsdl");
            // e.printStackTrace();
        }
        WSDL_LOCATION = url;
    }


I am also using java 1.6. Are there any jars I need to include for CXF to
use a generated client?

Thanks.


bimargulies wrote:
> 
> This is about the code, not the WSDL.
> 
> You are making a call to a JAX-WS standard API. That API is provided
> in Java 1.6. If you want to use CXF's version, instead, you have you
> to make sure that you are calling CXF's version.
> http://cxf.apache.org/21-migration-guide.html might be relevant, or
> not, depending on what precise version of Java you've got.
> 
> What exactly is in your classpath.
> 
> On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com> wrote:
>>
>> I don't think I am following you. I'm fairly new to using Java for web
>> services in general so if you could be a bit more detailed I would
>> appreciate it. I created a client (wsdl2java -client) from the wsdl and I
>> am
>> using that to access the service. As far as I understand it, the location
>> of
>> the wsdl is in my classpath as I am referencing other files from that
>> location as well.
>>
>>
>>
>> bimargulies wrote:
>>>
>>> No, that it is a problem with your classpath. If you're trying to use
>>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>>> Glassfish / Metro versions instead.
>>>
>>> javax.xml.ws.Service at the bottom of your stack is the symptom, I
>>> think.
>>>
>>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> So are you saying that this is a problem with Glassfish? I suppose I
>>>> can
>>>> get
>>>> tomcat up and running locally and try it there.
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> That's not a CXF stack trace! That's the Sun reference implementation
>>>>> at
>>>>> work.
>>>>>
>>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> I have a web start app that is all packaged and signed as a single
>>>>>> jar
>>>>>> (with
>>>>>> a couple of dependent jars). This is all being deployed as a WAR to a
>>>>>> Glassfish server for right now. Eventually will be deployed to a
>>>>>> tomcat
>>>>>> server.
>>>>>>
>>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>>> specifying
>>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>>> My example.wsdl is located at the root of my jar at the same level as
>>>>>> my
>>>>>> topmost package. This is within the jar that is being deployed as the
>>>>>> web
>>>>>> start application. When I try to run it, I get the following
>>>>>> exception:
>>>>>>
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> java.security.AccessControlException:
>>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>>> Source)
>>>>>>        at
>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>>> Source)
>>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>>
>>>>>> I have other files in this same location (mostly images) that I am
>>>>>> accessing
>>>>>> just fine.
>>>>>>
>>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26979446.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
This is about the code, not the WSDL.

You are making a call to a JAX-WS standard API. That API is provided
in Java 1.6. If you want to use CXF's version, instead, you have you
to make sure that you are calling CXF's version.
http://cxf.apache.org/21-migration-guide.html might be relevant, or
not, depending on what precise version of Java you've got.

What exactly is in your classpath.

On Wed, Dec 30, 2009 at 3:24 PM, caseyd418 <ca...@gmail.com> wrote:
>
> I don't think I am following you. I'm fairly new to using Java for web
> services in general so if you could be a bit more detailed I would
> appreciate it. I created a client (wsdl2java -client) from the wsdl and I am
> using that to access the service. As far as I understand it, the location of
> the wsdl is in my classpath as I am referencing other files from that
> location as well.
>
>
>
> bimargulies wrote:
>>
>> No, that it is a problem with your classpath. If you're trying to use
>> CXF to launch this endpoint, you've ended up with the Java 1.6 or
>> Glassfish / Metro versions instead.
>>
>> javax.xml.ws.Service at the bottom of your stack is the symptom, I think.
>>
>> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com> wrote:
>>>
>>> So are you saying that this is a problem with Glassfish? I suppose I can
>>> get
>>> tomcat up and running locally and try it there.
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> That's not a CXF stack trace! That's the Sun reference implementation at
>>>> work.
>>>>
>>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>>>> wrote:
>>>>>
>>>>> I have a web start app that is all packaged and signed as a single jar
>>>>> (with
>>>>> a couple of dependent jars). This is all being deployed as a WAR to a
>>>>> Glassfish server for right now. Eventually will be deployed to a tomcat
>>>>> server.
>>>>>
>>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>>> specifying
>>>>> the wsdlLocation as "classpath:example.wsdl".
>>>>> My example.wsdl is located at the root of my jar at the same level as
>>>>> my
>>>>> topmost package. This is within the jar that is being deployed as the
>>>>> web
>>>>> start application. When I try to run it, I get the following exception:
>>>>>
>>>>> Exception in thread "AWT-EventQueue-0"
>>>>> java.security.AccessControlException:
>>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>>> Source)
>>>>>        at
>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>>> Source)
>>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>>
>>>>> I have other files in this same location (mostly images) that I am
>>>>> accessing
>>>>> just fine.
>>>>>
>>>>> Any ideas? I've been working at this for a couple of days now.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
I don't think I am following you. I'm fairly new to using Java for web
services in general so if you could be a bit more detailed I would
appreciate it. I created a client (wsdl2java -client) from the wsdl and I am
using that to access the service. As far as I understand it, the location of
the wsdl is in my classpath as I am referencing other files from that
location as well.



bimargulies wrote:
> 
> No, that it is a problem with your classpath. If you're trying to use
> CXF to launch this endpoint, you've ended up with the Java 1.6 or
> Glassfish / Metro versions instead.
> 
> javax.xml.ws.Service at the bottom of your stack is the symptom, I think.
> 
> On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com> wrote:
>>
>> So are you saying that this is a problem with Glassfish? I suppose I can
>> get
>> tomcat up and running locally and try it there.
>>
>>
>> bimargulies wrote:
>>>
>>> That's not a CXF stack trace! That's the Sun reference implementation at
>>> work.
>>>
>>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com>
>>> wrote:
>>>>
>>>> I have a web start app that is all packaged and signed as a single jar
>>>> (with
>>>> a couple of dependent jars). This is all being deployed as a WAR to a
>>>> Glassfish server for right now. Eventually will be deployed to a tomcat
>>>> server.
>>>>
>>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>>> specifying
>>>> the wsdlLocation as "classpath:example.wsdl".
>>>> My example.wsdl is located at the root of my jar at the same level as
>>>> my
>>>> topmost package. This is within the jar that is being deployed as the
>>>> web
>>>> start application. When I try to run it, I get the following exception:
>>>>
>>>> Exception in thread "AWT-EventQueue-0"
>>>> java.security.AccessControlException:
>>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>>> Source)
>>>>        at
>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>>> Source)
>>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>>
>>>> I have other files in this same location (mostly images) that I am
>>>> accessing
>>>> just fine.
>>>>
>>>> Any ideas? I've been working at this for a couple of days now.
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971789.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
No, that it is a problem with your classpath. If you're trying to use
CXF to launch this endpoint, you've ended up with the Java 1.6 or
Glassfish / Metro versions instead.

javax.xml.ws.Service at the bottom of your stack is the symptom, I think.

On Wed, Dec 30, 2009 at 3:05 PM, caseyd418 <ca...@gmail.com> wrote:
>
> So are you saying that this is a problem with Glassfish? I suppose I can get
> tomcat up and running locally and try it there.
>
>
> bimargulies wrote:
>>
>> That's not a CXF stack trace! That's the Sun reference implementation at
>> work.
>>
>> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com> wrote:
>>>
>>> I have a web start app that is all packaged and signed as a single jar
>>> (with
>>> a couple of dependent jars). This is all being deployed as a WAR to a
>>> Glassfish server for right now. Eventually will be deployed to a tomcat
>>> server.
>>>
>>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>>> specifying
>>> the wsdlLocation as "classpath:example.wsdl".
>>> My example.wsdl is located at the root of my jar at the same level as my
>>> topmost package. This is within the jar that is being deployed as the web
>>> start application. When I try to run it, I get the following exception:
>>>
>>> Exception in thread "AWT-EventQueue-0"
>>> java.security.AccessControlException:
>>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>>        at java.io.File.getCanonicalPath(Unknown Source)
>>>        at java.io.File.getCanonicalFile(Unknown Source)
>>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>>> Source)
>>>        at
>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>>> Source)
>>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>>
>>> I have other files in this same location (mostly images) that I am
>>> accessing
>>> just fine.
>>>
>>> Any ideas? I've been working at this for a couple of days now.
>>>
>>> Thanks!
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: AccessControlException using CXF in Web Start App

Posted by caseyd418 <ca...@gmail.com>.
So are you saying that this is a problem with Glassfish? I suppose I can get
tomcat up and running locally and try it there.


bimargulies wrote:
> 
> That's not a CXF stack trace! That's the Sun reference implementation at
> work.
> 
> On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com> wrote:
>>
>> I have a web start app that is all packaged and signed as a single jar
>> (with
>> a couple of dependent jars). This is all being deployed as a WAR to a
>> Glassfish server for right now. Eventually will be deployed to a tomcat
>> server.
>>
>> I have generated a CXF client using wsdl2java (CXF version 2.2.5)
>> specifying
>> the wsdlLocation as "classpath:example.wsdl".
>> My example.wsdl is located at the root of my jar at the same level as my
>> topmost package. This is within the jar that is being deployed as the web
>> start application. When I try to run it, I get the following exception:
>>
>> Exception in thread "AWT-EventQueue-0"
>> java.security.AccessControlException:
>> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>>        at java.io.Win32FileSystem.resolve(Unknown Source)
>>        at java.io.File.getCanonicalPath(Unknown Source)
>>        at java.io.File.getCanonicalFile(Unknown Source)
>>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
>> Source)
>>        at
>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
>> Source)
>>        at javax.xml.ws.Service.<init>(Unknown Source)
>>
>> I have other files in this same location (mostly images) that I am
>> accessing
>> just fine.
>>
>> Any ideas? I've been working at this for a couple of days now.
>>
>> Thanks!
>>
>> --
>> View this message in context:
>> http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971622.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AccessControlException using CXF in Web Start App

Posted by Benson Margulies <bi...@gmail.com>.
That's not a CXF stack trace! That's the Sun reference implementation at work.

On Wed, Dec 30, 2009 at 2:11 PM, caseyd418 <ca...@gmail.com> wrote:
>
> I have a web start app that is all packaged and signed as a single jar (with
> a couple of dependent jars). This is all being deployed as a WAR to a
> Glassfish server for right now. Eventually will be deployed to a tomcat
> server.
>
> I have generated a CXF client using wsdl2java (CXF version 2.2.5) specifying
> the wsdlLocation as "classpath:example.wsdl".
> My example.wsdl is located at the root of my jar at the same level as my
> topmost package. This is within the jar that is being deployed as the web
> start application. When I try to run it, I get the following exception:
>
> Exception in thread "AWT-EventQueue-0" java.security.AccessControlException:
> access denied (java.util.PropertyPermission user.dir 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 java.io.Win32FileSystem.getUserPath(Unknown Source)
>        at java.io.Win32FileSystem.resolve(Unknown Source)
>        at java.io.File.getCanonicalPath(Unknown Source)
>        at java.io.File.getCanonicalFile(Unknown Source)
>        at com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
>        at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
> Source)
>        at javax.xml.ws.Service.<init>(Unknown Source)
>
> I have other files in this same location (mostly images) that I am accessing
> just fine.
>
> Any ideas? I've been working at this for a couple of days now.
>
> Thanks!
>
> --
> View this message in context: http://old.nabble.com/AccessControlException-using-CXF-in-Web-Start-App-tp26971079p26971079.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>