JDBC :: New OJDBC 7 12.0.1.2 Maximum Cursor Limit Exceeded
Mar 5, 2015
We are running a set of unit tests using the latest ojdbc 7 driver and the highest open cursor keeps going up, until it hits our 300 limit, then throws the cursor limit exception. If we run these tests using ojdbc 12.0.1.1, the highest open cursor stays at 17 and doesn't cause this exception.
The query used to monitor these cursors is below:
SELECT max(a.value) as highest_open_cur, p.value as max_open_cur FROM v$sesstat a, v$statname b, v$parameter p WHERE a.statistic# = b.statistic# and b.name = 'opened cursors current' and p.name= 'open_cursors' group by p.value
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Java 8 version 31
View Replies
ADVERTISEMENT
Nov 25, 2014
So lets say I got maximum of 20 deposit, I want to create a method/function (idk what proper name for it is) so that you cannot deposit more than 20 nor withdraw more than you have in your account, so this function checks your account, if your total is for example 18 and you're trying to deposit 10, it rejects it and doesn't add to your total and pops up with a message, vice versa for withdraw.
This is what I have so far
Not I already have the maximum limit + total feature created just not displayed here
public void depositMoney (int dMoney) {
if(DMoney > 0 ) {
totalMoney = totalMoney + dMoney;
}
else {
System.out.println("Please insert money more than 0");
[Code] .....
View Replies
View Related
Nov 25, 2014
So lets say I got maximum of 20 deposit, I want to create a method/function (idk what proper name for it is) so that you cannot deposit more than 20 nor withdraw more than you have in your account, so this function checks your account, if your total is for example 18 and you're trying to deposit 10, it rejects it and doesn't add to your total and pops up with a message, vice versa for withdraw.
This is what I have so far . Not I already have the maximum limit + total feature created just not displayed here
Java Code:
public void depositMoney (int dMoney) {
if(DMoney > 0 ) {
totalMoney = totalMoney + dMoney;
} else {
System.out.println("Please insert money more than 0");
[Code] ....
View Replies
View Related
May 21, 2015
I am working on a Java program that calls a stored procedure in an Oracle 11.2g database and retrieves a set of records via a ref cursor. The program follows the standard Connection/CallableStatement/ResultSet pattern. A ResultSet object is used to access and iterate through the returned cursor, processing each record in turn.
One of the database fields returned in the cursor is a CLOB, which I'm retrieving using the NClob class's getNClob() method. Two other methods - length() and getSubString() are then used to get the length of the CLOB and copy of it off to a String object respectively.
The problem is that these latter two method calls are relatively slow, taking around 80ms to complete for modestly sized CLOBs of, say, around 10KB in size.
Is this the most efficient way to access a CLOB and retrieve its contents? If so, is there anything I can do, to make it run faster?
View Replies
View Related
Feb 29, 2012
I am using a static initialization block to register the driver and a static synchronized method to get a connection. The problem is I need to run 15 threads but always only two threads get the connection. I want to know if there is a default maximum number of concurrent connections a DriverManager can provide or is it my threading logic that may be faulty.
CODE:
static {
try {
Class jdbcDriverClass = Class.forName( JDBC_DRIVER );
driver = (Driver) jdbcDriverClass.newInstance();
DriverManager.registerDriver( driver );
[Code] ....
View Replies
View Related
May 17, 2014
calling a parameterized stored procedure in java jdbc from sql server.The stored procedure goes like this in sql
create proc patientreg
@id int
as
begin
select [patient_id],[Psurname], [pFirstname], [pMiddlename], [reg_date], [DOB], [Sex], [Phone_num], [Addr],[Email],[dbo].[fncomputeage](DOB) from [dbo].[Patient_registration] where [patient_id] = @id
end
please note dbo.fncompute(DOB) is a function
To call it in jdbc it goes like this
try{
String str = "{call patientreg(?)}";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbcdbc:GeneralHospit al");
cstmt = con.prepareCall(str);
cstmt.setInt(1, Integer.parseInt(t.getText()));
[code]....
after doing it this way it throwing an exception: Error:java.sql.SQLException: Parameter 1 is not an OUTPUT parameter.
View Replies
View Related
Jan 17, 2014
I'm programming in school using Netbeans and we've just started with graphical programming (i.e JPanel, JClass, JFrame). This is my first assignment and the purpose of this program is that when you press the mouse you will fill 4 circles with diffrent colors. I've managed to draw 4 circles with diffrent colors but I want my cursor to change color simultaneously. Here's my code so far ....
//Java klass "Klick"
public class Klick {
//Medlemsvariabler.
private int x = 0;
private int y = 0;
private int r = 1;
public int antal = Rityta.antalKlick;
[Code]...
View Replies
View Related
Oct 17, 2014
I want to know is there a limit for length of get url request? if if what is the max length.
View Replies
View Related
Oct 26, 2014
When I enter the wrong password, it says I have successfully logged in.
import javax.swing.JOptionPane;
public class P2H
{
public static void main (String[] args) {
System.out.println("LOGIN");
String usernameStr=JOptionPane.showInputDialog("Enter Username");
[Code] ....
Also I have to limit password attempts to 3. How would I go about that?
View Replies
View Related
Nov 4, 2014
I am developing an application where blind person can interact with computer i have completed the part where computer responds as per command given by user.The part where i am stuck is i want to give voice feedback as user moves the curser for example if mouse is on d drive then user should get feedback that its d drive....i want to do it for whole windows ...
View Replies
View Related
Jan 13, 2014
I want that the cursor change when the mouse is over one of the rectangles. Rectangles are displayed but nothing happens when the mouse is over.
class Resizing extends JPanel {
java.awt.List myGuiList = new java.awt.List();
java.util.List<Rectangle> paths = new ArrayList<Rectangle>();
public Resizing() {
paths.add(new Rectangle(100, 100, 75, 50));
paths.add(new Rectangle(200, 100, 75, 50));
[Code] .....
View Replies
View Related
Feb 24, 2014
I decided to change the mouse cursor based on the theme of the game. This is the code that I wrote for the declaration of the cursor:
ImageIcon imageIcon = new ImageIcon ("cursor / cursor.gif");
Image img = imageIcon.getImage ();
Toolkit t = Toolkit.getDefaultToolkit ();
Cursor cursor = t.createCustomCursor (img, new Point (0,0), "cur");
this.setCursor (cursor);
Having to click on different JButton in the menu of the game, a few screens later, I have to manage something in particular, such as determining the point of clicks that allows the action to take place?
In particular I would like to change the point of hotspots. The size of 136x163 is cursor.gif
Image - TinyPic - Servizio di hosting d'immagini, condivisione immagini & hosting di video gratuito
As you can see in the image I want to create the point of hotspots in the red dot of the image. How should I do to pass the correct coordinates in Point?
View Replies
View Related
Jan 13, 2014
I want that the cursor change when the mouse is over one of the rectangles. Rectangles are displayed but nothing happens when the mouse is over.
class Resizing extends JPanel {
java.awt.List myGuiList = new java.awt.List();
java.util.List<Rectangle> paths = new ArrayList<Rectangle>();
public Resizing() {
paths.add(new Rectangle(100, 100, 75, 50));
paths.add(new Rectangle(200, 100, 75, 50));
[Code] ......
View Replies
View Related
May 15, 2014
My problem is simple. Just set busy cursor on a scene. The scenarios is like this: I have simple application with a button on it. When I click the button, I will:
1. Set mouse cursor to BUSY
2. Do some work
3. Set mouse cursor back to DEFAULT.
I search the web and found some sample codes to set cursor. But they don't satisfy my need. So I wrote a simple application:
public class MainFormApp extends Application {
@Override
public void start(Stage stage) throws Exception {
stage.initStyle(StageStyle.DECORATED);
Pane root = new Pane();
root.setPrefSize(500, 300);
Button btn = new Button("Click me");
[Code] ....
When I run application and click the button, cursor does not change to BUSY. I also tried to use Platform.runLater() but no luck.
View Replies
View Related
Mar 2, 2015
I am trying to make a program in which first I am entering number of charachters and then in nextline their is exactly that number of characters should be enter after than program should stop taking input from console..this is I have try so far
private static ArrayList<String> chars;
static String inputdata;
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
chars=new ArrayList<String>();
[code]....
View Replies
View Related
Mar 3, 2014
When I add to a JScrollPane (I'm adding to a JPanel then putting that in the scroll pane) it displays as many items in one row as possible. How can I make it so that it only displays one per row?
View Replies
View Related
Feb 13, 2014
I need to set a limit when a textfield is typed, I don't know where to start to do this validate.
Any way to do it. or can you take me to the correct path.??
View Replies
View Related
Mar 22, 2014
What is limitation for command line parameter??
View Replies
View Related
Aug 31, 2014
I just started to learn Java. In my program, I created a GRect(paddle) and I would like to move it on the x axis whenever the mouse is moved.
import acm.graphics.*;
import acm.program.*;
import acm.util.*;
import java.awt.*;
import java.awt.event.*;
public class BreakoutClass extends GraphicsProgram {
/** Width and height of application window in pixels */
private static final int WIDTH = 400;
private static final int HEIGHT = 600;
[code]....
In this case, whenever the paddle reaches the right edge of the screen, it doesn't move off the windows, but it stops moving (even if you move the mouse).
View Replies
View Related
Mar 31, 2014
I tried to Google, but was not able to find anything relevant.
I have a sql query where in I am using preparedStatement which goes something like :
select * from test where parameters in ( ?,?,?,?,?,?,?,?,?,?,?,?,?);
Is there a limit on how many "?" characters i.e. parameters can be there in this query?
View Replies
View Related
Mar 25, 2014
I've been creating a digital clock using Java, and have made the mouse cursor invisible after a set period of time (40-seconds) and had the thought to make it visible again if mouse was moved.
Here's the code that makes it invisible:
ActionListener mouseTimeout = new ActionListener() {
public void actionPerformed(ActionEvent e) {
setCursor(blankCursor);
}
};
/* Make mouse cursor disappear after 40 seconds */
Timer mTimeout = new Timer(40000, mouseTimeout);
mTimeout.start();
And here is what I have so far for making it visible again:
MouseMotionListener mouse = new MouseMotionListener() {
@Override
public void mouseDragged(MouseEvent e)
{
}
@Override
public void mouseMoved(MouseEvent e)
{
}
};
I have tried using "setCursor(DEFAULT_CURSOR)" but NetBeans says that it "cannot find symbol" .....
View Replies
View Related
Sep 30, 2014
I have now slowly moving on the learning Database Connectivity.Found a simple example on one site and tried to execute it, Creating a database, connecting to it and displaying the output.
I am getting trouble with recordset in displaying all the records in the badabase. It displays the very first record correctly but if I try to enclose it in while(rs.next()) loop, it generates an error message saying "Invalid operation at current cursor position".
package database_console;
import java.sql.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
[code]....
View Replies
View Related
Dec 7, 2014
This is my code. It is running great until I enter in the final color and hit enter. I get an Array Index out of bounds error, which I show at the bottom. I have fiddled with it, by moving the all answers correct into an if..else statement, hoping it would fix it. Needless to say, it didn't work.
Also, I am trying to figure out how to make the cursor appear in each guess box. It does in the first one, but after I hit enter, I have to click in the box each time to get one.
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class RobertMaloneChapter17 extends JFrame
{
//final variables to set the width and height of my frame
[Code] ....
My Errors:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 5
at RobertMaloneChapter17$Listener.actionPerformed(RobertMaloneChapter17.java:67)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:508)
at javax.swing.JTextField.postActionEvent(JTextField.java:721)
[Code] ....
View Replies
View Related
Jun 13, 2014
I know how add new button to HTMLEditor, and I want set to my button action to paste some text in the current cursor position.
//HTMLEditor html;//String IMAGE_URL = "http://...";Node node = html.lookup(".top-toolbar");
if (node instanceof ToolBar) { ToolBar bar = (ToolBar) node;
ImageView graphic = new ImageView(new Image(IMAGE_URL, 32, 32, true, true));
Button myButton = new Button("", graphic); bar.getItems().add(myButton);
myButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent arg0) {
//needs code
} });}
View Replies
View Related
Apr 23, 2014
I am just not sure of some theory in collections, ArrayList and LinkedList maximum capacity depends on the memory allocated to the JVM. But according to few people those list has a maximum capacity of Integer.MAX_VALUE.
According to my experiment, those list has a maximum capacity of Integer.MAX_VALUE since the get method of List accept a parameter of int primitive type (index of element), therefore we can conclude that the maximum capacity of List is equal to Integer.MAX_VALUE.
But what about the Map? get() method of map accepts object(the key of the map). So does it mean that the maximum capacity of Map depends on the memory allocated to our JVM? Or its maximum size is Integer.MAX_VALUE also just like Lists and Arrays? Is there a way to prove it? Is Map designed to hold infinite number of data (disregarding the heap memory space exception)?
And also about Stack, Deque? is it also the same as Map (in terms of maximum capacity)?
View Replies
View Related
Nov 21, 2014
i need to calculate the minimum and the maximum, actually it seems to be easy but, the minimum should be the smallest number but 0..this is my code
Java Code:
Scanner s = new Scanner (System.in);
int max = 0 ;
int min = 0 ;
System.out.println(" Please enter 3-5 numbers");
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
int d = s.nextInt();
int e = s.nextInt();
[code]....
View Replies
View Related