Re: how to access oracle database on netwrk
Nishant wrote: now server is throwing an errors as cannot load JDBC driver called com.mysql.jdbc.Driver wht is wrong wiil i hav to import some external JDBC driver (on my pc no oracle is there ) You want to connect to an oracle database and you're loading a jdbc driver for mysql ? Yes you will have to make a oracle jdbc driver available to tomcat ( or whatever app server you are using). FYI there is a brief write up on this with the tomcat docs. Just make sure you have the proper driver for the version of oracle you are using and you should be ok. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to access oracle database on netwrk
hello, i am using oracle 9i as my database in my application. My database is on anothere machine in network. my struts-config.xml is like data-sources data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver / set-property property=url value=jdbc:mysql://localhost/employees / set-property property=username value=thinc/ set-property property=password value=thinc/ /data-source /data-sources now server is throwing an errors as cannot load JDBC driver called com.mysql.jdbc.Driver wht is wrong wiil i hav to import some external JDBC driver (on my pc no oracle is there ) Nishant Patil Software Engineer Cybage Software Pvt. Ltd. (A CMM Level 3 Company) West Avenue , Kalyani Nagar, Pune - 411 006 Tel: 91-20-4041700 -355 Email: [EMAIL PROTECTED] Website: www.cybage.com There's a difference between knowing the path, and walking the path
RE: how to access oracle database on netwrk
You have to use Oracle thin driver instead. I don't remember the location of jar file named classes12.jar for example to be used with jdk1.3, but it would be available with an Oracle client installation or you can copy them from an existing oracle client/oracle installation. It is also available at http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html Thanks Ramesh M -Original Message- From: Nishant [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 11:12 AM To: Struts Users Mailing List Subject: how to access oracle database on netwrk hello, i am using oracle 9i as my database in my application. My database is on anothere machine in network. my struts-config.xml is like data-sources data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver / set-property property=url value=jdbc:mysql://localhost/employees / set-property property=username value=thinc/ set-property property=password value=thinc/ /data-source /data-sources now server is throwing an errors as cannot load JDBC driver called com.mysql.jdbc.Driver wht is wrong wiil i hav to import some external JDBC driver (on my pc no oracle is there ) Nishant Patil Software Engineer Cybage Software Pvt. Ltd. (A CMM Level 3 Company) West Avenue , Kalyani Nagar, Pune - 411 006 Tel: 91-20-4041700 -355 Email: [EMAIL PROTECTED] Website: www.cybage.com There's a difference between knowing the path, and walking the path - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to access oracle database on netwrk
You say you are using Oracle, but your configuration is for a MySQL database. For Oracle, your driver class is going to be oracle.jdbc.driver.OracleDriver. Your URL is going to follow this pattern: jdbc:oracle:thin:@hostname:port:db_name The database name is also known as a TNS name in Oracle terms. Usually this is something you have to obtain from whoever set up the database. You are also going to need to download the Oracle thin driver from the URL I gave you earlier. You may have to register, I can't remember, but it's painless if you do. The driver jar file (ojdbc14.jar) has to be in your server's classpath. You don't say what server you are using, but in the case of Tomcat, it goes in tomcat_home/common/lib/. The Oracle thin driver (the collection of classes which lives in the above mentioned jar file) is a Java library which enables your Java application to talk to the Oracle database server over a network using the JDBC API. The classes are implementations of JDBC. (Sorry if you already know all this.) You don't have to use the Struts data source configuration you are trying to use, but you can if you want. Consider it to be optional. It might be easier to just follow the documentation that comes with your server for setting up a JDBC connection pool (data source). You can get a reference to a Java DataSource instance using a standard JNDI lookup (there are tutorials on this). Again, if you are using Tomcat, the docs will help with this (I think there is an Oracle example). Hope this helps, Erik Nishant wrote: hello, i am using oracle 9i as my database in my application. My database is on anothere machine in network. my struts-config.xml is like data-sources data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=com.mysql.jdbc.Driver / set-property property=url value=jdbc:mysql://localhost/employees / set-property property=username value=thinc/ set-property property=password value=thinc/ /data-source /data-sources now server is throwing an errors as cannot load JDBC driver called com.mysql.jdbc.Driver wht is wrong wiil i hav to import some external JDBC driver (on my pc no oracle is there ) Nishant Patil Software Engineer Cybage Software Pvt. Ltd. (A CMM Level 3 Company) West Avenue , Kalyani Nagar, Pune - 411 006 Tel: 91-20-4041700 -355 Email: [EMAIL PROTECTED] Website: www.cybage.com There's a difference between knowing the path, and walking the path - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]