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 <[email protected]> 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 <[email protected]>
>>> 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 <[email protected]>
>>>>> 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.