我最近遇到了以下问题:
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
尽管该类存在于构建中,但我们正面临此类未找到错误。
请提出相同的建议....