<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    issue in oracle data source configuration
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/varmax">Varun Jain</a> in <i>Datasource Configuration</i> - <a href="https://community.jboss.org/message/740863#740863">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; I have a simple Jsf+Jpa app in Eclipse indigo. I am using Oracle 10d database and want to run the app on JBoss-5.0.0 GA. I have added oracle-ds.xml , xa-oracle-ds.xml file in C:\servers\jboss-5.0.0.GA\server\default\deploy and added application-policy in login-config.xml file, but I am still getting the below exception</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'</p><p>17:34:52,883 INFO&#160; [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'</p><p>17:34:53,008 INFO&#160; [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=XAOracleDS' to JNDI name 'java:XAOracleDS'</p><p>17:34:53,054 INFO&#160; [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#JsfJpa</p><p>17:34:53,210 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#JsfJpa state=Create</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java.lang.NullPointerException</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.createInputStreamForUnconvertableURL(PersistenceUnitProcessor.java:284)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.createInputStreamForFileInPersistenceUnit(PersistenceUnitProcessor.java:239)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.getORMXMLFileNames(EntityManagerSetupImpl.java:613)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.buildPersistentClassSetFromXMLDocuments(EntityManagerSetupImpl.java:116)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Please find my persistence.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p><p><span>&lt;persistence version="1.0" xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span> </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a><span>"&gt;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;persistence-unit name="JsfJpa" transaction-type="RESOURCE_LOCAL"&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;provider&gt;oracle.toplink.essentials.PersistenceProvider&lt;/provider&gt; </p><p>&lt;!-- &lt;provider&gt;oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider&lt;/provider&gt; --&gt;</p><p>&lt;non-jta-data-source&gt;java:/OracleDS&lt;/non-jta-data-source&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;entity.Customer&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&lt;properties&gt;</p><p>&#160; </p><p>&lt;property name="toplink.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:orcl"/&gt;</p><p>&lt;property name="toplink.jdbc.user" value="System"/&gt;</p><p>&lt;property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/&gt;</p><p>&lt;property name="toplink.jdbc.password" value="danbrown"/&gt;</p><p>&lt;property name="toplink.ddl-generation" value="create-tables"/&gt;</p><p>&lt;property name="toplink.jdbc.read-connections.max" value="1"/&gt;</p><p> &lt;property name="toplink.jdbc.read-connections.min" value="1"/&gt;</p><p> &lt;property name="toplink.jdbc.write-connections.max" value="1"/&gt;</p><p> &lt;property name="toplink.jdbc.write-connections.min" value="1"/&gt;</p><p> &lt;property name="toplink.logging.level" value="SEVERE" /&gt;</p><p>&lt;/properties&gt;&#160;&#160;&#160; </p><p>&lt;/persistence-unit&gt;</p><p>&#160; </p><p>&lt;/persistence&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>My oracle-ds.xml</strong></p><p>&lt;datasources&gt;</p><p>&#160; &lt;no-tx-datasource&gt;</p><p>&#160;&#160;&#160; &lt;jndi-name&gt;OracleDS&lt;/jndi-name&gt;</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&lt;use-java-context&gt;true&lt;/use-java-context&gt;</p><p>&#160;&#160;&#160; &lt;connection-url&gt;jdbc:oracle:thin:@localhost:1521:orcl&lt;/connection-url&gt;</p><p>&#160;&#160;&#160; &lt;driver-class&gt;oracle.jdbc.OracleDriver&lt;/driver-class&gt;</p><p>&#160;&#160;&#160; &lt;user-name&gt;System&lt;/user-name&gt;</p><p>&#160;&#160;&#160; &lt;password&gt;danbrown&lt;/password&gt;</p><p>&#160;&#160;&#160; &lt;exception-sorter-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter&lt;/exception-sorter-class-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;metadata&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;type-mapping&gt;Oracle9i&lt;/type-mapping&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/metadata&gt;</p><p>&#160; &lt;/no-tx-datasource&gt;</p><p>&lt;/datasources&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>My xa-oracle-ds.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;datasources&gt;</p><p>&#160; &lt;xa-datasource&gt;</p><p>&#160;&#160;&#160; &lt;jndi-name&gt;XAOracleDS&lt;/jndi-name&gt;</p><p>&#160;&#160;&#160; &lt;use-java-context&gt;true&lt;/use-java-context&gt;</p><p>&#160;&#160;&#160; &lt;track-connection-by-tx&gt;true&lt;/track-connection-by-tx&gt;</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&lt;isSameRM-override-value&gt;false&lt;/isSameRM-override-value&gt;</p><p>&#160;&#160;&#160; &lt;xa-datasource-class&gt;oracle.jdbc.xa.client.OracleXADataSource&lt;/xa-datasource-class&gt;</p><p>&#160;&#160;&#160; &lt;xa-datasource-property name="URL"&gt;jdbc:oracle:thin:@localhost:1521:orcl&lt;/xa-datasource-property&gt;</p><p>&#160;&#160;&#160; &lt;xa-datasource-property name="User"&gt;System&lt;/xa-datasource-property&gt;</p><p>&#160;&#160;&#160; &lt;xa-datasource-property name="Password"&gt;danbrown&lt;/xa-datasource-property&gt;</p><p>&#160;&#160;&#160; &lt;exception-sorter-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter&lt;/exception-sorter-class-name&gt;</p><p>&#160;&#160;&#160; &lt;no-tx-separate-pools/&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;metadata&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;type-mapping&gt;Oracle9i&lt;/type-mapping&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/metadata&gt;</p><p>&#160; &lt;/xa-datasource&gt;</p><p>&lt;/datasources&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>addition in login-config.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;application-policy name = "OracleDbRealm"&gt; </p><p>&#160;&#160; &lt;authentication&gt; </p><p>&#160;&#160;&#160;&#160;&#160; &lt;login-module code =&#160; </p><p>&#160; "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required"&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name = "principal"&gt;sa&lt;/module-option&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name = "userName"&gt;sa&lt;/module-option&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name = "password"&gt;&lt;/module-option&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name = "managedConnectionFactoryName"&gt;jboss.jca:service=LocalTxCM,name=OracleDS&lt;/module-option&gt; </p><p>&#160;&#160;&#160;&#160;&#160; &lt;/login-module&gt; </p><p>&#160;&#160; &lt;/authentication&gt; </p><p>&lt;/application-policy&gt;</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/740863#740863">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>