无法连接到Oracle:Oracle错误ORA-12650

时间:2017-03-16 10:09:38

标签: java oracle hibernate jdbc jetty

我正在尝试建立与Oracle数据源的连接。应用程序在Jetty下运行。以下是我在jetty-env.xml中配置数据源的方法:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes"/>
    <xsl:strip-space elements="*"/>
    <xsl:template match="node() | @*">
        <xsl:copy>
            <xsl:apply-templates select="node() | @*"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template
        match="item[not(@item-name = 'TShirt' or @item-name = 'Ball' or @item-name = 'Bat')]"/>
</xsl:stylesheet>

这是我的persistence.xml:

<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
    <New id="com.scc.gcm" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg>com.scc.gcm</Arg>
        <Arg>
            <New class="oracle.jdbc.pool.OracleDataSource">
                <Set name="DriverType">thin</Set>
                <Set name="URL">user/pass@host/sid</Set>
                <Set name="User">user</Set>
                <Set name="Password">password</Set>
            </New>
        </Arg>
    </New>
</Configure>

我可以使用sqlplus连接到具有该凭据的模式,但在应用程序中创建EntityManagerFactory时,我收到以下错误:

<persistence-unit name="Dora" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>com.scc.gcm</jta-data-source>
    <properties>
        <property name="hibernate.transaction.manager_lookup_class" value="${hibernate.transaction.manager_lookup_class}"/>
        <property name="hibernate.archive.autodetection" value="class, hbm"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9iDialect"/>
        <property name="hibernate.show_sql" value="false"/>
    </properties>

</persistence-unit>

0 个答案:

没有答案