Retrieving BLOB and Converting it to CLOB in Apex
Hi,
I am using Apex to upload a BLOB file (csv) and in my PL/SQL function, I convert it into a CLOB. However it doesn't read all the lines. Any advice? Thanks.
Here's the function I used to convert BLOB to CLOB.
function convertBlob(
B IN BLOB
return clob is
c clob;
n number;
BEGIN
if (b is null) then
return null;
end if;
if (length(b)=0) then
return empty_clob();
end if;
dbms_lob.createtemporary(c,true);
n:=1;
while (n+32767<=length(b)) loop
dbms_lob.writeappend(c,32767,utl_raw.cast_to_varchar2(dbms_lob.substr(b,32767,n)));
n:=n+32767;
end loop;
dbms_lob.writeappend(c,length(b)-n+1,utl_raw.cast_to_varchar2(dbms_lob.substr(b,length(b)-n+1,n)));
return c;
END;
use dbms_lob.getlength rather than length to get the length of the blob.
Nothing else obvious stands out, but should be plenty of examples in pl/sql forum and I know there is an example of this on the web. BLOB to CLOB?
Similar Messages
-
I was trying to free up space on my internal storage, so when I created files in Garage Band, I thought it would be a great idea to store them in my external hard drive. However, I now wanted to retrieve my files and burn them to a cd. When I dragged and dropped them to iTunes, they showed up in my playlist, but when I tried to burn the playlist, I got a message telling me there were no files in the playlist. Then I looked into putting them back into Garage Band and transferring from there to iTunes. But do not know how to do this, or even if I can do this. Do I have to always convert my aiff files to either wav or mpe files before I store them? Is it a lost cause for me now? Would really appreciate help on this.
On the external drive, in the Finder, do a get Info on one of those & report size, where, etc.
Also, if you double click on one, does iTunes play it?
You could save some space without losing quality by converting them to Apple Lossless. -
BLOB and CLOB data in BI Publisher
Hello,
I have an XML file with blob and clob data in it. I am using BI desktop publisher to load the xml file and create the rtf template. I am getting the following error:
ConfFile: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config\xdoconfig.xml
Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
Template: C:\work\employee.rtf
RTFProcessor setLocale: en-us
FOProcessor setData: C:\work\employee.xml
FOProcessor setLocale: en-us
Do i need to install anything or am i missing any configuration to read the blob and clob? Please advise
thanksCheck this out, hopefully it'll help you
http://oraclebizint.wordpress.com/2007/11/12/oracle-bi-ee-101332-working-with-clob-fields/
Fiston -
To store PDF into BLOB and retrieve into OLE/OCX
We would like to:
1. Store a PDF file (output of a report saved in file server) into a BLOB
column.
2. Retrieve previously stored PDF in the BLOB column and display using either
OLE automation or ActiveX (OCX) control.
I read all related documents in metalink that addresses this issue however cant
get this to work. We have Acrobat Reader 4.0. Here are some issues from the
tests that I did:
1. To load the PDF file the program code that uses BFILE and LOADFROMFILE does
not work since the database is on a remote server and the PDF file is on a
local file server. The DIRECTORY created on the database is unable to find the
PDF file.
2. Though I want the loading of the file to be programmatic, I tried
right-click on the OLE container and inserted object from file. This loaded the
file into the container (Icon on the container appeared) however I was not able
to view the document by double-clicking. An error in Adobe occured: 'There was
an error opening this document. A file read error occured'. My guess is the
'Insert Object' did not insert the file properly into the BLOB.
3. When trying to display the PDF file stored in file server (in case storing
into BLOB does not work), I used an OCX control, right-clicked and Insert
Object and select Adobe Control for ActiveX. The problem here is when I run the
form, the OCX control shows up empty and I have to 'Insert Object' again in
runtime. Once I manually insert object from runtime the GET_INTERFACE POINTER &
SET_PROPERTY works fine is displaying the document. Is there any way to
maintain the control property of the OCX when the form is run?
4. Are there any workarounds and better solution to store PDFs into BLOBs and
retrieve and display in OLE/OCX controls? Using temporary file into local drive
is not an issue.
5. Would I be able to make use of 'PDF.PdfCtrl.1' OLE class?
6. Does OLE automation work for Acrobat Reader 4.0.?
I would appreciate all the help.
ShyamIm facing a similar kind of problem. I want to store and retrieve Office files, PDF and Jpegs into/from the database to view them on web in disconnected mode. Please reply as I cant find any help/documentation regarding saving BLOB data into files. I was able to store file data into BLOB, using DBMS_LOB package.
Shahzad -
Display BLOB and CLOB on browser
Hi All.
I need to display contents of BLOBs and CLOBs on the browser. They can be any docFlavour eg. .jpg, .gif, .pdf, .doc etc
Is there some standard way of doing this ???
If any all possible I would rather not use swing class because of its footprint and its slow performance over the net.Hi !
Just in case anyone read this and is willing to comment on it...
I have one BLOB and one CLOB column in the same record.
I have been able to stream documents into and out of the BLOB's incl. MS .doc Also I have been able to get the content from BLOB and write it to a target directory.
However I am having odd problems with CLOB, a simple text file. My servlet attempts to read the CLOB and does create the output file in the target directory, but does not copy the content over. It also returns 0 for clobLength !?! Here is the stub-code :
ResultSet clobRS = thisStmt.executeQuery (
"SELECT ATextMsg " +
"FROM ... " +
"WHERE ... " );
clobRS.next();
CLOB thisCLOB = ((OracleResultSet) clobRS).getCLOB("ATextMsg");
int chunkSize = thisClob.getChunkSize();
System.out.println("chunkSize is " + chunkSize); // default us 8132...
char [] textBuffer = new char[chunkSize];
String targetFile = targetDir + "retrieved_" + fileName;
File thisFile = new File(targetFile); // it does create an empty target file...
// read content as ASCII (text) content...
FileOutputStream thisFileOutputStream = new FileOutputStream(thisFile);
OutputStreamWriter thisWriter = new OutputStreamWriter(thisFileOutputStream);
BufferedWriter thisBufferedWriter = new BufferedWriter(thisWriter);
// things go wrong here, returns length of 0, why ?!?
long clobLength = thisClob.length();
System.out.println("clobLength is " + clobLength);
// flush to targetFile - but since clobLength=0, nothing gets copied over...
for (position=1; position<=clobLength; position+=chunkSize)
int charsRead = thisClob.getChars(position, chunkSize, textBuffer);
thisBufferedWriter.write(testBuffer);
Since the clobLength is 0, obviously it will not copy from the database CLOB to the file.
Manually change the clobLength = 8132, recompile and run, then it copies some junk to the targetFile, certainly not the textual data in the CLOB itself.
The BLOB is fine...
Can someone comment on this please and if possible, give me a hint on where I might have gone wrong with a simple text file ??? -
Converting CHAR or CLOB to BLOB in Oracle9i
Hi!
I want to convert CHAR or CLOB to BLOB.
I am working with Oracle9i Database.
Oracle9i Supplied PL/SQL Package Release 2 (9.2) does'nt support DBMS_LOB.CONVERTTOBLOB procedure.
How I can convert CHAR or CLOB to BLOB in Oracle9i?
ValeryHi Valery,
For conversion to blob, just try the utl_raw package.
I use utl_raw.cast_to_raw quite often.
Or have a look at:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:437819871174
Good luck,
Jan-Marcel -
How to retrieve xml file from BLOB and display on browser with css/xslt
Hi All,
I am new to xml. I am storing my xml file into BLOB in database. Now in my jsp page I want to retrieve this xml file from BLOB and display in HTML/CSS/XSLT form...
Pl. guide me.. any docs..?? Logic...??
Thanks in Advance.
Sandeep OzaHello Sandeep!
I'm not familiar with jsp but logic should be as follows:
-in jsp page instantiate XML parser
-load specified BLOB into parser
Now you may traverse the XML tree or you might load XSL file and use transform method to transform XML according to XSL file.
I have an example where I'm selecting XML straight from relational database and then transform it using XSL into appropriate HTML output, but it's written in PSP.
You can try http://www.w3schools.com/default.asp for basics on XML, CSS, XSL. It's easy to follow with good examples.
Regards!
miki -
How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif -
Help required in handling of Oracle BLOB and CLOB in OC4J
Hi,
I am in a process of porting my application from Weblogic 6 to OC4J.
I have problem while handling CLob and Blob's in oracle. Weblogic has
classes defined to do the same. (weblogic.jdbc.common.OracleClob)
Does any one know how I can achieve this.
Thanks in advance.
Regards,
MoinWe have an application running on OC4J accessing an Oracle 8.1.7 db, and have no problems using BLOBs and CLOBs. It is explained quite clearly in the Oracle documentation.
If you require further assistance let me know :-) -
How to store and retrieve blob data type in/from oracle database using JSP
how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
thanksJSP? Why?
start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html] -
Code for using thin client over connection pool to access blob and clob
Hi,
Currently I am running WL5.1SP12 with oracle thin client 8.1.7 to access blob
and clob data. As the performance for concurrent users is very bad, I like to
use the thin client over a connection pool to access the blob and clob instead.
My question is whether this is possible and if so does anyone have a sample code?
Thanks.
This is urgent as the site has to roll out in 2 weeks..
Rgd,
JasonSee http://e-docs.bea.com/wls/docs61/jdbc/thirdparty.html#1043705.
"Jason" <[email protected]> wrote in message news:3eba851f$[email protected]..
>
Hi Stephen,
Thanks for the reply. Can I confirm that what you are saying is that in release
6.1 I am able to access blob/clob data via thin client over connection pool?
Rgd.
Jason
"Stephen Felts" <[email protected]> wrote:
Blob/clob support through the connection pool came in with release 6.1.
"Jason" <[email protected]> wrote in message news:[email protected]..
Hi,
Currently I am running WL5.1SP12 with oracle thin client 8.1.7 to accessblob
and clob data. As the performance for concurrent users is very bad,I like to
use the thin client over a connection pool to access the blob and clobinstead.
My question is whether this is possible and if so does anyone havea sample code?
Thanks.
This is urgent as the site has to roll out in 2 weeks..
Rgd,
Jason -
Uploading PDF in to BLOB and Retrieve PDF from BLOB
hi
I have recently started working in apex and run into a bump while trying to handle PDF file Attachments and BLOBs.
I am trying to upload a PDF file into BLOB database Column using APEX, and later view this file from DB.
I require assistance on how to upload PDF file into BLOB, and how i can later view this inside the browser window, using APEX
thanksMaybe this blog post can help you.
Regards,
Sergio -
Reading the Blob and writing it to an external file in an xml tree format
Hi,
We have a table by name clarity_response_log and content of the column(Response_file) is BLOB and we have xml file or xml content in that column. Most probably the column or table may be having more than 5 records and hence we need to read the corresponding blob content and write to an external file.
CREATE TABLE CLARITY_RESPONSE_LOG
REQUEST_CODE NUMBER,
RESPONSE_FILE BLOB,
DATE_CRATED DATE NOT NULL,
CREATED_BY NUMBER NOT NULL,
UPDATED_BY NUMBER DEFAULT 1,
DATE_UPDATED VARCHAR2(20 BYTE) DEFAULT SYSDATE
)The xml content in the insert statement is very small because of some reason and cannot be made public and indeed we have a very big xml file stored in the BLOB column or Response_File column
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(5, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(6, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(7, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(8, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(9, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');THe corresponding proc for reading the data and writing the data to an external file goes something like this
SET serveroutput ON
DECLARE
vstart NUMBER := 1;
bytelen NUMBER := 32000;
len NUMBER;
my_vr RAW (32000);
x NUMBER;
l_output UTL_FILE.FILE_TYPE;
BEGIN
-- define output directory
l_output :=
UTL_FILE.FOPEN ('CWFSTORE_RESPONCE_XML', 'extract500.txt', 'wb', 32760);
vstart := 1;
bytelen := 32000;
---get the Blob locator
FOR rec IN (SELECT response_file vblob
FROM clarity_response_log
WHERE TRUNC (date_crated) = TRUNC (SYSDATE - 1))
LOOP
--get length of the blob
len := DBMS_LOB.getlength (rec.vblob);
DBMS_OUTPUT.PUT_LINE (len);
x := len;
---- If small enough for a single write
IF len < 32760
THEN
UTL_FILE.put_raw (l_output, rec.vblob);
UTL_FILE.FFLUSH (l_output);
ELSE
-------- write in pieces
vstart := 1;
WHILE vstart < len AND bytelen > 0
LOOP
DBMS_LOB.READ (rec.vblob, bytelen, vstart, my_vr);
UTL_FILE.put_raw (l_output, my_vr);
UTL_FILE.FFLUSH (l_output);
---------------- set the start position for the next cut
vstart := vstart + bytelen;
---------- set the end position if less than 32000 bytes
x := x - bytelen;
IF x < 32000
THEN
bytelen := x;
END IF;
UTL_FILE.NEW_LINE (l_output);
END LOOP;
----------------- --- UTL_FILE.NEW_LINE(l_output);
END IF;
END LOOP;
UTL_FILE.FCLOSE (l_output);
END;The above code works well and all the records or xml contents are being written simultaneously adjacent to each other but we each records must be written to a new line or there must be a line gap or a blank line between any two records
the code which I get is as follow all all xml data comes on a single line
<?xml version="1.0" encoding="ISO-8859-1"?><emp><empno>7369</empno><ename>James</ename><job>Manager</job><salary>1000</salary></emp><?xml version="1.0" encoding="ISO-8859-1"?><emp><empno>7370</empno><ename>charles</ename><job>President</job><salary>500</salary></emp>But the code written to an external file has to be something like this.
<?xml version="1.0" encoding="ISO-8859-1"?>
<emp>
<empno>7369</empno>
<ename>James</ename>
<job>Manager</job>
<salary>1000</salary>
</emp>
<?xml version="1.0" encoding="ISO-8859-1"?>
<emp>
<empno>7370</empno>
<ename>charles</ename>
<job>President</job>
<salary>500</salary>
</emp>Please adviceWhat was wrong with the previous answers given on your other thread:
Export Blob data to text file(-29285-ORA-29285: file write error)
If there's a continuing issue, stay with the same thread, don't just ask the same question again and again, it's really Pi**es people off and causes confusion as not everyone will be familiar with what answers you've already had. You're just wasting people's time by doing that.
As already mentioned before, convert your BLOB to a CLOB and then to XMLTYPE where it can be treated as XML and written out to file in a variety of ways including the way I showed you on the other thread.
You really seem to be struggling to get the worst possible way to work. -
How to retrieve data from a field of CLOB datatype?
How can I retrieve data from a field of CLOB datatype in Oracle
8 being called from an ASP or VB application? The recordset
object in ASP or VB doesn't support the CLOB datatype.
Thank you in advance for your help.How can I retrieve data from a field of CLOB datatype in Oracle
8 being called from an ASP or VB application? The recordset
object in ASP or VB doesn't support the CLOB datatype.
Thank you in advance for your help. Hello.. were you able to solve your problem? I'm faced with pretty much the same task.. I have a VBA application that needs to pull various pieces of data(CLOBs, BLOBs, etc..) from an Oracle8i db. -
Retrieving BLOB in CMP2.0 from Oracle 8.1.7.3
Hi all,
In one of our project we are using CMP 2.0 and WLS8.1 SP2. While storing BLOB into Oracle (8.1.7) database we are not facing any issue.
But retrieving the BLOB from the database throwing error.
In weblogic.cmp.jar.xml I have defined the database column as below
<field-map>
<cmp-field>pendingUser</cmp-field>
<dbms-column>PENDING_USER</dbms-column>
<dbms-column-type>OracleBlob</dbms-column-type>
</field-map>
Stack trace of the issue is below
javax.ejb.FinderException: Exception executing finder 'findByAdministrator':
java.io.StreamCorruptedException: invalid stream header
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.__WL_set_pendingUserForInput(PendingUserEntity_2zvzps__WebLogic_CMP_
RDBMS.java:2258)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.__WL_loadGroup0FromRS(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.j
ava:868)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.__WL_loadGroupByIndex(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.j
ava:1100)
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.loadBeanFromRS(RDBMSPe
rsistenceManager.java:428)
at weblogic.ejb20.manager.DBManager.getBeanFromRS(DBManager.java:1435)
at weblogic.ejb20.manager.BaseEntityManager.getBeanFromRS(BaseEntityManage
r.java:1207)
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getBeanFromRS(RDBMSPer
sistenceManager.java:2015)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.ejbFindByAdministrator(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.
java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMS
PersistenceManager.java:378)
at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1700)
at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1672)
at weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:560)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps_HomeIm
pl.findByAdministrator(PendingUserEntity_2zvzps_HomeImpl.java:128)
at com.boa.gcib.docwf.ecf.ejbs.user.UserManagerBean.getRequestedAccounts(U
serManagerBean.java:1158)
at com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl.getRequested
Accounts(UserManager_iq4580_EOImpl.java:46)
at com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl_WLSkel.invok
e(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef
.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedS
ubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:14
4)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:
415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.j
ava:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.ejbFindByAdministrator(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.
java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMS
PersistenceManager.java:378)
at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1700)
at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1672)
at weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:560)
at com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps_HomeIm
pl.findByAdministrator(PendingUserEntity_2zvzps_HomeImpl.java:128)
at com.boa.gcib.docwf.ecf.ejbs.user.UserManagerBean.getRequestedAccounts(U
serManagerBean.java:1158)
at com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl.getRequested
Accounts(UserManager_iq4580_EOImpl.java:46)
at com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl_WLSkel.invok
e(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef
.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedS
ubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:14
4)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:
415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.j
ava:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Is there anything I am missing?
Please help me!
Thanks a lot in advance,
Mahesh
Message was edited by:
MaheshindiaThere is a new flag named 'serialize-byte-array-to-oracle-blob' and it was
introduced in SP2. Check whether that flag is useful. More info can be found
on the SP2 release notes -
http://e-docs.bea.com/wls/docs81/notes/resolved_sp02.html
--Sathish
<Mahesh Patil> wrote in message news:[email protected]...
Hi all,
In one of our project we are using CMP 2.0 and WLS8.1 SP2. While storing
BLOB into Oracle (8.1.7) database we are not facing any issue.
But retrieving the BLOB from the database throwing error.
In weblogic.cmp.jar.xml I have defined the database column as below
<field-map>
<cmp-field>pendingUser</cmp-field>
<dbms-column>PENDING_USER</dbms-column>
<dbms-column-type>OracleBlob</dbms-column-type>
</field-map>
Stack trace of the issue is below
javax.ejb.FinderException: Exception executing finder
'findByAdministrator':
java.io.StreamCorruptedException: invalid stream header
java.io.StreamCorruptedException: invalid stream header
at
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.__WL_set_pendingUserForInput(PendingUserEntity_2zvzps__WebLogic_CMP_
RDBMS.java:2258)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.__WL_loadGroup0FromRS(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.j
ava:868)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.__WL_loadGroupByIndex(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.j
ava:1100)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.loadBeanFromRS(RDBMSPe
rsistenceManager.java:428)
at
weblogic.ejb20.manager.DBManager.getBeanFromRS(DBManager.java:1435)
at
weblogic.ejb20.manager.BaseEntityManager.getBeanFromRS(BaseEntityManage
r.java:1207)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getBeanFromRS(RDBMSPer
sistenceManager.java:2015)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.ejbFindByAdministrator(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.
java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMS
PersistenceManager.java:378)
at
weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1700)
at
weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1672)
at
weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:560)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps_HomeIm
pl.findByAdministrator(PendingUserEntity_2zvzps_HomeImpl.java:128)
at
com.boa.gcib.docwf.ecf.ejbs.user.UserManagerBean.getRequestedAccounts(U
serManagerBean.java:1158)
at
com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl.getRequested
Accounts(UserManager_iq4580_EOImpl.java:46)
at
com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl_WLSkel.invok
e(Unknown Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef
.java:108)
at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedS
ubject.java:353)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:14
4)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:
415)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.j
ava:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps__WebLo
gic_CMP_RDBMS.ejbFindByAdministrator(PendingUserEntity_2zvzps__WebLogic_CMP_RDBMS.
java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMS
PersistenceManager.java:378)
at
weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1700)
at
weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityMan
ager.java:1672)
at
weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:560)
at
com.boa.gcib.docwf.ecf.ejbs.pendinguser.PendingUserEntity_2zvzps_HomeIm
pl.findByAdministrator(PendingUserEntity_2zvzps_HomeImpl.java:128)
at
com.boa.gcib.docwf.ecf.ejbs.user.UserManagerBean.getRequestedAccounts(U
serManagerBean.java:1158)
at
com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl.getRequested
Accounts(UserManager_iq4580_EOImpl.java:46)
at
com.boa.gcib.docwf.ecf.ejbs.user.UserManager_iq4580_EOImpl_WLSkel.invok
e(Unknown Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef
.java:108)
at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedS
ubject.java:353)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:14
4)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:
415)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.j
ava:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Is there anything I am missing?
Please help me!
Thanks a lot in advance,
Mahesh
Message was edited by:
Maheshindia
Maybe you are looking for
-
Select-Options in dialog program
Hi there, I'm using a selection-screen in a dialog program, I declared it in the TOP. Selection-screens SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN. parameters: p_lifnr type lfa1-lifnr obligatory , p_werks type t001w-werks obligato
-
How to move the stock after quality inspection in wm
hi , if i am posting GR with PO for the material XXXX quantity of 10 it should not be posted in Warehouse. after completion of stock inspection in QM then only it moved to warehouse . But the problem is when i post gr in migo the transfer requir
-
Is MacPro 2.oGHz enough to edit AVCHD?
I plan to get canon FHS10 and FCE4 or may be FCP.
-
About table control in the selection screen
i want to create a table control in the selection screen of my report.i can create the table control using SE51.but how to program with the table control in the report.for example i should fetch the data for the personnel nos entered in the table con
-
Create disappearing radio buttons?
I'm looking to create a pdf that can act as several templates in one. Is there a way to create radio buttons with text choices and then have the button disappear once the text is selected and just have normal text?