raju k [http://community.jboss.org/people/komariraj] created the discussion

"Can not get JNDI connection from Data sourceSQLState with oracle 10g"

To view the discussion, visit: http://community.jboss.org/message/546225#546225

--------------------------------------------------------------
Hi all
i am using jboss portal 2.6.8 server with oracle 10g..

i am getting follwing  exception when creating datasource object for Oracle 10g 
using JNDI.

*Can not get JNDI connection from Data sourceSQLState: null Vendor Code:  0 
Could not create connection; - nested throwable:  
(java.lang.NullPointerException); - nested throwable:  
(org.jboss.resource.JBossResourceException: Could not create connection; -  
nested throwable: (java.lang.NullPointerException))*

*step-1: portal-oracle-ds.xml*
<datasources>
  <local-tx-datasource>
    <jndi-name>jndiname</jndi-name>
    <connection-url>jdbc:oracle:thin:@server:orcl</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>user</user-name>
    <password>password</password>
  </local-tx-datasource>
</datasources>

I copied this xml file in to deploy folder of jboss.

*s**tep: 2* classes12.jar copied in my war file lib only
*
*
*step-3*: in my java code ...

                line-1:  InitialContext initialContext = new 
InitialContext();               
               
                line-2: DataSource dataSource = 
(DataSource)initialContext.lookup("java:/jndiname");       
              
                line-3: java.sql.Connection dbconnection = 
dataSource.getConnection();  

when ever i am  executing line-3, getting above exception...


if any body knows about this problam ,  please help...

Thanks in advance..
Raju.K

*
*

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/546225#546225]

Start a new discussion in JBoss Portal Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2014]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to