Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 78790 invoked from network); 31 Dec 2009 17:32:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Dec 2009 17:32:08 -0000 Received: (qmail 39962 invoked by uid 500); 31 Dec 2009 17:32:07 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 39905 invoked by uid 500); 31 Dec 2009 17:32:07 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 39895 invoked by uid 99); 31 Dec 2009 17:32:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 17:32:07 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 17:31:58 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NQOs5-0003GC-Cx for users@cxf.apache.org; Thu, 31 Dec 2009 09:31:37 -0800 Message-ID: <26980556.post@talk.nabble.com> Date: Thu, 31 Dec 2009 09:31:37 -0800 (PST) From: caseyd418 To: users@cxf.apache.org Subject: Re: AccessControlException using CXF in Web Start App In-Reply-To: <61b5d9410912310925v1f5b64e5k6fd7eb946e28de14@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: casey.dunham@gmail.com References: <26971079.post@talk.nabble.com> <61b5d9410912301142icbcc27bk85dcf12ab0d214cd@mail.gmail.com> <26971622.post@talk.nabble.com> <61b5d9410912301207p572093fcu88dab184c3afee9b@mail.gmail.com> <26971789.post@talk.nabble.com> <61b5d9410912301236x736ddd5va39e87180ac8cb57@mail.gmail.com> <26979446.post@talk.nabble.com> <61b5d9410912310800g6a30efaak7627ba7df4f57453@mail.gmail.com> <26980160.post@talk.nabble.com> <61b5d9410912310925v1f5b64e5k6fd7eb946e28de14@mail.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: >=20 > What JDK version are you using? >=20 > Did you read that page I sent you about 'endorsed'? >=20 > On Thu, Dec 31, 2009 at 11:50 AM, caseyd418 > 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 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.xml.internal.ws.client.WSServiceDe= legate.(Unknown >> Source) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.xml.internal.ws.client.WSServiceDe= legate.(Unknown >> Source) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown >> Source) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at javax.xml.ws.Service.(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 >>> 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) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.security.AccessControlContext.check= Permission(Unknown >>>> Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.security.AccessController.checkPerm= ission(Unknown >>>> Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.lang.SecurityManager.checkPermissio= n(Unknown Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.lang.SecurityManager.checkPropertyA= ccess(Unknown Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.lang.System.getProperty(Unknown Sou= rce) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.Win32FileSystem.getUserPath(Unkn= own Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.Win32FileSystem.resolve(Unknown = Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.File.getCanonicalPath(Unknown So= urce) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.File.getCanonicalFile(Unknown So= urce) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.xml.internal.ws.util.JAXWSUtils.= absolutize(Unknown >>>> Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>> com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown >>>> Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>> com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown >>>> Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown >>>> Source) >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at javax.xml.ws.Service.(Unknown Sour= ce) >>>> >>>> This is being generated from the static initializer block from my >>>> service >>>> implementation: >>>> >>>> =C2=A0static { >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0URL url =3D null; >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0try { >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0url =3D new URL("classpath:ex= ample.wsdl"); >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0} catch (MalformedURLException e) { >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0System.err.println("Can not i= nitialize the default wsdl from >>>> classpath:WEXAuth.wsdl"); >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0// e.printStackTrace(); >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0WSDL_LOCATION =3D url; >>>> =C2=A0 =C2=A0} >>>> >>>> >>>> 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 >>>>> 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 tha= t >>>>>> 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 >>>>>>> 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 >>>>>>>>> >>>>>>>>> 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 a= s >>>>>>>>>> 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) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>>>>>>>> java.security.AccessControlContext.checkPermission(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.security.AccessController.che= ckPermission(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.lang.SecurityManager.checkPer= mission(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.lang.SecurityManager.checkPro= pertyAccess(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.lang.System.getProperty(Unkno= wn Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.Win32FileSystem.getUserPat= h(Unknown Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.Win32FileSystem.resolve(Un= known Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.File.getCanonicalPath(Unkn= own Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at java.io.File.getCanonicalFile(Unkn= own Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>>>>>>>> com.sun.xml.internal.ws.util.JAXWSUtils.absolutize(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>>>>>>>> com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at >>>>>>>>>> com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(U= nknown >>>>>>>>>> Source) >>>>>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0at javax.xml.ws.Service.(Unknow= n 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-St= art-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-Star= t-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-Ap= p-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. >> >> >=20 >=20 --=20 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.