Hallo,ich habe ein problem mit meiner firebird verbindung und zwar kann meine datenbank anscheinend nicht geöffnet werden wenn ich das richtig verstanden hab...vielleicht kann mir jmd meinen fehler erklären:
und als fehlermeldung bekomm ich:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544344. I/O error for file CreateFile (open) "C:/Users/Desktop/DBSPROJEKT.fdb"
Error while trying to open file
null
Reason: I/O error for file CreateFile (open) "C:/Users/Desktop/DBSPROJEKT.fdb"
Error while trying to open file
null
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:122)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at projekt.main(projekt.java:23)
at org.firebirdsql.gds.GDSException: I/O error for file CreateFile (open) "C:/Users/Desktop/DBSPROJEKT.fdb"
Error while trying to open file
null
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2169)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2119)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.internalAttachDatabase(AbstractJavaGDSImpl.java:434)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscAttachDatabase(AbstractJavaGDSImpl.java:369)
at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:86)
at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:477)
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:119)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at projekt.main(projekt.java:23)
java.lang.NullPointerException
at projekt.main(projekt.java:37)
Vielen dank schon mal
Java:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
/**
* @author [url=http://www.javaworkspace.com]Java Workspace. JSP Tutorials,JDBC Tutorials,Java Servlets Tutorials,Spring Framework Tutorials,J2EE Tutorials,Jboss Tutorials,Hibernate Tutorials,XML and MySQL Tutorials,Make Business Online, BIRT Tutorials, Java Mail, Difference between path and cl[/url]
*
*/
public class projekt {
public static void main(String[] args) {
Connection connection = null;
ResultSet resultSet = null;
Statement statement = null;
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
connection = DriverManager.getConnection("jdbc:firebirdsql://localhost:3050/C:/Users/Desktop/DBSPROJEKT.fdb","sysdba", "masterkey");
System.out.println("Connection established.");
statement = connection.createStatement();
resultSet = statement.executeQuery("SELECT TITLE FROM ALBUM");
while (resultSet.next()) {
System.out.println("Title:"
+ resultSet.getString("TITLE"));
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
resultSet.close();
statement.close();
connection.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
und als fehlermeldung bekomm ich:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544344. I/O error for file CreateFile (open) "C:/Users/Desktop/DBSPROJEKT.fdb"
Error while trying to open file
null
Reason: I/O error for file CreateFile (open) "C:/Users/Desktop/DBSPROJEKT.fdb"
Error while trying to open file
null
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:122)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at projekt.main(projekt.java:23)
at org.firebirdsql.gds.GDSException: I/O error for file CreateFile (open) "C:/Users/Desktop/DBSPROJEKT.fdb"
Error while trying to open file
null
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2169)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2119)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.internalAttachDatabase(AbstractJavaGDSImpl.java:434)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscAttachDatabase(AbstractJavaGDSImpl.java:369)
at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:86)
at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:477)
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:119)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at projekt.main(projekt.java:23)
java.lang.NullPointerException
at projekt.main(projekt.java:37)
Vielen dank schon mal