I am total novice in this topic. In general, my friend created derby database in netbeans. All databases were stored in directory:
home/.netbeans-derby
He ziped the folder with database he created, and sent to me. I entered unziped database folder to my directory (screen with it:https://dl.dropboxusercontent.com/u/108321090/DATABASE_FOLDERS.png) :
C:\Users\Fisher\.netbeans-derby
Netbeans finds this database and shows it in the tree under Java DB. When use "Connect" on this database I get error (screen with it: https://dl.dropboxusercontent.com/u/108321090/DB_ERROR.png):
Unable to connect. Cannot estabilish a connection to jdbc:derby//localhost:1527/mydatabase using org.apache.derby.jdbc.ClientDriver (DERBY SQL error: SQLCODE -1, SQLSTATE: XJ040, SQLERRMC: Starting database 'mydatabase' failed. Details are containing exception.::SQLSTATE: XSAI2. Demanded conglomeration (16) doesnt exist.).
And also I can provide you with log txt from my folder which is rly long so: https://dl.dropboxusercontent.com/u/108321090/derby.log
Please tell me is there any easy way to connect to that database or is there any EASY way to export base if it was done in wrong way? Please help me.
Related
I am trying to create a connection using Java DB (Embedded), but I keep getting the error shown in the image below:
If it helps my Java DB Installation path is: C:\Program Files (x86)\glassfish-3.1.2.2\javadb and my database location is: C:\Users\MyPC\.netbeans-derby
I have tried specifying the file paths, I have watched YouTube tutorials and tried a few examples from Oracle and other sites, none of which help.
The properties (if it helps) for this database are:
I noticed that the driver class is ClientDriver, is it posible this could be playing a role in the problem?
How can I get the Java DB (Embedded) connection to work (or simply correct the problem)?
The root directory doesn't load, find the location on the Database,
eg C:\Users\xxx.netbeans-derby\dataBaseName
copy it and paste it as the database Java DB(Embedded) name. Your new JDBC URL: is now jdbc:derby:C:\Users\xxx.netbeans-derby\dataBaseName
Test the connection and the path should connect.
I think this is a bug in 8.1 and needs to be addressed, but this will work around it.
I am using intellij for a java project and am trying to use the database tools to create a local derby database but every time I try to create a database I get a error message java.sql.SQLException: Failed to create database '', see the next exception for details.. Has anyone else ran into this problem or knows how to fix it?
I have a simple application that writes data from a MySQL database into an Access .accdb database.
I have used it for 4 months and I haven't had any problems.
Yesterday I tried to use it and now I have a problem. If I try to open the file with Microsoft Access and I try to open table CodScontrini, I see all the records. If I try to open Scontrini table I have this message:
bookmark not valid
If I try to run my Java application from Eclipse I see this warning message:
WARNING:Error in the metadata of the table CodScontrini: table's row count in the metadata is 665 but 499 records have been found and loaded by UCanAccess. All will work fine, but it's better to repair your database.
It means that a inconsistency between data and metadata has been detected in your access db. The Compact and Repair tool will solve this issue.
I followed the instructions in this blog to create a basic embedded database application.However, although checking the steps over and over and searching for the problem on the web , I'm still getting the exception : Table view blabla does not exists. Table seems to exists when I expand my driver's app schema. Netbeans version is 7.3.
The most common reason for a table-does-not-exist error with Derby is confusion over the location of the database. The database that you are accessing via Netbeans is probably different than the database that your application is accessing.
The location of your database is controlled by the JDBC connection URL, so if you provide some details about your JDBC connection URL, that might help others to help you.
This is in continuation to my previous question
I'm trying to embed a derby database in my web application. I'm able to embed it, though I am facing glitches. Here's the snapshot of my project structure.
I wonder why class.forName("org.apache.derby.jdbc.EmbededDriver") is throwing exception?
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbededDriver
To overcome this, I have used
DriverManager.registerDriver(new org.apache.derby.jdbc.EmbeddedDriver());
Which works well. Why is it so? Also, Where would it create database if coded like this. I cannot spot the database.
connection = DriverManager.getConnection("jdbc:derby:MyDbTest;create=true");
I checked in tomcat webapps and eclipse workspace, I didn't find database.
If given this way, I can spot it.
connection = DriverManager.getConnection("jdbc:derby:E:/MyDbTest;create=true");
class.forName("org.apache.derby.jdbc.EmbededDriver")
Threw an exception because there is a 'd' missing from embedded.
See here for information about specifying the location of databases on the file system.
connecting to a file-based derby database