0

我有 jboss 7 (jboss EAP 6.0.1)。我有 oracle 9 DB 和 oracle 8.0.5 DB。oracle 8.0.5 DB 在 5 小时内下降,但 oracle 9 连接继续工作。使用了 oracle 8 和 oracle 9 Db通过相同的应用程序。它们被添加到同一个 ds 文件中。例外 :-

    13:17:41,530 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ajp-lwpit118v/10.77.29.52:8409-28) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:282)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:240)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:775)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:345)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) [hibernate3.jar:3.2.0.ga]
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417) [hibernate3.jar:3.2.0.ga]
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) [hibernate3.jar:3.2.0.ga]
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1560) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.Loader.doQuery(Loader.java:661) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.Loader.doList(Loader.java:2144) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.Loader.list(Loader.java:2023) [hibernate3.jar:3.2.0.ga]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393) [hibernate3.jar:3.2.0.ga]
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) [hibernate3.jar:3.2.0.ga]
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) [hibernate3.jar:3.2.0.ga]
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) [hibernate3.jar:3.2.0.ga]
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) [hibernate3.jar:3.2.0.ga]
at com.sabicip.web.loftware.dao.orm.LWAppDAOImpl.retrieveConsBOLNumList(LWAppDAOImpl.java:310) [classes:]
at com.sabicip.web.loftware.ui.web.bean.AutoLabelBackingBean.<init>(AutoLabelBackingBean.java:158) [classes:]
at sun.reflect.GeneratedConstructorAccessor232.newInstance(Unknown Source) [:1.7.0_21]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_21]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_21]
at java.lang.Class.newInstance0(Class.java:374) [rt.jar:1.7.0_21]
at java.lang.Class.newInstance(Class.java:327) [rt.jar:1.7.0_21]
at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:277) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:268) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:49) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:314) [myfaces-impl-1.1.5.jar:]
at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65) [el-ri-1.0.jar:]
at com.sun.el.parser.AstValue.getValue(AstValue.java:106) [el-ri-1.0.jar:]
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192) [el-ri-1.0.jar:]
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at javax.faces.component.UISelectItems.getValue(UISelectItems.java:58) [myfaces-api-1.1.5.jar:]
at org.apache.myfaces.shared_impl.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:105) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:450) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:428) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:294) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:267) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:59) [myfaces-impl-1.1.5.jar:]
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539) [myfaces-api-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101) [myfaces-impl-1.1.5.jar:]
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539) [myfaces-api-1.1.5.jar:]
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:594) [jsf-facelets-1.1.15.jar:1.1.15.B1]
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) [ajax4jsf-1.1.1.jar:1.1.1]
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233) [ajax4jsf-1.1.1.jar:1.1.1]
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) [myfaces-impl-1.1.5.jar:]
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132) [myfaces-impl-1.1.5.jar:]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) [myfaces-api-1.1.5.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127) [ajax4jsf-1.1.1.jar:1.1.1]
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277) [ajax4jsf-1.1.1.jar:1.1.1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
at com.sabicip.web.loftware.AuthFilter.doFilter(AuthFilter.java:124) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:453) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
    Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-02248: invalid option for ALTER SESSION

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:785)

我在模块中使用的驱动程序是 ojdbc14-9201.jar 。它适用于 oracle 8 Db 但 oracle 8 DB 因上述异常而失败。oracle 8 确实连接但失败,除了上述异常中的 alter session 错误。请建议。

4

1 回答 1

0

使用ironcamar.xml,将低版本oracle jar文件打包在ear文件里面。将驱动jar和war打包在ear文件里面。配置jboss-deployment文件指定部署结构。war文件将指向打包的jar文件数据库连接,这将允许较低版本的 oracle 像在较低版本的 jboss 中一样正常工作。

于 2014-05-30T16:55:56.300 回答