XML SQL Utility error - SQLException Data size bigger than max size for this type

I am trying to insert an XML document the contains the text of new articles into the database and I am receiving this error on large documents. The process flow is as follows:
From a servlet:
1. Query the news server and retrieve an XML document containing the new story.
2. Apply an XSL style sheet to the XML document to transform it into an XML document that matches the news_article table into which the story will be inserted.
3. Call the insertXML method to store the transformed document in the table. The table contains a CLOB.
Here is a sample of the raw XML:
<?xml version="1.0" standalone="yes" ?>
- <body id="s13602">
- <![CDATA[
Feb. 15-MAR--
[B] BRIDGE UPDATE--LIVESTOCK: US hunger for beef must persist amid
placements
Feb 15--2238 GMT/1738 ET
TOP STORIES:
Bridge Survey: US hunger for beef must persist amid big placements
Chicago--Feb 15--The $70.00 price level for slaughter steers has been
considered an indication of good times in cattle country since last fall.
More to follow...
^^^^^^
]]>
</body>
Here is the XSL that is applied:
<?xml version="1.0" ?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" />
<xsl:template match="*|/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="text()|@*">
<xsl:value-of select="." />
</xsl:template>
<xsl:template match="body">
<ROWSET>
<ROW>
<ID />
<SECTION_ORDER>1</SECTION_ORDER>
<SUBTITLE />
<BODY_TEXT>
<xsl:value-of select="." />
</BODY_TEXT>
<STORY_ID>
<xsl:value-of select="@id" />
</STORY_ID>
</ROW>
</ROWSET>
</xsl:template>
</xsl:stylesheet>
The transformed XML looks like:
ROWSET>
<ROW>
<ID></ID>
<SECTION_ORDER>1</SECTION_ORDER>
<SUBTITLE></SUBTITLE>
<BODY_TEXT>
Feb. 15-MAR--
BRIDGE UPDATE--LIVESTOCK: US hunger for beef must persist amid
placements
Feb 15--2238 GMT/1738 ET
TOP STORIES:
Bridge Survey: US hunger for beef must persist amid big placements
Chicago--Feb 15--The $70.00 price level for slaughter steers has been
considered an indication of good times in cattle country since last fall.
More to follow...
^^^^^^</BODY_TEXT>
<STORY_ID>s13602</STORY_ID>
</ROW>
</ROWSET>
The table I am trying to insert into look like:
ID NOT NULL NUMBER(10)
SECTION_ORDER NOT NULL NUMBER(10)
SUBTITLE VARCHAR2(500)
BODY_TEXT CLOB
STORY_ID VARCHAR2(25)
The ID column is null in the XML document and set by a before-insert trigger.
The relevant Java code I am calling all this from looks like:
try
// Setup the output handler
res.setContentType("text/xml");
// Define the URLs for the input source and Stylesheet
URL xmlSource = new URL (xmlUrl);
URL xslSource = new URL (xslUrl);
// Open connection to XML and XSL Sources via URL
URLConnection xmlConnection = xmlSource.openConnection();
xmlConnection.connect();
InputStream xmlInput = xmlConnection.getInputStream();
URLConnection xslConnection = xslSource.openConnection();
xslConnection.connect();
InputStream xslInput = xslConnection.getInputStream();
// Create the parser
DOMParser parser = new DOMParser();
// Initial parser variables
parser.setPreserveWhitespace(true);
// Parse the XML file
parser.parse(xmlInput);
xml = parser.getDocument();
// Create and configure the XSL Stylesheet and XSL Processor
XSLStylesheet xsl = new XSLStylesheet(xslInput, xslSource);
XSLProcessor processor = new XSLProcessor();
processor.showWarnings(false);
processor.setErrorStream(System.out);
// Process the XML document using the stylesheet
XMLDocumentFragment result = processor.processXSL(xsl, xml );
// Create the output document to store results
output = new XMLDocument();
// Load the transformed document into the output document
output.appendChild(result);
Class.forName ("oracle.jdbc.driver.OracleDriver");
//init a JDBC connection
Connection conn =
DriverManager.getConnection("jdbc:oracle:oci8:@ZEUS", "emerge","emerge");
OracleXMLSave sav = new OracleXMLSave(conn, tabName);
int rowCount = sav.insertXML(output);
} catch (Exception err) {
Anyone have any ideas on what I am doing wrong. This works fine on short news articles, but not large ones.
Thanks!
null

Steven,
Thanks for you reply. I have verified that I am using the latest version of Oracle XSQL Servlet, version 0.9.8.6 as well as the OCI8 driver. In doing some additional research I found that I was using the JDBC drivers supplied with OAS 4.0.8 and not the Oracle 8.1.5 JDBC drivers. I have switched my classpath to point to the 8.1.5 drivers and I am now encountering the following error:
ORA-21301: not initialized in object mode
Is this something I need to do in my Servlet code, or should the XSQL Servlet handle that?
Thanks for any help that you can provide.

Similar Messages

  • SqlEjava.sql.SQLException: Data size bigger than max size for this type: 52

    SqlEjava.sql.SQLException: Data size bigger than max size for this type: 5200
    can any one help how to resolve this error

    Im using clob object I want to insert more data
    how to insert more data

  • Error: Data size bigger than max size for this type: 4774

    Hi all,
    I am using Oracle 8.1.7.I am having long datatype in one table.I installed Oracle 9i jdbc driver( ojdbc14.jar) file and using it .When i try to submit the form from web it is giving the following error
    java.sql.SQLException: Data size bigger than max size for this type: 4774
    The same thing worked if i use Oracle ODBC driver.
    Regards
    Vasu

    Hi,
    Can you please let me know what could be the reasons for encountering the error. Am struck with this issue.
    Thanks.

  • Getting error "Data size bigger than max size for this type"

    Hi,
    I'm getting the error "Data size bigger than max size for this type: 122446" when am uploading the RTF template. RTF template size is 831 KB. Can anyone let me know what is the maximum size that an RTF template should be.
    Thanks

    Hi,
    Can you please let me know what could be the reasons for encountering the error. Am struck with this issue.
    Thanks.

  • ORA-17070: Data size bigger than max size for this type error

    Hi,
    While importing the mapping from one location to another location, I am getting the error ORA-17070: Data size bigger than max size for this type. Can anyone help me on this.
    Paul

    This error occurs when the incoming data is larger than the size of the column in the expression operator. Solution for this is that you need to set the datatype to that of the source and give in the appropriate size in the expression properties.
    If it is conversion to number (for example) from character then set the datatype to Number and specify the size to 30 or 40 or depending upon the size of the incoming data.
    For any datatype you can set the size till 9999 characters. It worked for me although my source was not as big as yours. I havnt experimented anything larger as this.
    I hope this is what you were looking for.
    If you are able to solve this, please post it here. I may need it at some point of time in the future.
    Regards
    Vibhuti
    Message was edited by:
    Vibhuti_Devatraj

  • Data size bigger than max size for this type - DB Control

    All,
    We are using a Java Control to fetch and store data
    - it fetches data from a webservice through a webservice control
    - it stores data in to database using a database control (stores the data as BLOB)
    Here currently we facing an error - weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
    The data is definitely not overshooting the max capacity of BLOB which is 4 GB. Initially this process was overshooting the transaction time-out limit of 300 sec but currently this is well within the transaction time-out limit and error happens soon after the webservice returns the data.
    a. Are there any known issues with using BLOB's with database controls ?
    b. what are the options - if we face this error ?
    weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:454)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:248)
         at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:85)
         at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:224)
         at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(SLSBContainerBean.java:103)
         at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(StatelessContainer_ly05hg_ELOImpl.java:99)
         at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(Ljava.lang.Object;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(GenericStatelessSLSBContAdpt.java:62)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:153)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
         at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
         at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:46)
         at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
         at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
         at $Proxy12.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(Unknown Source)
         at portlets.PeopleStaffing.StaffingController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(StaffingController.jpf:356)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1519)
    Caused by: java.sql.SQLException: Data size bigger than max size for this type: 4516
         at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava.lang.Object;)V(DBError.java:179)
         at oracle.jdbc.ttc7.TTCItem.setArrayData(Z[B)V(TTCItem.java:95)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(III[B)Z(DBDataSetImpl.java:2413)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(II[B)V(OraclePreparedStatement.java:1166)
         at oracle.jdbc.driver.OraclePreparedStatement.setBytes(I[B)V(OraclePreparedStatement.java:2208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;II)V(OraclePreparedStatement.java:3002)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;I)V(OraclePreparedStatement.java:3107)
         at weblogic.jdbc.wrapper.PreparedStatement.setObject(ILjava.lang.Object;I)V(PreparedStatement.java:244)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(Ljava.sql.PreparedStatement;ILjava.lang.Object;I)V(DatabaseControlImpl.jcs:1862)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(Ljava.lang.reflect.Method;[Ljava.lang.Object;ZLjava.lang.String;)Ljava.sql.PreparedStatement;(DatabaseControlImpl.jcs:1708)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(DatabaseControlImpl.jcs:2567)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:388)
         at $Proxy13.insertObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManagerImpl.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(PeopleDatabaseManagerImpl.jcs:263)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Optimized Method)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:381)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sudeep SV wrote:
    All,
    We are using a Java Control to fetch and store data
    - it fetches data from a webservice through a webservice control
    - it stores data in to database using a database control (stores the data as BLOB)
    Here currently we facing an error - weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
    The data is definitely not overshooting the max capacity of BLOB which is 4 GB. Initially this process was overshooting the transaction time-out limit of 300 sec but currently this is well within the transaction time-out limit and error happens soon after the webservice returns the data.
    a. Are there any known issues with using BLOB's with database controls ?
    b. what are the options - if we face this error ?
    Hi Sudeep. The problem is that WLW is trying to set the datum as a byte array
    and the oracle driver won't take a byte array that big. Please check whether
    WebLogic Workshop has any explicit instructions for BLOB data. Otherwise, do
    contact official BEA support for your WebLogic WorkShop issue.
    Joe
    weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:454)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:248)
         at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:85)
         at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:224)
         at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(SLSBContainerBean.java:103)
         at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(StatelessContainer_ly05hg_ELOImpl.java:99)
         at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(Ljava.lang.Object;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(GenericStatelessSLSBContAdpt.java:62)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:153)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
         at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
         at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:46)
         at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
         at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
         at $Proxy12.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(Unknown Source)
         at portlets.PeopleStaffing.StaffingController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(StaffingController.jpf:356)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1519)
    Caused by: java.sql.SQLException: Data size bigger than max size for this type: 4516
         at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava.lang.Object;)V(DBError.java:179)
         at oracle.jdbc.ttc7.TTCItem.setArrayData(Z[B)V(TTCItem.java:95)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(III[B)Z(DBDataSetImpl.java:2413)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(II[B)V(OraclePreparedStatement.java:1166)
         at oracle.jdbc.driver.OraclePreparedStatement.setBytes(I[B)V(OraclePreparedStatement.java:2208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;II)V(OraclePreparedStatement.java:3002)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;I)V(OraclePreparedStatement.java:3107)
         at weblogic.jdbc.wrapper.PreparedStatement.setObject(ILjava.lang.Object;I)V(PreparedStatement.java:244)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(Ljava.sql.PreparedStatement;ILjava.lang.Object;I)V(DatabaseControlImpl.jcs:1862)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(Ljava.lang.reflect.Method;[Ljava.lang.Object;ZLjava.lang.String;)Ljava.sql.PreparedStatement;(DatabaseControlImpl.jcs:1708)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(DatabaseControlImpl.jcs:2567)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:388)
         at $Proxy13.insertObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManagerImpl.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(PeopleDatabaseManagerImpl.jcs:263)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Optimized Method)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:381)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • From 1 DB:Data size bigger than max size for this type

    I am getting error while inserting text file as a string in the table (oracle DB)as :java.sql.SQLException: Data size bigger than max size for this type: 11412
    This particular column is Long data type.
    The mystry is there is: In one DB instance the code is working fine without error but in other DB instance its giving the following Error:
    (CMessageLog.java:118) java.sql.SQLException: Data size bigger than max size for this type: 11412
    at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava/lang/String;Ljava/lang/String;I)V(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava/lang/Object;)V(DBError.java:179)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(ZLjava/lang/String;I)V(TTCItem.java:147)
    at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(IIILjava/lang/String;)Z(DBDataSetImpl.java:2460)
    at oracle.jdbc.driver.OraclePreparedStatement.setItem(IILjava/lang/String;)V(OraclePreparedStatement.java:1190)
    at oracle.jdbc.driver.OraclePreparedStatement.setString(ILjava/lang/String;)V(OraclePreparedStatement.java:1610)
    at weblogic.jdbc.wrapper.PreparedStatement.setString(ILjava/lang/String;)V(PreparedStatement.java:638)
    Can anyone please help me out.
    Thanks,
    Joydeep Maiti

    Yes Rajat . Your are right
    I have pasted the code below. I am using "String" to hold the message (strQueueMessage). That should be the problem
    Pls let me know How should I overcome this problem.
    public void dbWriteLog(String strQueueMessage,
                   ExtractionEngineDetails objExtractionEngineDetails,
                   QueryBuilder objQueryBuilder) throws DBException
    objPrepStatement.setString(1,strQueueMessage);
    objPrepStatement.setDate(2,new Date(new java.util.Date().
                             getTime()));
                   objPrepStatement.setString(3, ExtractionUtils.getProperty(
                             ExtractionUtils.EXT_FAIL_TYPE2));
                   objPrepStatement.executeUpdate();
                   objPrepStatement.close();
                   stmt = conn.createStatement();
    Thanks
    Ashwin N.

  • Data size bigger than max size for this type

    First, I'd like to thank you for release 1.2.1, it works like
    a charm! Keep up the good work. Here are my questions:
    1. When parsing a stored procedure, I get the message "Data
    size bigger than max size for this type". Can you tell me what
    causes this?
    2. Is there any list of all the error messages that can be
    given by Migration Workbench?
    Thank You,
    Shane Brubaker
    null

    Shane,
    With respect to your questions :
    1. Could you possibly send [email protected] (that is
    our helpdesk, a direct line into development) a little more
    information about what you were doing. Also, if you could
    send us the stored procedure in question (no data required)
    then we could try to reproduce the error in-house and better
    evaluate what is going on.
    2. The majority of errors ORA-**** are actually generic
    Oracle errors and can be found in the Server documentation.
    As for our specific errors most parser messages can be
    found in the appendix "Parser Reference" from the help system.
    Regards,
    Marie
    ===
    Shane Brubaker (guest) wrote:
    : First, I'd like to thank you for release 1.2.1, it works like
    : a charm! Keep up the good work. Here are my questions:
    : 1. When parsing a stored procedure, I get the message "Data
    : size bigger than max size for this type". Can you tell me what
    : causes this?
    : 2. Is there any list of all the error messages that can be
    : given by Migration Workbench?
    : Thank You,
    : Shane Brubaker
    Oracle Technology Network
    http://technet.oracle.com
    null

  • UpdateCharacterStream - Data size bigger than max size ...

    I get the error when trying to update a LONG column using rs.
    updateCharacterStream and the THIN driver.
    I get the following error:
    Data size bigger than max size for this type: 2050
    I really need a solution to this!
    I am using 8.1.7i and thought (HOPED) it was going to be fixed in it...

    By the way, setCharacterStream works OK from a PreparedStatement, it is just updateCharacterStream that I have the problem with.

  • Java.sql.SQLException: Data size bigger than max size for this type: 77835

    I'm having this strange SQLException while trying to insert BLOB image data to Oracle database. I'm saying this strange because for the same image that has been inserted before it's throwing the exception. My program is run from Oracle form and then some image data are inserted into database through a loop. I can't realize what's the problem inside my code that's causing this problem. In fact, when I run my program independently not from Oracle Form, it runs fine, every image data get inserted into database. Given below is my code snippet:
    public void insertAccDocs(String[] accessions) throws SQLException
        for(int q=0; q<accessions.length; q++)
        final String  docName = accessions[q];
        dbThread = new Thread(new Runnable(){
        public void run()
          try{
          System.out.println("insertDB before connection");
                   getConnected();
                   System.out.println("insertDB after connection");
                   st=con.createStatement();
             //String docName = acc; commented
         // String docName = singleAccession;
                   String text = formatFree;
                   String qry = "INSERT INTO DOCUMENT VALUES('"+docName+"','"+text+"','"+formatted+"','"+uiid+"')";
                   System.out.println("parentqry"+qry);
                   int ok=0;
                   ok=st.executeUpdate(qry);
                   if(ok==1)
                System.out.println("INSERTION SUCCESS= "+ok);
                        System.out.println("Image List Size"+ imgList.size());
                // inserting into child
                        for(int i=0;i<imgList.size(); i++)
                      String imgPath = ""+imgList.get(i);
                                  System.out.println("db"+imgPath);
                                  FileInputStream fin = new FileInputStream(imgPath);
                                  BufferedInputStream bufStr = new BufferedInputStream(fin);
                                  byte[] imgByte = new byte[bufStr.available()];
                                  String img = "" + imgNameList.get(i);
                                  System.out.println("imgid="+i);
                callable = con.prepareCall("{call prc_insert_docimage(?,?,?)}");
                callable.setString(1,docName);
                            callable.setString(2,img);
                callable.setBinaryStream(3, bufStr , (int)imgByte.length);
                callable.execute();
            callable.close();
                     con.commit();
            con.close();
                   else
                        System.out.println("INSERTION NOT SUCCESS");
       //   } //else end of severalAcc
                   }catch(Exception err){ //try
                        System.out.println(err.toString());
        } //run
      }); //runnable
      dbThread.start();     
    }Can someone help me solve this problem?
    Regards
    Rashed

    Hi thanks....would you please make me a bit clear about your suggestions? Where should I move to see the "max packet size allowed to send to server in jdbc driver"? If I want to change this on server side or as one of JDBC connection property, which topic should I look for in Oracle doc...please let me know.
    Regards
    Rashed

  • UpdateCharacterStream for LONG column gives SQLException: Data size bigger than max

    I have a LONG column and when I call updateCharacterStream via the resultset I get the following error:
    SQLException: Data size bigger than max size for this type: 2391
    I am trying to update the column with a value that is 2391 in length. The column is defined as a LONG so it is plenty big enough.
    What gives?
    If I use a UTF-8 database it works OK. But if I use a db that is on the default character set I get the error. There are NO multibyte characters, I just happened to test it against my unicode db and it worked.

    This only happens with the thin driver. I am using 8i. It also works OK if the target db is in UTF8!
    D:\myjava>java OracleLongTest
    Registering the ORACLE JDBC drivers.
    Connecting to database
    Connection = oracle.jdbc.driver.OracleConnection@1616c7
    Insert via prepared statement with reader length = 2200
    Insert with prepared statement was successfull
    Updating via prepared statement with reader length = 2200
    Update with prepared statement was successfull
    ===========================================================================
    ticketDesc len = 2200 mod date = 970510081398
    Updating with reader length = 2200
    Updating C1 ts = 970510081608
    Updating the row...
    Exception 2 = java.sql.SQLException: Data size bigger than max size for this type: 2200
    java.sql.SQLException: Data size bigger than max size for this type: 2200
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:775)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:82)
    at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:761)
    at oracle.jdbc.driver.OraclePreparedStatement.setDatum(OraclePreparedStatement.java:1464)
    at oracle.jdbc.driver.OraclePreparedStatement.setCHAR(OraclePreparedStatement.java:1397)
    at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:1989)
    at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2200)
    at oracle.jdbc.driver.OraclePreparedStatement.setOracleObject(OraclePreparedStatement.java:2216)
    at oracle.jdbc.driver.UpdatableResultSet.prepare_updateRow_binds(UpdatableResultSet.java:2070)
    at oracle.jdbc.driver.UpdatableResultSet.updateRow(UpdatableResultSet.java:1287)
    at OracleLongTest.run(OracleLongTest.java:146)
    at OracleLongTest.main(OracleLongTest.java:41)
    FINISHED!!
    StringBuffer sb = new StringBuffer("");
    for(int i = 0; i < 2200; i++)
    sb.append("X");
    Statement stmt = con.createStatement();
    try
    String insertSQL = "CREATE TABLE MYLONGTEST (C1 NUMBER(38), C2 LONG)";
    stmt.executeUpdate(insertSQL);
    catch( SQLException se) {}
    PreparedStatement insertPstmt = con.prepareStatement("INSERT INTO MYLONGTEST VALUES (?, ?)");
    PreparedStatement updatePstmt = con.prepareStatement("UPDATE MYLONGTEST SET C2 = ? WHERE C1 = ?");
    PreparedStatement selectPstmt = con.prepareStatement("SELECT C1,C2 FROM MYLONGTEST WHERE C1 = ?", 1004, 1008);
    long ts = System.currentTimeMillis();
    String value = sb.toString();
    Reader rdr = new StringReader(value);
    int len = value.length();
    try
    System.out.println("Insert via prepared statement with reader length = " + len);
    insertPstmt.setLong(1, ts);
    insertPstmt.setCharacterStream(2, rdr, len);
    insertPstmt.execute();
    System.out.println("Insert with prepared statement was successfull");
    catch( SQLException se )
    System.out.println("Caught exception = " + se.toString());
    try
    System.out.println("Updating via prepared statement with reader length = " + len);
    rdr = new StringReader(value);
    updatePstmt.setCharacterStream(1, rdr, len);
    updatePstmt.setLong(2, ts);
    int rowcount = updatePstmt.executeUpdate();
    System.out.println("Update with prepared statement was successfull");
    updatePstmt.close();
    catch( SQLException se )
    System.out.println("Caught exception = " + se.toString());
    System.out.println("===========================================================================");
    selectPstmt.setLong(1, ts);
    ResultSet rs = selectPstmt.executeQuery();
    rs.absolute(1);
    String c2 = rs.getString("C2");
    ts = rs.getLong("C1");
    System.out.println("c2 len = " + c2.length() + " mod date = " + ts);
    rs.absolute(1);
    ts = System.currentTimeMillis();
    System.out.println("Updating with reader length = " + len);
    rdr = new StringReader(value);
    rs.updateCharacterStream("C2", rdr, len);
    ts = System.currentTimeMillis();
    System.out.println("Updating C1 ts = " + ts);
    rs.updateLong("C1", ts);
    System.out.println("Updating the row...");
    rs.updateRow();
    null

  • XML SQL utility - Error

    Hi,
    I am trying to retrieve data from a DB table and generate an XML file. I am using Oracle8i and IIS 4.0.
    I have downloaded XML SQL utility and I followed the installation instructions. I executed oraclexmlsqlload.bat file. It got executed and then I got the following error
    ORA-12203: TNS:unable to connect to destination.
    Let me know whether I should have JDK1.1x and JDBC 1.x compliant drivers installed in my machine. can any one help me ??
    vik

    Use xmlgen.setDateFormat('yyyy-MM-dd hh:mm:ss') and try it out
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Mark Hansen:
    I am having trouble with the xmlgen package within the XML SQL utility software version 1.1.1. I wrote a package that gets an XML file and loads it into a temporary CLOB and then using xmlgen.insertXML it inserts the XML into table. Everything works fine except for a date column in the table. I get an error when it tries to parse the date. Using the procedure xmlgen.setDateFormat, I tried to set the default date format, but I still get an error. Below you will find the text of the error message that I am getting:
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: Exception
    'java.text.ParseException:Unparseable date: "2000-08-24 08:34:24"' encountered
    during processing ROW element 0All prior XML row changes were rolled back. in
    the XML document.
    ORA-06512: at "SITESTEPPER.SS_LOG", line 30
    ORA-06512: at line 1
    I've tried a number of diferent date formats including the database default date format. I have a work around to this but it involves the use of a temporary table. Please Help!
    <HR></BLOCKQUOTE>
    null

  • Oracle XML SQL utility, error oracle.xml.sql.OracleXMLSQLException:....

    I am using Oracle XML SQL utility to generate some XML using CURSOR
    operator.
    Following is the query -
    SELECT PROJECT.PROJ_CD,
    PROJECT.PROJ_TITLE,
    CURSOR(SELECT ISSUES.ISSUE_ID
    FROM ISSUES
    WHERE PROJECT.PROJ_ID = ISSUES.PROJ_ID )
    as ISSUES_DATA
    FROM PROJECT
    WHERE PROJECT.PROJ_ID = 1
    This query works fine when I create a direct connection using Oracle JDBC
    thin driver. But when I execute same thing using a connection from a
    Weblogic connection pool (which uses exactly the same Oracle JDBC thin
    driver, classes12.zip), I get following error-
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: cursorGetMetaData: this method
    is not supported by OracleXMLDataSetGenJdbc' class. Please use
    'OracleXMLDataSetExtJdbc' instead.</ERROR>
    Following are the details about my environment:
    Weblogic5.1 on Windows NT 4.0
    Oracle 8.1.5 on Sun Solaris
    Oracle JDBC thin Classes12.zip (from Oracle 8.1.6)
    Oracle XML SQL utility XSU12_ver1_2_1
    Does anyone have any idea what is going on. Please help.
    Thanks.

    Thanks for your reply.
    Here is what I am doing:
    I have connection pool defined in welogic.properties file
    weblogic.jdbc.connectionPool.oraclePool=\
    url=jdbc:oracle:thin:@192.168.2.251:1521:orcl,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=15,\
    capacityIncrement=1,\
    allowShrinking=true,\
    shrinkPeriodMins=5,\
    refreshMinutes=5,\
    testTable=,\
    props=user=someuser;password=somepasswd
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=everyone
    weblogic.jdbc.TXDataSource.orclDataSource=oraclePool
    Then I have a DBConnection class which gets connection from the pool
    following is some code from DBConnection class
    private Connection con = null;
    private DataSource ds = null;
    private String providerURL;
    private String dataSource;
    private String contextFactory;
    private IpmsProps ipmsProp = null;
    public Connection getConnection() {
    if ( con == null ) {
    try {
    ipmsProp = IpmsProps.getInstance();
    providerURL = ipmsProp.getProviderURL();
    dataSource = ipmsProp.getDataSource();
    contextFactory = ipmsProp.getContextFactory();
    Properties p = new Properties();
    p.put(javax.naming.Context.PROVIDER_URL, providerURL);
    p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
    contextFactory);
    Context ctx = new InitialContext(p);
    Context ctx = new InitialContext();
    ds = (DataSource) ctx.lookup(dataSource);
    con = ds.getConnection();
    } catch (Exception e) {
    System.out.println("Error While creating connection! " +
    e.toString());
    } // catch
    I Hope you will be able to provide me some work around.
    Thank you very much for the help.
    Rajinder.
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Hi. It's probably because you're calling some Oracle-specific method,passing it
    a pool JDBC object, and though the Oracle methos signature says it will
    take a generic java.sql.XXX object, it really is going to assume the thingis
    an Oracle class, and fails when it tries to cast it to such.
    Depending on how you're getting your pool connection, I may have aworkaround.
    Joe
    Rajinder Arora wrote:
    I am using Oracle XML SQL utility to generate some XML using CURSOR
    operator.
    Following is the query -
    SELECT PROJECT.PROJ_CD,
    PROJECT.PROJ_TITLE,
    CURSOR(SELECT ISSUES.ISSUE_ID
    FROM ISSUES
    WHERE PROJECT.PROJ_ID =
    ISSUES.PROJ_ID )
    as ISSUES_DATA
    FROM PROJECT
    WHERE PROJECT.PROJ_ID = 1
    This query works fine when I create a direct connection using OracleJDBC
    thin driver. But when I execute same thing using a connection from a
    Weblogic connection pool (which uses exactly the same Oracle JDBC thin
    driver, classes12.zip), I get following error-
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: cursorGetMetaData: thismethod
    is not supported by OracleXMLDataSetGenJdbc' class. Please use
    'OracleXMLDataSetExtJdbc' instead.</ERROR>
    Following are the details about my environment:
    Weblogic5.1 on Windows NT 4.0
    Oracle 8.1.5 on Sun Solaris
    Oracle JDBC thin Classes12.zip (from Oracle 8.1.6)
    Oracle XML SQL utility XSU12_ver1_2_1
    Does anyone have any idea what is going on. Please help.
    Thanks.--
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advancedpositions
    for people who want to work with Java, XML, SOAP and E-Commerceinfrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San JoseCA.
    Send resumes to [email protected]

  • DES output size bigger than input size

    If I try the code below for passwords and data of each 8 bytes, I get encrypted data of 16 bytes. Why is this so? I thought with DES the number of output bits equals the number of input bits.
    Thanks,
    J�rgen
    static String A="DES";
    private static byte[] encode(Key k, byte[] data) throws Exception
    Cipher c = Cipher.getInstance(A);
    c.init(Cipher.ENCRYPT_MODE, k);
    byte[] enc = c.doFinal(data);
    return enc;
    byte[] passBytes = password.getBytes();
    Key k = new SecretKeySpec(passBytes, A);
    byte[] input = data.getBytes();
    byte[] enc = encode(k,input);

    see code below.
    with "DES/CBC/NoPadding":
    java.security.InvalidKeyException: Illegal key size or default parameters
    with "DES/EBC/NoPadding"
    java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES/EBC/NoPadding
    public class DESTest
         static String A=
    //     "DES/EBC/NoPadding";
         "DES/CBC/NoPadding";
    //     "DES";
         private static byte[] encode(Key k, byte[] data) throws Exception
              Cipher c = Cipher.getInstance(A);
              c.init(Cipher.ENCRYPT_MODE, k);
              byte[] enc = c.doFinal(data);
              return enc;
         private static byte[] decode(Key k, byte[] data) throws Exception
              Cipher c = Cipher.getInstance(A);
              c.init(Cipher.DECRYPT_MODE, k);
              byte[] enc = c.doFinal(data);
              return enc;
         public static void main(String[] args) throws Exception
              byte[] pass = "password".getBytes();
              byte[] data = "datadata".getBytes();
              Key k = new SecretKeySpec(pass, A);
              byte[] enc = encode(k,data);
              byte[] dec = decode(k,enc);
              String s = new String(dec);
              System.out.println(s);
    }

  • HOWTO: Writing Out XML Query Results of Any Size in Java with XML SQL Utility

    A customer mailed me asking for an example of how to use our XML SQL Utility to write out query results for tons of query result rows.
    With tons of data, the getXMLDOM() and getXMLString() methods are not really appropriate due to the size.
    The XML SQL Utility offers a getXMLSAX() method that streams SAX2 events to report the data being queried. This is the approach we can use to handle data of any size.
    It dawned on me today that by putting together the XML SQL Utilities getXMLSAX() routine, and the oracle.xml.parser.v2.XSLSAXPrintDriver SAX2 ContentHandler, we can effectively stream out data of any length to an appropriate writer.
    Here's a code example to get the point across:
    package test;
    import java.io.BufferedOutputStream;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.Properties;
    import javax.xml.transform.OutputKeys;
    import oracle.jdbc.OracleDriver;
    import oracle.xml.parser.v2.XSLException;
    import oracle.xml.parser.v2.XSLOutput;
    import oracle.xml.parser.v2.XSLSAXPrintDriver;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Example  {
      private static final String QUERY = "select * from emp";
      public static void main(String[] args) throws Throwable  {
          Connection conn = getConnection();
          OracleXMLQuery q = new OracleXMLQuery(getConnection(),QUERY);
          // Any printwriter will do. Here's we're output to standard out.
          PrintWriter output = new PrintWriter(new BufferedOutputStream(System.out));
          // This is a SAX2 Content Handler used by the Oracle XSLT Engine
          // to serialize a stream of sax2 events as an XML document
          // We'll use it to serialize the sax2 events from the XML SQL Utility
          // out as an XML document.
          XSLSAXPrintDriver ch = new XSLSAXPrintDriver(output, outputOptions());  
          // This asks XML SQL Utility to fire sax events for the data
          // being fetched instead of creating DOM nodes or returning text.
          // By using the XSLSAXPrintDriver content handler, these events
          // get handled by writing them directly to the output stream
          q.getXMLSAX(ch);
          ch.flush();
          q.close();
          conn.close();     
      private static XSLOutput outputOptions() throws XSLException {
        XSLOutput x = new XSLOutput();
        Properties props = new Properties();
        props.put(OutputKeys.METHOD,"xml");
        props.put(OutputKeys.INDENT,"yes");  // Set to "no" for non-indented
        x.setProps(props);
        return x;
      public static Connection getConnection() throws SQLException {
        String username = "scott";
        String password = "tiger";
        String thinConn = "jdbc:oracle:thin:@localhost:1521:ORCL";
        Driver d = new OracleDriver();
        return DriverManager.getConnection(thinConn,username,password);
    }

    Hi Uber,
    This is a known issue that error occurs when running report "Count of instances of specific software registered with Add or Remove Programs" due to non-printable characters for XML. Based on internal research, the hotfix for this issue will be
    included in the System Center 2012 Configuration Manager Service Pack 1.
    As a workaround, you can remove the nonprintable character populated into the report parameter by referring to the following KB article:
    http://support.microsoft.com/KB/914159
    Hope this helps.
    Regards,
    Mike Yin
    Mike Yin
    TechNet Community Support

Maybe you are looking for