-
java.sql.SQLException: Bigger type length than Maximum
Hi,
I use:
WebLogic Platform 8.1 Service Pack 5
Oracle9i Enterprise Edition Release 9.2.0.5.0
Web application that use Oracle JDBC driver Version 10.1.0.2.0 to query
the DB.
I call this procedure:
/*//////////////////////////////////////////////////////////////////////*/
procedure GET_PROGECT_GID(
progectID in INTEGER,
int_table in VARCHAR2,
outCursor out dnCursor)
IS
localCursor dnCursor;
BEGIN
OPEN localCursor FOR
'SELECT pr.GID, pr.ESEQ '||
'FROM SIGRAFWEB.'||int_table||' pr '||
'WHERE pr.PREVENTIVO = '||progectID||'';
outCursor := localCursor;
END GET_PROGECT_GID;
/*//////////////////////////////////////////////////////////////////////*/
where the pakage is
/*//////////////////////////////////////////////////////////////////////*/
create or replace PACKAGE "DXF_PKG" as
type dnCursor is REF CURSOR;
Procedure EXTRACT_DATA(windowX1 in NUMBER,windowY1 in NUMBER,
windowX2 in NUMBER,windowY2 in NUMBER,
windowX3 in NUMBER,windowY3 in NUMBER, windowX4 in
NUMBER,windowY4 in NUMBER,gid_window_layer in INTEGER,
outCursor out dnCursor,int_table in VARCHAR2);
Procedure GET_PROGECT_GID(progectID in INTEGER,int_table in
VARCHAR2, outCursor out dnCursor);
Procedure GET_GEOM_DATA(int_table VARCHAR2,gid in INTEGER,eseq in
VARCHAR2,outCursor out dnCursor);
Procedure CREATE_WINDOW(windowX1 in NUMBER,windowY1 in
NUMBER,windowX2 in NUMBER,windowY2 in NUMBER,windowX3 in
NUMBER,windowY3 in NUMBER,windowX4 in NUMBER,windowY4 in NUMBER,gid_out
out INTEGER);
Procedure DESTROY_WINDOW(gid_window_layer in INTEGER);
end;
/*//////////////////////////////////////////////////////////////////////*/
I call this procedure in this mode in java object:
/*//////////////////////////////////////////////////////////////////////*/
Connection con = ds.getConnection();
CallableStatement proc = con.prepareCall("{ call
DXF_PKG.GET_PROGECT_GID(?,?,?) }");
proc.setInt(1, IDpreventivo);
proc.setString(2, gid_table);
proc.registerOutParameter(3, OracleTypes.CURSOR);
proc.execute();
/*//////////////////////////////////////////////////////////////////////*/
where
/*//////////////////////////////////////////////////////////////////////*/
IDpreventivo = number 8 digits
gid_table = table name string 10 chars
/*//////////////////////////////////////////////////////////////////////*/
when I execute the code, I receve this exception
/*//////////////////////////////////////////////////////////////////////*/
Bigger type length than Maximum
java.sql.SQLException: Bigger type length than Maximum
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java(Compiled
Code))
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java(Inlined
Compiled Code))
at
oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java(Compiled
Code))
at
oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java(Compiled
Code))
at
oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1048)
at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:112)
at
oracle.jdbc.driver.T4CTTIdcb.receiveFromRefCursor(T4CTTIdcb.java:104)
at
oracle.jdbc.driver.T4CResultSetAccessor.unmarshalOneRow(T4CResultSetAccessor.java:165)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:785)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:702)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:527)
at
oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
at
oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:783)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2885)
at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2976)
at
oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4103)
at
weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:102)
at
it.escsolution.sigrafweb.dxfservice.ProjBounding.computeBounding(ProjBounding.java:101)
at
it.escsolution.sigrafweb.dxfservice.ProjBounding.computeBounding(ProjBounding.java:49)
at
it.escsolution.sigrafweb.dxfservice.ProjBounding.(ProjBounding.java:35)
at
it.escsolution.sigrafweb.idservice.AutenticazioneAction.open(AutenticazioneAction.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>
/*//////////////////////////////////////////////////////////////////////*/
How can help me to resolve this problem?
I'm in truble...
Tnx to all.
-
Re: java.sql.SQLException: Bigger type length than Maximum
sandro.salari@gmail.com wrote:
> Hi,
> I use:
> WebLogic Platform 8.1 Service Pack 5
> Oracle9i Enterprise Edition Release 9.2.0.5.0
> Web application that use Oracle JDBC driver Version 10.1.0.2.0 to query
> the DB.
....
> Bigger type length than Maximum
> java.sql.SQLException: Bigger type length than Maximum
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java(Compiled
> Code))
Hi. First, are you absolutely sure that's the driver version actually
being used? WebLogic packages an earlier version of the thin driver,
which can be found in the installation's server\lib directory. Unless
you replaced that one, or edited your start-weblogic script and altered
the CLASSPATH variable constructed in the script to list your driver
ahead of weblogic.jar, you may not be using the driver you think.
You can always check with your code, by doing:
System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
You can also get quick WebLogic/JDBC related help by posting to the
BEA newsgroup.
Let me know...
Joe weinstein at BEA Systems
-
Re: java.sql.SQLException: Bigger type length than Maximum
sandro.salari@gmail.com wrote:
> Hi,
> I use:
> WebLogic Platform 8.1 Service Pack 5
> Oracle9i Enterprise Edition Release 9.2.0.5.0
> Web application that use Oracle JDBC driver Version 10.1.0.2.0 to query
> the DB.
....
> Bigger type length than Maximum
> java.sql.SQLException: Bigger type length than Maximum
> at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java(Compiled
> Code))
Hi. First, are you absolutely sure that's the driver version actually
being used? WebLogic packages an earlier version of the thin driver,
which can be found in the installation's server\lib directory. Unless
you replaced that one, or edited your start-weblogic script and altered
the CLASSPATH variable constructed in the script to list your driver
ahead of weblogic.jar, you may not be using the driver you think.
You can always check with your code, by doing:
System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
You can also get quick WebLogic/JDBC related help by posting to the
BEA newsgroup.
Let me know...
Joe weinstein at BEA Systems
-
Re: java.sql.SQLException: Bigger type length than Maximum
Hi,
thanks for the assistance, I use the same instruction you talk about
for obtain JDBC driver information. The application server is as
production server out of my direct control and I don't know why the
driver is not up to date, or if someone has replace it by another one.
I read about someone that had the same problem and resolved it updating
ojdbc14.jar file. I can't update directly this file, but I can alter
the Weblogic CLASSPATH. The problem is that I'm not sure about the
procedure to follow to done this modify ( I try to use the
PRE_CLASSPATH procedure, but I don't see change in driver version).
Can you explain me the step needed, and the file to modify for UNIX
platform please? Can you confirm me that this problem is due to a bug
present in early version of Oracle JDBC driver as I read in some forum?
Regards,
Sandro Salari.
-
Re: java.sql.SQLException: Bigger type length than Maximum
Hi,
thanks for the assistance, I use the same instruction you talk about
for obtain JDBC driver information. The application server is as
production server out of my direct control and I don't know why the
driver is not up to date, or if someone has replace it by another one.
I read about someone that had the same problem and resolved it updating
ojdbc14.jar file. I can't update directly this file, but I can alter
the Weblogic CLASSPATH. The problem is that I'm not sure about the
procedure to follow to done this modify ( I try to use the
PRE_CLASSPATH procedure, but I don't see change in driver version).
Can you explain me the step needed, and the file to modify for UNIX
platform please? Can you confirm me that this problem is due to a bug
present in early version of Oracle JDBC driver as I read in some forum?
Regards,
Sandro Salari.
-
Re: java.sql.SQLException: Bigger type length than Maximum
sandro.salari@gmail.com wrote:
> Hi,
> thanks for the assistance, I use the same instruction you talk about
> for obtain JDBC driver information. The application server is as
> production server out of my direct control and I don't know why the
> driver is not up to date, or if someone has replace it by another one.
> I read about someone that had the same problem and resolved it updating
> ojdbc14.jar file. I can't update directly this file, but I can alter
> the Weblogic CLASSPATH. The problem is that I'm not sure about the
> procedure to follow to done this modify ( I try to use the
> PRE_CLASSPATH procedure, but I don't see change in driver version).
> Can you explain me the step needed, and the file to modify for UNIX
> platform please? Can you confirm me that this problem is due to a bug
> present in early version of Oracle JDBC driver as I read in some forum?
>
> Regards,
> Sandro Salari.
Hi, yes, I can confirm it's an oracle driver issue, fixed in the later
vesion of the driver. As I said, the only way to get WebLogic to
use the driver is to get it into WebLogic's class path. WebLogic's
class path is constructed by the script that starts WebLogic, and
passed explicitly to the java call via a commandline argument. You
must therefore explicitly add the driver so it's ahead of weblogic.jar
in the constructed commandline argument, or you must replace the
ojdbc14.jar in the server\lib directory.
HTH,
Joe Weinstein at BEA Systems
-
Re: java.sql.SQLException: Bigger type length than Maximum
sandro.salari@gmail.com wrote:
> Hi,
> thanks for the assistance, I use the same instruction you talk about
> for obtain JDBC driver information. The application server is as
> production server out of my direct control and I don't know why the
> driver is not up to date, or if someone has replace it by another one.
> I read about someone that had the same problem and resolved it updating
> ojdbc14.jar file. I can't update directly this file, but I can alter
> the Weblogic CLASSPATH. The problem is that I'm not sure about the
> procedure to follow to done this modify ( I try to use the
> PRE_CLASSPATH procedure, but I don't see change in driver version).
> Can you explain me the step needed, and the file to modify for UNIX
> platform please? Can you confirm me that this problem is due to a bug
> present in early version of Oracle JDBC driver as I read in some forum?
>
> Regards,
> Sandro Salari.
Hi, yes, I can confirm it's an oracle driver issue, fixed in the later
vesion of the driver. As I said, the only way to get WebLogic to
use the driver is to get it into WebLogic's class path. WebLogic's
class path is constructed by the script that starts WebLogic, and
passed explicitly to the java call via a commandline argument. You
must therefore explicitly add the driver so it's ahead of weblogic.jar
in the constructed commandline argument, or you must replace the
ojdbc14.jar in the server\lib directory.
HTH,
Joe Weinstein at BEA Systems
-
Re: java.sql.SQLException: Bigger type length than Maximum
Good...
after upgrade all work well...
tnx a lot for your help
Sandro Salari
-
Re: java.sql.SQLException: Bigger type length than Maximum
Good...
after upgrade all work well...
tnx a lot for your help
Sandro Salari
-
Re: java.sql.SQLException: Bigger type length than Maximum
sandro.salari@gmail.com wrote:
> Good...
> after upgrade all work well...
> tnx a lot for your help
> Sandro Salari
Glad to have been of service. We want you successful.
Joe Weinstein at BEA Systems