users@jersey.java.net

Re: Allocate Exception

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 23 Apr 2008 17:45:52 +0200

Hi Richard,

Richard Levenberg wrote:
> Does this error mean that there were too many classes/libs that it had
> to search through or something else?
>

Hmm... i think "SEVERE: Allocate exception for servlet ..." means there
was an error initiating the servlet. What version of ASM are you using?

 From the exception (java.lang.NoSuchMethodError) my guess is that the
signature of the method:

   org.objectweb.asm.ClassReader.accept(ClassVisitor, int)

that jersey was compiled against (using asm 3.1) does not match the
signature of the method in the asm jar you are using in the class path.


> If the there were too many is there any way to further qualify the
> search to minimize the stuff it has to search through?
>

Yes, if using servlet you can set the init-param

   "com.sun.ws.rest.config.property.classpath"

with a ';' separate list of paths (that are relative the the location of
the web application).

Paul.

> ------
>
> SEVERE: Allocate exception for servlet Jersey Web Application
> java.lang.NoSuchMethodError:
> org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I)V
> at
> com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.analyzeClassFile(AnnotatedClassScanner.java:258)
>
> at
> com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.indexJar(AnnotatedClassScanner.java:240)
>
> at
> com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.indexJar(AnnotatedClassScanner.java:229)
>
> at
> com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.indexDir(AnnotatedClassScanner.java:221)
>
> at
> com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.index(AnnotatedClassScanner.java:180)
>
> at
> com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.scan(AnnotatedClassScanner.java:90)
>
> at
> com.sun.ws.rest.api.core.ClasspathResourceConfig.init(ClasspathResourceConfig.java:104)
>
> at
> com.sun.ws.rest.api.core.ClasspathResourceConfig.<init>(ClasspathResourceConfig.java:74)
>
> at
> com.sun.ws.rest.api.core.ClasspathResourceConfig.<init>(ClasspathResourceConfig.java:82)
>
> at
> com.sun.ws.rest.spi.container.servlet.ServletContainer.createResourceConfig(ServletContainer.java:160)
>
> at
> com.sun.ws.rest.spi.container.servlet.ServletContainer.init(ServletContainer.java:103)
>
>
>
> r
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109