Here is an example application development video.
Tuesday, February 09, 2010
NetBeans 6.8 JSR-296 Database Application Example
Labels:
Apache Derby
,
example
,
frameworks
,
JSR-295
,
JSR-296
,
Netbeans
,
Swing
,
tutorial
Subscribe to:
Post Comments
(
Atom
)
Popular Posts
-
Introduction This article is not another diatribe to tell you the importance of unit testing. I think we can all agree that it is important...
-
A friend of mine asked me if there was a list of reserved words in EL and JSF. He had previously looked for it, and after some Google search...
-
I saw a question posed on stackoverflow called Trouble with Primefaces 3.0.M2 SelectOneMenu Ajax behavior and I had just done an example a...
-
I was working on a couple of SSL based issues when I made a couple of observations. The default self-signed key generation in Java does not ...
-
This is an example on how to make a system call to the local operating system to execute external programs. This example was written to work...
-
We have been doing a lot of work lately with PrimeFaces. A common set of questions comes up about displaying <p:dialog/> boxes on a pa...
-
I was asked earlier today how to reset fields in a JSF application, if the validation fails. In his case, he had a Richfaces table which had...
-
Image by quasarkitten via Flickr The basics for creating a Maven archetype can be found in the Maven - Guide to Creating Archetypes . The ...
-
Previously, I posted an example of how to use JSF 1.2 with form based authentication (j_security_check). In this example, I use JSF 2.x to...
-
Abstract A common use case is to iterate over a collection of elements, and display them on a page. In the world of JSP, we would use a Ja...
5 comments :
I have attempted to create a database using this tutorial: http://netbeans.org/kb/docs/ide/java-db.html
When I try to create the Database Application as you show. Netbeans 6.9.1 shows my database as: jdbc:derby://localhost:1527/contact[nbuser on NBUSER], but it errors out "Connected database doesn't contain tables"
I can see the App.Friends table and its contents using the Netbeans "View Data"
Any idea what the issue may be?
Thanks.
I have followed this tutorial to create a database: http://netbeans.org/kb/docs/ide/java-db.html
When I get to the step of creating Database Application it recognizes the java:derby://localhost:1527/contact [nbuser on NBUSER] but says "Connected database doesn't contain tables"
Using Netbeans 6.9.1 I can "View Tables..." and see the contents of the FRIENDS table.
I also worked through an Apache Derby tutorial to create a database, but with the same results.
The sample database which you demo does however work for me.
Any ideas would be appreciated.
Thanks.
I have completed this tutorial to create a database: http://netbeans.org/kb/docs/ide/java-db.html
When I attempt to create my Database Application as you show. Netbeans (6.9.1) recognizes my database jdbc:derby://localhost:1527/contact [nbuser on NBUSER] but errors out reporting "Connected database doesn't contain tables"
I can see the FRIENDS table and "View table..." to see its contents.
I have also tried an Apache Derby tutorial to create another database, but this also failed on this step.
The sample database which you show does however work for me.
Any ideas would be appreciated.
Thanks.
Sorry, for the multiple posts. One must be patient to see them.
I do believe I have found the answer. If I create the database with app as the user, the step that shows the tables operates correctly and the desktop application is created.
Wow... Three separate comments. Let me try to answer them.
In the first comment, you are connected to the Derby (JavaDB) instance as nbuser which likely does not have tables unless you create them as nbuser. If you log into the database using APP/APP, or app/app (The most likely combinations). You will be in the APP schema where the Friends table is located.
The second comment leads me to believe that the DBs are different. If you create the DB in NetBeans, it places it in the .netbeans-derby directory. When you start the database from NetBeans, it looks in this directory. If you create the database some other place, you need to tell the persistence.xml javax.persistence.jdbc.url where the database is located with a path like C:\derby\db, etc.
The last comment may be related to the second remark above.
I hope this helps.
John
Post a Comment