Some java code returns a null resultset from 10.2.0.1 DB, but works w/ 9.2
I am a Java noob guys, but we have java code the calls an Oracle Function. This code is unchanged from what successfully runs against an Oracle 9.2 database returning, in this case, one row from the database. A ref cursor is used. When the same Java code calls the same ref cursor function from a 10.2.0.1 database, a null resultset occurs. The function correctly returns a single row when executed by the same database user via sql-plus. So it must be a java thing. Does the jdbc driver need to be upgraded to correctly run against a 10.2 database? And is this null resultset type of anomaly a potential result of having a wrong version of ojdbc14.jar? Nothing else has changed except pointing the code to the same package and tables in a 10.2 database.
Thanks in advance for your comments.
Phil McDermott
I realize now that this is the wrong forum to post in, but I was linked here from a google search on the issue.
I downloaded the 10.2.0.1 ojdbc14.jar from oracle, but the problem persists.
yeesh! now what?
Similar Messages
-
Java code to generate XML File from XML Schema
Hi I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
Thankz in advance...JAXB has been available as an early release download for some time. There are also XML Binding packages available from Borland (JBuilder) and Castor. These tools create Java classes from a source document, xml,dtd etc. You can use these classes to marshal-unmarshal XML documents.
Dave -
Hi I need this asap... "Java code to generate XML File from XML Schema"
Hi all....
I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
Thankz in advance...
PS: I already posted in the afternoon... this is the second posting.take look at :
http://sourceforge.net/projects/jaxme/
this might help... -
How to get hold of the JavaFX applet in some java code called from it
I have a scenario where I am trying to reuse some java libraries that existed before and used the Applet API. In order to give a new UI to these APIs I am redesigning the front end using JavaFX. I can create instances of java classes from these old libraries. Methods on these old classes take java.applet.Applet as an argument.
When the JavaFX applet is deployed as an applet, how can one get hold of the corresponding Applet object?
Thanks in advance.When run as an applet, FX.getArgument("javafx.applet") will return the JApplet instance.
-
Returning rowcount and resultset from stored procedure
Hello,
In SQL Server you can return multiple resultsets from stored procedure by simple SELECT statement. But in Oracle, you have to use SYS_REFCURSOR.
Sample code:
CREATE OR REPLACE PROCEDURE sp_resultset_test IS
t_recordset OUT SYS_REFCURSOR
BEGIN
OPEN t_recordset FOR
SELECT * FROM EMPLOYEE;
END sp_resultset_test;
Is there any other way in Oracle 10 or 11 ?
Thank You.What is the requirement? Oracle is far more flexible than SQL-Server... with numerous features that do not exist in SQL-Server. (Fact)
One of the biggest mistakes you can make is to treat Oracle like SQL-Server... trying to match feature A1 in SQL-Server to feature B3 in Oracle.
Does not work that way.. rather then stick to SQL-Server as SQL-Server does SQL-Server specific features far better than Oracle.
So instead of trying to map what a T-SQL stored proc to do to an Oracle ref cursor (even to the extent of using that very silly sp_ prefix to name the proc), tell us the problem and requirements... That way we can tell you what Oracle features and options are best used to solve that problem - instead of competing in some unknown feature comparison event with SQL-Server. -
Java code to fetch contact list from outlook
I have a requirement to get the contact list from outlook using java code. There are many hooks provided by third party and they are all licensed.
I want java code example which directly communicate with outlook.you want to directly communicate with the Outlook program?? or do you want a program that can read the Outlook data? These are two very different problems, the first being relatively difficult, the second being easier.
-
Java-code returns char-array to c++
Hello,
I have a problem with return a char[] from a java method to the native c++-code.
The code looks like this:
//in java
public static char[] draw( int j,int i){
char[] myc = new char[100];
return myc;
//in c++
jmethodID mid;
jchar jarr;
mid = env->GetStaticMethodID(cls, "draw", "(II)[C");
jarr = env->CallStaticObjectMethod(cls,mid,200,300);
In the last line of the c++ code happens this error: error C2440: '=' : cannot convert from 'class _jobject *' to 'class _jcharArray *'
Does anybody know how I get the jArray?
Thank you very much!Cast it.
jarr = (jIntArray)env->CallStaticObjectMethod(cls,mid,200,300); -
Java code to get integer values from a gridLayout to put into an array?
I am writing a tictactoe game for a programming class. I made a grid of 3x3 layout and it alternates between putting an X when clicked and an O. I need to know how to retrieve what button off the grid was picked so I can create an array to check for win conditions...Or how to access the rowIndex and columnIndex of a selected button on the grid
Thanks in advance
Edited by: ryAnOnFire on May 23, 2010 6:10 PMimport java.awt.*;
import java.awt.Container;
import javax.swing.*;
import java.awt.event.*;
public class TicTacToe
JFrame theWindow;
JButton theButton;
Container thePane;
JTextField theText;
MyListener theListener;
public JButton[][] grid = new JButton[3][3];
public TicTacToe()
theWindow = new JFrame("Tic Tac Toe");
theWindow.setSize(250, 250);
String empty = " ";
theListener = new MyListener();
JFrame frame = new JFrame("TicTacToe");
Container thePane = theWindow.getContentPane();
thePane.setLayout(new GridLayout (3,3,5,5));
for(int i = 0; i < 3; i++)
for(int j =0; j < 3; j++)
grid[i][j] = new JButton(empty);
thePane.add(grid[i][j]);
grid[i][j].addActionListener(theListener);
JButton blankSpot = new JButton(empty);
blankSpot.setFont(new Font("Papyrus", Font.BOLD, 35));
theWindow.setVisible(true);
public static void main(String[] args)
new TicTacToe();
class MyListener implements ActionListener
String[][] spots1 = new String[3][3];
String[][] spots2 = new String[3][3];
static int playerTurnCounter = 0;
JButton[][] grid; // !! added
// !! added
public MyListener(JButton[][] grid)
this.grid = grid;
public void actionPerformed(ActionEvent e)
JButton jb = (JButton)e.getSource();
if(playerTurnCounter % 2 == 0)
jb.setText("X");
for(int i = 0; i < grid.length; i++)
for(int j = 0; j < grid.length; j++)
spots1[i][j] = grid[i][j].getText();
if((spots1[0][0].equals("X")))
JOptionPane.showMessageDialog(null, "TICTACTOE", "WIN", JOptionPane.PLAIN_MESSAGE);
//The problem seems to be occuring in the above block commented area
else
jb.setText("O");
jb.setEnabled(false);
playerTurnCounter ++;
Compiler Error:
C:\Documents and Settings\HP_Administrator\My Documents\TicTacToe.java:24: cannot find symbol
symbol : constructor MyListener()
location: class MyListener
theListener = new MyListener();
^
1 error
Tool completed with exit code 1
I'm just going to let you ponder over this as I do too...
I have no idea...my minimal experience with ActionListeners is doing me nothing for this one.
Edited by: ryAnOnFire on May 23, 2010 8:12 PM -
Need java code to select a folder from the Host server System
Hi All,
In my application For a button click i want to select a folder from host server .And copy an image into that selected path. Iam using tomcat 5.0. Can any one tell me how can i do this? Can any one provide sample code for this...
Thanks in Advance!!!Dblr, welcome to the forum.
When requesting help, you should always include the make/model of the computer and/or monitor. This information is necessary for us to review the specifications of them. We need to know Windows version you have installed.
Signature:
HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
HP Photosmart 7520 AIO
++++++++++++++++++
**Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
Intelligence is God given; Wisdom is the sum of our mistakes!
I am not an HP employee. -
Capture error code returned by VB script from the OIM Remote Manager
Hi All,
I am trying to provision to Exchange using powershell and OIM remote Manager.
RM is installed in the Exchange server and a VB script is called by the RM to perform the necessary provisioning operations.
Certain error codes are configured in VB script according to the script execution.
How can I get the return codes back to the RM and then to OIM adpater, so that I can publish appropriate error messages by writing them in the Adapter responses.
Below is my current code, but it does not capture return codes.
Can the variable 'i' get the return codes fron the VB script?
if (fScriptFile.exists())
String sCmd = scriptPath + " " + sUPN;
log.debug("Firing Powershell command:" + sCmd);
Process localProcess = localRuntime.exec("cscript.exe " + sCmd);
log.debug("Script Executed ");
int i = localProcess.waitFor();
localProcess.getOutputStream().close();
log.debug("Process Exit Value " + i);
sResult = i == 0 ? "EXCHANGE.REMOTE_SCRIPT_RUN_FAILURE" : "EXCHANGE.REMOTE_SCRIPT_RUN_SUCCESS";
Please help..
Thanks and Regards.Your VB script must be calling a powershell script.Check if powershell script returns any error message to your vbscript.I
-
Some Adobe PDF documents don't print from Adobe Reader; with other software it works correctly
Dear community,
I'm facing the problem that some Adobe PDF documents with lots of colors and lines (size less than 3 MB) don't print on our printers from Adobe Reader XI.
The same files when opened with PDF XChange or PDF Architect are printed out without problems.
How can I provide an Adobe Reader that is able to do so? Any recommendations about solving the issue are very appreciated.
Best regards
ChristianWord document problem fixed at the moment by deleting and adding the Lexmark printer again.
-
I have set the Mathscript preferences 'Path' and 'Working Directory' parameters to the folder containing my scripts, and it works when
I run the VI, but I get a -90031 error when I run the executable.
What am I doing wrong?Hi Umars,
I had the same problem. In my case it turned out that it was caused the surrounding code. Plus the error
message was missleading. I got the error message -90031 (unknown symbol CalcWelchCorr2) for the
following piece of code:
ecorr= 1;
if setup & src== 1
for lag= 1:50
rho= CalcWelchCorr2( lag, win );
if rho > 0.001, ecorr= [ecorr; rho]; else, break; end
end
CalcWelchCorr2 is a user defined function located in the MS search path. The problem was caused by the
"break" in line 5. Actually this line was marked by some little warning symbol. Eventualle I modified the code
to get rid of the break
ecorr= 1;
if setup & src== 1
lag= 1; rho= CalcWelchCorr2( lag, win );
while rho > 0.001 && lag <= 50
ecorr= [ecorr; rho];
lag= lag+ 1; rho= CalcWelchCorr2( lag, win );
end
end
and voila, the executable worked fine.
However, I had to check all my VIs ( > 200 !) for similar errors which gave me headaches.
Why does the application builder doesn't produce some appropriate error message ?
E.g. "Line xxx in MathScript node in VI xxx cannot be executed"? Currently you get the
impression that the application was build successfully but eventually you get strange errors
or even erroneous results. Keep in mind that tracking down bugs in the final application is
much more difficult that in LV. Also the error message produced by the executable was not
helpfull at all. -
No Sound from Flip video clips on iMac, but works on Mac Pro and Macbook
I just got a flip video camera today. I tried it out at work, made a quick video, imported it on my mac pro, and it worked fine. I came home took some videos, went on my iMac(24 inch core 2 duo) and was surpised that the videos imported without sound. After searching the web, I didn't find any concrete solutions, just some suggestions that pointed towards codecs. Since nothing worked, I sent the file to my wife's macbook pro to try it out. The same AVI file on her computer plays sound. Now I am totally confused.
Any ideas?The sound is on, and other files and applications play sound.
In fact, in iMovie 09, there is sound. But there is no sound in quicktime, VLC player, the flipshare software the camera works with, and if I upload to youtube via the iMac there is no sound on the youtube video, but if I upload the file to youtube from the macbook pro, there is sound.
I don't know what to try next. -
I am unable to sync my calendars from the iphone 4S to the ipad but the calendars do sync from the ipad to the phone. Music also does not sync either way. Everything else seems to be OK. Anyone have this problem?
Welcome to the Apple Community.
First check that all your settings are correct, that calendar syncing is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
Make sure the calendars you are using are in your 'iCloud' account and not an 'On My Mac', 'On My Phone' or other non iCloud account (you can do this by clicking/tapping the calendar button in the top left corner of the application ), non iCloud calendars will not sync.
If you are sure that everything is set up correctly and your calendars are in the iCloud account, you might try unchecking calendar syncing in the iCloud settings, restarting your device and then re-enabling calendar syncing settings.
With regard to your music, what exactly are you expecting to happen. -
Running a jar file from java code
Hi!
Im trying to run a jar file from my code.
I've tried Classloader, but that doesnt work because it doesnt find the images (also embedded in the 2nd jar file).
WHat I would like to do is actually RUN the 2nd jar file from the first jar file. There must be a way to do this right?
any ideas?ok, I found some wonderful code (see below) that will try to start the jar. But it doesn't. What it does is produce the following error when my application runs...
So it's not finding the images in the jar file that I am trying to run? Strange. I checked the URL that sending, but it seems ok....
I think I will check the url again to make sure......
any ideas?
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(Unknown Source)
at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
the code....
/* From http://java.sun.com/docs/books/tutorial/index.html */
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.JarURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.jar.Attributes;
* Runs a jar application from any url. Usage is 'java JarRunner url [args..]'
* where url is the url of the jar file and args is optional arguments to be
* passed to the application's main method.
public class JarRunner {
public static void main(String[] args) {
URL url = null;
try {
url = new URL(args[0]);//"VideoTagger.jar");
} catch (MalformedURLException e) {
System.out.println("Invalid URL: ");
// Create the class loader for the application jar file
JarClassLoader cl = new JarClassLoader(url);
// Get the application's main class name
String name = null;
try {
name = cl.getMainClassName();
} catch (IOException e) {
System.err.println("I/O error while loading JAR file:");
e.printStackTrace();
System.exit(1);
if (name == null) {
fatal("Specified jar file does not contain a 'Main-Class'"
+ " manifest attribute");
// Get arguments for the application
String[] newArgs = new String[args.length - 1];
System.arraycopy(args, 1, newArgs, 0, newArgs.length);
// Invoke application's main class
try {
cl.invokeClass(name, newArgs);
} catch (ClassNotFoundException e) {
fatal("Class not found: " + name);
} catch (NoSuchMethodException e) {
fatal("Class does not define a 'main' method: " + name);
} catch (InvocationTargetException e) {
e.getTargetException().printStackTrace();
System.exit(1);
private static void fatal(String s) {
System.err.println(s);
System.exit(1);
* A class loader for loading jar files, both local and remote.
class JarClassLoader extends URLClassLoader {
private URL url;
* Creates a new JarClassLoader for the specified url.
* @param url
* the url of the jar file
public JarClassLoader(URL url) {
super(new URL[] { url });
this.url = url;
* Returns the name of the jar file main class, or null if no "Main-Class"
* manifest attributes was defined.
public String getMainClassName() throws IOException {
URL u = new URL("jar", "", url + "!/");
JarURLConnection uc = (JarURLConnection) u.openConnection();
Attributes attr = uc.getMainAttributes();
return attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null;
* Invokes the application in this jar file given the name of the main class
* and an array of arguments. The class must define a static method "main"
* which takes an array of String arguemtns and is of return type "void".
* @param name
* the name of the main class
* @param args
* the arguments for the application
* @exception ClassNotFoundException
* if the specified class could not be found
* @exception NoSuchMethodException
* if the specified class does not contain a "main" method
* @exception InvocationTargetException
* if the application raised an exception
public void invokeClass(String name, String[] args)
throws ClassNotFoundException, NoSuchMethodException,
InvocationTargetException {
Class c = loadClass(name);
Method m = c.getMethod("main", new Class[] { args.getClass() });
m.setAccessible(true);
int mods = m.getModifiers();
if (m.getReturnType() != void.class || !Modifier.isStatic(mods)
|| !Modifier.isPublic(mods)) {
throw new NoSuchMethodException("main");
try {
m.invoke(null, new Object[] { args });
} catch (IllegalAccessException e) {
// This should not happen, as we have disabled access checks
}
Maybe you are looking for
-
Hi, My mac mini has recently started randomly crashing. Ive done some searching and its always suggested to post the report on here, can anyone tell me what could be the cause? Sat Jan 18 16:35:11 2014 panic(cpu 2 caller 0xffffff80002dc19e): Kernel t
-
Multi Value Parameter in SP error in Crystal Report SAP B1 ?
Hi Experts , i am Getting an error in Crystal Report "Failed to retrieve data from the database. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '('. [Database vendor code: 120]" I an executing the SP In
-
Hello! I am working with the PDA module, but I have a little problem: when I create the PDA executable, I cannot visualize in the sreen of the device all the labels that I can see in the Pc. I don't understand what's wrong because sometimes these lab
-
Dear Fellows, I was surprise, as I realized that MacBook Pro was running InterChech from the Sophos Anti-Virus folder using near to 192% process time... The fan was running on 100% all time long. It was a big piece of work to start annother applicati
-
not sure how to accomplish this i have 2 tables shown below i need to do a group by on the type in tab1 based on what num is in tab2. so the results of my output should look like Type sum(val) A 40 B 10 C 10 tab1 Type start end A 0000 1200 B 1201 160