在glassfish 3.1.2中部署时,commons-digester无法加载我的类

时间:2012-10-16 06:34:43

标签: glassfish glassfish-3 classnotfoundexception xerces apache-commons-digester

我最近遇到了以下问题:

1)我的应用程序是企业应用程序。它建立在JAVA 1.5之上。部署在glassfish 2.1中,它运行正常。

现在我们发现有必要从JAVA 1.5迁移到JAVA 1.6以及从GLASSFISH 2.1迁移到GLASSFISH 3.1.2。

现在,在尝试迁移问题时出现了问题。 在我们的应用程序启动期间,使用commons-digester我们解析XML配置文件并将其保存到对象。使用glassfish 2.1,在JAVA 1.5和JAVA 1.6中,消化器解析正好发生。

但是当在glassfish 3.1.2中执行相同操作时,我们在应用程序启动期间收到以下错误:

以下日志文​​件来自应用程序日志:

java.lang.ClassNotFoundException: ge.ifm.valueObjects.ConfVO
    at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808)
    at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252)
    at org.apache.commons.digester.Rule.begin(Rule.java:200)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(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.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1605)
    at ge.ifm.common.utility.IFMCacheListener.contextInitialized(IFMCacheListener.java:87)

来自glassfish服务器日志的以下日志:

[#|2012-10-16T10:59:40.936+0530|SEVERE|glassfish3.1.2|org.apache.catalina.core.ContainerBase|_ThreadID=22;_ThreadName=Thread-2;|ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: ge.ifm.common.exception.GenericInterfaceException: SAXException-->Occured while calling parse of Digester Class.Exception Message is -->Error at (11, 7: ge.ifm.valueObjects.ConfVO
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
    .
    .
Caused by: ge.ifm.common.exception.GenericInterfaceException: SAXException-->Occured while calling parse of Digester Class.Exception Message is -->Error at (11, 7: ge.ifm.valueObjects.ConfVO
    at ge.ifm.common.utility.IFMCacheListener.contextInitialized(IFMCacheListener.java:107)
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
    at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
    ... 62 more
Caused by: java.lang.ClassNotFoundException: ge.ifm.valueObjects.ConfVO
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
    at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(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.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1605)
    at ge.ifm.common.utility.IFMCacheListener.contextInitialized(IFMCacheListener.java:87)
    ... 65 more
Caused by: java.lang.ClassNotFoundException: ge.ifm.valueObjects.ConfVO
    at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808)
    at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252)
    at org.apache.commons.digester.Rule.begin(Rule.java:200)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
    ... 77 more

虽然构建中存在类,但我们正面临着此类未找到的错误。

请在同样的建议....

0 个答案:

没有答案