Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss Classpath

 
Srinivas Katta
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 3918
10
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the driver jar file in your server instance's lib folder: $JBOSS_HOME/server/<server-instance>/lib
 
Srinivas Katta
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response

I already had classes12.jar in JBOSS_HOME/server/default/lib folder
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Srinivas Katta
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic