InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: New to instant DB, Help please? part 1


I don't know why this mail didn't get out on the list, so therefor I'm resending
it.


Martin
---------------------- Forwarded by Martin Husted/Electrolux Nyborg A
S/Denmark/Electrolux Group on 18-07-2000 08:59 ---------------------------


18-07-2000 08:25
Martin Husted/Electrolux Nyborg A S

To:   instantDB@enhydra.org
cc:
Subject:  Re: InstantDB: New to instant DB, Help please?  (Document link: Martin
      Husted)

Hey Eric,

Don't use the "package org.enhydra.instantdb;", just make your own package, you
get the error message
becoz of the import line:"import org.enhydra.instantdb.*;" use this instead :"
import org.enhydra.instantdb.jdbc.*;".

This should make your example work.





Regards

Martin







Eric Advincula <eric07@earthlink.net> on 18-07-2000 03:57:32

Please respond to instantDB@enhydra.org

To:   instantDB@enhydra.org
cc:
Subject:  InstantDB: New to instant DB, Help please?



I'm new to InstantDb and I'm just trying to build the database without any of
the tables.

I have jdk1.3 and the latest InstantDB
running on Win 2000.

My paths:
c:\java\jar
- has all the idb.jar files

Here is my code:

package org.enhydra.instantdb;

import org.enhydra.instantdb.*;
import java.sql.*;

public class CreateDatabase
{

     public static CreateDatabase objCreateDatabase;

     public CreateDatabase()
     {
    Connection conn;
          try
          {

               Class.forName( "org.enhydra.instantdb.jdbc.idbDriver" );
               conn = DriverManager.getConnection(
"jdbc:idb:SupportCentralCalendar.prp" );

               conn.close();

          }
          catch( Exception err )
          {
          // Print out the error message
            System.out.println(err);
            err.printStackTrace();
          }
     }


     public static void main(String arg[])
     {
          objCreateDatabase = new CreateDatabase();
          System.exit( 0 );
     }

};


To compile I have a batch file like so:

javac -classpath
"c:\java\jar;c:\java\jar\idb.jar;c:\projects\support_central\database" *.java

to run it i have a batch file:

java -classpath
"c:\java\jar;c:\java\jar\idb.jar;c:\projects\support_central\database"
CreateDatabase

It compiles fine without any errors or warnings but when I run it I get the
following errors:

Exception in thread "main" java.lang.NoClassDefFoundError: CreateDatabase( wrong
name: org/enhydra/instantdb/CreateDatabase )
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknow Source)
..
...

Any ideas?  This is my first attempt with Instant DB and although there are
samples I'm not sure what I'm doing wrong herre.

Also, Do I really need "package org.enhydra.instantdb;"
on top?  Expecially if I'm not creating a package.  If I leave it out gives me
an error that "package org.enydra.instantdb" does not exist.
What happens if i'm adding this class as a package for another project does that
create a conflict?

Thanks for any information.



-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.









-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.