This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes JBoss Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss Classpath" Watch "JBoss Classpath" New topic
Author

JBoss Classpath

Srinivas Katta
Ranch Hand

Joined: Feb 01, 2007
Posts: 76
Hi All,

I have Configured the JBoss4 in Linux System and Uploaded my Java application that uses Oracle DB. I started the JBoss server and can access the my Web application but the application is unable to Connect to Database as it gives Oracle Driver Not Found but I have the classes12.jar in WEB-INF/lib Folder

I am able to Ping the Database and can Connect to the Database from Different System.

My Main doubt is JBoss is looking in Different folder for classes12.jar

I would like to Know Where are all the places we are setting up the paths that JBoss can look for jar files


Any help in this regard is Highly appreciated

Thanks
Srinivas
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Put the driver jar file in your server instance's lib folder: $JBOSS_HOME/server/<server-instance>/lib


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Srinivas Katta
Ranch Hand

Joined: Feb 01, 2007
Posts: 76
Thanks for the response

I already had classes12.jar in JBOSS_HOME/server/default/lib folder
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Please post the *-ds.xml file for your database (you can remove the username/password).

Also post the full stack trace for the error message.

And since you have server/xxx/lib/classes12.jar, remove classes12.jar from WEB-INF/lib.


JBoss In Action
Srinivas Katta
Ranch Hand

Joined: Feb 01, 2007
Posts: 76
The below is the oracle-ds.cml file entries
-----------------------------------------------------------------------------------
<datasources>
<local-tx-datasource>
<use-java-context>false</use-java-context>
<jndi-name>java.hrTxDataSource</jndi-name>
<connection-url>jdbcracle:thin:hruat/hruat@//hrdev-scan.1800registry.com:1531/HRDEV</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

</local-tx-datasource>
</datasources>
----------------------------------------------------------------------------------------------

We are getting the below Error
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=186647040)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.50.162)(PORT=1521))(CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))null))'))(ERROR=(CODE=303)(EMFI=1)))))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)


But The DB Server can Ping from the System where JBoss is running

Thanks
Srinivas
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Can you run one of the oracle command line (or GUI) clients, such as sql*net, on the system running JBoss AS and access the Oracle database? Most likely there is either a firewall issue or an Oracle configuration issue (Oracle doesn't allow connections from the JBoss AS system).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss Classpath
 
Similar Threads
How to add Oracle thin Driver
Driver to connect to Oracle
Driver to connect to Oracle
connecting Oracle on linux to windows
package oracle.jdbc.driver does not exist