Problem loading Blobs to Oracle DB
Hi folks,
I am indeed stuck. I wrote a stored procedure, compiled it to byte-code, jarred it, used load java to load it into the Oracle 9i DB and wrapped it in a PL/SQL wrapper. It worked. simply calling it as:
select
f_loadBlob('100')
from dual... produced a return of 1 - that's what the function returns - which is the count of inserted DB rows.
Now, I altered the java code to load several Blobs instead of just one. I did not change any other code so far as checking and re-checking over and over again brings to my attention. I went through all the same steps - altering the PL/SQL wrapper to to suit.
But I can't get rid of the following error from the call:
1 select
2 f_loadPix('100','200')
3* from dual
11:05:55 SQL>
11:05:56 SQL> /
from dual
ERROR at line 3:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.NullPointerException... where 100 and 200 are VARCHAR2 file-names, in the file system where the jpeg files exist.
I am willing to post the code, but just don't want to overwhelm any who might be inclined to help me out. So if you want to see the class file code, please just ask.
Thanks in advance,
~Bill
PS: Oh BTW - I neglected to tell that the java code works just fine when run through the command line as a class file and accesses the DB through JDBC.
I also have try/catches up to wazzu.
Ok ... I noticed a few checked this thread out, and so here's the answer:
1. I must be mistaken that the single load worked, because having discussed the problem with our DBA, I am assured that no permissions were changed on the file that I am accessing ... or was attempting to access.
2. Our DBA made the correct determination that - even though the message did not indicate the file could not be accessed, this was indeed the problem. It seems that even though I placated Oracle with the proper Grant, Unix still controled file access.
3. After Oracle was granted rights to the directory containing the files, it is now working for both single and batch Blob loads.
Now I just need to write the routine to get the Blobs out of the table and onto the web-page ... always fun.
Thanks everyone who took the time to give this a look, and I hope if anyone was interested, I might have in turn helped you. Best regards,
~Bill
PS: I also learned that
select
f_loadBlob('100')
from dualis not the correct way to run this function. Running it as:
variable x number;
call f_loadBlob('100') into :x;... is the correct way for testing.
Similar Messages
-
Problem inserting Blob through Oracle 9iAs
Hai Everybody,
I got a unique problem , i am trying to insert a blob object to the blob column. This is working fine when i am using JDeveloper 9.0.3 , but when i am using the same on 9iAS , the data is not evening inserting to the database. Please can any body help me how to solve this problem.
This is the code used to insert into the database.
if (resSet.next()) {
oracle.sql.BLOB bCol = ((OracleResultSet)resSet).getBLOB(1);
blobOutputStream = bCol.getBinaryOutputStream();
byte[] bBuffer = new byte[bCol.getBufferSize()];
int intBytesRead = 0;
ByteArrayInputStream fis = new ByteArrayInputStream(byteValues);
ErrorLog.log(" before the while loop ");
while ((intBytesRead = fis.read(bBuffer)) != -1) {
blobOutputStream.write(bBuffer,0,intBytesRead);
blobOutputStream.close();
// i am commiting the connection here
conn.commit();
conn.setAutoCommit(true);Hi !, you can find response of this answer in Oracle forums...
http://forums.oracle.com/forums/forum.jsp?forum=99 -
Problem in loading Ntriple to Oracle
Hello,
Can some one please point what could be wrong in loading of Data in Ntriple format using the Code provide by Oracle to convert RDF data in N-Triple format to
Oracle's RDF storage type, SDO_RDF_TRIPLE_S in Oracle10g R2.
called TestNTriple2NDM.java
C:\prateek\semdis\sdordf_converter>java TestNTriple2NDM Data/timestamp.nt TIMEST
AMP_RDF_DATA TIMEMODEL 3
ID: 1403 Error: java.sql.SQLException: ORA-13199: RDF:Error occurred
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_TRIPLE_S", line 322
ID: 3641 Error: java.sql.SQLException: ORA-13199: RDF:Error occurred
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_TRIPLE_S", line 322
ID: 5835 Error: java.sql.SQLException: Unsupported feature
Rows: 10000
ID: 10754 Error: java.sql.SQLException: ORA-13199: RDF:Error occurred
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_TRIPLE_S", line 322
ID: 10755 Error: java.sql.SQLException: ORA-13199: RDF:Error occurred
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_TRIPLE_S", line 322
ID: 10868 Error: java.sql.SQLException: Unsupported feature
ID: 12002 Error: java.sql.SQLException: Unsupported feature
ID: 12818 Error: java.sql.SQLException: Unsupported feature
time (sec): 2342.0
time (min): 39.03333333333333
It loads the data,but I see all these errors.
Thanks
PrateekHi Prateek,
I have posted a response at Problem in loading Ntriple to Oracle .
Melli -
How load File as Blob in Oracle Table?
Hi, I am beginner in ODI.
How load File as BLOB in Oracle Table?Ah so nice, a FAQ, by someone who can't use online resources!
Any explanation why Google is broken for you?
Here is the code I use to load a jpg.
procedure upd_portrait(p_person_id in number, p_file_name in varchar2) is
l_blob blob;
l_bfile bfile;
begin
update person
set portrait = empty_blob()
where id = p_person_id
returning portrait into l_blob;
l_bfile := bfilename('MY_IMAGES', p_file_name);
dbms_lob.fileopen(l_bfile);
dbms_lob.loadfromfile(l_blob, l_bfile, dbms_lob.getlength(l_bfile));
dbms_lob.fileclose(l_bfile);
end;
Sybrand Bakker
Senior Oracle DBA -
How to show an image stored by using SQLLDR as BLOB in ORACLE 10g
Hi!
i used SQLLDR to upload images from localhost to my oracle db,
i saves theme as BLOB`s.
my problem is:
i can not view them correctly, showing it using the code below, i get:
gtìSNEvR=Cm¯ö¾ÆTÿmÖØÏs_û«¬ú ÿSê¯HwýÓ [[ü/ñÝßSº¢
does any know what to do?? can help me??
thank you!
A.H.S.
<?php
echo "<p>Attempting database connection...</p></p>";
$db_conn = ocilogon("username", "password", "ORACLE_SID");
if (!$db_conn)
echo "...FAILED. Check the username, passwd, dbstring given in this script are valid or not.</p>";
if (OCIError($db_conn))
$erra=OCIError($db_conn);
dodberror("SQL Error: $erra $erra[message]");
exit;
else
echo "<p>Connected...</p></p>";
$table_name="images";
$stmt = ociparse($db_conn, "select * from $table_name" );
if (!$stmt)
echo '<p>parsing error</p></p>';
if (!ociexecute($stmt,OCI_DEFAULT))
echo "<font color='red'><p>query execute error!</p></font>";
echo "<table border=1 cellspacing='0' width='50%'>\n";
$ncols = OCINumCols($stmt);
echo "<tr>\n";
for ($i = 1; $i <= $ncols; $i++) {
$column_name = OCIColumnName($stmt,$i);
echo "<td><b>$column_name</b></td>\n";
while (OCIFetch($stmt))
echo "<tr>\n";
for ($i = 1; $i <= $ncols; $i++)
$column_name = OCIColumnName($stmt,$i);
$column_value = OCIResult($stmt,$i);
if($column_name=="DATA")
//Header("content-type: image/jpg");
$image = "$column_value->load()";
echo $column_value; // gives OBJECT!
echo "<td><img src='$image' width='48' height='48' align='middle' border='0' alt='not found'> </td>\n";
//echo "<td><img src='$column_value.jpg' width='48' height='48' a-lign='middle' border='0' alt='not found'> </td>\n"; //works 100%
//$c1 = '<IMG height=128 width=600 SRC="http://host/' . $row[2] . '">';
//if ($row[image]) {
//header("Content-Type: $row[image_type]");
//print "$row[image]";
else
echo "<td><b>$column_value</b></td>\n";
echo "</tr>\n";
echo "</tr>\n";
echo "</table>\n";
OCIFreeStatement($stmt);
OCILogoff($db_conn);
?>Do you need to uncomment one of the header() functions? Make sure
it is called before any text or whitespace is sent.
Look at the example in PHP 5 Code to Upload and Retrieve an Image (aka BLOB) with Oracle
-- cj -
ORA-22275 :invalid LOB locator specified error while loading BLOBs/CLOBS.
Hello All,
I am trying to load BLOB/CLOB data from a client oracle DB to the oracle db on our side,we are using ODI version 10.1.3.5.6,which reportedly has the issue of loading BLOB/CLOBS solved.I am using
The extraction fails in the loading stage when inserting data into the C$ table with the following error.
"22275:99999 :java.sql.BatchUpdateException:ORA-22275:Invalid LOB locator specified".
Kindly let me know how I can resolve this issue as the requirement to load this data is very urgent.
Thanks,
JohnOne alternate way can be done out of ODI as ODI is still not able to resolve this issue. You can trim these fields (CLOB/BLOB) and push this data as separate fields into ODI and at the reporting end you can again concatenate them.
May be this may solve your problem ....it solved mine.
--XAT -
Using FDM to load data from oracle table (Integration Import Script)
Hi,
I am using Integration Import Script to load data from oracle table to worktables in FDM.
i am getting following error while running the script.
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
Attaching the full error report
ERROR:
Code............................................. -2147217887
Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
At line: 22
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 6260
IDENTIFICATION:
User............................................. ******
Computer Name.................................... *******
App Name......................................... FDMAPP
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... DBNAME
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SCRTEST
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... FDM ACTUAL
Category ID...................................... 13
Period........................................... Jun - 2011
Period ID........................................ 6/30/2011
POV Local........................................ True
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
I am using the following script
Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
'Oracle Hyperion FDM Integration Import Script:
'Created By: Dhananjay
'Date Created: 1/17/2012 10:29:53 AM
'Purpose:A test script to import data from Oracle EBS tables
Dim cnSS 'ADODB.Connection
Dim strSQL 'SQL string
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect to SQL Server database
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
'Create query string
strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
'Get data
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Amount") = rs.fields("Amount").Value
rsAppend.Fields("Desc1") = rs.fields("Description").Value
rsAppend.Fields("Account") = rs.fields("Account").Value
rsAppend.Fields("Entity") = rs.fields("Entity").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "Import successful!"
'Assign Return value
SQLIntegration = True
End Function
Please help me on this
Thanks,
Dhananjay
Edited by: DBS on Feb 9, 2012 10:21 PMHi,
I found the problem.It was because of the connection string.The format was different for oracle tables.
PFB the format
*cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
And thanks *SH* for quick response.
So closing the thread......
Thanks,
Dhananjay -
BLOB in Oracle Forms 6.0
I have used the following PL/SQL code in Forms 6.0 form, for inserting an Image in the BLOB type column of a database table, taken from windows filesystem.
DECLARE
F_LOB BFILE;
B_LOB BLOB;
BEGIN
INSERT INTO IMAGES (IMAGE_ID, IMAGE_FILE) VALUES (1, EMPTY_BLOB());
SELECT IMAGE_FILE INTO B_LOB FROM IMAGES WHERE IMAGE_ID = 1 FOR UPDATE;
F_LOB := BFILENAME('BLOB_FILES', 'BlueHills.JPG');
DBMS_LOB.FILEOPEN(F_LOB);
DBMS_LOB.LOADFROMFILE(B_LOB, F_LOB, DBMS_LOB.GETLENGTH(F_LOB));
DBMS_LOB.FILECLOSE(F_LOB);
EXCEPTION WHEN OTHERS THEN
MESSAGE(SQLERRM);
MESSAGE(SQLERRM);
END;
When i debug or run the form, it collapses or closes at line # 2 without giving any exception, and hense does'nt inserts the image in the column, where BLOB_FILES is the database directory object mapping to a specific windows file system directory containing images.
I would be very thankful if anyone can help me out of this problem.Dear Gerd Volberg,
I have:
Forms Version 6.0.5.0.2
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
and with the following statement you have made in ur last post what should I do then:
only patch 18 is certified against this database 10 g rel. 2.
I know many problems around blobs and clobs when using too old patch-sets.
install the newest patch 17 and try it again. 17 is certified against 10g DB rel. 1.
18 is only for EBS-user, so you are not allowed to install it when not running the E-Business-Suite -
Bulk loading BLOBs using PL/SQL - is it possible?
Hi -
Does anyone have a good reference article or example of how I can bulk load BLOBs (videos, images, audio, office docs/pdf) into the database using PL/SQL?
Every example I've ever seen in PL/SQL for loading BLOBs does a commit; after each file loaded ... which doesn't seem very scalable.
Can we pass in an array of BLOBs from the application, into PL/SQL and loop through that array and then issue a commit after the loop terminates?
Any advice or help is appreciated. Thanks
LJIt is easy enough to modify the example to commit every N files. If you are loading large amounts of media, I think that you will find that the time to load the media is far greater than the time spent in SQL statements doing inserts or retrieves. Thus, I would not expect to see any significant benefit to changing the example to use PL/SQL collection types in order to do bulk row operations.
If your goal is high performance bulk load of binary content then I would suggest that you look to use Sqlldr. A PL/SQL program loading from BFILEs is limited to loading files that are accessible from the database server file system. Sqlldr can do this but it can also load data from a remote client. Sqlldr has parameters to control batching of operations.
See section 7.3 of the Oracle Multimedia DICOM Developer's Guide for the example Loading DICOM Content Using the SQL*Loader Utility. You will need to adapt this example to the other Multimedia objects (ORDImage, ORDAudio .. etc) but the basic concepts are the same.
Once the binary content is loaded into the database, you will need a to write a program to loop over the new content and initialize the Multimedia objects (extract attributes). The example in 7.3 contains a sample program that does this for the ORDDicom object. -
Load blob to file. error: file write error
Hi,
I used procedure witch load blob to file. It's working at Oracle 10g, but its does't work on oracle 11g. Why?
create or replace PROCEDURE load_blob_to_bfile (p_file_id IN VARCHAR2, p_directory IN VARCHAR2, p_ident in varchar2 default NULL)
IS
v_blob BLOB;
v_start NUMBER := 1;
v_bytelen NUMBER := 2000;
v_len NUMBER;
v_raw RAW (2000);
v_x NUMBER;
v_output UTL_FILE.file_type;
v_file_name VARCHAR2 (200);
BEGIN
-- get length of blob
SELECT DBMS_LOB.getlength (blob_content), filename
INTO v_len, v_file_name
FROM wwv_flow_files
WHERE filename = p_file_id;
-- define output directory
v_output := UTL_FILE.fopen (p_directory, p_ident||'_'||v_file_name, 'wb', 32760);
-- save blob length
v_x := v_len;
-- select blob into variable
SELECT blob_content
INTO v_blob
FROM wwv_flow_files
WHERE filename = p_file_id;
v_start := 1;
WHILE v_start < v_len AND v_bytelen > 0
LOOP
DBMS_LOB.READ (v_blob, v_bytelen, v_start, v_raw);
UTL_FILE.put_raw (v_output, v_raw);
UTL_FILE.fflush (v_output);
/* Text only could be: UTL_RAW.cast_to_varchar2 (v_raw);*/
-- set the start position for the next cut
v_start := v_start + v_bytelen;
-- set the end position if less than 32000 bytes
v_x := v_x - v_bytelen;
IF v_x < 2000
THEN
v_bytelen := v_x;
END IF;
END LOOP;
UTL_FILE.fclose (v_output);
END;
directories is creaited and granted for read and write. It looks like file is created, but application rise the write file error, and files in directory is emty.
TomasBSo, I'm copying the file in a temp. BLOB with this function:
FUNCTION get_remote_binary_data (p_conn IN OUT NOCOPY UTL_TCP.connection,
p_file IN VARCHAR2)
RETURN BLOB IS
l_conn UTL_TCP.connection;
l_amount PLS_INTEGER;
l_buffer RAW(32767);
l_data BLOB;
BEGIN
DBMS_LOB.createtemporary (lob_loc => l_data,
CACHE => TRUE,
dur => DBMS_LOB.CALL);
l_conn := get_passive(p_conn); //get a passive connection
send_command(p_conn, 'RETR ' || p_file, TRUE); //send Retrieve command to server
BEGIN
LOOP
l_amount := UTL_TCP.read_raw (l_conn, l_buffer, 32767);
DBMS_LOB.writeappend(l_data, l_amount, l_buffer);
END LOOP;
EXCEPTION
WHEN UTL_TCP.END_OF_INPUT THEN
NULL;
WHEN OTHERS THEN
NULL;
END;
UTL_TCP.close_connection(l_conn);
get_reply(p_conn);
RETURN l_data;
END;
Then I'm writing it into a local file:
PROCEDURE put_local_binary_data (p_data IN BLOB,
p_dir IN VARCHAR2,
p_file IN VARCHAR2) IS
l_out_file UTL_FILE.FILE_TYPE;
l_buffer RAW(32767);
l_amount BINARY_INTEGER;
l_pos INTEGER := 1;
l_blob_len INTEGER;
BEGIN
l_blob_len := DBMS_LOB.getlength(p_data);
l_amount := DBMS_LOB.GETCHUNKSIZE(p_data);
IF (l_amount >= 32767) THEN
l_amount := 32767;
END IF;
l_out_file := UTL_FILE.FOPEN(p_dir, p_file, 'w', 32767);
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.READ (p_data, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw(l_out_file, l_buffer, FALSE);
l_pos := l_pos + l_amount;
END LOOP;
UTL_FILE.FCLOSE(l_out_file);
EXCEPTION
WHEN OTHERS THEN
IF UTL_FILE.IS_OPEN(l_out_file) THEN
UTL_FILE.FCLOSE(l_out_file);
END IF;
RAISE;
END;
I've checked the blob before I'we wrote it ito the file (UTL_FILE.put_raw(l_out_file, l_buffer, FALSE)), and it contains no carriage-return. -
Problem connecting Mapview to Oracle Database(Add a data source)
Im a neophyte to the mapviewer and Ive run into a very primitive problem. I cant view the sample maps in the mapviewer. I cant connect to the database where I've loaded the sample oracle data (mvdemo.zip) to the database. I have the mapviewer running. Ive checked my tnsnames to confirm the connection used by other oracle application (sql) and confirmed that the spatial files exists on the database.
Below is my platform inform
Platform
For MapView
We have Java- j2se_1.4.2_09
My local system is Microsoft Windows 2000.
Connect to Oracle 9.2.0.4.0 and 10.1.0.3.1 on separate machines
Here is my connection infor:
<?xml version="1.0" standalone="yes"?>
<non_map_request>
<add_data_source
name="mvdemo"
jdbc_host="medea"
jdbc_port="1521"
jdbc_sid="orcl"
jdbc_user="gda_stock"
jdbc_password="!********"
jdbc_mode="thin"
number_of_mappers="3" />
</non_map_request>
Here is the error I received:
<?xml version="1.0" encoding="UTF-8" ?>
<oms_error>Message:[MapperConfig] cannot add map data source. Fri Aug 26 17:28:04 CDT 2005 Severity: 0 Description: at oracle.lbs.mapserver.core.MapperConfig.addMapDataSource(MapperConfig.java:583) at oracle.lbs.mapserver.MapServerImpl.addMapDataSource(MapServerImpl.java:315) at oracle.lbs.mapserver.oms.addDataSource(oms.java:1241) at oracle.lbs.mapserver.oms.doPost(oms.java:409) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Unknown Source)</oms_error>Hi, is there anyone here who can help me.....thanks in advance!
-
SOS!!!!----Error for Loading data from Oracle 11g to Essbase using ODI
Hi all.
I want to load data from oracle database to essbase using ODI.
I configure successfully the physical and logical Hyperion essbase on Topology Manager, and got the ESSBASE structure of BASIC app DEMO.
The problem is.
1. When I try view data right click on the essbase table,
va.sql.SQLException: Driver must be specified
at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.graphical.frame.b.jc.bE(jc.java)
at com.sunopsis.graphical.frame.bo.bA(bo.java)
at com.sunopsis.graphical.frame.b.ja.dl(ja.java)
at com.sunopsis.graphical.frame.b.ja.<init>(ja.java)
at com.sunopsis.graphical.frame.b.jc.<init>(jc.java)
I got answer from Oracle Supporter It's ok, just omit it. Then the second problem appear.
2. I create an interface between oracle database and essbase, click the option "staging area deffirent from target"(meaning the staging is created at oracle database), and using IKM SQL to Hyperion Essbase(metadata), execute this interface
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 61, in ?
com.hyperion.odi.essbase.ODIEssbaseException: Invalid value specified [RULES_FILE] for Load option [null]
at com.hyperion.odi.essbase.ODIEssbaseMetaWriter.validateLoadOptions(Unknown Source)
at com.hyperion.odi.essbase.AbstractEssbaseWriter.beginLoad(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at org.python.pycode._pyx1.f$0(<string>:61)
at org.python.pycode._pyx1.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.Py.exec(Py.java)
I'm very confused by it. Anybody give me a solution or related docs.
Ethan.Hi ethan.....
U always need a driver to be present inside ur <ODI installation directory>\drivers folder.....for both the target and the source......Because ojdbc14.jar is the driver for oracle already present inside the drivers folder ....we don't have to do anything for it.....But for Essbase ...you need a driver......If u haven't already done this.....try this.....
Hope it helps...
Regards
Susane -
Serialization Object and storasge in blob field Oracle 8.1.6
Hi,
this is problem with serializing and deserializing when i am storing object serialized in a Blob field Oracle:
MyObject myObject = new MyObject();
ByteArrayOutputStream bayos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream (bayos);
oos.writeObject(myObject);
oos.flush();
byte[] buffer = bayos.toByteArray();
int size = buffer.length;
oos.close();
ByteArrayInputStream bayis = new ByteArrayInputStream(buffer,0,size);
// if the number bytes of serialized myObject > 4kbytes then the insert in Blob field fails down.
// if the number bytes of serialized myObject < 4kbytes then the insert in Blob field successes.
// So I only can put in Blob field serialized object with size minus 4k.
// The code for insert:
PreparedStatement pstmt = connection.prepareStatement(sqlInsert);
pstmt.setBinaryStream(1,bayis,size);
int retCode = pstmt.executeUpdate();
// The code for read from table Oracle
rset = stmt.rxecuteQuery(sqlSelect);
rset.next();
oracle.sql.BLOB fldBlob = (BLOB)rset.getObject(1);
InputStream ins = fldBlob.getBinaryStream();
byte[] buf = new byte[size]
ByteArrayInputStream bayis = new ByteArrayInputStream(buf,0,size);
ObjectInputStream ois = new ObjectInputStream(bayis);
MyObject myObject = (MyObject)ois.readObject();
Someone knows the reason of the limit of 4Kbyte ?
Thanks....Insert LOBs into Oracle is a 3 step process. You must insert a place holder, and the do a select for update to put the contents into the row. Lets say you have a table called MY_LOB:
create table MY_LOB (
MYID NUMERIC(10) NOT NULL,
MYLOB BLOB DEFAULT EMPTY_BLOB()
);The 'empty_blob' keyword tells Oracle to put a dummy value in the blob column when a row is initially created. To insert (assuming you have a db connection already):
conn.setAutoCommit(false);
PreparedStatement pstmt = null;
ResultSet rs = null;
oracle.sql.BLOB myLob = null;
try
//Insert the initial row.
pstmt = conn.prepareStatement("INSERT INTO MY_LOB (MYID) VALUES (?)");
//Set the PK value
pstmt.setInt(1,100);
pstmt.executeUpdate();
pstmt.close();
//Lock the row for insertion. This is needed for large inserts.
pstmt = conn.prepareStatement("SELECT MYLOB from MY_LOB where MYID = ? FOR UPDATE");
pstmt.setInt(1,100);
rs = pstmt.executeQuery();
if (rs.next())
myLob = (oracle.sql.BLOB)rs.getBlob(1);
rs.close();
pstmt.close();
//Finally...update the row with the blob data....
myLob.putBytes(1, buffer);
pstmt = conn.prepareStatement("UPDATE MY_LOB SET MYLOB = ? WHERE MYID = ?");
pstmt.setBlob(1, myLob);
pstmt.setInt(2,100);
pstmt.executeUpdate();
pstmt.close();
conn.commit();
catch(SQLException sqlE)
conn.rollback();
finally
//make sure and close all statements....
}Hope this helps, I didn't compile it so it may have some bugs. It should lead in the right direction at least. -
Hi All,
I got stuck thread issues when deploying composites to Oracle SOA 11.1.1.5 running on Windows Server 2008 R2. Even the SimpleApproval composite which ships with the standard installation is having trouble deploying.
The composites are deploying fine in Oracle SOA 11.1.1.5 running on Windows XP.
I'm not so good with thread dumps, so I post it below for rescue.
Please advice,
Rommel
<Jul 18, 2011 10:15:25 AM AST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] Ex
ecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' has been bus
y for "605" seconds working on the request "weblogic.servlet.internal.ServletReq
uestImpl@32d047d4[
POST /soa-infra/deployer HTTP/1.1
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: Oracle HTTPClient Version 10h
Accept-Encoding: gzip, x-gzip, compress, x-compress
ECID-Context:
Authorization: Basic bmFnaGl3ZWJsb2dpY3NvYTp3ZWJsb2dpY3NvYTEwIQ==
Content-type: application/octet-stream
Content-Length: 25876
]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds
. Stack trace:
Thread-55 "[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-
tuning)'" <alive, in native, suspended, priority=1, DAEMON> {
jrockit.net.SocketNativeIO.readBytesPinned(SocketNativeIO.java:???)
jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:24)
java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)
java.net.SocketInputStream.read(SocketInputStream.java:107)
oracle.net.nt.MetricsEnabledInputStream.read(TcpNTAdapter.java:707)
oracle.net.ns.Packet.receive(Packet.java:243)
oracle.net.ns.DataPacket.receive(DataPacket.java:106)
oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:309)
oracle.net.ns.NetInputStream.read(NetInputStream.java:254)
oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrap
per.java:93)
oracle.jdbc.driver.T4CMAREngine.getNBytes(T4CMAREngine.java:1573)
oracle.jdbc.driver.T4C8TTILobd.unmarshalLobData(T4C8TTILobd.java:360)
oracle.jdbc.driver.T4C8TTILob.readLOBD(T4C8TTILob.java:787)
oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:303)
oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:181)
oracle.jdbc.driver.T4C8TTILob.read(T4C8TTILob.java:139)
oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2690)
^-- Holding lock: oracle.jdbc.driver.T4CConnection@32386377[thin lock]
oracle.sql.BLOB.getBytes(BLOB.java:557)
oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.jav
a:188)
oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.ja
va:171)
oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:151)
^-- Holding lock: oracle.jdbc.driver.OracleBlobInputStream@341d0b87[thin loc
k]
java.io.BufferedInputStream.fill(BufferedInputStream.java:189)
java.io.BufferedInputStream.read(BufferedInputStream.java:236)
^-- Holding lock: oracle.mds.internal.persistence.db.DBInputStream@341d0bb2[
thin lock]
oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:363)
oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:230)
oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:217)
oracle.fabric.common.wsdl.SchemaBuilder.parseXMLSrc(SchemaBuilder.java:1016)
oracle.fabric.common.wsdl.SchemaBuilder.parseXSDSrc(SchemaBuilder.java:984)
oracle.fabric.common.wsdl.SchemaBuilder.processSchemaImportsAndInclude(Schem
aBuilder.java:755)
oracle.fabric.common.wsdl.SchemaBuilder.loadEmbeddedSchemas(SchemaBuilder.ja
va:474)
oracle.fabric.common.wsdl.SchemaBuilder.loadSchemasFromWSDL(SchemaBuilder.ja
va:423)
oracle.fabric.common.wsdl.SchemaBuilder.loadAllSchemas(SchemaBuilder.java:21
4)
oracle.fabric.common.wsdl.SchemaManager.loadAllXSD(SchemaManager.java:209)
^-- Holding lock: oracle.fabric.common.wsdl.SchemaManager@36279195[thin lock
oracle.fabric.common.wsdl.SchemaManager.getXSDEntityResolver(SchemaManager.j
ava:424)
oracle.fabric.composite.model.CompositeModel.loadImports(CompositeModel.java
:361)
oracle.fabric.composite.model.CompositeModel.getWSDLManager(CompositeModel.j
ava:196)
oracle.integration.platform.blocks.adapter.AbstractAdapterBindingComponent.g
etWSDLDefinition(AbstractAdapterBindingComponent.java:168)
oracle.integration.platform.blocks.adapter.AdapterReference.loadDefinition(A
dapterReference.java:543)
oracle.integration.platform.blocks.adapter.AdapterReference.load(AdapterRefe
rence.java:377)
oracle.integration.platform.blocks.adapter.AdapterReference.load(AdapterRefe
rence.java:73)
oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.depl
oyReferences(CompositeDeploymentConnection.java:177)
oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.depl
oy(CompositeDeploymentConnection.java:81)
oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.ini
tDeployment(CompositeDeploymentManagerImpl.java:143)
oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.loa
d(CompositeDeploymentManagerImpl.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:?
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:27
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
java.lang.reflect.Method.invoke(Method.java:575)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopU
tils.java:306)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
iveMethodInvocation.java:148)
oracle.integration.platform.blocks.deploy.DeploymentEventPublisher.invoke(De
ploymentEventPublisher.java:57)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflect
iveMethodInvocation.java:148)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPro
xy.java:151)
$Proxy309.load(Unknown Source)
oracle.integration.platform.blocks.deploy.StandaloneCompositeDeploymentCoord
inatorImpl.coordinateCompositeDeployment(StandaloneCompositeDeploymentCoordinato
rImpl.java:54)
oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploy
NewComposite(BaseDeployProcessor.java:365)
oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploy
SARs(BaseDeployProcessor.java:123)
^-- Holding lock: java.lang.Object@3621c97c[thin lock]
oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWo
rk(DeployProcessor.java:122)
oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWo
rk(DeployProcessor.java:107)
oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeploy(D
eployProcessor.java:96)
oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.process(De
ployProcessor.java:68)
oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.d
oPostInsideLoggingSession(CompositeDeployerServlet.java:141)
oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.d
oPost(CompositeDeployerServlet.java:119)
javax.servlet.http.HttpServlet.service(HttpServlet.java:700)
javax.servlet.http.HttpServlet.service(HttpServlet.java:815)
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSe
curityHelper.java:224)
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelpe
r.java:108)
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:206)
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:299)
oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java
:405)
oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:98)
oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:299)
oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java
:405)
oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:98)
oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:86)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:55)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapR
un(WebAppServletContext.java:3687)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:3681)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:308)
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:116)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletC
ontext.java:2213)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.
java:2135)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:142
0)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:203)
weblogic.work.ExecuteThread.run(ExecuteThread.java:170)
>I just noted that this is a database connectivity issue because when I point my soa related data sources (mds, soa_infra, etc...)to a local xe database, the deployment is doing fine.
-
Arabic Character while loading in to Oracle.
Hi All,
OWB config is as follows:
OWB : 9.2
Oracle 9i database.
I am able to load Arabic characters from a source table to a target table
using OWB mappings but when i try to load a flat file the characters get jumbled.
My environment variables :--
IN
Database character set AR8ISO8859P6
Database National character set AL16UTF16
Database NLS_language AMERICAN
Database NLS_territory America
all settings obtained from v$nls_parameters
ON Windows server
in registry
NLS_LANG = AMERICAN_AMERICA.AR8MSWIN1256
I have tried changing the NLS_LANG in the registry to AR8ISO8859P6 but still
the same results.
Does OWB support Arabic character, by default at time of installation i must have selected American as language parameter?
If ans to above query is 'Yes' & it i manage to set Language to Arabic what will be impact on other components e.g. OEM, OWM etc.
Thanks in Advance.
Regards,
VidyanandVidyanand,
OWB supports Arabic language to add support for objects translations in the repository (done via OWB Repository Assistant).
OWB also supports data in any language that the database is configured for, as you could see by moving data from table to table with OWB mapping.
I suspect the problem loading flat file is not with OWB. Can you try loading that same file with SQL*Loader? You can read more on the subject in "Handling Different Character Encoding Schemes" section of SQL*Loader reference (in "Oracle 9i Database Utilities").
Nikolai
Maybe you are looking for
-
I am using XYlayout in my code. I am importing it from import com.borland.jbcl.layout.*; But when I am executing my code I am getting this error. "package com.borland.jbcl.layout does not exist" SO what I have to do to overcome this problem....
-
New mac mini 2011 windows 7 won't connect wireless in bootcamp
When I boot into win 7 everything is fine apart from I have no wireless connection looked everywhere in setting but cannot find any way of doing it,wireless works fine in lion,I currently connect mac mini by wireless,Ethernet is not possible at this
-
Hi, Can anyone let me know how to mask column names in model? Problem: There are columns with not so user friendly names like Attribute1, so I need to mask that name in my model and give a more user friendly name which describes its functionality. Ju
-
How do I restore Apps & such from my second computer?
Itunes update trashed my iphone, itunes and windows 7. Then after I managed to restore my Iphone, it deleted all of the apps on my phone and trashed Itunes on the same computer. Itunes and any backups on that computer are no longer available. I h
-
whenever i write a stored procedure in Oracle8.0.5 i get procedure created with compilation erros..what does this mean? any logs where i can see what errors exatly have occured? how to check if the procedure has been created at all or not.... my proc