jdbc and oracle 8.0.5 using jdk1.2
Hi,
I have installed java jdk1.2 and oracle 8.0.5
Installed net8 and all is working fine.
refed the CLASSSPATH for jdbc as $ORACLE_HOME/jdbc/lib/classes111.zip
The java source compiles ok, but when I run the .class file
I am getting the following error.
Exception in thread "main" java.lang.NoClassDefFoundError: nt
Any ideas on how I can correct the problem ?
Many thanks
Matt
---
bash-2.02# java nt
Exception in thread "main" java.lang.NoClassDefFoundError: nt
By ref the classpath I am getting the following..
bash-2.02# javac -classpath .:/$ORACLE_HOME/jdbc/lib/classes111.zip
jj.java
bash-2.02# java nt
Exception in thread "main" java.lang.NoClassDefFoundError: nt
Without the classpath added..
bash-2.02# javac jj.java
jj.java:8: Class oracle.jdbc.driver.OracleDriver not found.
oracle.jdbc.driver.OracleDriver());
The above result without the classpath was expected, but I just wanted
to see what the classpath would be looking for.
-
Below is the test script.
Where is changed to my host name ref'ed in listener.ora
Where is changed to my oracle_sid
Where is changed to the oracle database password (system = uid
and your_password = manager).
-
import java.sql.*;
class nt
{
public static void main (String args []) throws SQLException
{
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection (
"jdbc:oracle:thin:@oracle_host:1521:oracle_sid",
"system","your_password");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery (
"SELECT name, value FROM V$SYSSTAT");
while (rset.next ()){
System.out.println (rset.getString (1));
System.out.println (rset.getString (2));
}
}
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
jdk1.2-pre2 Installation Problem
Java-Linux List, I just installed jdk1.2-pre2 on to a system running RH6.0. Following the instructions, I simply added /usr/local/jdk1.2/bin to my path. For any of the base applications (java, javac, appletviewer), I get the message "Could not create the Java virtual machine." This is for both native and green threads. I downloaded the glibc2.1 version (which should go with RH6.0), I have 128 Meg of RAM (I have yet to even hit the swap), and everything else in the system seems to be stable. Any ideas? TIA, Bill Richmond, VA -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Swing Priority
Does anyone know what the priority of the Swing Event processing thread is? I have an application that needs to process very large files, but I start the thread, the main application is still locked up. Placing a yield() in the time consuming thread doesn't seem to help. Any suggestions? -Tom -- +---+ + Thomas M. Sasala, Electrical Engineer [EMAIL PROTECTED] + + MRJ Technology Solutionshttp://www.mrj.com + + 10461 White Granite Drive, Suite 102(W)(703)277-1714 + + Oakton, VA 22124 (F)(703)277-1702 + +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: jdbc and oracle 8.0.5 using jdk1.2
This may not be exactly what you are looking for, but this is the code I
use to connect to oracle. ( and it is for 1.1 ).
/***/
/*** S N I P P L E T
*/
/***/
import java.sql.*;
import oracle.jdbc.driver.*;
import java.math.*;
public class OrclConn{
public OrclConn(){
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
}catch(Exception e){System.out.println("ORACLE DRIVER LOADER ERROR: " +
e);}
}//end constructor
Connection CurrConn;
String Driver;
private return getOracleConnection(String IP-ADDRESS, String PORT, String
SID, String USERNAME, String PASSWORD,){
try{
Driver = "oracle.jdbc.driver.OracleDriver";
Class.forName(Driver);
CurrConn = DriverManager.getConnection("jdbc:oracle:thin:@" +
IPADDRESS + ":" + PORT + ":" + SID + ", "+ USERNAME + ", " + PASSWORD);
}catch(Exception e){System.out.println("ORACLE ERROR: " + e);
e.printStackTrace();}
}//end getInformixConnection
public void closeConn() throws SQLException{
CurrConn.close();
}//end closeConn
}//end class OrclConn
/***/
/** E N D - S N I P P L E T
**/
/***/
_
Steve Gee
Java Developer
Maxor National Pharmacies
Information Technologies
[EMAIL PROTECTED]
806.324.5540
www.maxor.com
806.324.5400
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
[Fwd: Swing Priority]
I guess I should of pointed out that I have already tried the SwingWorker utility. I have tried various incarnations of threading, using my real code and test code. If I have a thread that does not sleep, then the main application locks up. Using yield does not help. If I put a sleep in the loop, then everything works fine (sleeping while doing a time intensive operation is not very productive). I was hoping I could lower the priority of my method to allow the Swing event handling code to run. As an aside, the SwingWorker utility does not work using native threads (on my system). It works fine under green threads, but it does not appear to actually switch threads. Any suggestions? -Tom "Alexander V. Konstantinou" wrote: > > You need to use a Swing worker thread to process your file. Go to Sun's > site and look for the example called "SwingWorker". > > Alexander > > On Tue, Jul 20, 1999 at 08:22:22AM -0400, Thomas M. Sasala wrote: > > Does anyone know what the priority of the Swing > > Event processing thread is? I have an application that needs to > > process very large files, but I start the thread, the main > > application is still locked up. Placing a yield() in the > > time consuming thread doesn't seem to help. Any suggestions? > > > > -Tom -- +---+ + Thomas M. Sasala, Electrical Engineer [EMAIL PROTECTED] + + MRJ Technology Solutionshttp://www.mrj.com + + 10461 White Granite Drive, Suite 102(W)(703)277-1714 + + Oakton, VA 22124 (F)(703)277-1702 + +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
[Fwd: [Fwd: Swing Priority]]
Setting my task to MIN_PRIORITY fixes the problem, but I think it is a suboptimal fix. So: a) What would a better priority be? b) Is there a better fix than thread priority? c) Does the event handling thread run at a lower priority than the main application, hence yield() not working? d) Any hope for native threads in the near future? -Tom "Alexander V. Konstantinou" wrote: > > Now I remember, that when I had written a similar application that did > intensive disk I/O, I had to set the priority ofd the disk I/O thread > to be lower than that of the Swing thread. > > Alexander > -- +---+ + Thomas M. Sasala, Electrical Engineer [EMAIL PROTECTED] + + MRJ Technology Solutionshttp://www.mrj.com + + 10461 White Granite Drive, Suite 102(W)(703)277-1714 + + Oakton, VA 22124 (F)(703)277-1702 + +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
[Fwd: [Fwd: [Fwd: Swing Priority]]]
It's not really a problem, unless the main app does something in an event that takes a while. Since I am currently the only one using the app, it's not an issue. However, in the future, it might become an issue. Generally I was hoping to set the thread to the same priority as the event handler and let the OS take care of time slicing. Clearly the JVM is not that robust though. -T "Robert A. Crawford" wrote: > > On Tue, Jul 20, 1999 at 12:32:19PM -0400, Thomas M. Sasala wrote: > > Setting my task to MIN_PRIORITY fixes the problem, but > > I think it is a suboptimal fix. So: > > Why is that a problem? The event thread probably spends > 95% of its time waiting for events, so your thread would get > the time it needs. > > -- > [EMAIL PROTECTED] -- +---+ + Thomas M. Sasala, Electrical Engineer [EMAIL PROTECTED] + + MRJ Technology Solutionshttp://www.mrj.com + + 10461 White Granite Drive, Suite 102(W)(703)277-1714 + + Oakton, VA 22124 (F)(703)277-1702 + +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Fwd: [Fwd: [Fwd: Swing Priority]]]
If you read the JVM threading specification, it explicitely states that threads of the same priority are *NOT* guaranteed to be time-sliced. This is the most common cause of incompatibilities, as software that works on MS WinNT (has time-slicing), breaks on other operating systems without time-slicing. The solution is to have the busy thread execute with a lower priority. Alexander On Tue, Jul 20, 1999 at 02:24:28PM -0400, Thomas M. Sasala wrote: > It's not really a problem, unless the main app does something > in an event that takes a while. Since I am currently the only one > using the app, it's not an issue. However, in the future, it > might become an issue. > > Generally I was hoping to set the thread to the same > priority as the event handler and let the OS take care of > time slicing. Clearly the JVM is not that robust though. > > "Robert A. Crawford" wrote: > > > > On Tue, Jul 20, 1999 at 12:32:19PM -0400, Thomas M. Sasala wrote: > > > Setting my task to MIN_PRIORITY fixes the problem, but > > > I think it is a suboptimal fix. So: > > > > Why is that a problem? The event thread probably spends > > 95% of its time waiting for events, so your thread would get > > the time it needs. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Problems with java.lang.ClassLoader
Hi All I am currently doing some tests with dynamic class loading. I have the following snippet of code: Class dateDisplayClass = cl.defineClass(args[0], dateDisplayClassBytes, 0, dateDisplayClassBytes.length); cl.resolveClass(dateDisplayClass); Here is the problem: when compiling the file, I get the following errors: ClassClient.java:20: No method matching defineClass(byte[], int, int) found in class java.lang.ClassLoader. cl.defineClass(args[0], ^ ClassClient.java:24: No method matching resolveClass(java.lang.Class) found in class java.lang.ClassLoader. cl.resolveClass(dateDisplayClass); When I look in the JDK1.2 API Specifications, those 2 methods exist. Any idea? Michel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: JAI
Bob Stafford wrote: > I've seen reference to a pure java version of the Java Advanced > Imaging API both on Javasoft and blackdown web-sites. The Javasoft > site syas it has actually been tested with the Blackdown Java port. > Can anybody tell me where I can doawload this version from. The > javasoft site only hosts Solaris and windows versions as far as I can > see. If I'm suppose to use one of these then how would I install these > files (Solaris .bin or Windows .exe) on a linux system. You can use the win version, albeit not take advantage of native accelaration. If you have access in a windoze machine just go ahead and download it. You only need jai_codec.jar jai_core.jar from that distribution, which are native java. The jai examples work fine in my box with this setting . -- dimitris -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug: in jdk1.2 FileChooser not choosing files
Hi I have been having problems using JFileChooser, it was not returning files that had been selected (sometimes it would /sometimes it wouldn't). Often about 1 in 3 selections would work. The problem happens only with native threads using green threads works. I believe it is probably related to the modal JFileChooser problems reported for native threads on the jdk1.2 known-bugs screen, although the rest of my system does not hang. I looked for an existing bug report to append this info to, but couldn't find one. Is there somewhere I should report it ? The JFileChooser sample from the java tutorial can be used to reproduce the problem. Thanks Mark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
