Payara micro - NoClassDefFoundError: org/w3c/dom/ElementTraversal

156 views
Skip to first unread message

Danilo Luiz Rheinheimer

unread,
Apr 5, 2018, 12:23:10 PM4/5/18
to Payara Forum
Hi,

  I have a war application.
  I am able to deploy it on payara full with no issues.
  But when a try do deploy it on payara micro it show this error on start (and the application is not deployed) :

  java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

  Full stack trace of the error is this :

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1093)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1624)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1505)
at org.apache.xerces.dom.DOMImplementationImpl.createDocument(Unknown Source)
at org.apache.xerces.dom.CoreDOMImplementationImpl.createDocument(Unknown Source)
at com.sun.faces.config.manager.Documents.createEmptyFacesConfigDocument(Documents.java:273)
at com.sun.faces.config.manager.Documents.getProgrammaticDocuments(Documents.java:154)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:296)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:229)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5156)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:661)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5725)
at com.sun.enterprise.web.WebModule.start(WebModule.java:609)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:956)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:939)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:684)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2099)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1745)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:107)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:123)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:294)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:357)
at com.sun.enterprise.v3.server.ApplicationLifecycle.initialize(ApplicationLifecycle.java:538)
at fish.payara.deployment.admin.InitializeAllApplicationsCommand.execute(InitializeAllApplicationsCommand.java:75)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:549)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:545)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:544)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:575)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:567)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:566)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1475)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1857)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1733)
at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:169)
at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:94)
at fish.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:1029)
at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:107)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:70)
at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:79)
at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:383)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1659)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1505)


Danilo.

Ondro Mihályi

unread,
Apr 6, 2018, 4:00:56 AM4/6/18
to Danilo Luiz Rheinheimer, Payara Forum
Hi Danilo,

What are the versions of Payara Server and Micro you use?

If the problem happens also with v5.181, please raise an issue on github as it would probably be a bug.

Ondro

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/e98fb636-a95c-4341-828d-320834ff2630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danilo Luiz Rheinheimer

unread,
Apr 6, 2018, 5:35:34 AM4/6/18
to Payara Forum
Ondro,

  The payara micro where the error happened is v5.181
  The payara full where the app is deployed with success is v4.1.2.181

  But I did download the last payara full version v5.181 and the same problem of the micro version happens.

  I will raise a issue on github about this.

  Before I will try to make a minimal war example to demonstrate the isssue.
  But I suspect it has relation with the use of dom4j 1.6,1 as a dependency on maven. It puts xml-apis 1.0.b2 on the project. This last jar has org.w3c.dom.Element interface inside it. But no the ElementTransversal.
  

Danilo.

Steve Millidge

unread,
Apr 6, 2018, 10:18:46 AM4/6/18
to Payara Forum
If you are packaging a different version of old XML apis in your war file then that is the likely problem. Have you tried removing the XML jars from your war and deploying?

Danilo Luiz Rheinheimer

unread,
Apr 8, 2018, 7:05:37 PM4/8/18
to Payara Forum
Steve,

  The jars are included by maven on the project.
  And it seems odd because it used to work on previous Payara (4.x) versions.
  I will make a minimal example and publish raise a issue.

Danilo.
Reply all
Reply to author
Forward
0 new messages