2Aguy
2Aguy

Reputation: 4625

How do I query the version of Xerces at runtime for an app deployed to JBoss 7.2?

Normally you can query the version of Xerces as documented here using org.apache.xerces.impl.Version.getVersion(). This does not work at runtime under JBoss due to a ClassNotFoundException:

Code:

Class.forName( "org.apache.xerces.impl.Version" )

Output:

java.lang.ClassNotFoundException: org.apache.xerces.impl.Version from [Module "deployment.tep-web-services.war:main" from Service Module Loader]
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
org.codehaus.groovy.runtime.callsite.CallSiteClassLoader.loadClass(CallSiteClassLoader.java:51)

What is the runtime location of the Version class under JBoss 7.2?

Upvotes: 2

Views: 754

Answers (1)

matt forsythe
matt forsythe

Reputation: 3912

I found my Xerces jar in $JBOSS_HOME/server/modules/system/layers/base/org/apache/xerces/main, but I'm not sure if that is 'standard' or not. It did contain an org.apache.xerces.impl.Version class. I'm not sure why you wouldn't be able to load it with Class.forName() from JBoss...

Upvotes: 1

Related Questions