glassfish3下报错"只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器"

glassfish3下报错"只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器"

#深圳# 6月10日 亚马逊AWSome Day云计算免费培训报名中

下载了SpringSide4,一直都没跑起来。我用的Netbeans 7.1.1 + glassfish3;

运行mini-web 一直报错"只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器";

今天忽然想起来,改成tomcat试试,运行就不报错了。

@江南白衣 ,@红薯 ,@各位兄弟姊妹:

glassfish3+下报错信息如下,希望能指点一二 ,

Launching GlassFish on Felix platform 2012-8-26 18:31:39 com.sun.enterprise.server.logging.LogManagerService postConstruct 警告: Record begin marker is not a proper value so using default. 2012-8-26 18:31:39 com.sun.enterprise.server.logging.LogManagerService postConstruct 警告: Record end marker is not a proper value so using default. 2012-8-26 18:31:39 com.sun.enterprise.server.logging.LogManagerService postConstruct 警告: Log Format field separator is not a character so using default. 信息: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry 信息: Grizzly Framework 1.9.36 started in: 290ms - bound to [0.0.0.0:8181] 信息: Grizzly Framework 1.9.36 started in: 181ms - bound to [0.0.0.0:7676] 信息: Grizzly Framework 1.9.36 started in: 206ms - bound to [0.0.0.0:3700] 信息: Grizzly Framework 1.9.36 started in: 271ms - bound to [0.0.0.0:4848] 信息: Grizzly Framework 1.9.36 started in: 346ms - bound to [0.0.0.0:8080] 信息: The Admin Console is already installed, but not yet loaded. 信息: SEC1002: Security Manager is OFF. 信息: SEC1010: Entering Security Startup Service 信息: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. 信息: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. 信息: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. 信息: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created. 信息: SEC1011: Security Service(s) Started Successfully 信息: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] 信息: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] 信息: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848] 信息: WEB0171: Created virtual server [server] 信息: WEB0171: Created virtual server [__asadmin] 信息: WEB0172: Virtual server [server] loaded default web module [] 信息: PWC1412: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath 信息: PWC1412: WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'mvc-dispatcher' 信息: FrameworkServlet 'mvc-dispatcher': initialization started 信息: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Sun Aug 26 18:31:53 CST 2012]; root of context hierarchy 信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 信息: JSR-330 'javax.inject.Named' annotation found and supported for component scanning 信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 信息: JSR-330 'javax.inject.Named' annotation found and supported for component scanning 信息: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15b2f17: defining beans [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,personDisplay,personForm,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,dummyService,viewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy 信息: Mapped URL path [/personDisplay.htm] onto handler 'personDisplay' 信息: Mapped URL path [/personForm.htm] onto handler 'personForm' 信息: FrameworkServlet 'mvc-dispatcher': initialization completed in 2596 ms 信息: WEB0671: Loading application [com.guloulou_eoms-sun_war_1.0-SNAPSHOT] at [/eoms-sun] 信息: CORE10010: Loading application com.guloulou_eoms-sun_war_1.0-SNAPSHOT done in 14,498 ms 信息: GlassFish Server Open Source Edition 3.1.1 (12) 启动时间: Felix (10,351ms),启动服务 (16,434ms),总计(26,785ms) 信息: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://git-dev-001:8686/jndi/rmi://git-dev-001:8686/jmxrmi 信息: Hibernate Validator 4.1.0.Final 信息: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. 信息: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] 信息: Grizzly Framework 1.9.36 started in: 7ms - bound to [0.0.0.0:8080] 信息: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] 信息: Grizzly Framework 1.9.36 started in: 8ms - bound to [0.0.0.0:8181] 严重: Class [ com/mysema/query/dml/UpdateClause ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ] 严重: Class [ com/mysema/query/dml/UpdateClause ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ] 严重: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method 严重: Exception while preparing the app 严重: 模块 [org.springside.examples_mini-web_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springside.examples.miniweb.dao.account.GroupDaoImpl/em] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 java.lang.RuntimeException: 模块 [org.springside.examples_mini-web_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springside.examples.miniweb.dao.account.GroupDaoImpl/em] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:701) at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:682) at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:1056) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:185) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:167) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619) 严重: Exception while preparing the app : 模块 [org.springside.examples_mini-web_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springside.examples.miniweb.dao.account.GroupDaoImpl/em] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 信息: Domain Pinged: stable.glassfish.org 严重: Class [ com/mysema/query/dml/UpdateClause ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ] 严重: Class [ com/mysema/query/dml/UpdateClause ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ] 严重: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method 严重: Exception while preparing the app 严重: 模块 [org.springside.examples_showcase_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean/entityManager] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 java.lang.RuntimeException: 模块 [org.springside.examples_showcase_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean/entityManager] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:701) at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:682) at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:1056) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:185) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:167) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619) 严重: log4j:ERROR log4j called after unloading, see http://logging.apache.org/log4j/1.2/faq.html#unload. 严重: java.lang.IllegalStateException: Class invariant violation at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:199) at org.apache.log4j.LogManager.getLogger(LogManager.java:228) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265) at org.apache.activemq.ActiveMQSession.<clinit>(ActiveMQSession.java:199) at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918) at java.lang.reflect.Field.getFieldAccessor(Field.java:899) at java.lang.reflect.Field.get(Field.java:358) at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1836) at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1665) at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1634) at org.glassfish.deployment.common.DeploymentContextImpl.preDestroy(DeploymentContextImpl.java:145) at com.sun.enterprise.v3.server.ApplicationLifecycle$1.actOn(ApplicationLifecycle.java:281) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:415) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619) 严重: Exception while preparing the app : 模块 [org.springside.examples_showcase_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean/entityManager] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 严重: Class [ com/mysema/query/dml/UpdateClause ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ] 严重: Class [ com/mysema/query/dml/UpdateClause ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ] 严重: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method 严重: Exception while preparing the app 严重: 模块 [org.springside.examples_showcase_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean/entityManager] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 java.lang.RuntimeException: 模块 [org.springside.examples_showcase_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean/entityManager] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:701) at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:682) at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:1056) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:185) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:167) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:872) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619) 严重: log4j:ERROR log4j called after unloading, see http://logging.apache.org/log4j/1.2/faq.html#unload. 严重: java.lang.IllegalStateException: Class invariant violation at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:199) at org.apache.log4j.LogManager.getLogger(LogManager.java:228) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265) at org.apache.activemq.ActiveMQSession.<clinit>(ActiveMQSession.java:199) at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918) at java.lang.reflect.Field.getFieldAccessor(Field.java:899) at java.lang.reflect.Field.get(Field.java:358) at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1836) at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1665) at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1634) at org.glassfish.deployment.common.DeploymentContextImpl.preDestroy(DeploymentContextImpl.java:145) at com.sun.enterprise.v3.server.ApplicationLifecycle$1.actOn(ApplicationLifecycle.java:281) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:415) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619) 严重: Exception while preparing the app : 模块 [org.springside.examples_showcase_war_4.0.0.RC3] 中的 persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean/entityManager] 解析为名为 [defaultPU] 的持久性单元(它属于 RESOURCE_LOCAL 类型)。只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器。请验证您的应用程序。 信息: 已启动服务器关机 信息: PWC1412: WebModule[null] ServletContext.log():Destroying Spring FrameworkServlet 'mvc-dispatcher' 信息: Closing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Sun Aug 26 18:31:53 CST 2012]; root of context hierarchy 信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15b2f17: defining beans [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,personDisplay,personForm,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,dummyService,viewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy 信息: JMXStartupService: Stopped JMXConnectorServer: null Completed shutdown of Log manager service

你可能感兴趣的:(glassfish3下报错"只有事务类型为 JTA 的持久性单元才能用作容器管理的实体管理器")