Home » Developer & Programmer » JDeveloper, Java & XML » PL SQL Error
PL SQL Error [message #131216] Thu, 04 August 2005 20:03 Go to next message
shon2005
Messages: 2
Registered: August 2005
Location: ca
Junior Member
Hi All, I am newbie to PL-SQL and I am trying to execute the procedure and iam getting the following error..

17:23:24,379 INFO [STDOUT] java.sql.SQLException: ORA-06550: line 1, column 269
0:
PLS-00103: Encountered the symbol "DECLARE"
17:23:24,379 INFO [STDOUT] at oracle.jdbc.dbaccess.DBError.throwSqlExceptio
n(DBError.java:134)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.j
ava:289)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573
)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Pro
tocol.java:1891)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFet
ch(TTC7Protocol.java:1093)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.executeNon
Query(OracleStatement.java:2047)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.doExecuteO
ther(OracleStatement.java:1940)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.doExecuteW
ithTimeout(OracleStatement.java:2709)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.execute(Or
acleStatement.java:854)
17:23:24,379 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrappedStatem
ent.execute(WrappedStatement.java:66)
17:23:24,379 INFO [STDOUT] at com.exelixis.plateloader.dao.UploadPlateLoade
r.postToDB(UploadPlateLoader.java:199)
17:23:24,379 INFO [STDOUT] at com.exelixis.plateloader.dao.UploadPlateLoade
r.run(UploadPlateLoader.java:81)
17:23:24,379 INFO [STDOUT] Message from PostToDB method>>>>>DB_ERROR
Re: PL SQL Error [message #131220 is a reply to message #131216] Thu, 04 August 2005 21:53 Go to previous messageGo to next message
easywebtech123
Messages: 22
Registered: March 2005
Location: c
Junior Member
Pls. post the procedure that you try to execute.
You might put "DECLARE" in a wrong place.




http://www.easywebtech.com
http://www.certified-easy.com
http://www.err-codes.com
Re: PL SQL Error [message #131345 is a reply to message #131216] Fri, 05 August 2005 07:57 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Did you think that maybe posting what you ran wouild be helpful? No, of course not.
Re: PL SQL Error [message #131374 is a reply to message #131216] Fri, 05 August 2005 11:31 Go to previous messageGo to next message
shon2005
Messages: 2
Registered: August 2005
Location: ca
Junior Member
Here is the procedure, I am doing this using Java Program and iam appending to the String buffer.

plProcedure.append("declare ");
                        plProcedure.append("bresult BOOLEAN; ");
                        plProcedure.append("well DBMS_SQL.VARCHAR2_TABLE; ");
                        plProcedure.append("cmpd DBMS_SQL.VARCHAR2_TABLE; ");
                        plProcedure.append("batch DBMS_SQL.VARCHAR2_TABLE; ");
                        plProcedure.append("conc DBMS_SQL.NUMBER_TABLE; ");
                        plProcedure.append("qty DBMS_SQL.NUMBER_TABLE; ");
                        plProcedure.append("begin ");
             for (int r = 0; r < exelData.size(); r++) {
                            plProcedure.append("cmpd(" + r + ") := '" +
                                               exelData.get(r) +
                                               "'; ");
                        }
             for (int k = 0; k < batchNoList.size(); k++) {
                            plProcedure.append("batch(" + k + ") := '" +
                                               batchNoList.get(k) +
                                               "'; ");
                        }
             for (int p = 0; p < wellList.size(); p++) {
                            plProcedure.append("well(" + p + ") := '" +
                                               wellList.get(p) +
                                               "'; ");
                        }
                                                plProcedure.append(
                                "bresult := PACK_AB_IMPORT.INSERT_PLATE('");
                        plProcedure.append(barcodePasteData.get(i));
                        plProcedure.append("', '" + "NULL" + "', ");
                        plProcedure.append("'" + "NULL" + "', '");
                        plProcedure.append(plateFormatID);
                        plProcedure.append("','" + plateGroup + "', '");
                        plProcedure.append(assay +
                                           "', TO_DATE(' " +
                                           date + "','YYYY-MM-DD'), NULL, " +
                                           0 + ", ");
                        plProcedure.append("0, 0, '" + 0 +
                                           "', 0, 0, 0, NULL, ");
                        plProcedure.append("'" + "NULL" + "', '");
                        plProcedure.append("NULL" + "', '");
                        plProcedure.append("NULL" + "', NULL, ");
                        plProcedure.append("'" + resGroup + "', cmpd, ");
                        plProcedure.append("batch, well, qty, conc, '" +
                                           userName +
                                           "', TRUE, FALSE , NULL); end;");
                        System.out.println("PL PROCEDURE >>>>>>>." +
                                           plProcedure.toString());
                        System.err.println(plProcedure.toString());
                        stmtUploadPlate.execute(plProcedure.toString());

Re: PL SQL Error [message #131712 is a reply to message #131216] Tue, 09 August 2005 02:02 Go to previous message
mchadder
Messages: 224
Registered: May 2005
Location: UK
Senior Member
Hello.

It'd be really helpful if you could post the output of the
System.out.printline at the end.

One thing I would recommend, well I'd insist on it if it was up to me, is that you utilise bind variables (see
here
for a discussion on this), rather than just plugging all those values into that PL/SQL block.

Rgds.
Previous Topic: Cannot Create Java Source file inside Database
Next Topic: Oracle XMLparser- access Non-oracle generated xml files
Goto Forum:
  


Current Time: Wed Apr 24 21:30:10 CDT 2024