Link to home
Start Free TrialLog in
Avatar of cisense
cisense

asked on

Oracle JDBC connection problem on tomcat

We are running Tomcat 4.1.18 with java 1.3.1
the database is Oracle 8.1.7 and I copied the thin client calsses (1.2) with the directory structure into WEB-INF/classes

When trying to connect to the database I need, I am getting the following error:

java.sql.SQLException
E/A-Exception: Size Data Unit (SDU) mismatch

the code I'm using is:

<HTML>
<HEAD>
<%@ page
     import = "java.sql.*"
     import = "java.lang.*"
%>
</HEAD>
<BODY>
<%
String err = "claudia";
String LastID = "";

Connection dbconn;
ResultSet rs;

try{
     DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@<server>:<port>:<db name>","***", "***");
} catch(Exception ex) {
     err += "<br>" + ex.getClass().getName();
     err += "<br>" + ex.getMessage();
}

%>
<%=err%>
</BODY>
</HTML>


This already produces the error.

Can anyone help?
Avatar of thanassis
thanassis

The SDU is a buffer that Net8 uses to place data before transmitting across the
network. Net8 sends the data in the buffer either when requested or when it is full.

The SDU size should be set as a multiple of the normal transport frame size. Since
the normal Ethernet frame size is 1024, the most efficient SDU size over an
Ethernet protocol should be a multiple of 1024, but not more than four times the
amount of 1024.

try stripping the settings out all together first
Avatar of cisense

ASKER

I found the mistake.
I just used the wrong port, oops.
The other port obviously wasn't active or sth.
And for the posted comment, thanks I found that one before, and could not use it :-)
Avatar of girionis
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQed and points refunded.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial