Bug 1183013 - Unable to run logging-tools quickstart in JBDS
Summary: Unable to run logging-tools quickstart in JBDS
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER2
: EAP 6.4.0
Assignee: jboss-set
QA Contact: Nikoleta Hlavickova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-16 12:32 UTC by Nikoleta Hlavickova
Modified: 2019-08-19 12:42 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:42:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nikoleta Hlavickova 2015-01-16 12:32:44 UTC
After deploying the quickstart using JBDS, the webapp is opened automatically at http://localhost:8080/jboss-logging-tools/ - this is OK. However, clicking on any of the examples on the webpage ends with JBWEB000065: HTTP Status 500 - java.lang.ExceptionInInitializerError

The stacktrace is:
13:30:05,345 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jboss-logging-tools].[javax.ws.rs.core.Application]] (http-localhost/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet javax.ws.rs.core.Application threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.ExceptionInInitializerError
	at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:364) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:232) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:208) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:556) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-17.jar:7.5.0.Final-redhat-17]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.4.Final-redhat-1.jar:7.5.4.Final-redhat-1]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
Caused by: java.lang.ExceptionInInitializerError
	at org.jboss.as.quickstarts.loggingToolsQS.GreeterService.getHelloName(GreeterService.java:45) [classes:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_71]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_71]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71]
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541) [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
	... 19 more
Caused by: java.lang.IllegalArgumentException: Invalid logger interface org.jboss.as.quickstarts.loggingToolsQS.loggers.GreeterLogger (implementation not found in ModuleClassLoader for Module "deployment.jboss-logging-tools.war:main" from Service Module Loader)
	at org.jboss.logging.Logger$1.run(Logger.java:2254) [jboss-logging-3.1.4.GA-redhat-2.jar:3.1.4.GA-redhat-2]
	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_71]
	at org.jboss.logging.Logger.getMessageLogger(Logger.java:2227) [jboss-logging-3.1.4.GA-redhat-2.jar:3.1.4.GA-redhat-2]
	at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214) [jboss-logging-3.1.4.GA-redhat-2.jar:3.1.4.GA-redhat-2]
	at org.jboss.as.quickstarts.loggingToolsQS.loggers.GreeterLogger.<clinit>(GreeterLogger.java:27) [classes:]
	... 29 more

Comment 2 Fred Bricon 2015-01-19 21:06:08 UTC
I haven't tried but I'm fairly confident this is the same problem that caused bug #1182606, i.e. annotation processing hasn't been enabled. The fix should be identical, i.e add <m2e.apt.activation>jdt_apt</m2e.apt.activation> to the project properties

Comment 3 sgilda 2015-01-19 21:23:20 UTC
I found this JIRA: https://issues.jboss.org/browse/ISPN-1177

I tried adding the <m2e.apt.activation>jdt_apt</m2e.apt.activation> and got a new error.

java.lang.NoClassDefFoundError: Could not initialize class org.jboss.as.quickstarts.loggingToolsQS.loggers.GreeterLogger

Let me try again with a fresh server.

Comment 4 sgilda 2015-01-19 21:37:49 UTC
Thanks Fred! This works with a fresh server.

It turns out this is the same issue described here: https://bugzilla.redhat.com/show_bug.cgi?id=1182606#c2

Fixed in this commit: https://github.com/jboss-developer/jboss-eap-quickstarts/commit/2096d93d42842ca317575d0d6f81f7588b20a001

Comment 6 sgilda 2015-01-28 12:31:06 UTC
Yes, that is what I meant.

Comment 7 Nikoleta Hlavickova 2015-02-11 12:48:36 UTC
Verified with EAP 6.4.0.ER2.


Note You need to log in before you can comment on or make changes to this bug.