Problem with cursors in JDBC
Hi,
I'm new to JDBC.
I'm trying to insert data into an Oracle database.
I'm using the prepare statement and the update to commit the transaction.
But after inserting about a 100 rows into the database, it gives an exception that the max limit on cursors was reached.
Can anyone tell me how to work around this?
Vishal.
Note that it's a good idea to close objects such as
statements, resultsets and your connection in aCreating a new connection is an expensive action, so it is not a good idea to close the connection after each statement execution. You should use a connection pool which manages connections to the database. The connection pool is built when your application starts, and during the program execution you can access the connections available in the pool without creating and destroying new connections every time you need to perform a database command.
Similar Messages
-
Entire JDBC communication stopped if problem with one single JDBC interface
Hello,
Will the entire JDBC communication stopped if problem with one single JDBC interface?
Thanks,
Soorya.hi surya,
this will happend if u use maintain order at runtime at interface determination.
just uncheck this option if u dont neet EOIO.
if you are getting the problem if u r going for EO then the problem might be using same JDBC channel for all interfaces.
if each interface is expected with a high load then it better to go for dedicated channels for interfaces.
like INTERFACE A should use JDBC A channel and INTERFACE B should use JDBC B channel.
Thanks & Regards,
Rama krishna -
JDBC communication stopped if problem with one single JDBC interface
Hello,
Can you please explain this phrase
"JDBC communication stopped if problem with one single JDBC interface"
THanks,
SooryaIf you are having a problem with a JDBC interface (lets consider this to be a communication channel) then the communication is stopped (via that channel) (only in the case of EOIO).
Hope this clarifies.
Cheers,
Sarath
Award if helpful. -
Problems With CURSORS in PRO*C
Hi all,
I have a problem with cursors in proc
1. Can i declare a cursor and with in it another cursor in proc
like
EXEC SQL DECLARE emp_cursor CURSOR FOR
SELECT ........;
EXEC SQL OPEN emp_cursor;
for(;;)
EXEC SQL FETCH emp_cursor INTO :emp_structure;
EXEC SQL DECLARE dept_cursor FOR
SELECT ...............;
EXEC SQL OPEN dept_cursor;
for(;;)
EXEC SQL FETCH dept_cursor INTO :dept_structure;
EXEC SQL CLOSE dept_cursor;
EXEC SQL CLOSE emp_cursor;
2. im getting the following error after getting an result
ORA-01405: fetched column value is NULL
though i dont have any null columns.
please help me in this regard,
Thanks in Advance,
Trinath Somanchi,
Hyderabad.
nullUse Indicator variables and let me know if it solves your problem.
http://docs.jcu.edu.au/oracle/doc/server.804/a58233/dev.htm#2239 -
Problem with XML SQL JDBC adapter
Hello All.
I have quite strange problem with my PI.
Whole scenario is SOAP -> JDBC, asynchronous. Everything works fine on DEV server. After transporting objects (using CTS) to QA env I'm getting this error:
JDBC Message processing failed, due to Error processing request in sax parser:
No 'action' attribute found in XML document
(attribute "action" missing or wrong XML structure)
But document seems to be correct. I've compared it to DEV server documents - they are identical. What could be wrong??
Document looks like this:
<ns2:BIPMessage xmlns:ns2="http://mynamespace.com/xi/sn"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<synchSlLok>
<STATEMENTNAME>
<SYNCH_SL_LOK ACTION="INSERT">
<TABLE>SYNCH_SL_LOK</TABLE>
<ACCESS>
<ID_TRANS>22050</ID_TRANS>
<ID_LOK>1234</ID_LOK>
<ID_CBK>1000050911</ID_CBK>
<NR_LOK>1234</NR_LOK>
<OPIS_LOK>12312312312312</OPIS_LOK>
<TYP>D</TYP>
<OPERACJA>U</OPERACJA>
</ACCESS>
</SYNCH_SL_LOK>
</STATEMENTNAME>
</synchSlLok>
</ns2:BIPMessage>
TIA
Best Regads
MaciejHi,
i was also facing the same error few days back in a JDBC -RFC-JDBC Synchronous scenario. In that scenario, i was using 2 modules in JDBC sender module tab. It was working fine. later i change polling interval and then i started getting same error. it happened coz of sequence of Module got changed somehow.
So please check in Receiver JDBC adapter and SOAP sender adapter CC if anything is changed. If this scenario is working in DEV as it is then it should work after transport.
Else have a look here
Re: attribute "action" missing or wrong XML structure
JDBC - No 'action' attribute found in XML document - error
Regards
Aashish Sinha
Edited by: Aashish Sinha on Mar 15, 2011 10:42 AM -
Problem with Webservice - XI - JDBC scenario
Hi Experts,
When I have tried to test the Webservice -> XI -> JDBC scenario with the mention address, I am getting the below error.
<b>Address :</b> http://<Host>:50100/XISOAPAdapter/MessageServlet?channel=:WEB_SERVICE:SOAP_CC&version=3.0&Sender.Service=WEB_SERVICE&Interface=http%3A%2F%2Fatl.com%2Ftar%5EMI_Outbound
<b>Error:</b>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>RecoverableException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.af.ra.ms.api.DeliveryException: Application:EXCEPTION_DURING_EXECUTE:
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:919)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl3.process(ModuleLocalLocalObjectImpl3.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:258)
JDBC Part works fine only problem with the SOAP sender side. Any suggestion please..
Regards
Sara
Message was edited by:
Sara DHi,
As per Bhavesh & Krishna's suggestion, I have changed the JDBC Data type. Now I could able to see the SXMB_MONI error too.
Latest error:
When I have tried to test the scenario using xmlApy, I am getting the below error.
<b>RWB error:</b>
2007-06-21 03:04:24 Success Receiver JDBC adapter: processing started; QoS required: BestEffort
2007-06-21 03:04:24 Success JDBC adapter receiver channel DB_CC: processing started; party , service DB_SERVICE
2007-06-21 03:04:24 Error Unable to execute statement for table or stored procedure. 'Address' (Structure 'STATEMENT') due to java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found
<b>xmlSpy Error:</b>
<context>XIAdapter</context>
<code>RecoverableException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Address' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:919)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl3.process(ModuleLocalLocalObjectImpl3.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:258)
I have mapped the EmpId in the mapping as well as in the DB the EmpId is Primary Key. Could you please tell me,what I am missing here?
Regards
Sara
Message was edited by:
Sara D -
Continuing problem with cursor jumping and more!
I had made a post about cursor jumping and thought I had solved the problem but it's back again with a twist. The cursor still jumps eratically in just about any program and will then settle down for awhile. What is also happening is the flyout tools in adobe photoshop and illustrator don't work properly or at all. I have tried trashing the preferences for illustrator and photoshop, repaired permissions, repaired the disk with disk utility- it says everything is fine. Now...... when I sartup off of my backup hard drive, everything is fine- cursor and all. Are there any ideas as to how I can solve the problem with my internal hard disk? I was told that I may have to wipe the hard disk clean and start over again. Are there any areas you can send me to that will help me do that?
I have this problem even before running this set up updates (not sure what version) so I have a hunch it may not be related to those updates (but not sure)..
.it started whem mine was new a few months ago and I am using a T410s....however I am also running win 7 64bit....
I did re-ren the windows touchpad calibration and it seemed to get better (NOT CONCLUSIVE) as it is intermitant and just started again...it would happen often for spurts then stop (Few days happening often)...when I am in hotel rooms or places with steam it seemed to happen more (not sure if coincidence)...I did run the tablet input calibration in the control panel but not sure if it fixes it...I don't know if it is softare or hardware and it is very anoying and intermitant...exact same things....cursor jumps to right corner and tablet keyboard shows up in left corner even though no touch...and it closes some apps...as that is where the X is....if you find anything PLEASE let me know...thanks -
Problem with Cursors in Photoshop CS4
I am only seeing partial cursors (i.e. semi-circles or truncated brush tips) for cursors when I enlarge the cursor size. This is happening across all tools wherever I enlarge the brush tip. I tried resetting the preferences and updating the video drivers with no luck. I am running on Windows XP Professional on a Dell desktop using a Dell monitor that has an nVidia GEForce 8600 GTS video driver running version 6.14.11.5851. I had updated the driver to the latest version but the PC became unstable, causing a system dump and "blue screen of death", so I rolled back to this version. I also use a Wacom tablet with the setup. It had been working fine and I am not aware of any changes to the system that would have caused this. I have an open ticket with Adobe for about two weeks but so far the problem has not been resolved. Does anyone have any suggestions?
Have you updated Photoshop to vession 11.0.1?
Have you tried turning off OpenGL in preferences?
I don't see your card on this list either:
List of tested graphics display cards for Photoshop CS4
http://kb2.adobe.com/cps/405/kb405711.html -
Problems with cursor and shortcuts when using JNLP services on MAC OS X
After invoking the JNLP services on a MAC I loose the ability to set the cursor and invoke keyboard shortcuts. On Windows this is not a problem, so I believe it is a bug and I have reported it to Apple. Meanwhile, I would appreciate if someone could help me with finding a work-around. To identify the problem run the following code with Java Web Start (i.e., you need to add the program to a jar and launch it using a JNLP script). You also need to include the javax.jnlp package.
Observe that the cursor changes to cross-hairs when entering the circle. After invoking the Open file menu item, the cursor does not change any longer. Shortcut key do not work either, but if you open the menu and close it again without selecting any of the menu items, the shortcuts are OK again.
package bugreport;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import javax.swing.*;
import javax.jnlp.*;
public class Demo2 extends JPanel implements Runnable, MouseMotionListener {
private int centerX = 100;
private int centerY = 100;
private int radius = 50;
public static void main(String[] args) {
SwingUtilities.invokeLater(new Demo2());
public void run() {
int menuMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
final JFrame frame = new JFrame("Bug Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setPreferredSize(new Dimension(200, 200));
addMouseMotionListener(this);
JMenuBar menuBar = new JMenuBar();
frame.setJMenuBar(menuBar);
//File menu
JMenu fileMenu = new JMenu("File");
fileMenu.setMnemonic('F');
menuBar.add(fileMenu);
//openMenuItem
JMenuItem openMenuItem = new JMenuItem("Open...");
openMenuItem.setMnemonic('O');
openMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, menuMask));
openMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
openFile();
fileMenu.add(openMenuItem);
frame.add(this);
frame.pack();
frame.setResizable(false);
frame.setVisible(true);
@Override
public void paintComponent(Graphics g) {
g.clearRect(0, 0, getWidth(), getHeight());
g.setColor(Color.BLUE);
g.fillOval(centerX - radius, centerY - radius, 2 * radius, 2 * radius);
public void mouseDragged(MouseEvent e) {
public void mouseMoved(MouseEvent e) {
int dx = e.getX() - centerX;
int dy = e.getY() - centerY;
if (dx * dx + dy * dy < radius * radius) {
setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
} else {
setCursor(Cursor.getDefaultCursor());
private void openFile() {
FileOpenService fos = null;
try {
fos = (FileOpenService) ServiceManager.lookup("javax.jnlp.FileOpenService");
} catch (UnavailableServiceException ex) {
JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
if (fos != null) {
try {
FileContents fc = fos.openFileDialog(null, null);
} catch (IOException ex) {
JOptionPane.showMessageDialog(this, "Service unavailable", "Open", JOptionPane.ERROR_MESSAGE);
}Edited by: James_Vagabond on Oct 29, 2009 9:35 AMBarbara, Thanks very much taking the time to respond to my posting. Your input and directions were just what I needed.I accessed the print settings in the pull down menu, setup the print options including the color profile for Elements and the Printer to sRGB, and printed my picture. This resolved all the invalid color problems I was having, but I did notice that there was a hint of magenta overall in the picture. I had read an article that said to use Canon Color Matching instead of Color Sync to prevent that but I couldn't make that change in the pull down menu. I tried in the Presets dialog box but that didn't appear to be possible. Should I make that change as well?
Also, in my travels through Elements 13 I notice under Edit->Color Settings that there were options for No Color Mgmt, Optimize for Screen, for Printing, or ability to chose one or the other (real time I assume). How do those options fit into this scenario?
Thanks again -
I am writing a simple class to start learning about jdbc. I wrote the following WHICH COMPILES:
public MyClass {
System.out.println("establishing connection...");
OracleConnectionPoolDataSource ods = new OracleConnectionPoolDataSource();
// this is where all the variables are initialised.
ods.setDriverType ("oci8");
ods.setServerName ("test");
ods.setNetworkProtocol ("tcp");
ods.setDatabaseName ("tester");
ods.setPortNumber (1521);
ods.setUser ("test");
ods.setPassword ("password");
// this is the variable that will get the connection pool.
// from this connection pool, you will get all ur connections.
pool = new OracleConnectionCacheImpl(ods);
and i am calling it by:
System.out.println("connecting to DataBase");
dbc = new MyClass();
System.out.println("connected to DataBase");
THIS WORKS FINE when i do either a command line execution - run a query thru a normal main method.
HOWEVER, when i try and call it from a jsp page, i get the following error from tomcat:
org.apache.jasper.JasperException: oracle/jdbc/pool/OracleDataSource
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
furthermore, the first system.out.println("establishing connection"); is not printed. "Connecting to Database" is printed however. i am really confused.
however, i have an ancient copy of tomcat 3.2 that i used - just to test - and that worked fine. i have to get this to work with tomcat 4.1.
i am really in a jam - any insights, please help!!!
thankyou so much.Mahesh,
It is the problem of your DRIVER not being in the classpath of TOMCAT. Put the driver in the lib folder of tomcat or else include the folder which contains the driver to the tomcat classpath. It should work OK.
Good Luck.
Sekar -
Problem with clloudscape rmi jdbc driver
I am using Cloudscape rmi jdbc driver, where Cloudscape runs as
a separate server. I am using WL6.1 running on Red Hat Linux
7.1. I defined a Cloudscape connection pool and data source. I
have to start Cloudscape before WebLogic or I get the following
exception:
<Feb 18, 2002 11:39:42 PM EST> <Error> <JDBC> <Cannot startup
connection pool "EStoreConnectionPool"
weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: Connection refused to host: localhost;
nested exception is:
java.net.ConnectException: Connection refused
at RmiJdbc.RJDriver.connect(RJDriver.java:149)
at java.sql.DriverManager.getConnection
(DriverManager.java:512)
etc.
No surprises here: However if I start Cloudscape first and
WebLogic second, I get the following message in Weblogic:
Starting WebLogic Server ....
<Feb 19, 2002 12:58:21 AM EST> <Notice> <Management>
<Loading configuration file ./config/mydomain/config.xml ...>
<Feb 19, 2002 12:58:43 AM EST> <Notice> <WebLogicServer>
<Starting WebLogic Admin Server "myserver" for domain "mydomain">
<Feb 19, 2002 12:59:00 AM EST> <Notice> <Management>
<Starting discovery of Managed Server... This feature is on by
default, you may turn this off by passing
-Dweblogic.management.discover=false>
This copy of Cloudscape is licensed for DEVELOPMENT ONLY.
It is a violation of the license agreement to deploy this version
in a production application.
For information about licensing Cloudscape for application
deployment, contact [email protected] or call
888/595-2821 ext. 7664.
Additional licensing information can be found at
http://www.cloudscape.com/licensing.
<Feb 19, 2002 12:59:31 AM EST> <Notice> <Management>
<Application Poller started for development server.>
<Feb 19, 2002 12:59:31 AM EST> <Notice> <WebLogicServer>
<ListenThread listening on port 7001>
<Feb 19, 2002 12:59:31 AM EST> <Notice> <WebLogicServer>
<SSLListenThread listening on port 7002>
<Feb 19, 2002 12:59:32 AM EST> <Notice> <WebLogicServer>
<Started WebLogic Admin Server "myserver" for domain "mydomain"
running in Development Mode>
The console running cloudscape then contains this message:
This copy of Cloudscape is licensed for DEVELOPMENT ONLY.
It is a violation of the license agreement to deploy this version
in a production application.
For information about licensing Cloudscape for application
deployment, contact [email protected] or call
888/595-2821 ext. 7664.
Additional licensing information can be found at
http://www.cloudscape.com/licensing.
Tue Feb 19 00:56:43 EST 2002: [RmiJdbc]
COM.cloudscape.core.JDBCDriver registered in DriverManager
Tue Feb 19 00:56:44 EST 2002: [RmiJdbc] Binding RmiJdbcServer...
Tue Feb 19 00:56:44 EST 2002: [RmiJdbc] No installation of RMI
Security Manager...
Tue Feb 19 00:56:46 EST 2002: [RmiJdbc] RmiJdbcServer bound in
rmi registry
WARNING: Cloudscape (instance
c013800d-00ec-1cf6-94ca-007f00000100) is
attempting to boot the database
/app/cloudscape_3.6/database/acme/estore even
though cloudscape (instance c013800d-00ec-1cca-ed1d-007f00000100)
may still be active. Only one instance of cloudscape should boot
a database at a time. Severe and non-recoverable corruption can
result and may have already occurred.
Well, it looks like I'm damned if I do and damned if I don't.
Any suggestions?Actually, it happened because Cloudscape was not properly shut down. Thanks for
responding. I was having some troble with the stopCS script, but its OK now.
"Laurent Goldsztejn" <[email protected]> wrote:
>
Hi Douglass,
The evaluation version of Cloudscape is limited to one concurrent user
per session,
so only one instance of cloudscape can be running at a time. The problem
reported
here can occur if you try to run more than once instance of any product
that
uses Cloudscape -- including WLS or Cloudview. This evaluation version
of Cloudscape
is intended for test purposes only.
This error can also occur on Solaris if you stop the server using ctrl-C
or ctrl-D,
which causes a database lock to remain in place after the server has
stopped.
You can get rid of it by deleting $BEA_HOME/wlserver6.1/samples/eval/cloudscape/data/demo/db.lck
The safest way to stop the server is to use the Admin console or the
SHUTDOWN
command from the command line.
Laurent Goldsztejn
Developer Relations Engineer
BEA Support -
I can't open a cursor on the same table on which I'm doing some operation
(inserting, deleting, etc).Mutating table problem, see Tom Kyte's advise:
http://asktom.oracle.com/~tkyte/Mutate/index.html
Rgds. -
Problems with sun's jdbc:odbc bridge under Tomcat 4.0
I keep getting this error when I try to access through jdbc:odbc sun's drive:
java.sql.Exception: [Microsoft][Administrador de controladores ODBC] No se encuentra el nomb
re del origen de datos y no se especific� ning�n controlador predeterminado
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2488)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:3
17)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:160)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
Translating the local spanish message, should be something like: "Can't find data source and no default driver defined."
I don't get this error if i access through the same driver but not on web server Tomcat 4.0.1. And I don't get this error even under Tomcat with other jdbc drivers (mysql for example).
Someone knows what is happening here?
I would apreciate some help.
Thank you.If you're running on Windows, you need to create an ODBC datasource to connect to.
To accomplish this, you need to go to Start >>> Control Panel >> Administrative Tools >> Data Sources (ODBC),
2. On the User DSN tab, click add
3. give it a name, this is the name you will use in the connection string. jdbc:odbc:<name>
4.Click Select, then find your mdb file, or other database file.
5. click Ok. -
Problem with SOAP to JDBC scenario. Please help!
Hi Experts,
I have configured a simple SOAP to JDBC scenario where the input data from webservice call is sent to JDBC for inserting into MSSQL database.
The problem is that even though I have setup the QOS in SOAP channel as EO but still in SXMB_MONI I can see the message getting processed as Synchrous but getting interface mapping not found error. But the data is getting inserted in the database.
Why is this not getting processed asynchrously? Please advice me if I am missing anything?
Thanks
GopalHello Gopal,
Hope these lonks are useful to you:
SOAP to JDBC : EXCEPTION_DURING_EXECUTE
Re: need help on SOAP-JDBC-RFC Scenario
SOAP to JDBC/RFC - RFC/JDBC to SOAP XI Scenario
Thanks,
Satya Kumar -
Problems with "Secure Thin JDBC Connection Sample"
I've tried to run the example code, "Secure Thin JDBC Connection
Sample", but I get "java.sql.SQLException: Oracle Error: ORA-
12645" when connecting to my server. Does anyone know what is
wrong? Without the security properties in the client it works,
so it it something with the security.Hi Peter,
the page you post has a link to jar file at http://www.oracle.com/technology/sample_code/deploy/security/files/secure_thin_driver/secure_thin_driver.jar
this jar has many example source codes. Just unzip it... or unjar it typing jar xvf SecureThinDriver.jar
Maybe you are looking for
-
Test print works but can't print from programs
I have installed an Officejet 6500A. Install went as expected and drivers were loaded ok. I can print a test page and the maintenance utilites will print fine but it will not print from any of the Windows programs. I am connected via USB. Any ideas
-
HTTPS connection with client certificate not working in spartan
Spartan does not show certificate for the user to select when I click the https link. The certificates (taken from a smartcard) are indeed present in the user CertStore. It works with IE 11 and Chrome. Has somebody any suggestions ? Thanks.
-
Change planned order operations
Dear guru , i must develop an abap program that must change the operations of a planned order. I can insert or delete the operations of the planned order. Which best solution (BAPI,user exit ..) can you suggest ? Thanks
-
Do anyone know how to write a sql query to get the last 5 record. e.g. there are 10 records and record number are 11, 3, 6, 32, 55, 7, 21, 90 i want to get the record record number in 90, 55, 32, 21, 11 But i dont want to write 5 nested..... Can anyo
-
Difference between FD01 AND XD01 ?
HI, Difference between FD01 AND FD02 ?