Re: NoClassDefFoundError org/w3c/dom/ElementTraversal

2015-08-05 Thread Peter Petersson


Moving xercesImp 2.11.0 and xml apis 1.4.01 into geronimo lib endorced 
and the server will not start, disabling either one of them but not both 
and the server will not start, removing them from endorsed and the 
server starts up as expected, so that solution don't seem to work either.


Nothing I have tried except removing the content of the properties files 
of my app has worked so far, this is a mess ;) Anny ideas ?


== geronimo.out ==
2015-08-05 14:45:29,383 ERROR [GBeanInstanceState] Error while starting; 
GBean is now in the FAILED state: 
abstractName=org.apache.geronimo.framework/j2ee-system/3.0.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/3.0.1/car,j2eeType=AttributeStore,name=AttributeManager
javax.xml.transform.TransformerFactoryConfigurationError: Provider 
org.apache.xalan.processor.TransformerFactoryImpl not found

at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(JAXBContextImpl.java:761)
at 
com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader$State.init(DomLoader.java:66)
at 
com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.startElement(DomLoader.java:117)
at 
com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:60)


On 08/01/2015 11:37 PM, Kevin Huntly wrote:


I've always been advised that the xerces and xalan jars should go in 
jre/lib/endorsed. Maybe give that a try (after removing them from the 
war) and see if it works?



Kevin Huntly
79 Aurora Drive
Cheektowaga, NY 14215
Email: kmhun...@gmail.com mailto:kmhun...@gmail.com
Cell: 716/341-5669
LinkedIn: http://www.linkedin.com/in/kevinhuntly

-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--

On Aug 1, 2015 14:23, Peter Petersson petersson.pe...@gmail.com 
mailto:petersson.pe...@gmail.com wrote:


Hi

I am hitting a class loader problem that I need some help
resolving (maybe someone already have resolved this).

I get the following stack trace (snippet, more below) when I try
to deploy my war file in geronimo 3.0.1 (tomcat7)

2015-08-01 01:10:28,646 ERROR [[/xxx]] Exception starting
filter LiftFilter
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

I have found that the problem is related to reading Lifts
resource/props/*.props files (a plain text file containing key
value pair strings).
I have come to this conclusions as disabling the properties files
by emptying the content, removing the files or changing the .props
extension to something like *.props.disabled then the war file
will install and load as expected (although without the properties
loaded).

In my war files /WEB-INF/lib/ I have **xerces:xercesImpl:2.11.0**
and **xml-apis:xml-apis:1.4.01** and the
org/w3c/dom/ElementTraversal class is in the xml-apis jar but when
running in Geronimo this class is not reached for some reason
(running in vanilla jetty works). I have tried some filter options
in geronimo-web.xml but so far have not found a working setup.

Anny ideas on how to resolve this ?

best regards Peter Petersson

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at

org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
at

org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
at

org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at

org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
at

org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at

org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at

org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
at 

Re: NoClassDefFoundError org/w3c/dom/ElementTraversal

2015-08-04 Thread Peter Petersson

Thank you Kevin

That would probably work for most use cases but I was hoping there was a 
filtering / import-package negation solution as that seem more isolated 
and robust also in my case the war may be deployed in other containers 
so having to complicate the build system is no ideal, anyway thanks for 
the input.


Come to think of it maybe using non-overridable-classes element in 
geronimo-war.xml could force the use of the war files xerces and 
xml-apis classes.


Anyone having suggestions/ideas is welcome to shim in

best regards Peter Petersson

On 08/01/2015 11:37 PM, Kevin Huntly wrote:


I've always been advised that the xerces and xalan jars should go in 
jre/lib/endorsed. Maybe give that a try (after removing them from the 
war) and see if it works?



Kevin Huntly
79 Aurora Drive
Cheektowaga, NY 14215
Email: kmhun...@gmail.com mailto:kmhun...@gmail.com
Cell: 716/341-5669
LinkedIn: http://www.linkedin.com/in/kevinhuntly

-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--

On Aug 1, 2015 14:23, Peter Petersson petersson.pe...@gmail.com 
mailto:petersson.pe...@gmail.com wrote:


Hi

I am hitting a class loader problem that I need some help
resolving (maybe someone already have resolved this).

I get the following stack trace (snippet, more below) when I try
to deploy my war file in geronimo 3.0.1 (tomcat7)

2015-08-01 01:10:28,646 ERROR [[/xxx]] Exception starting
filter LiftFilter
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

I have found that the problem is related to reading Lifts
resource/props/*.props files (a plain text file containing key
value pair strings).
I have come to this conclusions as disabling the properties files
by emptying the content, removing the files or changing the .props
extension to something like *.props.disabled then the war file
will install and load as expected (although without the properties
loaded).

In my war files /WEB-INF/lib/ I have **xerces:xercesImpl:2.11.0**
and **xml-apis:xml-apis:1.4.01** and the
org/w3c/dom/ElementTraversal class is in the xml-apis jar but when
running in Geronimo this class is not reached for some reason
(running in vanilla jetty works). I have tried some filter options
in geronimo-web.xml but so far have not found a working setup.

Anny ideas on how to resolve this ?

best regards Peter Petersson

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at

org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
at

org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
at

org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
at

org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at

org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
at

org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at

org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at

org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown
Source)
at
org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at 

NoClassDefFoundError org/w3c/dom/ElementTraversal

2015-08-01 Thread Peter Petersson

Hi

I am hitting a class loader problem that I need some help resolving 
(maybe someone already have resolved this).


I get the following stack trace (snippet, more below) when I try to 
deploy my war file in geronimo 3.0.1 (tomcat7)


2015-08-01 01:10:28,646 ERROR [[/xxx]] Exception starting filter 
LiftFilter

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

I have found that the problem is related to reading Lifts 
resource/props/*.props files (a plain text file containing key value 
pair strings).
I have come to this conclusions as disabling the properties files by 
emptying the content, removing the files or changing the .props 
extension to something like *.props.disabled then the war file will 
install and load as expected (although without the properties loaded).


In my war files /WEB-INF/lib/ I have **xerces:xercesImpl:2.11.0** and 
**xml-apis:xml-apis:1.4.01** and the org/w3c/dom/ElementTraversal class 
is in the xml-apis jar but when running in Geronimo this class is not 
reached for some reason (running in vanilla jetty works). I have tried 
some filter options in geronimo-web.xml but so far have not found a 
working setup.


Anny ideas on how to resolve this ?

best regards Peter Petersson

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at 
org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
at 
org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at 
org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at 
org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at 
org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown 
Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:102)
at java.util.XMLUtils.load(XMLUtils.java:74)
at java.util.Properties.loadFromXML(Properties.java:868)
at 
net.liftweb.util.Props$$anonfun$7$$anonfun$apply$5.apply(Props.scala:309)
at 
net.liftweb.util.Props$$anonfun$7$$anonfun$apply$5.apply(Props.scala:304)

at net.liftweb.common.Full.map(Box.scala:806)
at net.liftweb.util.Props$$anonfun$7.apply(Props.scala:304)
at net.liftweb.util.Props$$anonfun$7.apply(Props.scala:300)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at scala.collection.immutable.Stream.flatMap(Stream.scala:493)
at net.liftweb.util.ListHelpers$class.first(ListHelpers.scala:139)
at net.liftweb.util.Helpers$.first(Helpers.scala:34)
at net.liftweb.util.Props$.props$lzycompute(Props.scala:300)
at net.liftweb.util.Props$.props(Props.scala:278)
at net.liftweb.util.Props$.getBool(Props.scala:64)
at net.liftweb.util.Props$.getBool(Props.scala:65)
at net.liftweb.http.LiftServlet.init(LiftServlet.scala:921)
at net.liftweb.http.LiftServlet.init(LiftServlet.scala:48)
at 
net.liftweb.http.provider.HTTPProvider$class.bootLift(HTTPProvider.scala:104)

at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:1063)
at 
net.liftweb.http.provider.servlet.ServletFilterProvider$class.init(ServletFilterProvider.scala:40)

at net.liftweb.http.LiftFilter.init(LiftServlet.scala:1063)
at 
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at 

Re: NoClassDefFoundError org/w3c/dom/ElementTraversal

2015-08-01 Thread Kevin Huntly
I've always been advised that the xerces and xalan jars should go in
jre/lib/endorsed. Maybe give that a try (after removing them from the war)
and see if it works?


Kevin Huntly
79 Aurora Drive
Cheektowaga, NY 14215
Email: kmhun...@gmail.com
Cell: 716/341-5669
LinkedIn: http://www.linkedin.com/in/kevinhuntly

-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--
On Aug 1, 2015 14:23, Peter Petersson petersson.pe...@gmail.com wrote:

 Hi

 I am hitting a class loader problem that I need some help resolving (maybe
 someone already have resolved this).

 I get the following stack trace (snippet, more below) when I try to deploy
 my war file in geronimo 3.0.1 (tomcat7)

 2015-08-01 01:10:28,646 ERROR [[/xxx]] Exception starting filter
 LiftFilter
 java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

 I have found that the problem is related to reading Lifts
 resource/props/*.props files (a plain text file containing key value pair
 strings).
 I have come to this conclusions as disabling the properties files by
 emptying the content, removing the files or changing the .props extension
 to something like *.props.disabled then the war file will install and load
 as expected (although without the properties loaded).

 In my war files /WEB-INF/lib/ I have **xerces:xercesImpl:2.11.0** and
 **xml-apis:xml-apis:1.4.01** and the org/w3c/dom/ElementTraversal class is
 in the xml-apis jar but when running in Geronimo this class is not reached
 for some reason (running in vanilla jetty works). I have tried some filter
 options in geronimo-web.xml but so far have not found a working setup.

 Anny ideas on how to resolve this ?

 best regards Peter Petersson

 java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
 at
 org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
 at
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
 at
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
 at
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
 at
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
 at
 org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
 at
 org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
 at
 org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
 at
 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
 at
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
 at
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
 at
 org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
 at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown
 Source)
 at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown
 Source)
 at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown
 Source)
 at
 org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown
 Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
 at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:102)
 at java.util.XMLUtils.load(XMLUtils.java:74)
 at java.util.Properties.loadFromXML(Properties.java:868)
 at
 net.liftweb.util.Props$$anonfun$7$$anonfun$apply$5.apply(Props.scala:309)
 at
 net.liftweb.util.Props$$anonfun$7$$anonfun$apply$5.apply(Props.scala:304)
 at net.liftweb.common.Full.map(Box.scala:806)
 at net.liftweb.util.Props$$anonfun$7.apply(Props.scala:304)
 at net.liftweb.util.Props$$anonfun$7.apply(Props.scala:300)
 at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
 at scala.collection.immutable.Stream.flatMap(Stream.scala:493)
 at net.liftweb.util.ListHelpers$class.first(ListHelpers.scala:139)
 at net.liftweb.util.Helpers$.first(Helpers.scala:34)
 at net.liftweb.util.Props$.props$lzycompute(Props.scala:300)
 at