Vince Black

Greenhorn
+ Follow
since Oct 16, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Vince Black

hi !
I have a Database Connection Problem in WebSphere Studio Application Developer (Windows) Version: 5.1.0
This is my Source Code :

And i Get this Error Message :


An exception has been intercepted
java.lang.ClassNotFoundException: com.ibm.websphere.jdbcx.sqlserver.SQLServerDataSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:516)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:448)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at Database.main(Database.java:13)


i hope you can held me
thx
14 years ago
hi !
i have a Problem with Websphere Database connect.
I get this Error Message :
java.lang.ClassNotFoundException: com.mysql.jdbc.driver.ConnectionPoolDataSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:516)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:448)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at Database.main(Database.java:12)
But i found the Database in websphere etc.
i dont know whats the Problem
14 years ago
i dont know how can i make it i am a real Java Newbie .
I dont unterstand how to make it .
so can you help me ..
hi !
I have a problem :
The Error Message is ->
An exception has been intercepted
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:516)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:448)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at Database.main(Database.java:12)
My Code is :
import java.sql.*;
import java.io.*;
import java.util.Properties;
public class Database
{
public static void main( String args[] )
{
try
{
// Register MySQL driver
Class.forName("com.mysql.jdbc.Driver").newInstance();

// Open a properties file where connection info is stored
FileInputStream infile = new FileInputStream( "db.properties" );
Properties props = new Properties();
props.load(infile);
// Connection info for MySQL
String dbserver = props.getProperty("dbserver", "localhost");
String dbname = props.getProperty("dbname", "test");
String user = props.getProperty("user", "root");
String password = props.getProperty("password", "");
String cs = "jdbc:mysql://"+dbserver+"/"+dbname+"?user="+user+"&password="+password;
// The SQL statement to execute
String sql = "SELECT * FROM daten";
// Open a connection to the database
Connection conn = DriverManager.getConnection(cs);
Statement stat = conn.createStatement();
// Execute the query
ResultSet rs = stat.executeQuery(sql);
// Display results
System.out.println("ID\tName");
System.out.println("--\t----");
while (rs.next())
{
System.out.println(rs.getString("id")+"\t"+rs.getString("name"));
}
// Close everyting
rs.close();
stat.close();
conn.close();
}
catch (Exception ex)
{
System.out.println( "An exception has been intercepted" );
ex.printStackTrace();
}
}
}
i dont know the Problem i am a Newbie
thx