| Author |
Could not create connection !!!!
|
shailesh kumar
Ranch Hand
Joined: Jul 18, 2005
Posts: 36
|
|
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 web.xml --file Here is the code by which I am trying to get the connection: Here is the error: 10:37:59,262 INFO [STDOUT] ds**********org.jboss.resource.adapter.jdbc.WrapperD ataSource@335053 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)
|
 |
Dave Salter
Ranch Hand
Joined: Jul 20, 2005
Posts: 292
|
|
|
It looks like you are using the wrong Oracle drivers for your version of your database. Are you using the correct drivers?
|
 |
shailesh kumar
Ranch Hand
Joined: Jul 18, 2005
Posts: 36
|
|
I think i have to classes12.jar file in lib directory, i removed the ojdbc14.jar and i copied classes12.jar file. now iam getting diffrent error..i dont understand why jboss is loading this driver..this unrelated to my application
|
 |
norman richards
Author
Ranch Hand
Joined: Jul 21, 2003
Posts: 364
|
|
|
Do not put database drivers in WEB-INF/lib. Put them in the lib directory for your configuration.
|
[<a href="http://members.capmac.org/~orb/blog.cgi" target="_blank" rel="nofollow">blog</a>] [<a href="http://www.amazon.com/exec/obidos/ASIN/0596100078/orb-20" target="_blank" rel="nofollow">JBoss: A Developer's Notebook</a>] [<a href="http://www.amazon.com/exec/obidos/ASIN/1932394052/orb-20" target="_blank" rel="nofollow">XDoclet in Action</a>]
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
Could not load org.hsqldb.jdbcDriver.
Because , you deleted driver of HypersonicDB from lib directory of jboss. ( restore driver )
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
trinity
Greenhorn
Joined: Oct 15, 2005
Posts: 4
|
|
For oracle 10g and if you are using jdk1.4 or higher use ojdbc14.jar. Download ojdbc14.jar from oracle website. Place it inthe jboss/default/lib directory. Connection conn = null; Context ic =null; DataSource ds=null; // To be used in JBoss Server try{ ic = new InitialContext(); ds=(DataSource)ic.lookup("java:/OracleDS"); System.out.println(ds.toString()); //System.out.println(ds.); conn = ds.getConnection(); } catch(Exception ere) { ere.printStackTrace(); } OraceDS is the JNDI name give inghe Oracle-ds.xml file If your problem is not fixed, let me help you. Trinity
|
 |
 |
|
|
subject: Could not create connection !!!!
|
|
|