users@jersey.java.net

Re: [Jersey] WL 10.3/Jersey 1.1.5 issue

From: gerard davison <gerard.davison_at_oracle.com>
Date: Fri, 26 Feb 2010 15:21:31 +0000

I logged a bug to track this:

https://jersey.dev.java.net/issues/show_bug.cgi?id=479

It has a suggested patch if you would like to try it.

Gerard

On 24/02/2010 13:20, Trolly Rogers wrote:
> Thanks Gerard. I tried it out and this does prevent the exception from
> happening. I'll stay tuned for the fix since ideally I'm going to want
> to specify packages.
>
>
> On Wed, Feb 24, 2010 at 4:42 AM, gerard davison
> <gerard.davison_at_oracle.com <mailto:gerard.davison_at_oracle.com>> wrote:
>
>
> Trolly,
>
> This is a known issue, I hope to have a fix for this it in a few
> days if all goes well. This appears to only be when you the use
> package specific filtering, if you just let Jersey scan the entire
> classpath you should find it starts to work.
>
> Thanks,
>
> Gerard
>
>
> On 24/02/2010 01:27, Trolly Rogers wrote:
>> Thanks for your quick response, Pavel. From what I've read, it
>> does seem that what you suggested - "*file:/*" - should work.
>> But I don't have control over this (or at least have never known
>> how to control it). I was able to reproduce the issue with a very
>> minimal example which I've attached.
>>
>> You mentioned that you didn't have WL experience, so I figured I
>> would list a few steps to save you some time digging through
>> documentation on how to do the simple things needed to recreate
>> this problem (in WL). I'm on windows for this project, and
>> C:\bea103 is my weblogic 10.3 install directory.
>>
>> 1. Setup a server - Locate
>> C:\bea103\wlserver_10.3\common\bin\config.cmd and run it to setup
>> a domain. Choose all default options except for entering user
>> id/pass for admin stuff. The default domain is usally
>> "base_domain"... whatever you choose, you'll need to remember it.
>> Click create, and then Done.
>>
>> 2. Run the server - C:\bea103\user_projects\domains\{your domain
>> name}\startWebLogic.cmd
>>
>> 3. Deploy the sample - not ideal, but simple... put the war in
>> C:\bea103\user_projects\domains\{your domain name}\autodeploy.
>> You should already be in "dev mode" so this should work. Also
>> note that you can re-copy the war there and WL will redeploy the
>> app.
>>
>> Default port on WL is 7001. The WL console can be targeted via
>> http://localhost:7001/console. Recreating this problem happens
>> during deploy time.
>>
>> Okay, that's my quick WL rundown! Hopefully I saved you a bit of
>> time so you can focus more on the issue rather than dumb WL setup
>> things.
>>
>> Thanks again!
>>
>> *trolly.s.rogers_at_gmail.com <mailto:trolly.s.rogers_at_gmail.com>*
>>
>> On Tue, Feb 23, 2010 at 5:57 PM, Pavel Bucek <Pavel.Bucek_at_sun.com
>> <mailto:Pavel.Bucek_at_sun.com>> wrote:
>>
>>
>> Hello Trolly,
>>
>> Paul did some work on this, I know he added support for
>> scanning in JBoss and fixed some issue with WebLogic too (and
>> it went to 1.1.5, so it looks like jersey bug or at least
>> changed behavior).
>>
>> What I see from your report is that protocol in URI is
>> somehow lost; I suppose it will work with following:
>>
>> zip:*file:/*C:/bea103/user_projects/domains/rest_domain/servers/AdminServer/tmp/_WL_user/_appsdir_rest-v1_war/h01wh2/war/WEB-INF/lib/_wl_cls_gen.jar!/org/comtradshow/rest/jaxrs
>>
>> but I'm not sure whether you control this or its passed from
>> container.
>>
>> I don't have any experience with weblogic but looks like
>> there is a free download available so I can look into it if
>> you provide reproducible testcase.
>>
>>
>> Regards,
>> Pavel
>>
>>
>>
>> Trolly Rogers wrote:
>>
>> Hi All - I'm trying to upgrade my jersey impl from
>> 1.1.4.1 to 1.1.5 (core,json, and server), and am getting
>> the exception below during deployment. My JVM info is
>> below too. I'm running Weblogic 10.3. 1.1.4.1 worked, but
>> when i introduce the 1.1.5 jars it doesn't.
>>
>> Anyone come across this and have a solution? I searched
>> on the "unknown protocol" exception below but haven't
>> found anything to resolve my issue.
>>
>> Thanks for reading.
>>
>> java version "1.6.0_17"
>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
>> Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode,
>> sharing)
>>
>> com.sun.jersey.core.spi.scanning.ScannerException: IO
>> error when scanning jar
>> zip:C:/bea103/user_projects/domains/rest_domain/servers/AdminServer/tmp/_WL_user/_appsdir_rest-v1_war/h01wh2/war/WEB-INF/lib/_wl_cls_gen.jar!/org/comtradshow/rest/jaxrs
>> at
>> com.sun.jersey.core.spi.scanning.uri.JarZipSchemeScanner.scan(JarZipSchemeScanner.java:75)
>> at
>> com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:135)
>> at
>> com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:121)
>> at
>> com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:69)
>> at
>> com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:110)
>> Truncated. see log file for complete stacktrace
>> java.net.MalformedURLException: unknown protocol: c
>> at java.net.URL.<init>(URL.java:574)
>> at java.net.URL.<init>(URL.java:464)
>> at java.net.URL.<init>(URL.java:413)
>> at
>> com.sun.jersey.core.spi.scanning.uri.JarZipSchemeScanner.scan(JarZipSchemeScanner.java:68)
>> at
>> com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:135)
>> Truncated. see log file for complete stacktrace
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> <mailto:users-unsubscribe_at_jersey.dev.java.net>
>> For additional commands, e-mail:
>> users-help_at_jersey.dev.java.net
>> <mailto:users-help_at_jersey.dev.java.net>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:users-unsubscribe_at_jersey.dev.java.net <mailto:users-unsubscribe_at_jersey.dev.java.net>
>> For additional commands, e-mail:users-help_at_jersey.dev.java.net <mailto:users-help_at_jersey.dev.java.net>
>
> --
> Gerard Davison | Senior Principal Software Engineer | +44 118 924 5095
> Oracle JDeveloper Web Service, Spring, Weblogic SCA Tooling Development
> Oracle Corporation UK Ltd is a company incorporated in England& Wales.
> Company Reg. No. 1782505.
> Reg. office: Oracle Parkway, Thames Valley Park, Reading RG6 1RA.
>
> Bloghttp://kingsfleet.blogspot.com Twitter kingsfleet
>
>
>

-- 
Gerard Davison | Senior Principal Software Engineer | +44 118 924 5095
Oracle JDeveloper Web Service, Spring, Weblogic SCA Tooling Development
Oracle Corporation UK Ltd is a company incorporated in England&  Wales.
Company Reg. No. 1782505.
Reg. office: Oracle Parkway, Thames Valley Park, Reading RG6 1RA.
Blog http://kingsfleet.blogspot.com Twitter kingsfleet