在Jboss中的接缝2.2.2中使用hibernate时出错为7.1.1

时间:2012-07-03 04:22:26

标签: hibernate jboss seam stack-trace

请将我的seam2.2.2应用程序部署到Jboss As 7.1.1。该应用已成功部署。但是当我尝试在应用程序中使用数据库资源时。我在下面的堆栈跟踪中得到以下错误

04:57:48,722 WARN  [org.jboss.seam.security.jaas.SeamLoginModule] (http--127.0.0.1-           8080-2) Error invoking login method: org.jboss.seam.InstantiationException: Could not     instantiate Seam component: authenti
cator
            at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam.jar:2.2.2.Final]
            at org.jboss.seam.Component.getInstance(Component.java:2024) [jboss-seam.jar:2.2.2.Final]
                    at org.jboss.seam.Component.getInstance(Component.java:1986) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.getInstance(Component.java:1980) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:148) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51) [jboss-seam.jar:2.2.2.Final]
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173) [jsf-impl-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200) [jsf-impl-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.parser.AstValue.getTarget(AstValue.java:34) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.parser.AstValue.invoke(AstValue.java:95) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:221) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109) [jboss-seam.jar:2.2.2.Final]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_04]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_04]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_04]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_04]
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) [rt.jar:1.7.0_04]
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_04]
        at javax.security.auth.login.LoginContext$5.run(LoginContext.java:721) [rt.jar:1.7.0_04]
        at javax.security.auth.login.LoginContext$5.run(LoginContext.java:719) [rt.jar:1.7.0_04]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_04]
        at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:718) [rt.jar:1.7.0_04]
        at javax.security.auth.login.LoginContext.login(LoginContext.java:590) [rt.jar:1.7.0_04]
        at org.jboss.seam.security.Identity.authenticate(Identity.java:344) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.security.Identity.authenticate(Identity.java:332) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.security.Identity.login(Identity.java:259) [jboss-seam.jar:2.2.2.Final]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_04]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_04]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_04]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_04]
        at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) [jboss-el.jar:1.0_02.CR5]
        at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jboss-el.jar:1.0_02.CR5]
        at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) [jsf-facelets.jar:1.1.15.B1]
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at javax.faces.component.UICommand.broadcast(UICommand.java:387) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:329) [richfaces-impl.jar:3.3.3.Final]
        at org.ajax4jsf.component.AjaxViewRoot.broadcastEventsForPhase(AjaxViewRoot.java:304) [richfaces-impl.jar:3.3.3.Final]
        at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:261) [richfaces-impl.jar:3.3.3.Final]
        at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:474) [richfaces-impl.jar:3.3.3.Final]
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) [jsf-impl-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) [jsf-impl-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [richfaces-impl.jar:3.3.3.Final]
        at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl.jar:3.3.3.Final]
        at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl.jar:3.3.3.Final]
        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl.jar:3.3.3.Final]
        at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.2.2.Final]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]
        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]
Caused by: java.lang.RuntimeException: exception invoking: getSession
        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.callComponentMethod(Component.java:2275) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.unwrap(Component.java:2301) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.getInstance(Component.java:2044) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.getInstance(Component.java:1986) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.getInstance(Component.java:1980) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2375) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.getValueToInject(Component.java:2327) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.injectAttributes(Component.java:1739) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.inject(Component.java:1557) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) [jboss-seam.jar:2.2.2.Final]
        at org.domain.lifeplus1.session.Authenticator_$$_javassist_seam_5.init(Authenticator_$$_javassist_seam_5.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_04]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_04]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_04]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_04]
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.callComponentMethod(Component.java:2275) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam.jar:2.2.2.Final]
        ... 87 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_04]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_04]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_04]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_04]
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.2.2.Final]
        ... 113 more
Caused by: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
        at org.jboss.seam.persistence.ManagedHibernateSession.initSession(ManagedHibernateSession.java:82) [jboss-seam.jar:2.2.2.Final]
        at org.jboss.seam.persistence.ManagedHibernateSession.getSession(ManagedHibernateSession.java:118) [jboss-seam.jar:2.2.2.Final]
        ... 119 more

请问我有什么问题吗?

1 个答案:

答案 0 :(得分:1)

检查此链接https://community.jboss.org/blogs/marek-novotny/2011/07/29/seam-2-booking-example-on-jboss-as-7

如果可能的话,你可以将接缝升级到版本2.3,该版本可以很好地与jboss 7一起使用