Java.sql.BatchUpdateException
Hi all,
In my application I am using batch updation for inserting values into database. But I am getting the following exception.
java.sql.BatchUpdateException: Lock wait timeout exceeded; try restarting transaction
Please tell me why this exception is coming and how to solve this.
Thanks in advance
hareesh_84 wrote:
Hi all,
In my application I am using batch updation for inserting values into database. But I am getting the following exception.
java.sql.BatchUpdateException: Lock wait timeout exceeded; try restarting transaction
In the future JDBC related questions should be posted into the JDBC forum. Taking the time to ensure your question is posted into the right forum increases your chances of getting better answers more quickly.
Smells like some sort of transaction deadlock going on. Are you doing this all inside of a transaction? Do you have other transactions going on at the same time?
Similar Messages
-
Hi All,
I am using SOA 11g(11.1.1.3). I am trying to insert data in to a table coming from a file. I have encountered the fallowing error.
Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
*insert failed. Descriptor name: [UploadStgTbl.XXXXStgTbl].*
Caused by java.sql.BatchUpdateException: ORA-12899: value too large for column "XXXX"."XXXX_STG_TBL"."XXXXXX_XXXXX_TYPE" (actual: 20, maximum: 15)
*The invoked JCA adapter raised a resource exception.*
*Please examine the above error message carefully to determine a resolution.*
The data type of the column errored out is VARCHAR2(25). I found related issue in metalink, java.sql.BatchUpdateException (ORA-12899) Reported When DB Adapter Reads a Row From a Table it is Polling For Added Rows [ID 1113215.1].
But the solution seems not applicable in my case...
Can anyone encountered same issue?? Is this a bug? If it is a bug, do we have patch for this bug??
Please help me out...
Thank you all...
Edited by: 806364 on Dec 18, 2010 12:01 PMIt didn't work.
After I changed length of that column of the source datastore (from 15 to 16), ODI created temporary tables (C$ with I$) with larger columns (16 instead of 15) but I got the same error message.
I'm wondering why I have to extend length of source datastore in the source model if there are no values in the source table with a length greather than 15....
Any other idea? Thanks ! -
I am stcuk in error exception java.sql.BatchUpdateException
Dear,
I have write a program which reads data from a file and write in a database Postrgresql.But when i run my program it shows the error after some time running.It shows the exception which is
"java.sql.BatchUpdateException: Batch entry 122,098 INSERT INTO GEONAME VALUES (3294551)"
"at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2516)"
These are the exceptions can anyone please help me to remove this.
ThanksThat might be telling you about a specific error in the sequence of batch commands that you are processing.
Try retrieving the getUpdateCounts() from that exception and print the results. -
Hello,
I have a ten relational data modeler. When I export a reporting scheme I get the following error:
java.sql.BatchUpdateException: ORA-01722: invalid number
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10296)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:216)
at oracle.dbtools.crest.exports.reports.RSTables.export(RSTables.java:108)
at oracle.dbtools.crest.exports.reports.RSRelationalModel.export(RSRelationalModel.java:28)
at oracle.dbtools.crest.exports.reports.ReportsHandler.export(ReportsHandler.java:123)
at oracle.dbtools.crest.swingui.ControllerApplication$ExportToReportsSchema$1.run(ControllerApplication.java:2055)
Will I could help with the error?
Logical data modeler is exported correctly
Thanks.Hi,
I've logged a bug on this.
It seems likely that the problem has arisen because one of your tables has a non-integer value for one of its volumetric properties (Minimum, Expected or Maximum volume).
(If this is the case, then the problem will probably still occur with the DM 4.1 EA1 version.)
David -
Hi guys, I m facing a problem while executing below query .Query is working fine in toad i don't know what is the issue with the code
<code>
String url3 = "CREATE OR REPLACE VIEW Table2(PERIOD, YEARS, COST_CENTRE, S_DIR_PERM, S_DIR_CONT, S_INDIR_PERM, S_INDIR_CONT, O_DIR_PERM, O_DIR_CONT, O_INDIR_PERM, O_INDIR_CONT)AS select period, year, cost_center, sum(s_dir_perm), sum(s_dir_cont), sum(s_indir_perm), sum(s_indir_cont), sum(o_dir_perm), sum(o_dir_cont), sum(o_indir_perm), sum(o_indir_cont) from ( select b.period, b.year, a.cost_center, sum(a.perm_dir_hc) as s_dir_perm, sum(a.contract_dir_hc) as s_dir_cont, sum(a.perm_indir_hc) as s_indir_perm, sum(a.contract_indir_hc) as s_indir_cont, 0 as o_dir_perm, 0 as o_dir_cont, 0 as o_indir_perm, 0 as o_indir_cont from ZVHR_ACT_HC_ASOF_FISPRD a, pertable b where to_char(as_of_date, 'mm/dd/yyyy') = b.ENDPERIOD and shift not in ('G','N','O2','O7') and b.endperiod = ? group by b.period, b.year, a.cost_center union select b.period, b.year, a.cost_center, 0 as s_dir_perm, 0 as s_dir_cont, 0 as s_indir_perm, 0 as s_indir_cont, sum(a.perm_dir_hc) as o_dir_perm, sum(a.contract_dir_hc) as o_dir_cont, sum(a.perm_indir_hc) as o_indir_perm, sum(a.contract_indir_hc) as o_indir_cont from ZVHR_ACT_HC_ASOF_FISPRD a, pertable b where to_char(as_of_date, 'mm/dd/yyyy') = b.ENDPERIOD and shift in ('G','N','O2','O7') and b.endperiod = ? group by b.period, b.year, a.cost_center) group by period, year, cost_center";
PreparedStatement statement3 = connection.prepareStatement(url3);
statement3.setString(1, "12/10/2008");
statement3.setString(2, "12/10/2008");
statement3.addBatch();
statement3.executeBatch();
</code>
i m getting the following error
java.sql.BatchUpdateException: ORA-01027: bind variables not allowed for data definition operations
can any1 help me with this.Can you explain what you are trying to do from a business perspective?
If you are creating a view, it doesn't make sense to pass bind variables to that DDL statement. The view definition itself is going to have to end up with hard coded date values there. So what possible benefit is there to using bind variables?
As an aside, if you are using bind variables and you have DATE columns, you really want to pass in the proper data type (i.e. setDate or setTimestamp rather than setString). Otherwise, Oracle has to do implicit string to date conversion, which depends on the session's NLS settings, which is likely to be different on different client machines and lead to all sorts of odd errors and behaviors down the line.
Are you trying to build a view that takes parameters? If so, there are a few options for that sort of thing.
Justin -
Poblem with java.sql.Date while inserting to a table
Hi All,
I have a PostgreSQL database table which contains fields(columns ) of type date. I want to insert values to the table in the[b] �dd-MMM-YYYY� format using the prepared statement.
My code is as follows
java.text.DateFormat dateFormatter =new java.text.SimpleDateFormat("dd-MMM-yyyy");
String formatedDate=dateFormatter.format(theDate);
currentDate = new java.sql.Date(dateFormatter.parse(formatedDate).getTime())
�������������������
�������������������
�������������������
pst.setDate(12,currentDate);The problem is the currentDate variable gives date only in the �YYYY-MMM-dd� format but requirement is the currentDate variable should give date in the �dd-MMM-YYYY� format and this should be save to table as java.sql.Date type
There is any solution???? please help me...
Thanks and Regards,
Hyson_05Hi,
What are you talking about? A Date does always wrap a millisecond value, and doesn't have any formatting. It's the database, or your program which formats the date that you see.
In short. You should format the value when you print it, and not when you store it.
Kaj -
OpenSQLException - object of type java.sql.Date is not normalized
Hi,
I am attempting to code an SQL query in an EJB and get the following exception:
com.sap.sql.log.OpenSQLException: The object of type java.sql.Date with the value '2010-06-04 13:21:09.424' assigned to host variable 1 is not normalized. It must not contain time components in the time zone running the virtual machine. at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85) at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124) at com.sap.sql.jdbc.common.CommonPreparedStatement.setDate(CommonPreparedStatement.java:650) at......
Below is the code snippet I am using:
private static String selWQ = "Select * from ZZZZ_TABLE " +
"where DATEFROM >= ? " +
"and DATETO <= ? ";
public UsageRecord[] getRecords(Date fromDate,Date toDate)
UsageRecord[] ura = null;
String q = null;
ArrayList al = new ArrayList();
try
q = selWQ;
conn.open();
PreparedStatement p = conn.prepareStatement(q);
p.setDate(1, fromDate);
p.setDate(2,toDate);
ResultSet rs = p.executeQuery();
I have a PreparedStatement and am using setDate to set the values. The fromDate and toDate parameters are of type java.sql.Date
Can someone please tell me what I am doing wrong and how to fix it?
thanks
BrianAs requested, here is an example of what I used to resolve this:
PreparedStatement p = conn.prepareStatement(q);
SimpleDateFormat ddf = new SimpleDateFormat("yyyy-MM-dd");
String sFrom = ddf.format(new java.util.Date(fromDate));
String sTo = ddf.format(new java.util.Date(toDate));
p.setDate(1, java.sql.Date.valueOf(sFrom));
p.setDate(2, java.sql.Date.valueOf(sTo));
ResultSet rs = p.executeQuery();
fromDate and toDate are parameters of type long...
regards
Brian -
What is the diffrence between package javax.sql and java.sql
Is javax designed for J2EE?
And when to use package javax?Hi,
What is the diffrence between package javax.sql and java.sql?The JDBC 2.0 & above API is comprised of two packages:
1.The java.sql package and
2.The javax.sql package.
java.sql provides features mostly related to client
side database functionalities where as the javax.sql
package, which adds server-side capabilities.
You automatically get both packages when you download the JavaTM 2 Platform, Standard Edition, Version 1.4 (J2SETM) or the JavaTM 2, Platform Enterprise Edition, Version 1.3 (J2EETM).
For further information on this please visit our website at http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
Hope this helps.
Good Luck.
Gayam.Srinivasa Reddy
Developer Technical Support
Sun Micro Systems
http://www.sun.com/developers/support/ -
Java.sql.SQLException: ORA-06502: PL/SQL in EBS R12
Hi everyone,
May you please help me diagnose the problem.
Oracle EBS 12.0.0.6, DB(10.2.0.3) on one machine and App(forms, concurrent manager, etc) on other machine, both AIX 5.3.
I have following failed concurrent request:
*====================================================*
Payables: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
APPPBR module: AP Prepayment Balance Report
Current system time is 12-MAY-2010 15:33:36
XDO Data Engine Version No: 5.6.3
Resp: 50661
Org ID : 81
Request ID: 449826
All Parameters: ORG_ID_PARAM=81:COA_ID_PARAM=50328:FROM_DATE_PARAM="2010/05/12 00:00:00":TO_DATE_PARAM=:PERIOD_FROM_PARAM=JUL-09:PERIOD_TO_PARAM=MAY-
10:CURR_CODE_PARAM=:ACCOUNT_FROM_PARAM=:ACCOUNT_TO_PARAM=:SUPPLIER_FROM_PARAM=Adel Bin Abdullah Bin Taha Al
Hadad:SUPPLIER_TO_PARAM=:PAID_ONLY_PARAM=:POSTED_ONLY_PARAM=:DUMMY_PARAM=2
Data Template Code: APPPBR
Data Template Application Short Name: SQLAP
Debug Flag: N
{ORG_ID_PARAM=81, PERIOD_FROM_PARAM=JUL-09, CURR_CODE_PARAM=, DUMMY_PARAM=2, PAID_ONLY_PARAM=, PERIOD_TO_PARAM=MAY-10, POSTED_ONLY_PARAM=,
ACCOUNT_FROM_PARAM=, SUPPLIER_FROM_PARAM=Adel Bin Abdullah Bin Taha Al Hadad, SUPPLIER_TO_PARAM=, TO_DATE_PARAM=, ACCOUNT_TO_PARAM=,
FROM_DATE_PARAM=2010/05/12 00:00:00, COA_ID_PARAM=50328}
Calling XDO Data Engine...
[051210_033341921][][STATEMENT] Start process Data
[051210_033341922][][STATEMENT] Process Data ...
[051210_033341924][][STATEMENT] Executing data triggers...
[051210_033341924][][STATEMENT] BEGIN
AP_BAL_PKG.ORG_ID_PARAM := :ORG_ID_PARAM ;
AP_BAL_PKG.COA_ID_PARAM := :COA_ID_PARAM ;
AP_BAL_PKG.FROM_DATE_PARAM := :FROM_DATE_PARAM ;
AP_BAL_PKG.TO_DATE_PARAM := :TO_DATE_PARAM ;
AP_BAL_PKG.PERIOD_FROM_PARAM := :PERIOD_FROM_PARAM ;
AP_BAL_PKG.PERIOD_TO_PARAM := :PERIOD_TO_PARAM ;
AP_BAL_PKG.CURR_CODE_PARAM := :CURR_CODE_PARAM ;
AP_BAL_PKG.ACCOUNT_FROM_PARAM := :ACCOUNT_FROM_PARAM ;
AP_BAL_PKG.ACCOUNT_TO_PARAM := :ACCOUNT_TO_PARAM ;
AP_BAL_PKG.SUPPLIER_FROM_PARAM := :SUPPLIER_FROM_PARAM ;
AP_BAL_PKG.SUPPLIER_TO_PARAM := :SUPPLIER_TO_PARAM ;
AP_BAL_PKG.PAID_ONLY_PARAM := :PAID_ONLY_PARAM ;
AP_BAL_PKG.POSTED_ONLY_PARAM := :POSTED_ONLY_PARAM ;
AP_BAL_PKG.DUMMY_PARAM := :DUMMY_PARAM ;
:XDO_OUT_PARAMETER := 1;
END;
[051210_033341927][][STATEMENT] 1:81 :
[051210_033341928][][STATEMENT] 2:50328 :
[051210_033341928][][STATEMENT] 3:2010/05/12 00:00:00 :
[051210_033341928][][STATEMENT] 4: :
[051210_033341928][][STATEMENT] 5:JUL-09 :
[051210_033341928][][STATEMENT] 6:MAY-10 :
[051210_033341928][][STATEMENT] 7: :
[051210_033341928][][STATEMENT] 8: :
[051210_033341928][][STATEMENT] 9: :
[051210_033341928][][STATEMENT] 10:Adel Bin Abdullah Bin Taha Al Hadad :
[051210_033341928][][STATEMENT] 11: :
[051210_033341928][][STATEMENT] 12: :
[051210_033341929][][STATEMENT] 13: :
[051210_033341929][][STATEMENT] 14:2 :
[051210_033341940][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 11
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:965)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3445)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4395)
at oracle.apps.xdo.dataengine.XMLPGEN.executeTriggers(XMLPGEN.java:650)
at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:262)
at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
------------- 1) PUBLISH -------------
Beginning post-processing of request 449826 on node EBSCL1 at 12-MAY-2010 15:33:42.
Post-processing of request 449826 failed at 12-MAY-2010 15:33:42 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
Finished executing request completion options.
Concurrent request completed
Current system time is 12-MAY-2010 15:33:42
*====================================================*
When I look at OPP Log, following is the info:
*====================================================*
[5/12/10 3:33:42 PM] [OPPServiceThread0] Post-processing request 449826.
[5/12/10 3:33:42 PM] [28164:RT449826] Executing post-processing actions for request 449826.
[5/12/10 3:33:42 PM] [28164:RT449826] Starting XML Publisher post-processing action.
[5/12/10 3:33:42 PM] [28164:RT449826]
Template code: APPPBR
Template app: SQLAP
Language: en
Territory: US
Output type: RTF
[5/12/10 3:33:42 PM] [UNEXPECTED] [28164:RT449826] java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:517)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:224)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:177)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:259)
at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:172)
Caused by: oracle.xdo.parser.v2.XMLParseException: Start of root element expected.
at oracle.xdo.parser.v2.XMLError.flushErrors1(XMLError.java:337)
at oracle.xdo.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:343)
at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:285)
at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:289)
... 17 more
[5/12/10 3:33:42 PM] [28164:RT449826] Completed post-processing actions for request 449826.
*====================================================*
Br,
AnjumHi,
It seems like a bug as per metalink note:
APPPBR : AP Prepayment Balance Report Error Out java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 11 [ID 827325.1]
Anyway, if you have any relevant information, please share.
Br,
Anjum -
Hi all,
In the middle of the last week for my final year project and having to convert to an Oracle database due to compatibility problems with university Tomcat Server and MS Access. I'm having trouble connecting to the Oracle database and would appreciate some help please.
Running on Windows 98 in the lab here, and the Oracle 9i, release 9.2.0.2.0, J2SDK1.4.0, Classes12.zip installed OK.
Code for connection looks like this inside the constructor of my class:
Class.forName("oracle.jdbc.driver.OracleDriver");
cardSaleConnexion = DriverManager.getConnection("jdbc:oracle:[email protected]:1521:sid","user_name","pwdt");
System.out.println("Connection Successful ");
And I'm getting the following error when calling the constructor in a driver program:
java.sql.SQLException: Invalid Oracle URL specified
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:188)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at CardSale.<init>(CardSale.java:30)
at Driver.main(Driver.java:11)
Exception in thread "main"
Please reply on a very urgent basis.
Kind regards,
PeterTry ojdbc14.jar as the JDBC driver instead of classes12.zip.
Refer:
http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
http://docs.sun.com/source/817-5603-10/index.html
Database Driver
This section describes the known database driver issues and associated solutions.
ID Summary
4700531 On Solaris, an ORACLE JDBC driver error occurs.
This new Java Database Connectivity (JDBC) driver is for Oracle (R) working with JDK1.4. The problem is caused by a combination of the Oracle 9.1 database and ojdbc14.jar. Applying the patch will fix the problem on Solaris 32-bit machine, running an Oracle 9.0.1.3 database.
Solution
Obtain and apply the patch to your server from the Oracle Web site for Bug 2199718. Perform the following steps:
1.��Go to the Oracle web site.
2.��Click the 'patches' button.
3.��Type 2199718 in the patch number field.
4.��Click the 32-bit Solaris OS patch.Go to Metalink.oracle.com.
5.��Click patches.
6.��Under patch number, enter 2199718.
7.��Click the 32 bit Solaris OS patch.
4707531 On Solaris, accessing an Oracle 9.1 database with an Oracle 9.2 Client may cause data corruption.
If you use an Oracle (R) 9.2 client to access an Oracle 9.1 database, data corruption might occur when a number column follows a timestamp column.
The problem might be caused by using the ojdbc14.jar file with an Oracle 9.1 database. Applying the patch might assist in addressing the situation on Solaris 32-bit machines, running an Oracle 9.1 database. This JDBC driver is for Oracle working with JDK1.4.
Solution
Obtain the patch that Oracle might make available from the Oracle web site for Bug 2199718 and apply it to your server.
Regards,
Pankaj D. -
Java.sql.SQLException: General error
Hi i got this error message:
java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
at PersonFrame.actionPerformed(PersonFrame.java:1155)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
n Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
my code is:
while (rs.next())
String recnumber = rs.getString("Person_ Record_ Number");
int reccc=Integer.parseInt(recnumber);
if (Integer.parseInt(FamilyTree.rowselected)==reccc && AddPersonn!=0)
System.out.println ("record in table "+reccc);
System.out.println ("record selected "+FamilyTree.rowselected);
str.executeUpdate("INSERT INTO Person " +
"VALUES ('"+nameofperson.getText()+"','"+SurnameOfPersonTxt.getText()+"','"+Bday+"','EMPTY','"+DateOfDeathTogether+"','EMPTY','EMPTY','"+phone+"','"+genre+"','"+Country+"','"+FamilyTree.rowselected+"','"+Nicknametxt.getText()+"','"+Filename+"','"+BioFile+"','"+city+"','"+postal+"','EMPTY','empty','"+TimeOfBirth+"','EMPTY')");
setVisible(false);
System.out.println(Filename);
LINE 1155 that the error message says is line :str.executeUpdate("INSERT INTO Person " +
<<<PersonFrame.actionPerformed(PersonFrame.java:1155)>>>>>
also note that i didn't include a try statement here (int reccc=Integer.parseInt(recnumber) because recnumber since is created holds the value 5000 so there is no need
Also the output.. of
System.out.println("INSERT INTO Person " + "VALUES ('"+nameofperson.getText()+"','"+SurnameOfPersonTxt.getText()+"','"+Bday+"','EMPTY','"+DateOfDeathTogether+"','"+PlaceOfDeath+"','"+address+"','"+phone+"','"+genre+"','"+Country+"','"+FamilyTree.rowselected+"','"+Nicknametxt.getText()+"','"+Filename+"','"+BioFile+"','"+city+"','"+postal+"','"+Causeofdeath+"','"+PlaceBurried+"','"+TimeOfBirth+"','EMPTY')");
is:
INSERT INTO Person VALUES ('fgfgff','dfdgfd','2/1/1988','EMPTY','Person Is Alive','null','EMPTY','EMPTY','Male','EMPTY','0560','dasfds','EMPTY','EMPTY','EMPTY','EMPTY','null','null','EMPTY','EMPTY')
and my table gets only text values...
Any Help Will Be Greately Appreciated
Thanks
Nick .sYou cannot do two thing at the same time with the same statement (while your ResultSet is open you are making an insert), try using a separate Statement that the one you used for the query for the insert. If that doesn't work, make a new connection, that will do it.
If you were using a separate statement then I'm sorry, I couldn't tell from your code. I'd had a similar problem and that's the way I solved it. -
Problem with java.sql.Clob and oracle.sql.CLOB
Hi,
I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below
java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);
lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));
lResourceStatus = true;
can anybody please tell me the what is the problem with this and solution.
thanks,
Ashok.Hi Ashok
You can get a "ClassCastException" when the JVM doesn't have access to the specific class (in your case, "oracle.sql.CLOB").
Just check your classpath and see if you are referring to the correct jar files.
cheers
Sameer
PS: Please award points if you find the answer useful -
AR Open Balances ~java.sql.SQLException: No corresponding LOB data found
Dear all,
Please gudie me to solve this error..
OPP.log file
[10/24/12 12:16:18 PM] [UNEXPECTED] [82244:RT2787964] java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA,DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ))
at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:403)
at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:236)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:1164)
Regards
Dharmawhat you can't understand?
OPP.log tell you what no lob for template (layout as rtf, pdf) in tables XDO_LOBS and XDO_TEMPLATES_B
so you have the query for checking
>
Please gudie me to solve this error..
>
for AR Open Balances get appl_short_name
find template by query from opp.log or by xml publisher resp
check existing of template file -
Error...java.sql.SQLException:Access denied for user
Hi,
I am getting the following error message while connecting with the MySQL .(O/S :Sun OS 5.6)
Error.....java.sql.SQLException: Invalid authorization specification: Access denied for user: 'some_user&password@localhost' (Using password: NO)
Note that i have given all permission to the user using,
GRANT ALL PRIVILEGES .......................
The code i have used to connect with the database is,
import java.io.*;
import java.sql.*;
class test
public static void main(String a[])
try
Connection con;
Statement stmt;
ResultSet rs;
Class.forName("org.gjt.mm.mysql.Driver");
con=DriverManager.getConnection(jdbc:mysql://localhost/db_name?user=some_user&password=some_pass");
stmt=con.createStatement();
//do something with resultset
catch(Exception e)
System.out.println("Exception in second try.."+e);
plese guide me on this problem to solve.
Thankz,
Bala.Hi friends...
I've read the last post...
The problem that I have is as follow....
1. I have installed on my machine MySQL 5.0 Server running
1.1 I have a database called "base1"
1.2 User "root", password "works"
1.3 I have the following sentence to connect it using JDBC
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/base1", "root", "works");
More notes:
- I use the JDBC 5.0
- My Machine is a Windows XP SP2 Pentium 3.0 512Mb
and it connects����
but I have this environment to develop applications, now that I want to connect to Production Environment happens the following:
2 The Production database is mounted on a Linux Server with MySQL 3.2.
2.1 I change the sentences as follow:
Connection con = DriverManager.getConnection("jdbc:mysql://192.168.0.7/base1", "user", "password");
2.3 But a message appears when I run the Java Program:
java.sql.SQLException:Access denied for user: '[email protected]' (Using password: YES)
2.4 As you can see it changes the IP Address...
More notes:- I have the MySQL Query Browser and I got connection.
- The IP that display the Error Message is my Second IP configurated on my Network Properties.
- Server is a Pentium 4 3.0 GHz 2Gb Linux Red Hat 3.0
I leave this case for the spider... I hope that somebady has the solution.
What is the problem? Why the JDBC doesn't respect the IP that I wrote. -
Java.sql.SQLException: Error while trying to retrieve text for error ORA-24
Hi All,
Am having serious problem with ORA-24327 and the behavior is very very unpredictable. I have couple of environment where the same error comes in different context. The recent one was surprising. I have describe bellow the environment configuration and the stack trace. The error which surprised me was when I use type � 3 driver while starting weblogic I get ORA �24327 but when I use Type �4 it starts properly. If you could kindly provide solution it would be great help. I would also appreciate if u can provide information which driver to use where performance is the major concern. I would also appreciate if u could provide feed-back from the industry about booth the driver. Apart from that I have couple have environment where it occurs when 10/12 user access simultaneously. All the open connection is closed in program properly still am getting the error.
Thanks in anticipation.
Cheers,
Tapas
Environment
OS - SunOS 5.8 Generic_108528-07 sun4u sparc SUNW,Ultra-Enterprise
JDK - Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)
Weblogic - 5.1.0 Service Pack 9 04/05/2001 14:59:53 #105983
Oracle � 8.1.6
Delaying 10 seconds before making a beuatpool pool connection.
Pool 1 (Type �3 )
weblogic.jdbc.connectionPool.beuatpool=\
url=jdbc:weblogic:oracle,\
driver=weblogic.jdbc.oci.Driver,\
loginDelaySecs=10,\
initialCapacity=10,\
maxCapacity=20,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=10,\
refreshMinutes=10,\
testTable=dual,\
props=user=xxx;password=xxx;server=xxxx
Pool 2(Type �4)
weblogic.jdbc.connectionPool.thinPool=\
url=jdbc:oracle:thin:@xxx:1521:xxx,\
driver=oracle.jdbc.driver.OracleDriver,\
loginDelaySecs=1,\
initialCapacity=1,\
maxCapacity=10,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=15,\
testTable=dual,\
props=user=xxx;password=xxx;server=xxx:1521:xxx
allow=everyone
---------- LOGIN ERROR CODE: 24327
java.sql.SQLException: Error while trying to retrieve text for error ORA-24327 �
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(SQLException.java:43)
at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:149)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:109)
at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
e)
at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:330)
at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
:62)
---------- LOGIN ERROR CODE: 24327
---------- LOGIN ERROR CODE: 24327
Fri Aug 31 00:57:22 GMT-05:00 2001:<I> <JDBC Pool> Sleeping in createResource()
Fri Aug 31 00:57:23 GMT-05:00 2001:<E> <JDBC Pool> Failed to create connection p
ool "beuatpool"
weblogic.common.ResourceException: weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: Error while trying to retrieve text for error ORA-24327 -
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(SQLException.java:43)
at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:172)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:109)
at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
e)
at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:330)
at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
:62)
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at weblogic.common.ResourceException.<init>(ResourceException.java:18)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:182)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:109)
at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
e)
at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:330)
at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
:62)
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at weblogic.common.ResourceException.<init>(ResourceException.java:18)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:125)
at weblogic.common.internal.ResourceAllocator.makeResources(Compiled Cod
e)
at weblogic.common.internal.ResourceAllocator.<init>(Compiled Code)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:330)
at weblogic.jdbc.common.internal.JdbcInfo.initPools(Compiled Code)
at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:200)
at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
:62)Hi,
I guess you can try some of these:
- Make sure you're not missing an entry inside your tnsnames.ora file. Thin driver does not require the information inside that file, as opposed to Weblogic's OCI driver. If you are able to connect to the DB using a thin driver, then the problem is most probably (WL)driver-related.
- Make sure you've properly configured the DB user / password inside your weblogic.properties (config.xml if WL6+).
- Make sure you're able to access all drivers and classes required (PATH, CLASSPATH, etc...)
- Make sure the OCI driver version you are using is fully compatible with the Oracle (server) version you are pointing to.
- Try to access the DB user through some other client (for instance, SQLPlus*).
Hope this is of some help,
Freddy.
Maybe you are looking for
-
MY ITOUCH IS NO LONGER SYNCING WITH MY ITUNES
MY ITOUCH IS NO LONGER SYNCING WITH MY ITUNES
-
BP Employee from CRM to R/3
Hi Experts, I'm faced with trying to send BP's (Employee) that are automatically created in CRM 5.0 (from HR data) to our other R/3 systems and to SolMan. I have conifgured the ALE properly as far as I can tell. I am able to send BPs to R/3, and vi
-
HI i restored a sharepoint web 80 application in our test domain and after when i browse the new web application it says Cannot make a cache safe URL for "1025/styles/Themable/corev4.css", file not found. Please verify that the file exists under th
-
Dear friends, is there any tool for migrating Forms and Reports made in 6i to Oracle 9i Portal?? Any help would be appreciated. Thanks a lot in advance Warm Regards Vivek Bajaj
-
A movie i rented on itunes wont download now what do i do?
a movie i rented from itunes wont download now what do i do?