users@jersey.java.net

[Jersey] Re: Help please

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Wed, 19 Dec 2012 18:47:19 -0500

     I'm curious... Suresh, why are you stuck using Java 5?

Gili

On 19/12/2012 6:06 PM, Pavel Bucek wrote:
> On 12/20/12 12:04 AM, Pavel Bucek wrote:
>> well, pom.xml is a good start, but it is little more complicated.
>> Luckily for you I was able to do that, but you will need to recompile
>> on JDK 1.5 (I don't have it installed currently).
>>
>> So..
>>
>> https://svn.java.net/svn/jersey~svn/tags/jersey-1.2/jersey/contribs/spring
>
> ^ shoudl be
> svn co
> https://svn.java.net/svn/jersey~svn/tags/jersey-1.2/jersey/contribs/spring
>
>> cd spring
>> patch -p0 < ./jersey-1.2-spring-2.0.1.patch # see attachment
>> mvn clean install -P spring20 -Dmaven.test.skip
>>
>> your new jersey-spring-1.2 is in target directory:
>>
>> ls ./target/jersey-spring-1.2.jar
>>
>> Please note that this is completely unsupported binary and I won't
>> recommend it for production environment (unless thoroughly tested).
>>
>> Hope it helps,
>> Pavel
>>
>> On 12/19/12 4:40 PM, Suresh Reddy wrote:
>>>
>>> Thanks Pavel. Appreciate your help. I am wondering what chanfe you
>>> were talking about changing jersey code. Is it the pom.xml?
>>>
>>> On Dec 19, 2012 7:16 AM, "Pavel Bucek" <pavel.bucek_at_oracle.com
>>> <mailto:pavel.bucek_at_oracle.com>> wrote:
>>>
>>> I just went thru jersey-spring/pom.xml file history and
>>> discovered that we haven't ever supported spring older than
>>> 2.0.5 :/ so if you don't want to make changes to jersey code,
>>> you would need to upgrade to spring 2.0.5 to get this working.
>>>
>>> Pavel
>>>
>>>
>>> On 12/19/12 3:31 PM, Suresh Reddy wrote:
>>>>
>>>> Hi Pavel,
>>>>
>>>> Thanks so much for you reply. Your mail sounded like light at
>>>> the end of tunnel. I am wondering if I can dow ngrade my jersey
>>>> to further down below 1.2, would it work with spring 2.0.1 or I
>>>> will have to work with spring 2.0.5
>>>>
>>>> Thanks
>>>>
>>>> On Dec 19, 2012 4:54 AM, "Pavel Bucek" <pavel.bucek_at_oracle.com
>>>> <mailto:pavel.bucek_at_oracle.com>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> from jersey-spring pom.xml:
>>>>
>>>> |<||spring20-release-version||>2.0.5</||spring20-release-version||>|
>>>> |<||spring25-release-version||>[2.5.2,3)</||spring25-release-version||>
>>>>
>>>> can you try upgrade spring to 2.0.5? Looks like there is
>>>> some minor change in its api - |
>>>> |org.springframework.util.ClassUtils.
>>>>
>>>> Regards,
>>>> Pavel
>>>> |
>>>>
>>>>
>>>> On 12/19/12 4:42 AM, Reddy, Suresh (HQP) wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am not sure if this is right forum, but I am wondering
>>>>> if somebody can help me as I have struggling with this
>>>>> over a week now. I have searched through google and found
>>>>> couple of pointers that I may have more than one jersey
>>>>> classes in my classpath. I have confirmed that I only have
>>>>> jersey-bundle-1.2.jar and jersey-spring-1.2 in classpath.
>>>>> We are using jdk 1.5 and spring 2.0.1 so we cannot use the
>>>>> latest. I will truly appreciate if anybody can give me any
>>>>> kind of pointers.
>>>>>
>>>>> Thanks
>>>>>
>>>>> 'weblogic.application.ModuleException:
>>>>> [HTTP:101216]Servlet: "jersey-servlet" failed to preload
>>>>> on startup in Web application: "jersey-core-restws".
>>>>>
>>>>> java.lang.NoSuchMethodError: getUserClass
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.spring.container.SpringComponentProviderFactory.register(SpringComponentProviderFactory.java:89)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.spring.container.SpringComponentProviderFactory.<init>(SpringComponentProviderFactory.java:83)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.spring.container.servlet.SpringServlet.initiate(SpringServlet.java:99)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:278)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:566)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:211)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:333)
>>>>>
>>>>> at
>>>>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:497)
>>>>>
>>>>> at
>>>>> javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
>>>>>
>>>>> at
>>>>> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>>>>>
>>>>> at
>>>>> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:68)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:504)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1698)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1675)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1595)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2734)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:892)
>>>>>
>>>>> at
>>>>> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
>>>>>
>>>>> at
>>>>> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
>>>>>
>>>>> at
>>>>> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
>>>>>
>>>>> at
>>>>> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:641)
>>>>>
>>>>> --Thanks
>>>>>
>>>>> Suresh Reddy
>>>>>
>>>>
>>>
>>
>