无法使用Websphere 8.5.5,hibernate jpa 4.2.6,oracle 12c启动应用程序

时间:2015-08-07 17:42:48

标签: java hibernate websphere-8 oracle12c ojdbc

我有一个让我感到害怕的问题。

这是我的persistence.xml,持久性单位是正确的。

<persistence-unit name="pu-administrativo" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <non-jta-data-source>jdbc/oracle</non-jta-data-source>

    <!-- Incluir Entidades -->
    <class>GrupoUsuario</class>
    <class>Dominio</class>

    <properties>
        <property name="hibernate.hbm2ddl.auto" value="update" />
        <property name="hibernate.show_sql" value="true" />
        <property name="hibernate.format_sql" value="true" />
        <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />
        <property name="hibernate.transaction.jta.platform"
            value="org.hibernate.service.jta.platform.internal.WebSphereJtaPlatform" />

    </properties>
</persistence-unit>

我使用OJDBC6在Websphere中配置了hibernate和datasource。

我以前在使用OJDBC14之前正常启动应用程序。但数据库被转移到另一个IP,现在我无法与OJDBC14连接。

当我使用OJDBC6时,应用程序无法启动并冻结:

[07/08/15 14:09:36:239 BRT] 0000006a ConnectionPro Z org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator instantiateExplicitConnectionProvider HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider [07/08/15 14:09:37:257 BRT] 0000006a InternalGener I DSRA8203I: Nome do produto de banco de dados: Oracle [07/08/15 14:09:37:265 BRT] 0000006a InternalGener I DSRA8204I: Versão do produto Banco de Dados: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [07/08/15 14:09:37:266 BRT] 0000006a InternalGener I DSRA8205I: Nome do driver JDBC: Oracle JDBC driver [07/08/15 14:09:37:266 BRT] 0000006a InternalGener I DSRA8206I: Versão do driver JDBC: 11.2.0.4.0 [07/08/15 14:09:37:266 BRT] 0000006a InternalGener I DSRA8218I: Nível de especificação do driver JDBC: 11.2 [07/08/15 14:09:37:266 BRT] 0000006a InternalOracl I DSRA8212I: O nome do DataStoreHelper é: com.ibm.websphere.rsadapter.Oracle11gDataStoreHelper. [07/08/15 14:09:37:267 BRT] 0000006a WSRdbDataSour I DSRA8208I: Tipo de driver JDBC: 4

启动应用程序11分钟后显示此消息

WSVR0605W: Thread "WebContainer : 3" (0000007a) has been active for 703443 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.

我已经尝试过使用OJDBC14和OJDBC7并且不能正常工作

服务器启动完美,但是当我尝试启动应用程序冻结时。我想我的应用程序有问题,但我还没想到。

你能帮帮我吗?

1 个答案:

答案 0 :(得分:0)

你可以试试下面的方言吗?

org.hibernate.dialect.Oracle10gDialect