HI Everybody,

I am new bie to JBoss and I am trying to connect Oracle and having some 
problems, would appreciate if somobody can respond urgently. I have ojdbc14.jar 
in WEB-INF/lib diretory
Here are my app-ds.xml file

code:
--------------------------------------------------------------------------------

   <local-tx-datasource>     <jndi-name>TEST_CONN</jndi-name>   
<use-java-context>false</use-java-context>    <connection-url>jdbc  
racle:thin:@dev:1521:test_dev</connection-url>     
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>     
<connection-property name="autoCommit">false</connection-property>     
<user-name>sysadmin</user-name>     sys_admin     
<blocking-timeout-millis>50000</blocking-timeout-millis>     <!-- Checks the 
Oracle error codes and messages for fatal errors -->      
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
     <new-connection-sql>select * from dual</new-connection-sql>   
</local-tx-datasource>  

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



web.xml --file

code:
--------------------------------------------------------------------------------

<resource-ref>  Test Database Connection Pool   
<res-ref-name>jdbc/TEST_CONN</res-ref-name>     
<res-type>javax.sql.DataSource</res-type>       
<res-auth>Container</res-auth></resource-ref>

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



Here is the code by which I am trying to get the connection:

code:
--------------------------------------------------------------------------------

private Context getInitialContext() throws NamingException {          Context 
ctx = new InitialContext();          return ctx; }

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



code:
--------------------------------------------------------------------------------

try {                ds = (javax.sql.DataSource) getInitialContext().lookup(    
                "TEST_CONN");                System.out.print("ds**********" + 
ds);               } catch (Exception e) {            e.printStackTrace();      
      throw new RuntimeException("cannot get database pool", e);            }   
     try{            Connection localConnection = ds.getConnection();           
 System.out.println("localConnection>>>>>>>>>>>>>" + localConnection);          
          }        catch(SQLException e){            e.printStackTrace();       
 }        finally {        try { if (localConnection != null) 
localConnection.close(); }        catch (SQLException e) { log.error(e); }

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



Here is the error:
10:37:59,262 INFO [STDOUT] ds**********org.jboss.resource.adapter.jdbc.WrapperD
[EMAIL PROTECTED]
10:37:59,402 WARN [JBossManagedConnectionPool] Throwable while attempting to ge
t a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested
throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver
class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc  
racle:thin:@dev:1521:test_dev at 
org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
reateManagedConnection(LocalManagedConnectionFactory.java:161)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
eateConnectionEventListener(InternalManagedConnectionPool.java:508)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
tConnection(InternalManagedConnectionPool.java:207)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
ool.getConnection(JBossManagedConnectionPool.java:534)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
dConnection(BaseConnectionManager2.java:395)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedCo
nnection(TxConnectionManager.java:297)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
onnection(BaseConnectionManager2.java:447)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
nManagerProxy.allocateConnection(BaseConnectionManager2.java:874)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
erDataSource.java:103)
at com.exelixis.plateloader.ProcessBarcodeAction.execute(ProcessBarcodeA
ction.java:78)
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116
4)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885954#3885954

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885954


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to