Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

problem sa Javaembedded Derby DB ("USER1 does not exist")

[es] :: Java :: problem sa Javaembedded Derby DB ("USER1 does not exist")

[ Pregleda: 1541 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

darkoks

Član broj: 257871
Poruke: 2
*.dynamic.isp.telekom.rs.



Profil

icon problem sa Javaembedded Derby DB ("USER1 does not exist")20.04.2010. u 16:46 - pre 171 meseci
Drustvo,

Nadam se da ce neko moci da mi pomogne :)

Naime, kreirao sam java aplikaciju u Eclipse okruzenju koja koristi embedded java derby dB.
Sve super radi kada je pokrecem iz Eclipse IDE.
Cak i kada kreiram exec jar file, koji se kreira u istom folderu gde je i sama aplikacija, i baza, tj. u workspace-u projekta, i kada uradim dupli klik sve super radi.

E problem nastaje kada ja taj exec jar file iz foldera gde je aplikacija kopiram negde drugde, recimo na Desktop.
I kada uradim dupli klik, javi mi gresku "ClassPATH Not Found" i "No suitable driver for jdbc:derby".
Taj sam problem resio tako sto sam na Desktop-u kreirao folder LIB, i u njega paste-ovao DERBY.JAR, i kada uradim dupli klik, aktivira se aplikacija, ali sa greskom: SCHEMA USER1 DOES NOT EXIST

E sad, razlog kopiranja negde drugde je moja zelja da taj exec jar file radi na bilo kom racunaru koji ima JVM duplim klikom.
Ne svidja mi se sto sma posebno kreirao lib folder na Desktop-u, jer koja je poenta EXEC jar file-a kome sam sve dao, sve stavio u njega, ako moram posebno da kreiram putanje do driver-a.
Zar poenta exec jar file-a nije da ima sve u sebi, i samo dupli klik? Kako inace da kreiram app koja ce da ima bazu u sebi, sve sto joj treba i da korisnik samo uradi dupli klik, i da radi.

Kako da resim problem SCHEMA USER1 DOES NOT EXIST?

Evo detalja greske:
See com.borland.dx.dataset.DataSetException error code: BASE+66
com.borland.dx.dataset.DataSetException: Schema 'USER1' does not exist
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
at com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)
at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown Source)
at com.borland.dx.sql.dataset.o.a(Unknown Source)
at com.borland.dx.sql.dataset.o.d(Unknown Source)
at com.borland.dx.sql.dataset.o.e(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.h(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.open(Unknown Source)
at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:1999)
at com.borland.dbswing.JdbTable.addNotify(JdbTable.java:1983)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Window.addNotify(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at kladza.KladionicaApplication.<init>(KladionicaApplication.java:30)
at kladza.KladionicaApplication.main(KladionicaApplication.java:40)
Chained exception:
java.sql.SQLSyntaxErrorException: Schema 'USER1' does not exist
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown Source)
at com.borland.dx.sql.dataset.o.a(Unknown Source)
at com.borland.dx.sql.dataset.o.d(Unknown Source)
at com.borland.dx.sql.dataset.o.e(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.h(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.open(Unknown Source)
at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:1999)
at com.borland.dbswing.JdbTable.addNotify(JdbTable.java:1983)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Window.addNotify(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at kladza.KladionicaApplication.<init>(KladionicaApplication.java:30)
at kladza.KladionicaApplication.main(KladionicaApplication.java:40)
Caused by: java.sql.SQLException: Schema 'USER1' does not exist
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 48 more
Caused by: ERROR 42Y07: Schema 'USER1' does not exist
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
... 42 more

Ne znam gde je problem.
Kada startujem aplikaciju sa dektop-a, prvo se automatski kreira folder myDB i file derby.log, zatim krece aplikacija, pojavi se prozor, i onda greska sa SCHEMA USER1 DOES NOT EXIST.

Inace koristim ovo:
database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:derby:myDB;create=true;user=user1;password=user1"));

Ako treba nesto dodatno da objasnim, posaljem, molim vas recite, tu sam.

Hvala unapred

Darko
 
Odgovor na temu

[es] :: Java :: problem sa Javaembedded Derby DB ("USER1 does not exist")

[ Pregleda: 1541 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.