Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jersey Version Problems #295

Closed
theroadrunnershow opened this issue Feb 21, 2015 · 0 comments
Closed

Jersey Version Problems #295

theroadrunnershow opened this issue Feb 21, 2015 · 0 comments

Comments

@theroadrunnershow
Copy link

I am having some troubles with running a app that I am using the Java server side code for. The code in the sample seems to be using Version 1.* (I am using sun.jersey 1.19 and maven)

I get the NoSuchMethodError when the server is starting up.

My POM.xml :

    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-core</artifactId>
        <version>1.19</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-servlet</artifactId>
        <version>1.19</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-client</artifactId>
        <version>1.19</version>
    </dependency>

My web.xml :

<servlet>
    <servlet-name>Rest</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.config.property.packages</param-name>
        <param-value>com.example.serversideauthservice.resources.AuthResource</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Rest</servlet-name>
    <url-pattern>/auth/*</url-pattern>
</servlet-mapping>

Not sure what I am doing wrong, but when I checked the API docs, it seems I have the right version in the mvn dependancies.

Here is the stacktrace during run time.

[INFO] INFO: Scanning for root resource and provider classes in the packages: [INFO] com.example.serversideauthservice.resources.AuthResource [INFO] Feb 21, 2015 2:35:26 PM com.google.apphosting.utils.jetty.JettyLogger warn [INFO] WARNING: failed Rest: java.lang.NoSuchMethodError: com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoaderPA()Ljava/security/PrivilegedAction; [INFO] Feb 21, 2015 2:35:26 PM com.google.apphosting.utils.jetty.JettyLogger warn [INFO] WARNING: failed com.google.appengine.tools.development.DevAppEngineWebAppContext@7f74a932{/,D:\taxmarkets_main\taxmarket\target\taxmarket-1.0-SNAPSHOT}: java.lang.NoSuchMethodError: com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoaderPA()Ljava/security/PrivilegedAction; [INFO] Feb 21, 2015 2:35:26 PM com.google.apphosting.utils.jetty.JettyLogger warn [INFO] WARNING: failed JettyContainerService$ApiProxyHandler@660382ce: java.lang.NoSuchMethodError: com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoaderPA()Ljava/security/PrivilegedAction; [INFO] Feb 21, 2015 2:35:26 PM com.google.apphosting.utils.jetty.JettyLogger warn [INFO] WARNING: Error starting handlers [INFO] java.lang.NoSuchMethodError: com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoaderPA()Ljava/security/PrivilegedAction; [INFO] at com.sun.jersey.spi.scanning.AnnotationScannerListener.(AnnotationScannerListener.java:94) [INFO] at com.sun.jersey.spi.scanning.PathProviderScannerListener.(PathProviderScannerListener.java:59) [INFO] at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79) [INFO] at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104) [INFO] at com.sun.jersey.api.core.PackagesResourceConfig.(PackagesResourceConfig.java:78) [INFO] at com.sun.jersey.api.core.PackagesResourceConfig.(PackagesResourceConfig.java:89) [INFO] at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:696) [INFO] at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:674) [INFO] at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:205)

Any ideas on what I am doing wrong?

@sahat sahat closed this as completed Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants