Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » java.lang.VerifyError and Virgo
java.lang.VerifyError and Virgo [message #671666] Wed, 18 May 2011 16:06 Go to next message
Aaron  is currently offline Aaron
Messages: 21
Registered: February 2011
Junior Member
I'm developing a web application on Virgo that uses Spring Http converters. This causes the project to depend on Rome to produce RSS and ATOM feeds. Those dependencies are available in the EBR, so I think I'm good there. When I try to load my ATOM feed, I'm getting a java.lang.VerifyError for a method call inside a Rome class:
May 18, 2011 9:57:56 AM org.apache.catalina.core.StandardWrapperValve invoke 
    SEVERE: Servlet.service() for servlet rest threw exception 
    java.lang.VerifyError: (class: com/sun/syndication/io/impl/Atom10Generator, method: serializeEntry signature: (Lcom/sun/syndication/feed/atom/Entry;Ljava/io/Writer;)V) Incompatible argument to function 
     java.lang.Class.forName0(Native Method) 
     java.lang.Class.forName(Class.java:247) 
     com.sun.syndication.io.impl.PluginManager.getClasses(PluginManager.java:136) 
     com.sun.syndication.io.impl.PluginManager.loadPlugins(PluginManager.java:87) 
     com.sun.syndication.io.impl.PluginManager.<init>(PluginManager.java:55) 
     com.sun.syndication.io.impl.PluginManager.<init>(PluginManager.java:46) 
     com.sun.syndication.io.impl.FeedGenerators.<init>(FeedGenerators.java:47) 
     com.sun.syndication.io.WireFeedOutput.getFeedGenerators(WireFeedOutput.java:53) 
     com.sun.syndication.io.WireFeedOutput.outputJDom(WireFeedOutput.java:262) 
     com.sun.syndication.io.WireFeedOutput.output(WireFeedOutput.java:211) 
     com.sun.syndication.io.WireFeedOutput.output(WireFeedOutput.java:190) 
     org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter.writeInternal(AbstractWireFeedHttpMessageConverter.java:95) 
     org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter.writeInternal(AbstractWireFeedHttpMessageConverter.java:1) 
     org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:181) 
     org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.writeWithMessageConverters(AnnotationMethodHandlerAdapter.java:975) 
     org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.handleResponseBody(AnnotationMethodHandlerAdapter.java:933) 
     org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.getModelAndView(AnnotationMethodHandlerAdapter.java:882) 
     org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:428) 
     org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) 
     org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) 
     org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) 
     org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) 
     org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) 
     javax.servlet.http.HttpServlet.service(HttpServlet.java:690) 
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
     org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
     org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
     org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
     org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
     org.eclipse.virgo.web.tomcat.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:29) 
     org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) 
     org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
     org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:886) 
     org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721) 
     org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2256) 
     java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
     java.lang.Thread.run(Thread.java:680)

I'm really not sure what could be causing this, and everything I read about java.lang.VerifyError makes it seem like it may be hard to track down.

The following two lines from that trace are what is making me wonder if the problem has something to do with Virgo/OSGi:
 java.lang.Class.forName0(Native Method) 
 java.lang.Class.forName(Class.java:247) 

only because every time I've seen problems related to Class.forName() it seems to be an OSGi related issue.

If you have any ideas what could possibly be going on here, I'd really appreciate your input.

Thanks,
Aaron
Re: java.lang.VerifyError and Virgo [message #673828 is a reply to message #671666] Tue, 24 May 2011 21:11 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo Iliev
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Looks like a combination of ClassCast and Java late binding, but I cannot be 100% sure without debugging the code.

Perhaps you have the same class in two different bundles and this causes the issue to appear.

If you can check which loader is used to load com/sun/syndication/feed/atom/Entry or java/io/Writer this should shed some light on the root cause.
Re: java.lang.VerifyError and Virgo [message #673842 is a reply to message #673828] Tue, 24 May 2011 22:59 Go to previous message
rshelley  is currently offline rshelley
Messages: 59
Registered: April 2010
Member
Check your WAR's WEB-INF/lib and make sure you don't have any classes duplicated between the WAR and the non-WAR OSGI bundles you loaded in (for ROME).
Previous Topic:Class Cast Exception for same class
Next Topic:war works in Tomcat, fails in Virgo with "packageImports must not contain duplicate items"
Goto Forum:
  


Current Time: Sat Oct 25 12:45:08 GMT 2014

Powered by FUDForum. Page generated in 0.16865 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software