Jersey and recursive paths

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Jersey and recursive paths

Graham Leggett
Hi all,

While experimenting with Jersey I have found how to specify URLs that  
consist of static path elements, such as "/browse/{itemID}", but I'm  
struggling to find how to handle recursive arguments, such as "/browse/
{itemPath}", where itemPath is "/path/to/my/item".

I have data expressed within a hierarchy that I need to maintain  
within the URL space, and I'm struggling to express it. When I attempt  
to use the path "/browse/path/to/my/item" I get a 404 from Jersey, and  
my code doesn't get called at all.

Is there a bit of documentation that I am missing?

Regards,
Graham
--


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Jersey and recursive paths

Scott Glass-2
Here we go again.  I'm getting this message when I try to create the Client
object in my code...

<BEGIN SNIPPET>

ClientConfig config = new DefaultClientConfig();

config.getProperties().put(
ClientConfig.PROPERTY_FOLLOW_REDIRECTS, true);

config.getProperties().put(
ClientConfig.PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, true);

myClient = Client.create(config);   // Throws the exception here (Line: 146
in the message below)

<END SNIPPET>

java.lang.ClassFormatError: Absent Code attribute in method that is not
native or abstract in class file javax/xml/stream/XMLInputFactory
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.bmc.arsys.pluginsvr.plugins.e.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.getDeclaredMethods(Unknown Source)
    at
com.sun.jersey.core.reflection.MethodList.getAllDeclaredMethods(MethodList.j
ava:67)
    at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:61)
    at
com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMetho
d(ComponentConstructor.java:123)
    at
com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConst
ructor.java:117)
    at
com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(Pro
viderFactory.java:162)
    at
com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(Provi
derFactory.java:134)
    at
com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServ
ices.java:253)
    at
com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(P
roviderServices.java:202)
    at
com.sun.jersey.core.spi.factory.InjectableProviderFactory.configure(Injectab
leProviderFactory.java:103)
    at com.sun.jersey.api.client.Client.<init>(Client.java:224)
    at com.sun.jersey.api.client.Client.<init>(Client.java:158)
    at com.sun.jersey.api.client.Client.create(Client.java:573)
    at
com.sungard.cto.arsystem.plugin.SunGardUpdateService.createEntry(SunGardUpda
teService.java:146)

Any ideas?

Thanks,
Scott




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Absent Code attribute in method that is not native...

Scott Glass-2
Ah never mind, I figured it out.  The class loader once again got in the
way.
Once I tweaked that, it started working.

Thanks anyway.

Scott



On 7/14/10 11:56 AM, "Scott Glass" <[hidden email]> wrote:

> Here we go again.  I'm getting this message when I try to create the Client
> object in my code...
>
> <BEGIN SNIPPET>
>
> ClientConfig config = new DefaultClientConfig();
>
> config.getProperties().put(
> ClientConfig.PROPERTY_FOLLOW_REDIRECTS, true);
>
> config.getProperties().put(
> ClientConfig.PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, true);
>
> myClient = Client.create(config);   // Throws the exception here (Line: 146
> in the message below)
>
> <END SNIPPET>
>
> java.lang.ClassFormatError: Absent Code attribute in method that is not
> native or abstract in class file javax/xml/stream/XMLInputFactory
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClassCond(Unknown Source)
>     at java.lang.ClassLoader.defineClass(Unknown Source)
>     at java.security.SecureClassLoader.defineClass(Unknown Source)
>     at java.net.URLClassLoader.defineClass(Unknown Source)
>     at java.net.URLClassLoader.access$000(Unknown Source)
>     at java.net.URLClassLoader$1.run(Unknown Source)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(Unknown Source)
>     at com.bmc.arsys.pluginsvr.plugins.e.loadClass(Unknown Source)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     at java.lang.Class.getDeclaredMethods0(Native Method)
>     at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
>     at java.lang.Class.getDeclaredMethods(Unknown Source)
>     at
> com.sun.jersey.core.reflection.MethodList.getAllDeclaredMethods(MethodList.j
> ava:67)
>     at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:61)
>     at
> com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMetho
> d(ComponentConstructor.java:123)
>     at
> com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConst
> ructor.java:117)
>     at
> com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(Pro
> viderFactory.java:162)
>     at
> com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(Provi
> derFactory.java:134)
>     at
> com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServ
> ices.java:253)
>     at
> com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(P
> roviderServices.java:202)
>     at
> com.sun.jersey.core.spi.factory.InjectableProviderFactory.configure(Injectab
> leProviderFactory.java:103)
>     at com.sun.jersey.api.client.Client.<init>(Client.java:224)
>     at com.sun.jersey.api.client.Client.<init>(Client.java:158)
>     at com.sun.jersey.api.client.Client.create(Client.java:573)
>     at
> com.sungard.cto.arsystem.plugin.SunGardUpdateService.createEntry(SunGardUpda
> teService.java:146)
>
> Any ideas?
>
> Thanks,
> Scott
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]