This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Could not create connection !!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Could not create connection !!!!" Watch "Could not create connection !!!!" New topic

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
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
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedCo
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
at com.exelixis.plateloader.ProcessBarcodeAction.execute(ProcessBarcodeA
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
at org.apache.struts.action.ActionServlet.process(
at org.apache.struts.action.ActionServlet.doPost(

at javax.servlet.http.HttpServlet.service(
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
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Do not put database drivers in WEB-INF/lib. Put them in the lib directory for your configuration.
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 )

Java Developer, Thailand

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
ic = new InitialContext();

conn = ds.getConnection();
catch(Exception ere)

OraceDS is the JNDI name give inghe Oracle-ds.xml file

If your problem is not fixed, let me help you.

I agree. Here's the link:
subject: Could not create connection !!!!
Similar Threads
Could not create connection
Problem oin connecting Oracle database in JBOSS AS 4.2.3
Oracle XA Exception
JBoss Classpath
[JBossManagedConnectionPool] Throwable while attempting to get a new connection: null