wildfly 10 javamelody jpa监测

时间:2017-08-25 20:19:09

标签: java jpa wildfly wildfly-10 java-melody

我想用javamelody监视JPA操作,但是我在部署时遇到错误。

16:51:56,294 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."SNEarWeb-2.0.wf10.ear".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."SNEarWeb-2.0.wf10.ear".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "SNEarWeb-2.0.wf10.ear"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider 'net.bull.javamelody.JpaPersistence' not found
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:1009)
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.nextPhaseDependsOnPersistenceUnit(PersistenceUnitServiceHandler.java:1052)
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:136)
    at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    ... 5 more

我耳朵上有javamelody jar,如果我不监视JPA(从persistence.xml中删除提供程序),它就可以正常工作。

这是我的persistence.xml

<persistence-unit name="LatinaUCPersistenceUnit">
    <provider>net.bull.javamelody.JpaPersistence</provider>

    <jta-data-source>java:/RSDS</jta-data-source>

    <class>foo.class</class>
    <class>foo2.class</class>
    <class>foox.class</class>
    <class>fooy.class</class>

    <properties>
        <property name="hibernate.dialect"  value="org.hibernate.dialect.PostgreSQLDialect"/>
        <property name="hibernate.show_sql" value="false"/>
        <property name="hibernate.format_sql" value="true"/>
        <property name="hibernate.auditable" value="false" />

        <property name="net.bull.javamelody.jpa.provider" value="org.hibernate.jpa.HibernatePersistenceProvider" />

        <property name="hibernate.transaction.flush_before_completion" value="true" />
    </properties>

</persistence-unit>

0 个答案:

没有答案