简体   繁体   中英

Embed Derby DB with Netbeans Platform Application - Module

I developed a project in Netbeans Platform Application ie like Modules.

When i run my project from Netbeans 7.4, it works fine and doesn't show any DB exception.

Now i created a installer using Netbeans 7.4 for my project. wen i install it, the DB is also installed but its not recognizing the DB and my connection url is public final static String connectionURL = "jdbc:derby:ProjectDB;create=true;user=user;password=p@ssword"; .

When i copy paste the DB alone in a location eg: " d:\\project DB " and change the code as connectionURL = "jdbc:derby:D:\\\\project DB; create=true; user=user; password=p@ss" it works fine. But i need to create along with the installer or want my project to recognize the DB.

When i searched i got the below links

https://platform.netbeans.org/tutorials/70/nbm-crud.html

https://platform.netbeans.org/tutorials/nbm-crud.html

but dint get a solution.

很难从您的描述中看出来,但是您能看到Netbeans问题的默认模式吗?

Found the Solution..

  • launh or run the project after doing clean Build from the "dist" folder.
  • The new Database will be created in the "dist/project name" and you will get a error "Schema DB doesnt exists".
  • Now close the application and delete the DB in the "dist/project name" folder and copy-paste the DB(this i did for Derby Database) which you use for your project. And run the application agaiin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM