Home » Developer & Programmer » JDeveloper, Java & XML » Re: Bigger type length than Maximum
Re: Bigger type length than Maximum [message #90996] Fri, 01 February 2002 06:15 Go to next message
Danny
Messages: 11
Registered: June 2001
Junior Member
I found that it happens in concurrent request in my app. Ofcourse including that Protocol Violation stuff sometimes.

More scary is that due this a query sometimes doesn't finish executing. Try closing down the connection and you'll lock up the entire app.

VERY ANNOYING, and a pitty that nobody found a solution yet!

...Danny
Re: Bigger type length than Maximum [message #91086 is a reply to message #90996] Thu, 28 March 2002 23:15 Go to previous messageGo to next message
Byoungjun Park
Messages: 1
Registered: March 2002
Junior Member
I had two problems, too.
1) Protocol Violation
2) Bigger type length than Maximum

And I found a solution of Protocol Violation. (but it's neither easy nor perfect. sorry.)
In my case, ALL Protocol Violation problem was caused by the series of linefeed('n') in VARCHAR2 type.
In other words, if 'hellon' is stored in VARCHAR2 type, it's ok. But if 'hellonn' is stored in VARCHAR2 type, it's still ok when you use SQL*Plus but it's not ok when you use JDBC.
So I changed all strings that have the series of 'n'.
After that, Protocol Violation didn't occur any more. :)

Just for reference, I used Redhat Linux7.1 and JDK 1.3.1_02.
DB was Oracle 8.1.5 on SunOS 5.7.

And... I still struggle with 'Bigger type length than Maximum'... Good Luck!
Re: Bigger type length than Maximum [message #91183 is a reply to message #90996] Fri, 17 May 2002 08:45 Go to previous messageGo to next message
Drew Poggemann
Messages: 2
Registered: May 2002
Junior Member
We were receiving the ORA-17412 error after we instantiated a new copy of one of our Oracle databases. I had to download the jdbc drivers specifically for the version of the database we were running to get the system to not give the error. I did not know why we were having the problem when our original database was running on the same version of oracle. We ended up finding out that the new version of the DB was setup in an underlying character set of UTF-8 vs ASCII which was causing the problems. The old JDBC drivers did not do the conversion and the new drivers do from what I have been told.

Hopefully this helps.
Re: Bigger type length than Maximum [message #91376 is a reply to message #91183] Thu, 01 August 2002 04:38 Go to previous messageGo to next message
Vikas Karwal
Messages: 1
Registered: August 2002
Junior Member
Hello,

Iam also facing the same problem of Protocol Violation error which is followed by 'Bigger type length than Maximum'. Can you please suggest me something . I have read in few FAQ's its because of classesxxx.zip. but i think i am using the correcct zip file . I am using classes12.zip with jdk1.3 . I am using the JDBC thin driver with oracle 8i in a multithreaded enviorment & my server runs continuously & i get this problem after 40-50 hours. I think its because connection gets Exausted or some thing elase. I dont know....
Please suggest.......

Thanks in advance,
Vikas Karwal
vikas_karwal79@hotmail.com
Re: Bigger type length than Maximum [message #91390 is a reply to message #91183] Tue, 06 August 2002 14:48 Go to previous messageGo to next message
Brigham Stevens
Messages: 1
Registered: August 2002
Junior Member
I am getting this exception:
java.sql.SQLException: Bigger type length than Maximum
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
at oracle.jdbc.ttc7.MAREngine.buffer2Value(MAREngine.java:1987)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB4(MAREngine.java:849)
at oracle.jdbc.ttc7.TTIoer.unmarshal(TTIoer.java:113)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:115)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:466)
at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:413)
at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:474)
at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:383)
at wamu.sql.Query.(Query.java:16)

HOW ANNOYING! It happens when doing a read-only select on a very simple table... One of the table columns is a varchar(4000) entry.

EVEN MORE ANNOYING: It isn't even executing the select statement. The driver is barfing when the STATEMENT is being created.

WHY is this happening????
Re: Bigger type length than Maximum [message #91463 is a reply to message #91183] Thu, 19 September 2002 08:20 Go to previous messageGo to next message
Douglas Thompson
Messages: 1
Registered: September 2002
Junior Member
I have the exact same problem. Also looking for answer.
Re: Bigger type length than Maximum [message #91669 is a reply to message #90996] Sun, 05 January 2003 02:00 Go to previous messageGo to next message
Chintan Shah
Messages: 1
Registered: January 2003
Junior Member
Hi all,
I got the same error, when the fetchsize of the resultset set by me was larger than the number of rows actually retrieved by the select query.
So, if u have not set the fetchsize, u can check the default fetchsize.
I hope this can help you all.

regards,
Chinan
Re: Bigger type length than Maximum [message #91755 is a reply to message #90996] Wed, 05 February 2003 17:08 Go to previous messageGo to next message
puneet
Messages: 76
Registered: August 2002
Member
we r having same problem with weblogic 7.1 -- EJB2 -- Oracle 8.1 env. it comes on its own.. after restart of server, it disappears..
ANY CLUES ??
Re: Bigger type length than Maximum [message #91761 is a reply to message #91755] Thu, 06 February 2003 09:19 Go to previous messageGo to next message
dpoggemann@schoolspecialt
Messages: 1
Registered: February 2003
Junior Member
I posted what we did to fix in one of my previous emails. The issue was with the version we had of the oracle jdbc libs and the underlying character set of the database. The database was setup as UTF8 and we had older classes that did not do the automatic conversion. My suggestion is to upgrade your oracle jdbc classes to see if that fixes the problem.
Re: Bigger type length than Maximum [message #91797 is a reply to message #90996] Fri, 21 February 2003 05:42 Go to previous messageGo to next message
Mukesh
Messages: 8
Registered: March 2002
Junior Member
Try using oci8 Oracle driver. It worked for me. Best of luck.
Re: Bigger type length than Maximum [message #91817 is a reply to message #90996] Mon, 03 March 2003 21:30 Go to previous messageGo to next message
Napoleon
Messages: 1
Registered: March 2003
Junior Member
The oci8 driver works for me too.

For me, the problem occurs when i was trying to retrieve a LONG using streaming.
Re: Bigger type length than Maximum [message #91945 is a reply to message #91376] Thu, 20 November 2003 13:24 Go to previous messageGo to next message
Juli√°n catino
Messages: 1
Registered: November 2003
Junior Member
You wrote in orafaq.net

"Hello,
Iam also facing the same problem of Protocol Violation error which is followed by 'Bigger type length than Maximum'. Can you please suggest me something . I have read in few FAQ's its because of classesxxx.zip. but i think i am using the correcct zip file . I am using classes12.zip with jdk1.3 . I am using the JDBC thin driver with oracle 8i in a multithreaded enviorment & my server runs continuously & i get this problem after 40-50 hours. I think its because connection gets Exausted or some thing elase. I dont know....
Please suggest.......

Thanks in advance,
Vikas Karwal
vikas_karwal79@hotmail.com"

DOu you know some clue ? I think I have the same problem, but with Oracle 9i and jdk 1.4.

Regards,

JuliŠn Catino
Re: Bigger type length than Maximum [message #91963 is a reply to message #91390] Mon, 29 December 2003 06:53 Go to previous messageGo to next message
George Ma
Messages: 1
Registered: December 2003
Junior Member
I got the two errors at the same time:
java.sql.SQLException: Bigger type length than Maximum
and
java.sql.SQLException: Protocol violation.
The data type is TIMESTAMP, the Oracle version is Oracle 9i. The JDBC is class12.zip (Oracle 9i jdbc for jdk 1.2 and 1.3).
Can any one help?
Thanks
Re: Bigger type length than Maximum [message #92257 is a reply to message #91086] Fri, 07 May 2004 06:21 Go to previous messageGo to next message
Frank
Messages: 7877
Registered: March 2000
Senior Member
Your information pushed me in the right direction.
I've discovered that plus and min sign (+ -) in varchar2 fields can give some problems trough JDBC.
We have got sometimes the error 'Bigger type length than Maximum', but if we removed the signs from the data we don't get the error (strange).
Re: Bigger type length than Maximum [message #275684 is a reply to message #90996] Mon, 22 October 2007 06:06 Go to previous messageGo to next message
rommelsharma
Messages: 2
Registered: October 2007
Junior Member
One of the definite reasons, what I think, is if you compile your java class using a particular version of the oracle driver and run it later using another version.

I confirmed this by using different versions of oracle drivers.

I would recommend you download the latest Oracle 11G driver (classes12.jar) and recompile your program, and it should work.

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

Cheers,
Rommel Sharma.
Re: Bigger type length than Maximum [message #275702 is a reply to message #275684] Mon, 22 October 2007 07:59 Go to previous messageGo to next message
Frank
Messages: 7877
Registered: March 2000
Senior Member
My (wild) guess is that version 11 was not yet available at the time the Original Poster had his problem...
Re: Bigger type length than Maximum [message #275723 is a reply to message #275702] Mon, 22 October 2007 09:03 Go to previous messageGo to next message
rommelsharma
Messages: 2
Registered: October 2007
Junior Member
I agree. One reason could be that there was a difference of drivers available that time, across the environments the code was run (Its my assumption that there were different environments where the code was tested).
Re: Bigger type length than Maximum [message #302415 is a reply to message #275723] Mon, 25 February 2008 09:50 Go to previous messageGo to next message
stonga
Messages: 1
Registered: February 2008
Junior Member
I had the same problem (using JDK1.5 & Oracle10g & driver type 4 version - 10.1.0.2.0 : ojdbc-1.4.jar) :
java.sql.SQLException: Bigger type length than Maximum

I've Tried the last version of ojdbc-1.4.jar (version - 10.2.0.3.0), so it works! Smile

To see the version of the driver ojdbc-1.4.jar take a look into META-INF\MANIFEST.MF within the .jar file

Specification-Version: "Oracle JDBC Driver version - 10.1.0.2.0" -->Doesn't work
Specification-Version: "Oracle JDBC Driver version - 10.2.0.3.0" -->Works fine

To retrieve the driver ojdbc-1.4.jar "Oracle JDBC Driver version - 10.2.0.3.0" and upper, you can retrieve it from Weblogic9.2.
Re: Bigger type length than Maximum [message #385942 is a reply to message #90996] Wed, 11 February 2009 23:51 Go to previous messageGo to next message
shavo25
Messages: 1
Registered: February 2009
Location: Sydney
Junior Member
i am using jdk1.5 and oracle 10.2.0.4.0, i downloaded the correct oracle driver from the oracle website to use.

i get that error "Bigger type length than Maximum" when i run a java application test. I am calling a stored function that uses xmltable:

CREATE OR REPLACE FUNCTION JL_INTERFACE.MAPPING_ITEMS (xmlInput IN CLOB)
RETURN SYS_REFCURSOR
Is
mappingItemsCursor SYS_REFCURSOR;

Begin
Open mappingItemsCursor FOR

Select OTCC.OTCC, MTI.*
From (Select XMLType(xmlInput) as xmlMessage
From Dual) xmlTypeInput

,XMLTable('/Message'
Passing xmlTypeInput.xmlMessage
Columns Jurisdiction VARCHAR2(50) Path 'Body/Outcome/OutcomeHeader/CourtAppearance/Court/@Jurisdiction',
Law_Part_Code VARCHAR2(50) Path 'Body/Outcome/Offence/ActionIdentifiers/@LawPartCode',
HNumber VARCHAR2(50) Path 'Body/Outcome/Offence/ActionIdentifiers/ActionID/CANReference/@HNumber'
) Identifiers

,XMLTable('/Message/Body/Outcome/Offence/Order'
Passing xmlTypeInput.xmlMessage
Columns Order_Number VARCHAR2(50) Path '@JusticelinkOrderNumber' ,
Order_Category VARCHAR2(50) Path 'OrderTypeCodes/@JusticelinkOrderCategory' ,
Order_Type VARCHAR2(50) Path 'OrderTypeCodes/@JusticelinkOrderType',
Next_Hearing_Type VARCHAR2(50) Path 'NewListingDetails/Listing/ListingDetail/NextHearingType'
) Orders

,JL_INTERFACE.ORDER_TYPE_NSWP_OTCC OTCC
,JL_INTERFACE.MAPPING_TEMPLATE_ITEM MTI
Where OTCC.Jurisdiction = Identifiers.Jurisdiction
And OTCC.Order_Type = Orders.Order_Type
And OTCC.Next_Hearing_Type = Orders.Next_Hearing_Type
And OTCC.Template_Type = MTI.Template_Type;

Return mappingItemsCursor;
End MAPPING_ITEMS;

so my java code is like:
String query = oracleQuery;
CallableStatement stmt = conn.prepareCall(query);

// register the type of the out param - an Oracle specific type
stmt.registerOutParameter(1, OracleTypes.CURSOR);

// set the in param
String xml = readInAsFile();
stmt.setString(2, xml );

// execute and retrieve the result set
stmt.execute();
ResultSet rs = (ResultSet)stmt.getObject(1);

I think this is a problem around using CLOB, as if i select a clob from a table to use in the stored function it works, but it will jsut not work in my java application.

If i upgrade my driver class to a newer version i get the error PLS-00201: identifier 'SYS.DBMS_XQUERYINT' must be declared instead.

I am going around in circles here, i have been looking into this problem for over a day now and it is seriously slowing me down, does anybody know what the problem is please?

Thanks,
Shane.
Re: Bigger type length than Maximum [message #407941 is a reply to message #90996] Fri, 12 June 2009 07:54 Go to previous messageGo to next message
Siliphant
Messages: 1
Registered: June 2009
Junior Member
Yet another cause and its solution

Hi

we had the error "Bigger type length than Maximum" but the strange thing was that we couldn't reproduce it on our test system (Linux) but it happened only on a customer system (Solaris).

We compared NLS and system settings, Oracle versions (10.2.0.4 on both systems) and tried three different JDBC driver versions - but nothing helped.

Finally we found that the cause for "Bigger type length than Maximum" was NOT a wrong driver version but a JDBC / SQL syntax error of a stored procedure call: it was "call stored_procedure()" but it should have been "{ call stored_procedure() }"; the curly braces were missing!

After fixing that it works fine. However, two questions remain:
1. Why did it run on many different systems for many years (!) but just on that single system the error was thrown (although the code was obviously wrong?)
2. Why does the SQL driver throw such a misleading exception?

Oracle developers, you should improve that! I think there's a bug in the bug... Wink
Re: Bigger type length than Maximum [message #525253 is a reply to message #90996] Fri, 30 September 2011 06:40 Go to previous message
naveedkamran
Messages: 1
Registered: September 2011
Location: Islamabad
Junior Member
Hi

I have Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit and I was having the same problem of protocol error and bigger length. I searched a lot over the internet but no solution. Finally, my problem was solved by using the most updated oracle 11 g driver "ojdbc6.jar".


Previous Topic: XML format for nested xmlelements
Next Topic: read value from xml
Goto Forum:
  


Current Time: Wed Oct 01 01:27:37 CDT 2014

Total time taken to generate the page: 0.07400 seconds