jdbc error in oracle developer suite

D

Daniel

Hi all,

I am getting a problem establishing a connection from a Java class (POJO,
not an EJB) deployed in Oracle's Developer's Suite's OC4J (J2EE container)
to an Oracle database. I get an exception that says that I did not enter the
correct connect string and it was expecting host:port:sid. I know my code
works because it runs just fine (unmodified) in Tomcat 5.5 and through the
command line. I can't figure why it won't work with Oracle's JSP/Servlet
container though. Do I need to do something special to OC4J (standalone, not
in one integrated with Oracle AS)?

Running on Windows XP.

Thanks in advance.
 
A

anonymous

Daniel said:
Hi all,

I am getting a problem establishing a connection from a Java class (POJO,
not an EJB) deployed in Oracle's Developer's Suite's OC4J (J2EE container)
to an Oracle database. I get an exception that says that I did not enter the
correct connect string and it was expecting host:port:sid. I know my code
works because it runs just fine (unmodified) in Tomcat 5.5 and through the
command line. I can't figure why it won't work with Oracle's JSP/Servlet
container though. Do I need to do something special to OC4J (standalone, not
in one integrated with Oracle AS)?

Running on Windows XP.

Thanks in advance.
Connecting to Oracle can be a pain. First you need to know the driver
type (type 1, 2, 3, or 4), then make sure the connect String works.

I use things like jdbc:eek:racle:thin:scott/tiger@localhost:1521:eek:rcl

For the oci driver the string is somewhat different. You may also run
into problems, if you use the datasource xml file.

I just developed an application for OC4J, then deployed in Tomcat,
making sure that Oracles classes12.jar file is in the path. The connect
string was set using a properties file, and did not require any
modifications.
 
D

Daniel

anonymous said:
Connecting to Oracle can be a pain. First you need to know the driver type
(type 1, 2, 3, or 4), then make sure the connect String works.

I am using the thin type (driver type 4).
I use things like jdbc:eek:racle:thin:scott/tiger@localhost:1521:eek:rcl
My connect string is very similar:
jdbc:eek:racle:thin:mad://machinename:dbname
For the oci driver the string is somewhat different. You may also run into
problems, if you use the datasource xml file.

I just developed an application for OC4J, then deployed in Tomcat, making
sure that Oracles classes12.jar file is in the path. The connect string
was set using a properties file, and did not require any modifications.

I am doing the opposite, first developing and testing on Tomcat 5.5 and
then trying to get it to work in OC4J. It works fine in Tomcat but not in
OC4J. Same connection string, etc.

I am using the ojdbc14.jar that I downloaded from Oracle for my JDBC
connection. What is the difference between ojdbc14.jar and the
classes12.jar?

Do you know what servlet version OC4J supports (from Oracle's DS suite 10g)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top