-
1. Re: JBoss 7 and OracleDriver
smarlow Jul 13, 2011 9:44 AM (in response to simas_ch)http://forums.oracle.com/forums/thread.jspa?threadID=431363 mentions a few possible issues (google shows other hits as well). Make sure you started the database server and that its listening on the default 1521 port. If there is a firewall involved, make sure you can get through it. You could try connecting with sqlplus or even better with a standalone database Java tool (like http://squirrel-sql.sourceforge.net).
-
2. Re: JBoss 7 and OracleDriver
simas_ch Jul 13, 2011 9:57 AM (in response to smarlow)I have JBoss 6 up and running with the same driver and the same application!
There must be a problem how the connection is created.
-
3. Re: JBoss 7 and OracleDriver
smarlow Jul 13, 2011 10:11 AM (in response to simas_ch)Sure sounds like you are right. Is the connection-url used with AS7, the same as AS6?
The "ORA-12505, TNS:listener" error, sounds like we connected to the target database server machine but the tns listener on the db server didn't like the request for some reason.
I wonder if we have any trace logging (AS6/AS7 or ojdbc6.jar) that would show the connection details being used (if something is missing in what is passed to the Oracle driver in AS7, working backwards from knowing what is missing, would be easiest).
-
4. Re: JBoss 7 and OracleDriver
jesper.pedersen Jul 13, 2011 10:31 AM (in response to simas_ch)Saying it doesn't work won't get you anywhere.
Provide the log from both servers - both from the JCA and JPA layers - that shows communication from your application down through the different layers to Oracle.
-
5. Re: JBoss 7 and OracleDriver
simas_ch Jul 13, 2011 10:34 AM (in response to jesper.pedersen)Sure. If you tell me how to switch the logging on...
-
6. Re: JBoss 7 and OracleDriver
smarlow Jul 13, 2011 10:43 AM (in response to smarlow)To get logging, I would enable TRACE logging for everything, get the connect info from the server.log (I believe that org.jboss.jca will show the connect info being passed to the JDBC driver). There will be a lot of trace output in the AS7 server.log, but you should be able to find the connect error and the connect info should be logged before that point in the server.log.
Logging can be enabled by hacking the AS7/standalone/configuration/standalone.xml and changing from INFO to TRACE (just a three line change). Be sure to turn it back to INFO after...
Let us know if the connect info matches what you would expect. If your not sure, show us the connect info (with the password removed of course).
-
7. Re: JBoss 7 and OracleDriver
simas_ch Jul 13, 2011 11:02 AM (in response to smarlow)Thanks to the logging I found the error. The connection URL was wrong! There was missing a @ before the server name.
Shame on me!
Thanks a lot for your help.
-
8. Re: JBoss 7 and OracleDriver
jaikiran Jul 13, 2011 11:19 AM (in response to simas_ch)Simon Martinelli wrote:
Thanks to the logging I found the error. The connection URL was wrong! There was missing a @ before the server name.
That error was being logged at TRACE level? Can you please post the relevant part of that log?
-
9. Re: JBoss 7 and OracleDriver
simas_ch Jul 13, 2011 11:29 AM (in response to jaikiran)17:27:53,735 DEBUG [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-7) DataSource=DataSourceImpl [connectionUrl=jdbc:oracle:thin:localhost:1521:xe, driverClass=oracle.jdbc.OracleDriver, driver=ojdbc6, connectionProperties={}, newConnectionSql=null, pool=org.jboss.jca.common.metadata.common.CommonPoolImpl@1ff8506]