EJB + JBoss无法启动

时间:2015-06-18 21:38:25

标签: java hibernate jboss ejb

我正在使用EJB,Hibernate和JBoss开发一个项目,我在JBoss启动时遇到了问题。 JBoss找到了我的数据源,但在此处停止:

15:42:14,035 INFO [EntityBinder] Bind entity br.com.sankhya.teste.model.entities.ContatoCliente on table CONTATO_CLIENTE 15:42:14,201 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider 15:42:14,209 INFO [InjectedDataSourceConnectionProvider] Using provided datasource

我将超时设置为1000秒,即使这个JBoss没有启动。这是完整的日志和我的代码:

15:42:13,277 INFO  [A] Bound to JNDI name: queue/A
15:42:13,278 INFO  [B] Bound to JNDI name: queue/B
15:42:13,279 INFO  [C] Bound to JNDI name: queue/C
15:42:13,279 INFO  [D] Bound to JNDI name: queue/D
15:42:13,280 INFO  [ex] Bound to JNDI name: queue/ex
15:42:13,293 INFO  [testTopic] Bound to JNDI name: topic/testTopic
15:42:13,294 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
15:42:13,295 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
15:42:13,297 INFO  [testQueue] Bound to JNDI name: queue/testQueue
15:42:13,328 INFO  [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
15:42:13,354 INFO  [DLQ] Bound to JNDI name: queue/DLQ
15:42:13,432 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
15:42:13,467 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=TesteDS' to JNDI name 'java:TesteDS'
15:42:13,667 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment
15:42:13,671 INFO  [JmxKernelAbstraction] installing MBean: persistence.units:jar=ClientesModel.jar,unitName=clientes with dependencies:
15:42:13,671 INFO  [JmxKernelAbstraction]     jboss.jca:name=TesteDS,service=DataSourceBinding
15:42:13,672 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.units:jar=ClientesModel.jar,unitName=clientes
15:42:13,695 INFO  [Version] Hibernate EntityManager 3.2.1.GA
15:42:13,712 INFO  [Version] Hibernate Annotations 3.2.1.GA
15:42:13,720 INFO  [Environment] Hibernate 3.2.4.sp1
15:42:13,725 INFO  [Environment] hibernate.properties not found
15:42:13,726 INFO  [Environment] Bytecode provider name : javassist
15:42:13,731 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
15:42:13,855 INFO  [Ejb3Configuration] found EJB3 Entity bean: br.com.sankhya.teste.model.entities.Cliente
15:42:13,855 INFO  [Ejb3Configuration] found EJB3 Entity bean: br.com.sankhya.teste.model.entities.ContatoCliente
15:42:13,855 INFO  [Ejb3Configuration] found EJB3 @Embeddable: br.com.sankhya.teste.model.entities.ContatoClientePK
15:42:13,877 INFO  [Configuration] Reading mappings from resource : META-INF/orm.xml
15:42:13,879 INFO  [Ejb3Configuration] [PersistenceUnit: clientes] no META-INF/orm.xml found
15:42:13,934 INFO  [AnnotationBinder] Binding entity from annotated class: br.com.sankhya.teste.model.entities.Cliente
15:42:13,988 INFO  [EntityBinder] Bind entity br.com.sankhya.teste.model.entities.Cliente on table Cliente
15:42:14,035 INFO  [AnnotationBinder] Binding entity from annotated class: br.com.sankhya.teste.model.entities.ContatoCliente
15:42:14,035 INFO  [EntityBinder] Bind entity br.com.sankhya.teste.model.entities.ContatoCliente on table CONTATO_CLIENTE
15:42:14,201 INFO  [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
15:42:14,209 INFO  [InjectedDataSourceConnectionProvider] Using provided datasource

持久性单元

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="clientes" transaction-type="JTA">
        <jta-data-source>java:TesteDS</jta-data-source>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
        </properties>
    </persistence-unit>
</persistence>

数据源

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
    <local-tx-datasource>
        <jndi-name>TesteDS</jndi-name>
        <connection-url>jdbc:mysql://localhost:8080/prog_test_db</connection-url>
        <driver-class>com.mysql.jdbc.Driver</driver-class>
        <user-name>root</user-name>
        <password>sissis</password>
        <min-pool-size>5</min-pool-size>
        <max-pool-size>20</max-pool-size>
        <idle-timeout-minutes>5</idle-timeout-minutes>
        <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
        <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
        <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
    </local-tx-datasource>
</datasources>
你可以帮帮我吗?谢谢

0 个答案:

没有答案