smallrye-graphql: io.smallrye.graphql.entry.http.GraphQLServerWebSocket java.lang.NoClassDefFoundError: org.jboss.logging.Logger
I’m trying to GraphQL server to run on OpenLiberty and it complains at start that :
`[WARNING ] CWNEN0047W: Resource annotations on the fields of the io.smallrye.graphql.entry.http.GraphQLServerWebSocket class will be ignored. The annotations could not be obtained because of the exception : java.lang.NoClassDefFoundError: org.jboss.logging.Logger [AUDIT ] CWWKT0016I: Web application available (default_host): http://ac6a5b861e67:9080/deneme2-web/ [ERROR ] SRVE0283E: Exception caught while initializing context: java.lang.NoClassDefFoundError: org.jboss.logging.Logger at io.smallrye.graphql.entry.http.SmallRyeGraphQLServletLogging.<clinit>(SmallRyeGraphQLServletLogging.java:17) at io.smallrye.graphql.entry.http.IndexInitializer.createIndex(IndexInitializer.java:55) at io.smallrye.graphql.entry.http.StartupListener.contextInitialized(StartupListener.java:55) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2465) at [internal classes]
[ERROR ] SRVE0265E: Error occured while notifying listeners of web application start: java.lang.NoClassDefFoundError: org.jboss.logging.Logger at io.smallrye.graphql.entry.http.SmallRyeGraphQLServletLogging.<clinit>(SmallRyeGraphQLServletLogging.java:17) at io.smallrye.graphql.entry.http.IndexInitializer.createIndex(IndexInitializer.java:55) at io.smallrye.graphql.entry.http.StartupListener.contextInitialized(StartupListener.java:55) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2465) at [internal classes]
[AUDIT ] CWWKZ0012I: The application deneme2-ear was not started. [AUDIT ] CWWKT0017I: Web application removed (default_host): http://ac6a5b861e67:9080/deneme2-web/ [ERROR ] SRVE0285E: Exception caught while destroying context: java.lang.NoClassDefFoundError: io.smallrye.graphql.entry.http.SmallRyeGraphQLServletLogging (initialization failure) at java.base/java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:156) at io.smallrye.graphql.entry.http.StartupListener.contextDestroyed(StartupListener.java:69) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed(WebApp.java:2697) at [internal classes] `
Server shouldn’t depend on Application server specific dependencies so that any Jakarta EE server can run it.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15 (6 by maintainers)
@t1 based on the bug report to open liberty the guide has not been followed and they are trying to package smallrye graphql in their application. If that is their intent and desire they can do so, but they would be required to package the dependencies of smallrye graphql in their applications. There is no requirement that a Jakarta EE runtime provide jboss logging.
I would imagine a similar issue would occur when trying to package smallrye graphql in a web app deployed to Tomcat or Jetty since I don’t think either of those provide jboss logging either. It seems to me that the jboss logging dependency should be compile rather than provided since it isn’t provided in all Jakarta EE runtimes.
If they were following the guide you pointed them at then you would be correct that they would not see this
ClassDefNotFoundError