Home » Developer & Programmer » JDeveloper, Java & XML » SqlException : No more data to read from socket
SqlException : No more data to read from socket [message #123890] |
Wed, 15 June 2005 07:37 |
singhvikas
Messages: 2 Registered: June 2005
|
Junior Member |
|
|
I am calling a Stored Procedure prr_proc() from java code.
I am able to make the oracle connection.
Class c = Class.forName ("oracle.jdbc.driver.OracleDriver");
Connection x = java.sql.DriverManager.getConnection(DataSourceConfig.getOracleDBUrl(),
DataSourceConfig.getOracleDBUser(),
DataSourceConfig.getOracleDBPassword());
But when I try to create array descriptors i am getting
"sql Exception : No more data to read from socket" at the line below.
// Get the type descriptors used for this SP call
ArrayDescriptor numberType = (ArrayDescriptor)ArrayDescriptor.createDescriptor("NUM_LIST", x);
ArrayDescriptor dateType = (ArrayDescriptor)ArrayDescriptor.createDescriptor("DATE_LIST", x);
ArrayDescriptor stringType = ArrayDescriptor.createDescriptor("STRING_LIST", x);
Logger.log( TRACE, " Arrays made ");
// create the ARRAY by calling the constructor
ARRAY currCodeArray = new ARRAY (stringType, x, currencyCodeList.toArray());
ARRAY prodSetIdArray = new ARRAY (stringType, x, productSetIdList.toArray());
ARRAY rateTypeNbrArray = new ARRAY (numberType, x, rateTypeList.toArray());
ARRAY effDateArray = new ARRAY (dateType, x, effectiveDateList.toArray());
ARRAY discDateArray = new ARRAY (dateType, x, discontinueDateList.toArray());
ARRAY lowRateArray = new ARRAY (numberType, x, lowRateList.toArray());
ARRAY highRateArray = new ARRAY (numberType, x, highRateList.toArray());
ARRAY actionArray = new ARRAY (stringType, x, actionList.toArray());
// Setup for the SP call
proc = x.prepareCall("{ call prr_proc(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }");
proc.setString(1, propertyId_sp);
proc.setString(2, marketerId_sp);
proc.setString(3, contractId_sp);
proc.setArray(4, currCodeArray);
proc.setArray(5, prodSetIdArray);
proc.setArray(6, rateTypeNbrArray);
proc.setArray(7, effDateArray);
proc.setArray(8, discDateArray);
proc.setArray(9, lowRateArray);
proc.setArray(10, highRateArray);
proc.setArray(11, actionArray);
// Register the output parameters
proc.registerOutParameter(12, java.sql.Types.INTEGER);
proc.registerOutParameter(13, java.sql.Types.VARCHAR);
// Execute the SP
proc.execute();
I am using Oracle ver :- Oracle9i Enterprise Edition Release 9.2.0.6.0
Has any one come across this problem before ?
Can you give me a solution for the above problem ?
Thanks.
|
|
|
|
Re: SqlException : No more data to read from socket [message #131060 is a reply to message #125589] |
Thu, 04 August 2005 02:08 |
eknath_singh
Messages: 2 Registered: August 2005 Location: Hyderabad
|
Junior Member |
|
|
I too having the same problem while using the ArrayDescriptor in java.
Basically i am using the ArrayDescriptor to pass the set of ids through an array object. I am getting an SQL Exception : No data to read from socket when i am using the ArrayDescriptor in my java files.
Is there any proper solution to get rid of this bug/Exception as i am using this in 3 to 4 various places in my application. I am deploying my application in the oracle application server.
thanks
eknath singh.
|
|
|
Re: SqlException : No more data to read from socket [message #240894 is a reply to message #123890] |
Sun, 27 May 2007 06:37 |
mahendra_sahu
Messages: 3 Registered: May 2007
|
Junior Member |
|
|
This is the problem because your database doesn’t support connection sharing.
Or it’s a dedicated server that will not respond to different clients.
Solution:
Go to
Oracle- OraHome92
--Configuration & Migration Tool
----data base Configuration Assistant
Select radio button ---Configure Data base options in database
Select your data base---eg Oracle or pspl
Select ----- shared server mode
Now your database is sharable, so we can use from different client.
|
|
|
Goto Forum:
Current Time: Thu Dec 12 22:56:21 CST 2024
|