Blob-error
What might be wrong if I get this exception
while saving a gif image in a blob field.
Can somebody give me a sample code.
ORA-01461 can bind a Long value only for insert into a long Col.
Thanks
Hi Pradeep
SELECT b_lob INTO dest_lob
FROM lob_table
WHERE key_value = 12
FOR UPDATE;Use for update in select clause to lock that particular row
or refer links [http://www.error-code.org.uk/view.asp?e=ORACLE-ORA-22920] and
[http://www.psoug.org/reference/dbms_lob.html]
*009*
Similar Messages
-
I have an mobile app and I put images in Azure Storage Blob. when tested by several of our own people (on test and beta), it is all good.
But when we released it to beta and had hundreds (maybe above one thousand) of users to use, lots of them report that they cannot see images. It happens on their iPhones and also on many different brands of Android phones. Sometimes, for the same image,
on one phone it is good, but on another it doesn't show.
When I check blob log, I saw a lot of errors, mainly these two:
AnonymousClientOtherError; 304
"Anonymous request that failed as expected, most commonly a request that failed a specified precondition. The total number of anonymous requests that failed precondition checks (like If- Modified etc.) for GET requests. Examples: Conditional GET requests
that fail the check." (From Microsoft)
AnonymousNetworkError; 200
"The most common cause of this error is a client disconnecting before a timeout expires in the storage service. You should investigate the code in your client to understand why and when the client disconnects from the storage service. You can also use
Wireshark, Microsoft Message Analyzer, or Tcping to investigate network connectivity issues from the client. " (From Microsoft) - a question here, this is an error, but why it is 200?
I wonder if these are the reasons that caused my problem?
For the first one, from my understanding, it is not actually an error, it just says that the version client cached is the same as server version. But when my client side sees this response, it thinks it is an error and throw an exception and thus no image
is shown? (I actually outsourced my client side, so I can only guess). I later tested with my browser to access these images and found that if I refresh the browser with the same URL of the image, I saw error 304 on the log but I still see the image. So I
guess this is not actually a reason for my problem.
For the second one, is it because my client side's timeout is shorter than the server side's timeout? But is the timeout a connection timeout or a socket timeout? what are the default values on client side and on Azure Blob? Or is it because the network
is not good? My Azure server is located in East Asia (Hongkong), but my users are in mainland China. I wonder if that could cause problem? But when a few users tested in China it is all good.
Many of the images are actually very small, just one to two hundred k. Some are just 11k.
I cannot figure out what is the reason...Hi,
Does any people encounter this error when they access the small picture, if this issue is only caused by large picture, please try to improve the timeout, you can also monitor your storage account from the Azure Management Portal, this may be help us
to find out the detailed error information. see more at:
http://azure.microsoft.com/en-gb/documentation/articles/storage-monitor-storage-account/, hope it helps.
Regards -
Doing setBytes() but when extracting data get BLOB error?
I am inserting a video into an oracle 10g db, and I insert it using the setBytes method but when trying to pull that video from the db, it gives me this error
SQL Exception in getting video ORA-00932: inconsistent datatypes: expected - got BLOB
The field value is a blob type, but don't have any issues when doing this with a jpg vs a wmv file. here is my code for insertion and extraction of the data.
String query=("INSERT INTO VIDEO (P_ID, P_VIDEONAME, P_VIDEO) Values (?,?,?)");
prepStmt = connection.prepareStatement(query);
prepStmt.setInt(1,patient.getP_ID());
prepStmt.setString(2,patient.getVideoName());
prepStmt.setBytes(3,patient.getVideo());
prepStmt.executeUpdate();
rs = stmnt.executeQuery("SELECT P_VIDEONAME, P_VIDEO FROM VIDEO WHERE P_VIDEO = " + patient.getVideoName() + " and P_ID = " + patient.getP_ID());
ResultSetMetaData metaData = rs.getMetaData();
int columns=metaData.getColumnCount();
while(rs.next()){
for(int i=1;i<=columns;++i) {
patient.setAction("getVideo");
patient.setVideoName(rs.getString(i));
patient.setVideo(rs.getBytes(++i));
sendPatient();
}catch(SQLException e) {
//this is similar to the definition i gave you above.
System.out.println("SQL Exception in getting video " + e.getMessage());That inner for loop makes no sense. You don't need to iterate through the columns; you already know what's supposed to be in each one. Get rid of the loop and just refer to them by their absolute indices, like you did when you inserted the record.
Also, I would advise always using the postfix operators i++ and i-- instead of the prefix forms, ++1 and --i. It's just too easy to lose track of what's going on when you mix the the two styles, and postfix operators are much more commonly used.
I don't know if any of this will solve your problem, but it should at least make the probelm easier to see. -
BLOB error: invalid arguments in call
I created a table with 3 columns: PICID(Number), Pic(BLOB) and User(Varchar2[20]). I am using SQL Developer to create a new row and put a picture into the Pic column. When I try to save it, I get this:
One error savings changes to table "PICS":
Row 1: Invalid argument(s) in call.
What am I doing wrong?Forigve me, I thought that the stuff I wrote before that would've been at least SOME help.
INSERT INTO "PICS" (PICID, PIC, INITIALS) VALUES ('1', empty_blob(), 'BOB')
SELECT PIC FROM "PICS" WHERE ROWID='AAATutAAEAAAAMUAAA' AND ORA_ROWSCN='4846781' FOR UPDATE
Invalid argument(s) in call
One error saving changes to table PICS":
Row 1: Invalid argument(s) in call
This is what SQL Developer comes up with after I click 'Load', browse for an image and put it into the PIC column.
I'm running 11g. What other information do you need? Thanks for your help, sorry to bother you. -
BLOB Error with JDBC driver 8.1.5
Hello.
I tried to run the sample code that I got from OTN, but
I couldn't run it because of some errors.
Would you please help me?
*** The sample code that I tried to run ***
I got it from "SQLJ & JDBC Advanced Samples" in OTN.
Sampl code Name: LOBSample
*** Erroe Message ***
Error in retrieving and drawing map for selected airport
java.sql.SQLException: ORA-06550: line 1, column 22:
PLS-00302: component 'GETCHUNKSIZE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
This error occurred when p_blob.getBinaryStream() was called.
(p_blob was an BLOB object)
*** Environment ***
OS: Windows NT 4.0 SP3
RDBMS: Oracle 8 R8.0.5
JDBC: Oracle JDBC Thin Driver v8.1.5
Thanks, Satoshi Ikeda
nullHi,
The method getBytes() does not work, and produce the following
error, when the size is big.
java.sql.SQLException: ORA-21560: argument 2 is null, invalid, or
out of range
ORA-06512: at "SYS.DBMS_LOB", line 458
ORA-06512: at line 1
Since getchunksize() will also produces the same error as
getBinaryStream() ('GETCHUNKSIZE' must be declared) therefore, I
have no idea how to find the best value to chop the data to
retrieve it, except try and error. The example I am working on
32000 bytes seems to be the ideal size, and it causes error when
the size get bigger. I am currently working on a NT server. I
guess the ideal size can differ from server to server. Does
anyone has better suggestion to get the ideal size?
Shuhsin
Oracle Product Development Team wrote:
: This is a known limitation when you use 8.1.5 JDBC drivers
: against old DBs. We have the fix in the 8.1.6 SDK.
: For now, try using getBytes if you are talking to an older
: DB
: Satoshi Ikeda (guest) wrote:
: : Hello.
: : I tried to run the sample code that I got from OTN, but
: : I couldn't run it because of some errors.
: : Would you please help me?
: : *** The sample code that I tried to run ***
: : I got it from "SQLJ & JDBC Advanced Samples" in OTN.
: : Sampl code Name: LOBSample
: : *** Erroe Message ***
: : Error in retrieving and drawing map for selected airport
: : java.sql.SQLException: ORA-06550: line 1, column 22:
: : PLS-00302: component 'GETCHUNKSIZE' must be declared
: : ORA-06550: line 1, column 7:
: : PL/SQL: Statement ignored
: : This error occurred when p_blob.getBinaryStream() was called.
: : (p_blob was an BLOB object)
: : *** Environment ***
: : OS: Windows NT 4.0 SP3
: : RDBMS: Oracle 8 R8.0.5
: : JDBC: Oracle JDBC Thin Driver v8.1.5
: : Thanks, Satoshi Ikeda
: Oracle Technology Network
: http://technet.oracle.com
null -
UploadedFile component - af:inputFile to upload blob Errors - help needed
Hi,
I am working with JDev, Toplink, and ADF Faces. I am using the af:inputFile component to read in a pdf file which I want to save as a blob into my oracle DB.
This is the code on the jspx page:
<af:inputFile label="Label 1"
binding="#{backing_app_ATBlobs1.inputFile1}"
valueChangeListener="#{backing_app_ATBlobs1.fileUploaded}"
id="inputFile1" columns="40"/>
<af:commandButton text="commandButton 1"
binding="#{backing_app_ATBlobs1.commandButton1}"
id="commandButton1"/>
The following is my code in the backing bean:
public void fileUploaded(ValueChangeEvent event) {
UploadedFile file = (UploadedFile)event.getNewValue();
if (file != null && file.getLength() > 0) {
FacesContext context = FacesContext.getCurrentInstance();
FacesMessage message =
new FacesMessage(JSFUtils.getStringFromBundle("srmain.srfileupload.success") +
" " + file.getFilename() + " (" +
file.getLength() + " bytes)");
context.addMessage(event.getComponent().getClientId(context),
message);
FileInputStream fis;
fis = null;
try {
fis = new FileInputStream((File)file);
catch (FileNotFoundException ex)
System.out.println("f2: Oops, FileNotFoundException caught");
finally
System.out.println("f2: finally block");
PreparedStatement pstmt =
cm.getCon().prepareStatement("INSERT INTO BLOBS (BLOB_ID, PROCUR_ID, PF_NUM, DOCUMEN, FILENAME_TXT) " +
"VALUES ('" + BLOB_SEQUENCE.NEXTVAL + ",1, 2, ?, " + file.getFilename() + ")");
pstmt.setBinaryStream(1, fis, (int)file.length());
pstmt.executeUpdate();
Following are the errors:
Name cm Not Found
Method getCon Not Found
Method prepareStatement Not Found
Method length() Not Found
Name BLOB_SEQUENCE.NEXTVAL Not Found, BLOB_ID is sequentially generated.
Exception Not handled: java.sql.SQLException for these lines:
pstmt.setBinaryStream(1, fis, (int)file.length());
pstmt.executeUpdate();
I am not very sure about coding the values for the insert statement. Any help would be appreciated. Thanks!
LinHi,
I got some of the errors taken care of, but I have some questions.
Below is my code:
public void fileUploaded(ValueChangeEvent event) {
// Add event code here...
UploadedFile file = (UploadedFile) event.getNewValue();
if (file != null)
FacesContext context = FacesContext.getCurrentInstance();
FacesMessage message = new FacesMessage( "Successfully uploaded file " + file.getFilename() + " (" + file.getLength() + " bytes)");
context.addMessage(event.getComponent().getClientId(context), message);
// Here's where we could call file.getInputStream()
InputStream fis;
fis = null;
try {
fis = file.getInputStream();
catch (FileNotFoundException ex)
System.out.println("FileNotFoundException caught");
} catch (IOException e) {
// TODO
System.out.println("IOException caught");
finally
System.out.println("finally block");
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
catch (ClassNotFoundException ex) {
System.out.println("ClassNotFoundException caught");
// DriverManager.registerDriver(new OracleDriver());
try {
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@oradev2.tceq.state.tx.us:1521:sand3", "kding", "kd5469");
PreparedStatement pstmt =
conn.prepareStatement("INSERT INTO BLOBS (BLOB_ID, PROCUR_ID, PF_NUM, DOCUMEN, FILENAME_TXT) " +
"VALUES (?,?,?,?,?)");
int blob_id;
blob_id = BLOB_SEQUENCE.NEXTVAL;
String filename = file.getFilename();
pstmt.setInt(1, blob_id);
pstmt.setString(2, "1");
pstmt.setString(3, "2");
pstmt.setBinaryStream(4, fis, (int)file.getLength());
pstmt.setString(5, filename);
pstmt.executeUpdate();
catch (SQLException e) {
// TODO
System.out.println("SQLException caught");
I am unable to get the value for the blob_id which is sequentially generated. The error is in this line:
blob_id = BLOB_SEQUENCE.NEXTVAL;
Another question:
Can someone tell me how to display variable in JDeveloper. I tried System.out.println - but I think this is for command line printing?
Thanks for the assistance.
Lin -
Insert BLOB error in IAS but not in JDeveloper
Hi
Our application have a Servlet who executes an INSERT using a PrepareStatement (created by the Transaction of an ApplciationModule)
In Jdeveloper (10.1.2) this works OK
But when deploy it in the IAS (904) we have an error:
java.sql.SQLException: Io exception: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:345)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2094)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1986)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2697)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
at com.asorco.sgie.controller.servlets.general.Archivo.uploadFile(Archivo.java:176)
at com.asorco.sgie.controller.servlets.general.Archivo.doPost(Archivo.java:118)
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:733)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.ja
va:192)
at java.lang.Thread.run(Thread.java:534)
In the IAS, Im using the jars used in JDeveloper (classes12.jar, classes12dms.jar, nls_classes12.jar).
Any knows the reason?
Thank you!The effect to use <jsp:forward> or RequestDispatcher.forward is different between
BEA and Tomcat (even Websphere). Weblogic stores the output in a buffer, before
the buffer reaches the limit, you can call those forward methods without obvious
problems. Tomcat (and Websphere I ever tested) is not so tolerable. If you have
send out something via Servlet writer or JSPWriter, or have something like HTML
tags/text before forwards, chances are big to encounter the exceptions you have.
So I use more include methods to assemble my JSPs and servlets, for the purpose
of portability.
"Aidan Monroe" <[email protected]> wrote:
>
>I have a .war file that runs perfectly in WebLogic 7.0. Today I tried
>to run that
>same .war in Tomcat 4.0.6. Unfortunately, it did not run. I get the following
>error:
>
>java.lang.IllegalStateException: Cannot forward after response has been
>committed
>
>Now, I know what this error means, but I don't know why I would get it
>when I
>run in Tomcat but not WebLogic. Does WebLogic do something to "insulate"
>me from
>this error that perhaps Tomcat does not do?
>
>Aidan
>
-
"Failed to convert to native blob" error
Can someone else me? Whenever I go into the slideshow module, I get the error "failed to convert to native blog" Any suggestions?
Success! I have been having this issue with the slideshow module for over a year. The issue was that I had an old identity plate that was trying to use a font that I no longer have installed. I opened the identity plate and updated it to use a font that I have currently. Now I can finally use the slideshow module again! Adobe - if you are listening - it would be nice to have a more descriptive error message when this happens, or to alert the user when lightroom starts that the font is now missing and will be replaced or similar. Thanks all!
-
Hi,
I am having some wierd situation, dealing with Blobs and clobs in the source tables.
I have removed all the attributes that have blobs and clobs ,.. the mapping validates fine... deploys fine.. But when I start to load data, it give me a warning about Blob and exceutes the mapping.
How can i get rid of the warning at the very first place
Thanks in advanceHi,
When u import the table it has blob and clob in it right. Then its natural that the warning will come up. Either ignore it or create a look alike without the blob and clob attributes and then import the table in the mapping.
Regards
Bharath -
ORA-00604: error occurred at recursive SQL level 2
Hello,
I am trying to create a simple table and I am getting a ora error as below.
SQL> create table album(name varchar2(100),image blob);
create table album(name varchar2(100),image blob)
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-01422: exact fetch returns more than requested number of rows
how to resolve this?Any help..
Thanks,
Ranz.Hi,
*@Anurag Tibrewal,*
I followed as per the order od statements you gave. Initially there was no table "ALBUM" when I executed the first 2 statements.
3rd staement i created a table "ALBUM" and then 4th and 5th statement showed that I have a table called "ALBUM".
Now when again I wanted to drop the table I am getting the same error.
SQL> drop table album
2 ;
drop table album
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01422: exact fetch returns more than requested number of rows
*@Jean-Valentin*
I am not finding the trace file for today as i checked the alert log. When i searched for the the error I found the error for March 4. No ora-00604 error from today.
As shown in ALERT LOG.
Thu Mar 04 10:50:41 2010
Errors in file d:\oracle\product\10.2.0\admin\raneeshtest\bdump\*raneeshtest_j000_5976.trc*:
ORA-00604: error occurred at recursive SQL level 1
ORA-04030: out of process memory when trying to allocate 172 bytes (Typecheck,seg:kggfaAllocSeg)
ORA-12012: error on auto execute of job 1
ORA-04030: out of process memory when trying to allocate 16428 bytes (pga heap,kgh stack)
Trace file details:
Dump file d:\oracle\product\10.2.0\admin\raneeshtest\bdump\raneeshtest_j000_5976.trc
Thu Mar 04 10:50:31 2010
ORACLE V10.2.0.3.0 - Production vsnsta=0
vsnsql=14 vsnxtr=3
Personal Oracle Database 10g Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
Windows NT Version V6.0 Service Pack 1
CPU : 2 - type 586, 2 Physical Cores
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:27M/2037M, Ph+PgF:341M/4352M, VA:4M/2047M
Instance name: raneeshtest
Redo thread mounted by this instance: 1
Oracle process number: 15
Windows thread id: 5976, image: ORACLE.EXE (J000)
*** 2010-03-04 10:50:31.224
*** ACTION NAME:() 2010-03-04 10:50:30.276
*** MODULE NAME:() 2010-03-04 10:50:30.195
*** SERVICE NAME:(SYS$USERS) 2010-03-04 10:50:30.195
*** SESSION ID:(137.401) 2010-03-04 10:50:30.195
*********START PLSQL RUNTIME DUMP************
***Got internal error Exception caught in pfrrun() while running PLSQL***
***Got ORA-4030 while running PLSQL***
PACKAGE SYSMAN.MGMT_ADMIN_DATA:
library unit=3416af50 line=128 opcode=117 static link=0 scope=0
FP=3ca31374 PC=30f42000 Page=0 AP=3ca47b2c ST=3ca32778
DL0=3ca46564 GF=3ca465b0 DL1=3ca46584 DPF=3ca465a8 DS=30f421e4
DON library unit variable list instantiation
0 3416af50 3ca465b0 3ca2005c
1
2
3
4
5
6
7
scope frame
2 0
1 3ca31374
package variable address size
0 3ca46698 16
1 3ca466a8 16
2 3ca466b8 16
3 3ca466c8 16
4 3ca466d8 16
5 3ca466e8 20
6 3ca466fc 16
7 3ca4670c 20
8 3ca46720 16
9 3ca46730 4
10 3ca46734 4
11 3ca46738 4
12 3ca4673c 4
13 3ca46740 4
14 3ca46744 4
15 3ca46748 4
16 3ca4674c 4
17 3ca46750 4
18 3ca46754 4
19 3ca46758 4
20 3ca4675c 4
21 3ca46760 20
22 3ca46774 20
23 3ca46788 20
24 3ca4679c 20
25 3ca467b0 4
26 3ca467b4 4
27 3ca467b8 4
28 3ca467bc 4
29 3ca467c0 16
30 3ca467d0 16
31 3ca467e0 8
32 3ca467e8 39
33 3ca46810 39
34 3ca46838 521
35 3ca46a44 521
36 3ca46c50 140
37 3ca46cdc 140
38 3ca46d68 30
39 3ca46d88 30
40 3ca46da8 30
41 3ca46dc8 30
42 3ca46de8 30
43 3ca46e08 30
44 3ca46e28 30
45 3ca46e48 30
46 3ca46e68 30
47 3ca46e88 30
48 3ca46ea8 30
49 3ca46ec8 30
50 3ca46ee8 140
51 3ca46f74 140
52 3ca47000 30
53 3ca47020 30
54 3ca47040 30
55 3ca47060 30
56 3ca47080 39
57 3ca470a8 39
version=43123476 instantiation size=2920
line pcode offset
1 2
4 620
5 632
6 632
7 638
8 644
14 650
29 810
44 970
47 992
48 1000
49 1008
50 1016
51 1024
52 1032
53 1040
54 1048
55 1056
56 1064
57 1072
60 1080
128 1814
196 2548
197 2554
198 2560
199 2566
205 2572
206 2578
438 2584
1 2586
***********END PLSQL RUNTIME DUMP************
*** 2010-03-04 10:50:40.690
ORA-12012: error on auto execute of job 1
ORA-04030: out of process memory when trying to allocate 16428 bytes (pga heap,kgh stack)
*** 2010-03-04 10:50:41.206
ORA-00604: error occurred at recursive SQL level 1
ORA-04030: out of process memory when trying to allocate 172 bytes (Typecheck,seg:kggfaAllocSeg)
ORA-12012: error on auto execute of job 1
ORA-04030: out of process memory when trying to allocate 16428 bytes (pga heap,kgh stack)
SQL> select * from dual;
D
X
SQL>
This is the output. Its returning corredclty. Now what is the problem? Pls help me. -
We are migrating a system from NW to OES2 which includes 4 DMS libraries. 3
are ok, but one is showing some issues.
The library dates back to 1998 under GW5.1 on NW4.11 and has been through 4
physical boxes and is currently GW8.0.1 on NW6.5sp8, so it has some history
A GW search indicates the highest document number is 81,979, whilst the
properties of the DMS folder structure shows 154,615 files in 256 folders !
The libraries are currently stored OFF the PO, and prior to moving them
under the PO, TID 10100328, we ran a GWcheck - Analyze/Fix Library with
Verify Library and Verify document files checked.
This threw up the following errors:
Error 76 - Error accessing document content: Error Code = C081
Problem 86 - Inaccessible wordlist blob: error Code = C081
Uncorrectable conditions encountered:
CODE DESCRIPTION COUNT
76 Document content access errors..................... 206
Correctable conditions encountered:
CODE DESCRIPTION COUNT
86 Inaccessible wordlists marked for regeneration..... 2106
From previous experience I know that Problem 86 can normally be circumvented
by selecting the doc and creating a New Version, however I cannot find an
automated means of doing this, and don't really want to do it manually 2106
times !
We then ran a structural check and go the following results:
CODE DESCRIPTION COUNT
50 Orphaned Blob files (deleted)...................... 7
Correctable conditions encountered:
CODE DESCRIPTION COUNT
39 Unrecognized or invalid files in mail directories.. 2083
66 GWCheck log files in log directory................. 356
91 Databases in Store Catalog but not on disk.......... 63
93 Unused blob files (deleted)........................ 194
Does anybody have any advice or guidance on how to clear these up?
Many thanks
Simonso, you would suggest I avoid running it at 10am on a work day? ;-)
thanks for that, will give it a go.
Simon
>>> On 20 October 2010 at 17:50, in message
<[email protected]>,
Dave Parkes<[email protected]> wrote:
> The well known <g> option tucked away in the middle of TID 10063853
>
> Within the reassign orphaned docs option, and I quote
>
> Note:
> A hidden operation found in this option is to
> regenerate wordlist blobs. This is performed by putting a *wl in the
New
> Author field. Caution should be used in causing a wordlist regeneration.
It
> forces a considerable amount of indexing to be performed. It also should
not
> be run if you have archived documents.
>
>
> You sort of have to know that one is there, but it is not selective, it
> does all the documents and hence triggers a full reindex
>
> Cheers Dave -
Text area with html editor based on sql query
Hi all,
I am trying to create a text area with its contents loaded from a sql query returning a blob field.
I gave the query
select blob_field from file_subjects where id=41; in the item source valueI am getting an error in the display page like
ORA-00932: inconsistent datatypes: expected NUMBER got BLOB
Error ERR-1019 Error computing item default value: page=5 name=CONTENTS.
where am i goig wrong..?
should i go for a pl/sql instead?Venket,
See my previous thread on this (Well I used CLOB rather than BLOB). You will find code examples too. Should be just what you need.
How to "Bypass" HTMLDB
-Joe -
Error while importing a table with BLOB column
Hi,
I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
IMP-00017: following statement failed with ORACLE error 959:
"CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
"CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
"DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
"ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
"ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
"TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
" 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
"4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
"IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
"OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
"AULT))"
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
I used the import command as follows :
imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
What can I do so that this table gets imported correctly?
Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
Thanks in advance.Hello,
U can either
1) create a tablespace with the same name in destination where you are trying to import.
2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
Regards,
Vinay -
Error while trying to store PDF in Oracle's BLOB field
Hi folks!
I'm having problems while trying to store PDF file in a BLOB field of an Oracle table
This is the message code:
Exception in thread "main" java.sql.SQLException: Data size bigger than max size for this type: 169894
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:95)
at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2414)
at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.setBytes(OraclePreparedStatement.java:2170)
at vgoactualizacion.Main.main(Main.java:84)
This is the piece of code i'm using:
Assuming conn = conection to Oracle 10g Database ( it's working )
String miProcedimientoAlmacenado = "{ call package_name.update_client(?,?, ?) }";
CallableStatement miComando = conn.prepareCall(miProcedimientoAlmacenado);
miComando.setString(1,miClienteID ); //first parameter : IN
//second parameter : IN
File miPDF = new File(pathPDF + "//" + miClienteID + ".pdf");
byte[] bodyIn = readFully(miPDF); //readFully procedure is shown below
miComando.setBytes(2, bodyIn); //THIS IS THE LINE WHERE THE ERROR IS PRODUCED
//3rd parameter: OUT
miComando.registerOutParameter(3, java.sql.Types.VARCHAR);
miComando.execute();
private static byte[] readFully(File miPDF) throws FileNotFoundException, IOException {
FileInputStream fis = new FileInputStream(miPDF);
byte[] tmp = new byte[1024];
byte[] data = null;
int sz, len = 0;
while ((sz = fis.read(tmp)) != -1) {
if (data == null) {
len = sz;
data = tmp;
} else {
byte[] narr;
int nlen;
nlen = len + sz;
narr = new byte[nlen];
System.arraycopy(data, 0, narr, 0, len);
System.arraycopy(tmp, 0, narr, len, sz);
data = narr;
len = nlen;
if (len != data.length) {
byte[] narr = new byte[len];
System.arraycopy(data, 0, narr, 0, len);
data = narr;
return data;
}//fin readFully
This approach indicates that the PDF file is converted into an array of bytes, then is stored as binary in the BLOB field.
Thanx in advance, and looking forward for your comments.You will probably need to use the setBinaryStream() method instead of setBytes().
-
Getting errors while writing to a BLOB column using PrepareStatement
Hello,
I am getting the following errors when I am trying to insert in a BLOB in the oracle 9i database:
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 205 ORA-22297: warning: Open LOBs exist at transaction commit time
It gets inserted into the BLOB column correctly even after throwing exception.I am using the following code:
String outputXML = outputXML //Some huge string having a length of 52k
String pKey = "DATA-WORKATTACH-URL MELLONFINCORP-GSS-CPG E-444!20061130T211932.030 GMT";
String createDateTime = "20061212T145931.448 GMT";
String createOpName = "Haque, Nadeem";
String createOperator = "ADCDTB6";
String createSystemID = "WFE";
String insName = "TESt INS";
String objClass = "Data-WorkAttach-Note";
String updateDateTime = "20061207T191900.510 GMT";
String updateOpName = "Haque, Nadeem";
String updateOperator = "ADCDTB6";
String updateSystemID = "WFE";
String label = "This is a test for label";
String attachDate = "20061207T191900.510 GMT";
String attachedBy = "Nadeem";
String attachName = "Nadeem Haque";
String note = "This is a test note";
String refObjectKey = "E-438!20061130T211932.030";
String replicationDate = "20061207T191900.510 GMT";
try{
java.sql.PreparedStatement pstmt = null;
java.sql.Statement stmt = null;
java.io.OutputStream tempBlobOStream = null;
oracle.sql.BLOB tempBlob = null;
javax.naming.Context ctx = new javax.naming.InitialContext();
tools.findPage("tempWorkPage").putString ("testctx", ctx.toString());
javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("jdbc/gswWorkflowReportingData");
tools.findPage("tempWorkPage").putString ("testds", ds.toString());
java.sql.Connection conn = ds.getConnection();
tools.findPage("tempWorkPage").putString ("testconn", conn.toString());
java.sql.ResultSet lobDetails = null;
try{
byte [] ba = outputXML.getBytes();
String query = "INSERT INTO GSW06U.pc_data_workattach(PZINSKEY,PXCREATEDATETIME,ATTACHDATE,PXUPDATEDATETIME,PXCREATEOPNAME,PXCREATEOPERATOR,PXCREATESYSTEMID,PXINSNAME,PXOBJCLASS,PXUPDATEOPNAME,PXUPDATEOPERATOR,PXUPDATESYSTEMID,PYLABEL,ATTACHEDBY,ATTACHNAME,NOTE,REFOBJECTKEY,ATTACHSTREAM) values(?,to_date(concat(substr(?,1,8),substr(?,10,6)),'YYYYMMDDHH24MISS'),to_date(concat(substr(?,1,8),substr(?,10,6)),'YYYYMMDDHH24MISS'),to_date(concat(substr(?,1,8),substr(?,10,6)),'YYYYMMDDHH24MISS'),?,?,?,?,?,?,?,?,?,?,?,?,?,EMPTY_BLOB())";
tools.findPage("tempWorkPage").putString ("query", query);
pstmt = conn.prepareStatement(query);
pstmt.setString(1, pKey); // Bind PZINSKEY
pstmt.setString(2, createDateTime); // Bind PZINSKEY
pstmt.setString(3, createDateTime);
pstmt.setString(4, attachDate);
pstmt.setString(5, attachDate);
pstmt.setString(6, updateDateTime);
pstmt.setString(7, updateDateTime);
pstmt.setString(8, createOpName);
pstmt.setString(9, createOperator);
pstmt.setString(10, createSystemID);
pstmt.setString(11, insName);
pstmt.setString(12, objClass);
pstmt.setString(13, updateOpName);
pstmt.setString(14, updateOperator);
pstmt.setString(15, updateSystemID);
pstmt.setString(16, label);
pstmt.setString(17, attachedBy);
pstmt.setString(18, attachName);
pstmt.setString(19, note);
pstmt.setString(20, refObjectKey);
pstmt.execute(); // Execute SQL statement
// Retrieve the row just inserted, and lock it for insertion of the LOB columns
stmt = conn.createStatement();
lobDetails = stmt.executeQuery("SELECT AttachStream FROM GSW06U.pc_data_workattach WHERE PZINSKEY = '" + pKey + "' FOR UPDATE");
tools.findPage("tempWorkPage").putString ("idvalue", pKey);
// Retrieve Blob streams for AttachStream column and load the sample XML
if( lobDetails.next()) {
//Get the CLOB from the resultset
tempBlob = (oracle.sql.BLOB)lobDetails.getBlob(1);
tools.findPage("tempWorkPage").putString ("pos1", "at pos1");
// Open the temporary CLOB in readwrite mode, to enable writing
tempBlob.open(oracle.sql.BLOB.MODE_READWRITE);
tools.findPage("tempWorkPage").putString ("pos2", "at pos2");
// Get the output stream to write
tempBlobOStream = tempBlob.getBinaryOutputStream();
tools.findPage("tempWorkPage").putString ("pos3", "at pos3");
// Write the data into the temporary CLOB from the byte array
tempBlobOStream.write(ba);
// Flush and close the stream
tempBlobOStream.flush();
conn.commit();
//Close everything
tempBlobOStream.close();
tempBlobOStream = null;
tempBlob.close();
tempBlob =null;
lobDetails.close();
lobDetails = null;
stmt.close();
stmt = null;
pstmt.close();
pstmt = null;
conn.close(); // Return to connection pool
conn = null; // Make sure we don't close it twice
catch(java.sql.SQLException sqlexp) {
tempBlob.freeTemporary();
sqlexp.printStackTrace();
tools.findPage("tempWorkPage").putString ("SQLException", sqlexp.toString());
catch(java.lang.Exception exp) {
tempBlob.freeTemporary();
tools.findPage("tempWorkPage").putString ("InnerException", exp.toString());
exp.printStackTrace();
finally
if (lobDetails != null) {
try { lobDetails.close(); } catch (java.sql.SQLException e) { System.out.println(" Error while Freeing Result sets" + e.toString()); }
lobDetails = null;
if (stmt != null) {
try { stmt.close(); } catch (java.sql.SQLException e) {System.out.println(" Error while Freeing java Statement" + e.toString()); }
stmt = null;
if (pstmt != null) {
try { pstmt.close(); } catch (java.sql.SQLException e) {System.out.println(" Error while Freeing java PrepareStatement" + e.toString()); }
pstmt = null;
try{
if (tempBlob != null) {
// If the BLOB is open, close it
if (tempBlob.isOpen()) {
tempBlob.close();
// Free the memory used by this BLOB
tempBlob.freeTemporary();
tempBlob = null;
catch (Exception ex) { // Trap errors
System.out.println(" Error while Freeing LOBs : " + ex.toString());
if (conn != null) {
try { conn.close(); } catch (java.sql.SQLException e) { System.out.println(" Error while Freeing Connection" + e.toString()); }
conn = null;
catch(java.lang.Exception e)
tools.findPage("tempWorkPage").putString ("LangException", e.toString());
e.printStackTrace();
}Hello,
I am getting the following errors when I am trying to
insert in a BLOB in the oracle 9i database:
java.sql.SQLException: ORA-00604: error occurred
at recursive SQL level 1 ORA-06502: PL/SQL: numeric
or value error ORA-06512: at line 205 ORA-22297:
warning: Open LOBs exist at transaction commit
time
You're doing exactly what the error says, that is committing with an open LOB. Look at the following piece of code: you write in the LOB, you flush it and then commit. There is no closing of the LOB stream before committing.
Try putting the tempBlobOStream.close() instruction before the commit.
// Write the data into the temporary CLOB from the
he byte array
tempBlobOStream.write(ba);
// Flush and close the stream
tempBlobOStream.flush();
nn.commit();
//Close everything
tempBlobOStream.close();
Maybe you are looking for
-
Wife opened an email and mac book pro is now frozen
Opened up an email and now the mac is completely looked up.
-
Hi. In transaction FB70 I need to save the document number in field bkpf-xblnr, I tried with BTE SAMPLE_PROCESS_00001120, but in this moment, the document number has not been generated yet. Any ideas ??? Thanks for your help.
-
Hi Experts, I want control on generation of PR , PO before project has been budgeted. For that I have created status profile and 2 status as BUGD and NBUD. I also link this status profile in OPSA. But still my PR and PO are generated without allocati
-
Can't change the color of a JButton when selected
I'm unable to change the color of a JButton with the following code: UIManager.put("Button.select", Color.cyan); SwingUtilities.updateComponentTreeUI(this); This works just fine with 1.2.2 but when I use 1.3.1 the JButton turns gray instead of cyan.
-
My iPad plug in to charge but later shows Not Charging
My iPad battery indicate "not charging". Anyone encounter such problem?