Writing LONG objects to DB

How can I write large LONG object to DB using a sql-procedure?
I invoke form java a procedure, which takes a LONG-parameter. This procedure simply writes LONG-parameter to DB.
Using a procedure I can't write large objects, I can write only <4Kb. I tried to send 10Kb and reseived SQL-error:"can bind a LONG value only for insert into a LONG column".
Please, help,
thanks for listening

Hi 398287,
Sorry but I can't help you, based on the [lack of] information you have provided. Perhaps if you would provide the following details, I may be able to help you:
1. Complete error message (and stack trace).
2. The part of your code that you think is causing the problem.
3. Environment details (Oracle version, java version, platform, etc.)
Good Luck,
Avi.

Similar Messages

  • Writing serialized objects as XML

    What are the advantages and a disadvantages for writing serialized objects as XML instead of the Java binary format?

    Depending on the serialization scheme, XML can be used to loosely bind the persistant data, so that the class can change version, or even be replaced by a different class as the project requires refactoring over its lifecycle.
    It also allows non-Java tools to interact with your data, which almost always has a longer lifetime than any implementation. I still occasionally process SGML files from the '80s. If they had been in a proprietory binary format, that data would be far harder to re-use.
    Pete

  • Error while updating DocumentDefinition AIP-11052:Writing following objects

    Hi All,
    I am getting this error while updating ecs in Document Definition. I was able to do it properly on the same environment a few weeks back but now its throwing an error:
    Error -: AIP-11052: Writing following objects: Document Definition failed due to following constraint violation: DOCUMENTDEFINITION. CAN NOT UPDATE UNVERSIONABLE OBJECT IN A VALIDATED CONFIGURATION
    I read in some of the OTN forums that this may be an environment issue. So i restarted the B2B server as suggested but the error seems to still exist.
    Kindly reply how to proceed. Its little critical.
    Thanks in advance.

    Make sure there is no agreement in deployed/validated state which is using this document definition. Retire and purge all existing configurations which are using this doc def and make sure there is no agreement in validated state. If there is an agreement in validated state and then change/just update anything in agreement and save it to bring it back into draft state.
    Regards,
    Anuj

  • Error validating TP...AIP-11052: Writing following objects: Trading Partner

    Hi,
    I am getting following error validating trading partner. I have double checked the TP setup, everything looks fine. I had earlier successfully validated, later added a document type and trying to re-validate.
    AIP-11052: Writing following objects: Trading Partner failed due to following constraint violation: PARTY. CAN NOT UPDATE UNVERSIONABLE OBJECT IN A VALIDATED CONFIGURATION
    Does anyone have any clues??
    Thanks
    Venkat

    Make sure you do not have active configuration which is using this agreement.

  • Problem changing Long object's value

    Hi,
    I want to know what is the way to change the value of a Long object (if any).
    I didn't find set for this, and i want to change the value after creating the object withoud changing the reference (not by longObject = new Long(5)).
    Thanks,
    Snayit

    That's not possible. Long is immutable (as are String, and all other primitive wrapper classes). This is done because immutable objects have huge advantages in many cases (like when acting as the key to a hashmap).

  • Efficiency of Long objects over Integer objects? any ?

    I have a Long object which actually only stores "integer" values and we had coded it that way long before we realised it. Now I am told we need to change the LONG object to INTEGER object to improve Java efficiency. I disagree with that. Note that we are not doing any ARITHMETIC operations on the Long object at all. I understand that it would be efficient to use Integer object if theres a lot of arithmetic operations being done on it. But since we are not how is converting of Long objects to Integer going to improve my efficiency? and moreover since only integer values are stored in the Long object I dont see any memory allocation lose too....am i right in my posture?
    Thanks

    Thanks for quick reply ! are you saying Long and
    Integer occupy same amount of memory space if the Long
    object contains integer value ?No.
    You said:
    moreover since only integer values are stored in the Long
    object I dont see any memory allocation lose too....am i right in my posture?I took that to mean that you thought that since the Longs contain a smaller (int-sized) values, that they're taking up the same space as Integers, and therefore you won't save any memory by switching to Integers.
    That's not in fact the case. A Long takes up the same amount of space regardless of whether it's holding 0 or 1 or Integer.MAX_VALUE or Long.MAX_VALUE, and that space is probably slightly bigger (2 bytes bigger, I'd guess) than what Integer uses.
    So technically, you will save some space (probably) by going to Integer. However, unless you have a huge number of these objects, that space savings will be minimal, and unless you've actually seen numbers in a profiler, it's pointless to speculate.

  • Caching Long Objects

    Hi,
    I would like to know why is Long objects are not cached internally and pooled in Java. Since Long objects are immutable there shouldn't be any problem in doing this right? Let me know am I missing anything here...Currently for one of my applications Iam planning to do this caching of Long objects myself. But the code for that looked pretty ugly as I need to put the newly constructed Long object into a HashMap and get the reference to the previously cached Long object. I believe providing this implementation will reduce my application memory requriements drastically as I need to cache huge volumes of data (around 1 GB of data need to be cached). Will there be any problems in providing an implementation like this ... Are there any better alternatives ?

    Objects in general take somewhere in the region of 24-32 bytes to represent (excluding any member
    variables) therefore Long will require somewhere in the region of 32 to 40 bytes to represent. The
    hashMap you use to cache your Longs creates additional overhead (we'll ignore this for now as it can be
    amortised over the individual unique Longs that you cache.
    a long takes 8 bytes to store.
    a reference takes 4 bytes (on a 32 bit machine 8 on a 64 bit JVM)
    Therefore on 64 bit machines there is no advantage. Caching will always take more memory then using
    native longs.
    on a 32 bit VM the advantage of using cached Longs when compared to native longs occurs when you
    have an average of at least 8 references to each unique Long. (for a large number of unique Longs)
    However there are, I believe, plans to do this in 1.5. However they are not doing it to save memory. They
    are doing it to improve the performance of autoboxing. Also the cache will not be dynamic it will be of
    fixed size and created when the VM starts up. Basically values in the range -128 to 127 (or something
    similar) will be cached for byte, short, int , long.
    matfud

  • Set Java Object with Java Long Object from JNI

    Hi,
    i am getting crazy with the jni...
    in Java i have the follwoing:
    public class blabla{
    Object myObject;
    i chose Object cause the return value from native is not known
    in case for a long value i handle it like this :
    //get the Long class
    jclass LongCls = env->FindClass("Ljava/lang/Long;");
    jmethodID jmid = env->GetMethodID(LongCls, "<init>","(J)V");
    //create an Long Object with the long return value
    jobject LongObj = env->NewObject(LongCls,jmid,longreturnvalue);
    //set Long Objekt - doesnt work!(jclazz is the class of the return Object of the blabla class)
    jfid = env->GetFieldID(jclazz, "myObject", "Ljava/lang/Object;");
    env->SetObjectField( returnobjectofblabla,jfid,LongObj );
    the long value is set fine in the Long Object but i cant set the Long Object with the SetObjectField method into the Object myObject.
    Java is shown that the myObject contains a Long Object but the long value of the Long Object is totally wrong and doesnt equal to the long value which has been set.But setting the value works fine- any ideas or solutions?
    Thank you!

    charliess wrote:
    sometimes i really wonder about the answers in this forum - until now i got not one answer that helps me, even i tried to write down the problem very detailed...
    Sometimes I wonder about people who jump onto a site and immediately assume that
    1. They are the most important person in the world
    2. That they deserved the absolute undivided attention of absolute everyone.
    3. That everyone should be absolutely polite to them and provide them with perfect answers.
    4. Feel free to denigrate and posit their own opinion on everything while ignoring anything else that anyone else says.
    5. Expect that everyone else should understand their poorly worded questions.
    Myself I find such individuals extremely amusing. Although they seldom stick around long here. At least not under their original alias.
    plaz tel me how to realise your error checking?example plz
    You start by having at least a basic understanding of C/C++ and java.
    Then you read the JNI documents, all of them, for each method that you are using.
    Then you write code such that it actually reflects the documents. For example you check return types. And probably deal with the possibility that JNI methods might throw exceptions.
    as far as i know the jni methods like getfieldids and so on throw exceptions other like stObject dont do that the just return nothing
    i can see all exceptions in my Java console thats not the Problem, setting the Long Object does not throwing a exception btw->
    Myself I wouldn't expect that a JNI exception would show in the java console. Could I suppose though.
    However nothing so far would suggest that an exception is being thrown. That however doesn't alter the fact that you must still write the code such that it could happen.
    is it possible in general to set an java Long Object created in C(native) into a Object type (Object) overgiven as parameter in my JNI function with the setObject method?
    Is it possible that you could actually follow my previous request and create some code that actually runs instead of cut and pasting whatever you feel like?
    plz answer also with code and examples i did the same for you...No you didn't. You posted something which would not compile and quite possibly doesn't represent your actual code at all.
    And please note that we do not get paid to do this. If you want to pay someone to solve your problem then there are sites for that.
    Paying someone allows you to make all sorts of demands. The more you pay the more people will put up with.
    If you don't want to pay and do in fact want free answers then it will probably be in your interest to
    1. Be polite
    2. Answer the questions that have been asked of you.

  • Trouble writing to object array

    Hi I did a semester of java 2 years ago and I'm trying to remember what I knew so please bear with me...
    I am extracting data from an xml file and then writing that information to an object array called files containing 4 string and 1 array. This files array is in turn an element in another object array containing 400 files arrays called records.
    It appeared to be working but when I want it to print out which ever record I have selected it only prints out the last record! It seems to be overwriting each files array with the next?
    Another problem I can only print out an element of the array not the entire thing?
    Please help have spent weeks on this
    Here is the code:
    Object[] Records = new Object[400];
    Object files[] = new Object[5];
    NodeList records = doc.getElementsByTagName("record");
    for( int i = 0; i < records.getLength();i++)
    Element record = (Element) records.item(i);
    NodeList headers = record.getElementsByTagName("header");
    Element header = (Element) headers.item(0);
    NodeList ids = header.getElementsByTagName("identifier");
    for(int j = 0; j < ids.getLength(); j++){
    Element id = (Element) ids.item(j);
    String ID = getText(id);
    files[0] = ID;
    NodeList metadatas = record.getElementsByTagName("metadata");
    Element metadata = (Element) metadatas.item(0);
    NodeList citeseers = metadata.getElementsByTagName("oai_citeseer:oai_citeseer");
    Element citeseer = (Element) citeseers.item(0);
    NodeList titles = citeseer.getElementsByTagName("dc:title");
    for(int k = 0; k < titles.getLength(); k++){
    Element title = (Element) titles.item(k);
    String TITLE = getText(title);
    files[1] = TITLE;
    NodeList subjects = citeseer.getElementsByTagName("dc:subject");
    for(int m = 0; m < subjects.getLength(); m++){
    Element subject = (Element) subjects.item(m);
    String SUBJECT = getText(subject);
    files[2] = SUBJECT;
    NodeList descriptions = citeseer.getElementsByTagName("dc:description");
    for(int n = 0; n < descriptions.getLength(); n++){
    Element description = (Element) descriptions.item(n);
    String DESCRIPTION = getText(description);
    files[3] = DESCRIPTION;
    String[] Names = new String[20];
    NodeList authors = citeseer.getElementsByTagName("oai_citeseer:author");
    for(int l = 0; l < authors.getLength(); l++){
    Element author = (Element) authors.item(l);
    Names[l] = author.getAttribute("name");
    files[4] = Names;
    System.out.println("The id is "+files[0]);
    System.out.println("The title is "+ files[1]);
    System.out.println("The Subject is "+ files[2]);
    System.out.println("The Description is "+ files[3]);
    for(int q=0; q < authors.getLength(); q++){
    System.out.println("The Names are "+ ((String[])files[4])[q]);
    //Records[i] = files;
    System.out.println(((Object[])Records[0])[0]);

    I'm afraid I'm not going to make you a millionaire but I feel so relieved at the moment that if I had a million I'd give it to you!!Yeah, I know you won't make me a millionaire, but I can dream... :)
    thanks for all your helpYou are welcome. Do you understand why you needed to move the creation of the "files" array.

  • Writing XML Object to a File

    Hi, I am using InDesign JavaScript to make an XML object in memory. When my script is done, I want to write the XML to a file. When I run the code below, the file is created, but the XML is not written to the file. Any help would be appreciated. Thanks. Rick
    #target indesign
    var partsMap = <partsMap />;
    savePartsMap (partsMap);
    function savePartsMap (partsMap) {
        var partsFile;
        // Make a File object for the parts map XML file.
        partsFile = new File("E:\\Test.xml");
        // Open the map file.
        partsFile.open("w");
        partsFile.write(partsMap);
        partsFile.close();

    Add partsFile.encoding = 'UTF-8'; right after your File instantiation.
    I'm not sure but you also might want to write partsMap.toXMLString() instead of the partsMap.toString() you're implicitly writing.
    Jeff

  • Visio UML - Long object lifetime run out of connector points

    I have a sequence diagram that is attempting to model a relatively long business process over a large number of objects.
    the problem is that as I extended the object lifetime swimlane I run out of connector points the automatically appear on the line, so I cannot attach a new activation shape.
    How can I get more connector points to be automatically drawn on the line.  I have been unable to use the Connection Point tool (Shift+Ctrl+1) to put new connection point directly on the swimlane, it keeps snapping to the grid lines and not to the line.
    Cheers...
    Robert

    Hi,
    If you are trying to create a point-to-point connection and having a difficult time gluing a connector exactly where you want it, try different snap and glue settings:
    On the View tab, Visual Aids group, click the
    Snap & Glue dialog box launcher, select the options that you want.
    More reference: "Add, move, or delete connection points"
    http://office.microsoft.com/en-us/visio-help/add-move-or-delete-connection-points-HP010378181.aspx?CTT=1
    Best regards.
    William Zhou
    TechNet Community Support

  • Query based on a Long Object Datatype

    I have a query like this
    SELECT project
    FROM vgn_ci
    WHERE bobdb__val
    LIKE '%#8#ObjectID,#7#%'
    Over here the the bobdb__val is of type long so it cannot be used with where clause, hence this query won't work. Can anybody provide me a solution.
    null

    I don't know which version of data base
    you are using.
    If you have 8i version you can use
    Oracle package DBMS_LOB to convert Long to Clob.

  • Writing InputStream object to a file.

    I want to write a InputStream object to a file. How can this be done?
    Help please

    Fucking spammer.
    http://forum.java.sun.com/thread.jspa?threadID=612286&messageID=3377965#3377965

  • Writing long to file

    I've been banging my head over this all day. I have an array of long numbers I want to write to a file. The command MyFile.write(longnumber[j]); doesn't work for type long. What do I do?
    Thanks.
    Edited by: tomegalovlito on Dec 11, 2007 3:15 AM

    MyFile.write(String.valueOf(longnumber[j]));

  • Writing JAXRPC Object to XML Stream  by using LiteralObjectSerializerBase

    I am trying to write the JAX-RPC object to a file before I dispatch it to the service provider. What I currently have is :
    QName type = new QName("http://solms.co.za/utils/appsupport", "LicenseRequest");
    XMLWriter writer = XMLWriterFactory.newInstance().createXMLWriter(System.out); 
    LicenseRequest_LiteralSerializer serializer = new LicenseRequest_LiteralSerializer(type, "", AppSupportService_SerializerRegistry.ENCODE_TYPE);
          serializer.initialize(new InternalTypeMappingRegistryImpl(new AppSupportService_SerializerRegistry().getRegistry()));
          serializer.doSerialize(licenseRequest,writer,new SOAPSerializationContext());But it does not work. I have the feeling I am not far off, but still mis something.
    Thanks

    Convert the method signature to a string (such as it is in the class file), and persist that.

Maybe you are looking for

  • I have a Macbook 3,1 and 2.5 G of ram, running Mac OS 10.6.8, I can not upgrade to Yosemite.  Any ideas?

    Looking at the qualifications for the upgrade my machine seems to qualify.  Any ideas? Thank you.

  • How to display an image if user does not have flash installed?

    Hi, Not all people have flash and the ones that don't will have an unpleasant experience on my website. How can I display an image instead of the flash itself for people that don't have flash who visit my website? I just have flash on the upper porti

  • Matching more than one condition

    I am trying to use the MATCH function to locate a row which contains 2 variables. Can I use the & symbol to do that in the one MATCH function? Should I be using a different technique? It seems to be working, but then it seems to be bringing back a va

  • CS4 library error message

    Can anyone help, every time I open Indesign I get an error message stating that three of my Libraries cannot be found Do I want to pospone their recovery. It does not matter if I press yes or no to recover or delete the files. The only way to get rid

  • HOW to update many frames

    Hello evrybody, How can i update five frames at the same time with diferents parameters on a dynamic web site ? Config : JSP/APACHE/WINDOWS 2000 / ORACLE PS : I need the answer for yesterday. Thx Vincent