Farhan Raja

Greenhorn
+ Follow
since Jun 09, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Farhan Raja

Yeah i have tried these options,

1. i used cglib 2.2, but no help
2. i also used cglib-nodep, but no help
3. I also put javassist in dependencies but my project is using hibernate.cfg.xml file, and javassist can only be configured in hibernate.properties file, not in XML.

So no solutions seems to work for me
14 years ago
Thanks for the help, but my problem still persists, after digging in to the issue more, i have found out that

hibernate and JAX-RS reference implementations cannot work together, as hibernate requires ASM 2.2.3 and JAX-RS requires 3.1, this is present on the URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-358

It seems that this problem is not fixed. Do you know any workaround for this ?
14 years ago
I am working in an existing established project, and it is using ASM 1.5.3,

now how can i force jetty/maven to use ASM 3.1, as if i just put ASM 3.1 in repository, then hibernate starts giving exceptions,

so can you please guide me that how can i force in POM.xml(or whatever), to use ASM 3.1 ?
14 years ago
I have also tried /demo/* but this gives me an exception and i am unable to figure out the reason for that as well,

the stack trae is

HTTP ERROR: 500

org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I)V

RequestURI=/hosting/demo/example
Caused by:

java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I)V
at com.sun.jersey.server.impl.container.config.AnnotatedClassScanner.analyzeClassFile(AnnotatedClassScanner.java:263)
at com.sun.jersey.server.impl.container.config.AnnotatedClassScanner.indexDir(AnnotatedClassScanner.java:212)
at com.sun.jersey.server.impl.container.config.AnnotatedClassScanner.index(AnnotatedClassScanner.java:185)
at com.sun.jersey.server.impl.container.config.AnnotatedClassScanner.scan(AnnotatedClassScanner.java:129)
at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:114)
at com.sun.jersey.api.core.PackagesResourceConfig.(PackagesResourceConfig.java:78)
at com.sun.jersey.api.core.PackagesResourceConfig.(PackagesResourceConfig.java:89)
at com.sun.jersey.spi.container.servlet.ServletContainer.createResourceConfig(ServletContainer.java:403)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:204)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:400)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:346)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:422)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:269)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

Powered by Jetty://
14 years ago
I am new to RESTful Services.

I am trying to deploy a simplest REST service using jersey, and JAX-RS, but i am getting this error,

HTTP ERROR: 404

NOT_FOUND

RequestURI=/hosting/demo/example

Powered by Jetty://


Where i think i have done everything right, below is the code i am using for it.

POM.XML (only pasting the part related to jersey)



WEB.XML



[b]My Class having @GET[/b]



The url i hit is: http://localhost/hosting/demo/example

Please help, its very urgent, thanks in advance.
14 years ago