Finally I have managed to bring up my adf web application in tomcat server. But now I'm stuck with one issue, when I try to access my page it gives me the following error,
22/01/2012 2:47:39 AM oracle.jsp.logger.JspMessages infoCannotDispatchJspPage
INFO: Unable to dispatch JSP Page : Exception:java.lang.NoClassDefFoundError: oracle/classloader/PolicyClassLoader
Thinking that its again an error because of jar, I searched to download the jar, I have found the jar name but I cannot find the jar anywhere to download , the name I have found is "pcl.jar"
But I cannot find what is the real problem, I have did all the things I could to get the fullest log but this is what I can find.
WARNING: Errors processing schema:jar:file:/C:/tomcat635/lib/adfm.jar!/oracle/adfdt/model/schema/main.xsd
oracle.xml.parser.schema.XSDException
at oracle.xml.parser.schema.XSDBuilder.buildSchema(XSDBuilder.java:748)
at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:407)
at oracle.bali.xml.grammar.schema.OracleSchemaFactory.buildSchemas(OracleSchemaFactory.java:213)
at oracle.bali.xml.grammar.schema.OracleSchemaFactory.buildSchemas(OracleSchemaFactory.java:159)
at oracle.bali.xml.grammar.schema.SchemaGrammarProvider.addSchema(SchemaGrammarProvider.java:64)
at oracle.mds.internal.type.InternalTypeManager.addSchema(InternalTypeManager.java:548)
at oracle.mds.internal.type.InternalTypeManager.addSchemasFromTypeConfig(InternalTypeManager.java:480)
at oracle.mds.internal.type.InternalTypeManager.<init>(InternalTypeManager.java:103)
at oracle.mds.type.TypeManager.create(TypeManager.java:102)
at oracle.mds.core.MDSInstance.<init>(MDSInstance.java:1795)
at oracle.mds.core.MDSInstance.<init>(MDSInstance.java:1738)
at oracle.mds.core.MDSInstance.findAndStoreMDSInstance(MDSInstance.java:2035)
at oracle.mds.core.MDSInstance.getOrCreateInstance(MDSInstance.java:529)
at oracle.mds.core.MDSInstance.getOrCreateInstance(MDSInstance.java:492)
at oracle.adf.share.config.ADFMDSConfig.getDefaultMDSInstance(ADFMDSConfig.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:64)
at oracle.adf.share.config.FallbackConfigImpl.getDefaultMDSInstance(FallbackConfigImpl.java:95)
at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:602)
at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:582)
at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.getMDSInstance(ADFContextMDSConfigHelperImpl.java:274)
at oracle.adf.share.ADFContext.getMDSInstanceAsObject(ADFContext.java:1757)
at oracle.adf.share.http.ServletADFContext.initialize(ServletADFContext.java:494)
at oracle.adf.share.http.ServletADFContext.initThreadContext(ServletADFContext.java:401)
at oracle.adf.model.servlet.HttpBindingRequestHandler.initADFContext(HttpBindingRequestHandler.java:55)
at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:109)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:171)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
22/01/2012 2:59:05 AM oracle.bali.xml.grammar.schema.OracleSchemaFactory buildSchemas
WARNING: Errors processing schema:jar:file:/C:/tomcat635/lib/adfm.jar!/oracle/adfdt/model/schema/ui/jcuimodel.xsd
oracle.xml.parser.schema.XSDException
at oracle.xml.parser.schema.XSDBuilder.buildSchema(XSDBuilder.java:748)
at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:407)
at oracle.bali.xml.grammar.schema.OracleSchemaFactory.buildSchemas(OracleSchemaFactory.java:213)
at oracle.bali.xml.grammar.schema.OracleSchemaFactory.buildSchemas(OracleSchemaFactory.java:159)
at oracle.bali.xml.grammar.schema.SchemaGrammarProvider.addSchema(SchemaGrammarProvider.java:64)
at oracle.mds.internal.type.InternalTypeManager.addSchema(InternalTypeManager.java:548)
at oracle.mds.internal.type.InternalTypeManager.addSchemasFromTypeConfig(InternalTypeManager.java:480)
at oracle.mds.internal.type.InternalTypeManager.<init>(InternalTypeManager.java:103)
at oracle.mds.type.TypeManager.create(TypeManager.java:102)
at oracle.mds.core.MDSInstance.<init>(MDSInstance.java:1795)
at oracle.mds.core.MDSInstance.<init>(MDSInstance.java:1738)
at oracle.mds.core.MDSInstance.findAndStoreMDSInstance(MDSInstance.java:2035)
at oracle.mds.core.MDSInstance.getOrCreateInstance(MDSInstance.java:529)
at oracle.mds.core.MDSInstance.getOrCreateInstance(MDSInstance.java:492)
at oracle.adf.share.config.ADFMDSConfig.getDefaultMDSInstance(ADFMDSConfig.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:64)
at oracle.adf.share.config.FallbackConfigImpl.getDefaultMDSInstance(FallbackConfigImpl.java:95)
at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:602)
at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:582)
at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.getMDSInstance(ADFContextMDSConfigHelperImpl.java:274)
at oracle.adf.share.ADFContext.getMDSInstanceAsObject(ADFContext.java:1757)
at oracle.adf.share.http.ServletADFContext.initialize(ServletADFContext.java:494)
at oracle.adf.share.http.ServletADFContext.initThreadContext(ServletADFContext.java:401)
at oracle.adf.model.servlet.HttpBindingRequestHandler.initADFContext(HttpBindingRequestHandler.java:55)
at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:109)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:171)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
22/01/2012 2:59:05 AM oracle.jbo.uicli.mom.CpxUtils$Visitor logMainApplicationCpx
INFO: jndi:/localhost/KitUtility_sample/WEB-INF/classes/view/DataBindings.cpx
22/01/2012 2:59:06 AM oracle.jsp.logger.JspMessages infoCannotDispatchJspPage
INFO: Unable to dispatch JSP Page : Exception:java.lang.NoClassDefFoundError: oracle/classloader/PolicyClassLoader
Update:
I have added all the custom libraries in <tomcat>/lib for deploying ADF as mentioned in the Oracle docs, url below link , The list of jars that i have included are '
adf-controller-api.jar
adf-controller-rt-common.jar
adf-controller-security.jar
adf-controller.jar
adf-richclient-api-11.jar
adf-richclient-impl-11.jar
adf-share-base.jar
adf-share-ca.jar
adf-share-security.jar
adf-share-support.jar
adflibfilter.jar
adflogginghandler.jar
adfm.jar
adfmweb.jar
adfsharembean.jar
adminclient.jar
annotations-api.jar
batik-anim.jar
batik-awt-util.jar
batik-bridge.jar
batik-codec.jar
batik-css.jar
batik-dom.jar
batik-ext.jar
batik-extension.jar
batik-gui-util.jar
batik-gvt.jar
batik-parser.jar
batik-script.jar
batik-svg-dom.jar
batik-svggen.jar
batik-swing.jar
batik-transcoder.jar
batik-util.jar
batik-xml.jar
cache.jar
catalina-ant.jar
catalina-ha.jar
catalina-tribes.jar
catalina.jar
dms.jar
dvt-basemaps.jar
dvt-faces.jar
dvt-jclient.jar
dvt-trinidad.jar
dvt-utils.jar
ecj-3.7.jar
el-api.jar
glassfish.jstl_1.2.0.1.jar
identitystore.jar
inspect4.jar
jasper-el.jar
jasper.jar
javatools-nodeps.jar
javax.activation_1.1.0.0_1-1.jar
jewt4.jar
jrf-api.jar
jsf-api.jar
jsf-impl.jar
jsp-api.jar
mdsrt.jar
oc4j-internal.jar
ojdl.jar
ojsp.jar
poi-3.7-20101029.jar
prefuse.jar
servlet-api.jar
share.jar
tomcat-api.jar
tomcat-coyote.jar
tomcat-dbcp.jar
tomcat-i18n-es.jar
tomcat-i18n-fr.jar
tomcat-i18n-ja.jar
tomcat-jdbc.jar
tomcat-util.jar
trinidad-api.jar
trinidad-impl.jar
xml-apis-ext.jar
xmlef.jar
xmlparserv2.jar
Update 2:
I have found the Pcl.jar , but now when I try to access my page it tells me the following error
22/01/2012 11:36:44 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
22/01/2012 11:36:44 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
22/01/2012 11:36:44 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('com.sun.faces.config.WebConfiguration', 'com.sun.faces.config.WebConfiguration#e99d0f')
22/01/2012 11:36:44 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('com.sun.faces.config.WebConfiguration', 'com.sun.faces.config.WebConfiguration#e99d0f')
22/01/2012 11:37:15 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
oracle.jbo.NoDefException: JBO-25002: Definition null.cpx of type Application Definition not found
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:381)
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:296)
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:277)
at oracle.jbo.uicli.mom.JUApplicationDefImpl.findDefObject(JUApplicationDefImpl.java:83)
at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:559)
at oracle.adf.model.servlet.ADFBindingFilter.initializeBindingContext(ADFBindingFilter.java:348)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:182)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)'
Related
First here is the exception code
java.lang.ClassNotFoundException: org.apache.poi.xssf.streaming.SXSSFWorkbook
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at com.alibaba.excel.context.GenerateContextImpl.<init>(GenerateContextImpl.java:64)
at com.alibaba.excel.write.ExcelBuilderImpl.init(ExcelBuilderImpl.java:35)
at com.alibaba.excel.ExcelWriter.<init>(ExcelWriter.java:50)
at com.landray.kmss.km.archive.excel.DownloadServlet.doGet(DownloadServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:79)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:143)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:177)
at com.landray.kmss.third.pda.interfaces.ThirdPdaRedirectFilter.doFilter(ThirdPdaRedirectFilter.java:103)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:183)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:183)
at com.landray.kmss.sys.admin.threadmonitor.service.spring.SysAdminThreadMonitorFilter.doFilter(SysAdminThreadMonitorFilter.java:54)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:183)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy.doFilter(KmssProcessingFilterProxy.java:55)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at com.landray.kmss.sys.authentication.integration.CheckVerificationCodeFilter.doFilter(CheckVerificationCodeFilter.java:115)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at com.landray.kmss.web.filter.AcegiFilterToBeanProxy.doFilter(AcegiFilterToBeanProxy.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.landray.kmss.web.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
2019-03-15 10:17:25,643 [ERROR] ==== http-8080-4: com.landray.kmss.util.KmssMessageWriter.logError(208)
很抱歉,操作失败!,URL=http://localhost:8080/ekp/resource/jsp/jsperror.jsp?type=500
java.lang.NoClassDefFoundError: org/apache/poi/xssf/streaming/SXSSFWorkbook
at com.alibaba.excel.context.GenerateContextImpl.<init>(GenerateContextImpl.java:64)
at com.alibaba.excel.write.ExcelBuilderImpl.init(ExcelBuilderImpl.java:35)
at com.alibaba.excel.ExcelWriter.<init>(ExcelWriter.java:50)
at com.landray.kmss.km.archive.excel.DownloadServlet.doGet(DownloadServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:79)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:143)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:177)
at com.landray.kmss.third.pda.interfaces.ThirdPdaRedirectFilter.doFilter(ThirdPdaRedirectFilter.java:103)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:183)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:183)
at com.landray.kmss.sys.admin.threadmonitor.service.spring.SysAdminThreadMonitorFilter.doFilter(SysAdminThreadMonitorFilter.java:54)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy$VirtualFilterChain.doFilter(KmssProcessingFilterProxy.java:183)
at com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy.doFilter(KmssProcessingFilterProxy.java:55)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at com.landray.kmss.sys.authentication.integration.CheckVerificationCodeFilter.doFilter(CheckVerificationCodeFilter.java:115)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at com.landray.kmss.web.filter.AcegiFilterToBeanProxy.doFilter(AcegiFilterToBeanProxy.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.landray.kmss.web.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xssf.streaming.SXSSFWorkbook
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 50 more
I can search org.apache.poi.xssf.streaming.SXSSFWorkbook class in the project using Ctrl + Shift + T ,but only one class I can see.I hava tried it with IntelliJ IDEA purely,and I can get the right thing as I expected.But when I make the code and jar into my official workspace which have so many other jars ,I think may be two jar are conflicting with each other.
Here is my imgs.
https://img.shownmmp.top/easyexcel.png
https://img.shownmmp.top/poi.png
Any help would be appreciated.
Try to use Maven or any other build tool in which you can easily control which dependencies are being used and added into resulting artifact. Also with Maven you can explicitly exclude conflicting transitive dependencies.
I'm trying to expose a WS using Axis2 on already existing webapp
So I setup what I had to setup : axis2-conf.xml, modules I'm using, services.xml is loaded correctly, also the Axis2 runtime for my Tomcat..
When I try to test my WS using the URL:
http://localhost:8080/myapp/services/TestService?wsdl
I get the following exception:
javax.servlet.ServletException: Le fichier "/axis2-web/listSingleService.jsp" n'a pas été trouvé
at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:335)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgent.java:120)
at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:309)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:254)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:744)
Saying that the JSP listSingleService.jsp was not found...
Anybody faced this problem before? thanks in advance!
I have an app that runs perfectly on tomcat 6 in eclipse. When I take this app and manually deploy it to that same tomcat server outside of eclipse and run it, I get javax.el.PropertyNotFoundException when trying to access many of the pages.
How can i get a PropertyNotFoundException when running an app outside of eclipse, but not in eclipse?
Stacktrace when trying to access a page:
Aug 28, 2013 9:40:30 AM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/ccadmin/publications/search.xhtml]
javax.el.PropertyNotFoundException: /ccadmin/publications/search.xhtml #107,92 value="#{pubBacker.beginYear}": Property 'beginYear' not found on type com.ccadmin.backing.PublicationBacker
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIOutput.getValue(UIOutput.java:170)
at javax.faces.component.UIInput.getValue(UIInput.java:284)
at org.primefaces.renderkit.SelectOneRenderer.getValues(SelectOneRenderer.java:46)
at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeMarkup(SelectOneMenuRenderer.java:74)
at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeEnd(SelectOneMenuRenderer.java:65)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:877)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:279)
at org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:237)
at org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:127)
at org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:71)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:877)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:447)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Aug 28, 2013 9:40:30 AM com.sun.faces.context.ExceptionHandlerImpl throwIt
INFO: Exception when handling error trying to reset the response.
javax.el.PropertyNotFoundException: /ccadmin/publications/search.xhtml #107,92 value="#{pubBacker.beginYear}": Property 'beginYear' not found on type com.ccadmin.backing.PublicationBacker
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIOutput.getValue(UIOutput.java:170)
at javax.faces.component.UIInput.getValue(UIInput.java:284)
at org.primefaces.renderkit.SelectOneRenderer.getValues(SelectOneRenderer.java:46)
at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeMarkup(SelectOneMenuRenderer.java:74)
at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeEnd(SelectOneMenuRenderer.java:65)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:877)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:279)
at org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:237)
at org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:127)
at org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:71)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:877)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:447)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
javax.el.PropertyNotFoundException: /ccadmin/publications/search.xhtml #107,92 value="#{pubBacker.beginYear}": Property 'beginYear' not found on type com.ccadmin.backing.PublicationBacker
clearly specifies it is missing beginYear property for pubBacker bean.
Check if jar is updated. It is common mistake, at least for me. Some part of code is updated, but jar is not updated(mvn install).
Unable to instantiate Action, com.hcl.hips.action.KAListproduct, defined for 'KAListproduct' in namespace '/'com.hcl.hips.action.KAListproduct
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:306)
at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:387)
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.sf.j2ep.ProxyFilter.doFilter(ProxyFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.hcl.hips.action.LoginFilter.doFilter(LoginFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.hcl.hips.action.KAListproduct
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:146)
at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:96)
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:206)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:128)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:139)
at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:109)
at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:287)
... 26 more
your error is described in the stack trace
java.lang.ClassNotFoundException: com.hcl.hips.action.KAListproduct
You did not import your class, or somehow failed to wire up it up correctly. Post relevant configs if you want further help.
Hey this is the code to resolve this issue
http://www.bpjava.net/Struts2_Configuration_Plugin/config-browser/showBeans.action
i do not know whether kiran kumar solved it or not...
But for future people........
I am developing a webapp that requires setting up a DataSource with JNDI using Enterprise JDBC Classes.I am using the Netbeans 6.9 bundled tomcat (6.0.26 app) server with mysql 5.xx.The issue really is that I can still see the database values from a relation being displayed in my jsp page whereas during the tomcat initialization it says something like this:
.
.
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to javax.naming.Context
at org.apache.jsp.Hello_jsp._jspService(Hello_jsp.java:141)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Jul 25, 2010 1:28:25 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jul 25, 2010 1:28:25 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Jul 25, 2010 1:28:32 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 25, 2010 1:28:32 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 25, 2010 1:28:40 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name nexusirm is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.apache.jsp.Hello_jsp._jspService(Hello_jsp.java:141)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Jul 25, 2010 1:29:50 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.apache.jsp.Hello_jsp._jspService(Hello_jsp.java:143)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Jul 25, 2010 1:30:10 AM org.apache.catalina.core.ApplicationContext log
.
.
I have the following inside my /WEB-INF/web.xml
<resource-ref>
<res-ref-name>jdbc/NexusIRM</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
And the following in my /META-INF/context.xml
<Resource name="jdbc/NexusIRM"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/nexusirm"
username="root"
password=""
maxActive="20"
maxIdle="30"
maxWait="-1"
/>
My Application code looks like:
<%
try{
Context initCtx = new InitialContext();
DataSource ds = (DataSource)
initCtx.lookup("java:comp/env/jdbc/NexusIRM");
Connection conn=ds.getConnection();
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("SELECT * FROM irm_gtresult");
if(rs.next())
{
for(int i=1;i<9;i++){
out.write(rs.getString(i));
}
}
conn.close();
}catch(SQLException e)
{out.write(e.getMessage());
e.printStackTrace();}
%>
I am just curious to why these exceptions are being thrown while the application is being executed perfectly!
Try this ...
Connection conn;
try
{
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
// Look up our data source
DataSource ds = (DataSource)
envCtx.lookup("jdbc/NexusIRM");
// Allocate and use a connection from the pool
Connection conn = ds.getConnection();
... use this connection to access the database ...
}
finally
{
if(conn != null)
conn.close();
}
NOTE: Make sure you put your close in a finally !!!