Can't load a BFILE into database!

Im "sys",
create table lobtest( A NUMBER,B BLOB);
INSERT INTO LOBTEST VALUES ( 2, '01010101');
COMMIT;
select a,dbms_lob.getLength(b) from dag.LOBTEST;
A DBMS_LOB.GETLENGTH(B)
2 4
create directory LOB AS 'c:\bfile';
Then, I created a java file, and loaded it into db as java stored-proc, and published it as a function.
Everything was ok.
When I executed the published function, it was accomplished successful.
But, when I issued this statement,
select a,dbms_lob.getLength(b) from dag.LOBTEST;
It was still :
A DBMS_LOB.GETLENGTH(B)
2 4
The source code is as following:
import java.io.*;
import java.sql.*;
import oracle.jdbc.*;
import oracle.sql.*;
class testj {
     public static String sj() throws Exception {
          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
          Connection conn=DriverManager.getConnection("jdbc:default:connection:");
          Statement stmt = conn.createStatement ();
          BFILE src_lob = null;
          BLOB dest_lob = null;
          InputStream in = null;
          OutputStream out = null;
          byte buf[] = new byte[1000];
          ResultSet rset = null;
          rset = stmt.executeQuery ("SELECT BFILENAME('LOB', 'COFFEE.bmp') FROM DUAL");
          if (rset.next())
               src_lob = ((OracleResultSet)rset).getBFILE (1);
               src_lob.openFile();
               in = src_lob.getBinaryStream();
          rset = stmt.executeQuery ("SELECT b FROM lobtest WHERE a=2 FOR UPDATE");
          if (rset.next())
               dest_lob = ((OracleResultSet)rset).getBLOB (1);
               out = dest_lob.getBinaryOutputStream(0);
          int length = 0;
          int pos = 0;
          while ((in != null) && (out != null) && ((length = in.read(buf)) != -1))
               pos += length;
               out.write(buf, pos, length);
               dest_lob.putBytes(1, buf);
          in.close();
          out.flush();
          out.close();
          src_lob.closeFile();
          conn.commit();
          conn.close();
          return ":(";
Im going crazy!!! Anyone can help?

I read ITPUB, and understand detailed situation a little.
The problem is not that any error occur on compiling,
but that compiling slows down with some conditional clause(*1).
It takes half a day or more(*2) to compile.
I think that must hung up.
Really? Is it really happen?
If that is true, You had better contact Oracle Support.
(*1)
The additional condition is like as follows.
and (t.MB_named_column1,t.MB_named_column2) in
(('MB_data1',0),('MB_data2',pvc2Bmid),('MB_data3',pvc2Zbmid),('MB_data4',pvc2Grzid),('MB_data5',pvc2Lfid),('MB_data6',pnumYhid))
Here, MB means MultiBytes.
(*2)
'half a day or more' is my literal translation.
It may mean only 'very long time'.
Message was edited by:
ushitaki
Added the more detailed explanation.

Similar Messages

  • Can I load a vi into memory programmatically

    Here's the situation (I'm programming in LV7.1)...
    I've got a program that runs, which uses the DSC.  I'm wanting to programmatically shut down and quit the Tag Engine when the program ends.  My problem is that when I use "Engine Shutdown.vi", all vi's that use the tag engine have to shutdown before the Tag Engine will completely shut down.  If I call this an wait (monitoring engine status for shutdown), then I get a deadlock error.  If I call this and end the program, then I get a pop up asking if I want to "Stop and close Tag Engine" (and for some reason an error afterwards as well, doesn't describe error, just that a log is being created.)  My goal is to have to pop up or dialog boxes appear that the user has to interact with when shutting down.
    So the solution that I believe would be appropriate for this would be to close the main program and have a separate vi (that is independant of the main program structure) call the "Engine Shutdown.vi", then quit itself, closing LV.  So I've been messing around with this...
    "Open VI Reference" with the vi path connected as an input (just a simple vi I made to kill the Tag Engine, wait until it falls, then kills Labview).  This is connected to an "Invoke Node" with the 'Run VI' method selected, property 'Wait until done' set to False, and 'Auto Dispose Ref' set to True.
    This works all fine on my developement machine, but I imagine I'm going to have issues when compiling this and installing it onto it's target machine.  How would I compile this?  If I add this vi to the build as a Dynamic VI will it automatically be loaded into memory when the program runs (on the target computer)?  If not, is there any way I can programmatically load this vi into memory in such a way where it is not a subvi to my program (else it will have same issues shutting down Tag Engine)?
    As always I appreciate everybody's help,
    Sean

    Mike, thx for your response.  Let me run this by you...
    So if I put Main.vi and Kill Engine.vi in the same folder on my developement machine, have the attached snippet of code execute when Main.vi is ready to shut down (very last thing to run, after all loops conclude) build the app (with Kill Engine.vi as a Dynamic VI), and install the app on the target machine, does it sound by you that this will work?  (Kill Engine.vi is the simple vi I made to shutdown and quit the Tag Engine, wait for this to conclude, then exit Labview).
    Thanks,
    Sean
    Attachments:
    snippet.JPG ‏8 KB

  • Can't load Raw files into Lightroom 3 form my Nikon D7100

    Can't load Raw files into Lightroom 3 form my Nikon D7100... Why?

    TGTruman wrote:
    How do I convert the Nef to DNG files...
    Download the Adobe DNG Converter (and install it, and run it...).
    Note: an internet search will reveal a link in short order.
    TGTruman wrote:
    I don't mind going to LR5, just don't want to spend the money and then not have it work...
    So use the trial first. No?
    R

  • After i updated my firefox from 3.16 to 4.0.1, have some websites i can't load, and they showed: " database error" but b4 i never got this problem. Can someone tell me why ?

    after i updated my firefox from 3.16 to 4.0.1, have some websites i can't load, and they showed: " database error" but b4 i never got this problem. Can someone tell me why ?

    Nothing is working and I can't find the Roboform toolbar. Your lack of direct support is really irritating- a live chat at least would be helpful.

  • Loading XML files into Database table

    Loading XML files into Database table
    Hi I have some XML files say 100 files in a virtual directory created using "Create or replace directory command" and those files need to be loaded into a table having a column of XMLTYPE. 1)How to load that using Oracle provided procedures/packages

    Check out the Oracle XDB Developer's Guide, Chapter 3. There is an example of using BFileName function to load the xml files from a directory object created using create or replace directory. It works really well.
    Ben

  • Load xml data into database

    Hi,
    I need to load the xml data into the relational tables. I was trying to use a DOM parser, but the thing is that i had to hard code the element node values to match the columns in the tables, and in later stage if there is change to the xml i have to change my program and recompile, i want a more flexible solution, where in i can parse the data and load into database without much changes. I do not know how to accomplish this. I have searched on this topic, but could not find a clear solution anywhere. Can anybody suggest a solution to this.
    Thanks & regards.

    For which database?
    With the Oracle database an XML document may be stored in a database with the XML SQL (XSU) utility.
    1. Create a table in the database with columns corresponding to the elements in the XML document.
    2. With the XSU store the XML document. The attributes in the XML document do not get stored.
    3. To store the attributes also, apply an XSLT to the XML document and convert the attributes to elements.

  • Helped, how to load xml data into database

    Hi,
    Given a DTD, can the XML SQL Utility generate
    the database schema?
    I currently have the dtd file to define
    the data type and xml data and I am looking
    for ways of how the XML/DTD can be loaded
    into the oracle db.
    Any suggestions/recommendations are
    appreciated.
    Thanks,
    Judy
    null

    You could check out this web site:
    http://www.rpbourret.com/xml/XMLAndDatabases.htm#software
    where you can find a list of products that can translate a DTD to a relational schema. Also, there are several technical papers that discuss algorithms to carry out this translation. FYI, We have implemented a similar system,and testing it out.
    null

  • Loading grocery bills into database.

    Hello
    I am in the process of making a procedure which will read scanned grocery bills and load.
    every row of bill into the database. Procedure should take filename as input and load data into database.
    Please help how i can achieve this.

    923808 wrote:
    i agree that it will be done using file utility , however bills will be scanned and hence will be in jpeg / gif or image format.
    will that have to be converted into text or pdf ?If the content is not processed by Optical Character Recognition software
    & converted to text then the content of the file will by as useful as a picture of my car.

  • Can't load m4v files into Photoshop

    I created a H264 Blu-ray (m4v) using Adobe Premiere Pro CS4. It was a exported as 1080i file. I tried to load this file into Photoshop CS4 extended. Photoshop says that it "could not complete your request because the movie file could not be opened". Can anyone help as it is important to me to apply some Photoshop to fix overexposure which it does superbly to a Quick Time (720*480) file. I want to do the same for 1080i file.
    Thx
    Sundar

    I initially captured the clip as .MTS in 1080. Using premiere CS4, I exported part of the clip as H264 Blu-Ray (m4v). If I try QT as output format, it is of lower resolution. You are right that Photoshop does not have problem in pulling in QT clips.
    You answered your own question. H.264 BluRay is a multiplexed sub-format of H.264 which is not compatible with QT's implementation of H.264. If you want to use H.264, you must export normal H.264 and the profile level must be set to 3.1, basic in the exporter. Then, after export, you simply rename the file to *.mov. That aside, you can always use alternate Quicktime CoDecs like PNG or PhotoJPEG and directly export to a MOV. Your loss in quality is due to incorrect field settings, so that needs to be set properly. It merely doesn't affect your H.264 output, because there everything is set correctly already in the presets.
    Mylenium

  • How can I load TPX Pantones into CS6 Photoshop palette?

    I use the Pantone papers for Fashion and Home and want to be able to load/download these into my photoshop palette rather than having to print out my designs and then match them to the papers by going tirelessly through the book. I've looked on the Pantone website and their links are useless and seem to be sending me round in circles. Photoshop seems to have every other type of Pantone pre-loaded apart from the TPX ones I need! Can any one help?

    You would need the ACB files from Pantone for the TPX books, and install those in the Photoshop presets folder.
    Sorry, but there are several of the more obscure Pantone books that we haven't shipped yet. (and it takes quite a bit of time to clean up and validate them all)

  • Urgent: Does dbms_java package is required  to load jar file into database?

    Hi, It's a urgent request. I am trying to install jar file that was created by JDeveloper into database using loadjava. But it is giving so many errors.
    Do we need to install dbms_java package in order to load jar files into the database? Thanks.

    Thanks for your reply Kamal.
    I am trying to load these jar files into Oracle 9.2.0.3.20 database.
    Could you please give me the list of the steps to enable java within the database? Thanks.

  • Can I load windows office into iPad?

    Hi, I am looking at buying my partner the iPad or iPad2 and was wondering if Windows Office for Mac can be loaded into it?

    do you mean using word,excel and powerpoint on ipad ?
    If YES
    there's an app Quick office pro or Office HD that can be used to use microsoft office

  • How can I load my Xlet into commercial STB emulator

    Hi
    I have developed some Xlets, and I could run and view the output of those Xlets in XleTView emulator.Now I want to run these xlets in commerial emulators like MHDK STBS .But I don't know how to load these Xlets into that emulator and run
    Any help would be greatly approiated.
    Thanks in advacne.

    hi
    if you want to test Xlets in the same real environment of a digital television, you can use [ OpenCaster|http://www.avalpa.com/the-key-values/15-free-software/33-opencaster] , it's a free software stand-alone carousel server that can do all the DVB tables to and a sample audio video playout server.
    You just need a supported PCI card that can modulate COFDM and drive directly a DVB STB (for DVB-T terrestrial, you could use a [Dektec DTA110T|http://www.dektec.com/Products/DTA-110T/index.asp], BTW i've no business interest with them.. )
    Hope it helps.
    bye
    andrea Venturi

  • Can I load a swf into my Flex app that loads other swf's?

    The code below loads an AS2 swf into my Flex mobile for IOS app and it works.  If that AS2 swf has like a circle in it that runs across the stage, it loads and displays properly when run in FlashBuilder.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     initialize="init()">
              <fx:Script>
                        <![CDATA[
                                  import mx.core.UIComponent;
                                  private var request:URLRequest = new URLRequest("http://PATH_TO_AS2_SWF");
                                  private var loader:Loader = new Loader();
                                  private var myComponent:UIComponent = new UIComponent; 
                                  private function init():void{
                                            myComponent.percentHeight = 100;
                                            myComponent.percentWidth = 100;
                                            loader.load(request);
                                            myComponent.addChild(loader);
                                            player.addElement(myComponent);
                        ]]>
              </fx:Script>
              <s:Group id="player"
                                   height="100%" width="100%"/>
    </s:Application>
    But if that AS2 swf loads other swf's, they don't load or display.  My FlashBuilder debugger reports no errors or security sand box violations.   I'm using the most elemental code in my AS2 swf so as to not cause problems.  This is it in its entirety:
    this.onLoad = function(){
              _root.loadMovie("http://[PATH_TO_REMOTE_SWF]");
    The paths to the remote content are fine because swf's load and display fine from AS2 swf when run on it's own - not embedded in Flex app.  They also load and run fine if I cut out the AS2 swf and access directly from my Flex code.  So I know there isn't a path issue.  More likely not accessing the right layer in the AS2 swf from Flex or something.  Or maybe security sandbox violation but I don't see anything reported in the FlashBuilder debug console.  When run console just reports:
    [SWF] SwfMobile.swf - 2,639,761 bytes after decompression
    [SWF] assets/swf/AS2.swf - 1,470 bytes after decompression
    Is there something inherently wrong with loading swf's that load other things?  Even if I have the AS2 swf load jpgs they don't load so the format of the target content at the end of the chain doesn't seem to be the issue.  Just the act of embedding a swf that loads other things seems to be the problem.

    Ah, yes. Using an AVM1 SWF could prove difficult...
    I'm going on about 3 hours of sleep at the moment, but let me toss out a few thoughts I have and hopefully something will stick...
    Ok, so my first thought what to try and cast the loaded content as a MovieClip and call methods on that, but the fact they are AVM1 throws that out the window.
    That leaves LocalConnection, as you mentioned. But this would require you to have code on the receiving end to handle the connection... no good either.
    But what if you created a "bridge" in AS2 that holds all the code for the receiving end of LocalConnection (or has the control logic itself, perhaps even eliminating the need for LocalConnection all together!). I think maybe this is what you were trying to do already by loading a SWF into a SWF? Well instead of loading your bridge at runtime, what if you statically linked it into your project as a class?
    *a few moments later*
    Well it looks like you can in fact link in a a symbol created for AVM1, but it will only come in as a SpriteAsset, and will not include any custom code (which makes sense, since they use entirely different class constructs).
    To do the test, I created a symbol exported for actionscript (AS2/Flash8), then linked it in with a CSS style embed. I then instantiated the class and called describeType on it.
    So in summery, it looks like calling custom code on the bridge is out (I did not test this extensively, that was just my first impression with this simple test). However, if you may be able to perform the actions you need by attempting to cast the loaded content into something AVM2 can recognize. Apparently it does this automatically when linked in statically, so maybe there is something there worth looking into... mainly, can you do what you need using only the base class and no custom code?
    Keep me posted!

  • Can i load data directly into DSO without PSA?

    hi friends,
    can i load data into DSO directly without PSA(without infopackage), if possible ple let me know where can i do that in dtp?
    regards
    ss

    Suneel,
    Why don't you try it to see if error DTP is possible with a flat file ds or not?
    Or, extrapolate logically -
    - An error DTP is based on a regular DTP.
    - In any situation where you can have a DTP, why can you not have an error DTP? I would think there would be no reason for this.
    At this point of my reasoning I will give it a try to validate if my assumption (DTP possible==>Error DTP possible) is correct or not.
    regards,

Maybe you are looking for

  • Schedule  the file adapter

    Hi experts, I use file adapter to read files in the source directory,and I've setup IR and ID. It works very well. Now I want to let this scenarios run from 12:00 A.M to 8:00 A.M.     What to do for this? Many thanks.

  • .PDF files will not open without saving first

    Since downloading Adobe Reader 11.0.07 on 5/20/14 .pdf files will not open without saving them first. I want .pdf files to open first BEFORE I save them (using Windows 7 and Firefox 30.0)

  • VIPCA does not start from root.sh

    Hi all, I've a problem in installing RAC 10g on ia64 architecture. S.O.: RH Enterprise Linux AS 2.1 Oracle CRS install completed successfully. The problems came up during DB installation when I need to run root.sh script that should automatically inv

  • Events in Cairngorm

    Hello all In cairngorm, is it okay if I don't define any event properties? Thanks and Regards ShiVik

  • JCOP API

    Does anyone here familiar with JCOP and its API. I read the API from the IBM website. It seem that the JCOP API can be used to develop off card and on card application. Is it true? Does anyone have the JCOP API JAR file so that i can use the API? Tha