NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
javydreamercsw
Joined: 22 Jun 2009 Posts: 456
|
Posted: Tue Sep 15, 2009 11:49 pm Post subject: Embedded Derby in RCP |
|
|
| Is there a clear guide on how to do this? In my case the persistence entity is never found. |
|
| Back to top |
|
 |
Charles F. Munat Posted via mailing list.
|
Posted: Wed Sep 16, 2009 12:40 am Post subject: Embedded Derby in RCP |
|
|
I have had the exact same problem. After following a tutorial (that I
since have lost track of), I had a Embedded DB module, but could not
find the driver when attempting to use it from another module. Checked
everything several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the persistence
entity is never found. |
|
|
| Back to top |
|
 |
bruehlicke Posted via mailing list.
|
Posted: Wed Sep 16, 2009 2:22 am Post subject: Embedded Derby in RCP |
|
|
There are multiple ways of doing this. One way is to use the
Connection and Driver xml and register the driver and use this
together with the db.explorer.ConnectionManager - or - you could try
to see the example from Heiko's book where he is using Derby to store
some music records.
Below my "DerbyEmbeddedDriver.xml" which is using the Driver form a
module which is a library wrapper around the derby.jar - maybe that
helps.
<?xml version='1.0'?>
<!DOCTYPE driver PUBLIC '-//NetBeans//DTD JDBC Driver 1.1//EN'
'http://www.netbeans.org/dtds/jdbc-driver-1_1.dtd'>
<driver>
<name value='apache_derby_embedded'/>
<display-name value='Java DB (Embedded DerbyDB)'/>
<class value='org.apache.derby.jdbc.EmbeddedDriver'/>
<urls>
<!-- Idea here is to use
nbinst://code.name.base.of.library.wrapper/modules/ext/xyz.jar -->
<url value="nbinst://org.apache.derby/modules/ext/derby.jar"/>
</urls>
</driver>
On Tue, Sep 15, 2009 at 7:40 PM, Charles F. Munat <address-removed> wrote:
| Quote: | I have had the exact same problem. After following a tutorial (that I since
have lost track of), I had a Embedded DB module, but could not find the
driver when attempting to use it from another module. Checked everything
several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: |
Is there a clear guide on how to do this? In my case the persistence
entity is never found.
|
|
|
|
| Back to top |
|
 |
Ernie Rael Posted via mailing list.
|
Posted: Wed Sep 16, 2009 3:38 am Post subject: Embedded Derby in RCP |
|
|
http://platform.netbeans.org/tutorials/nbm-crud.html might be the
tutorial you were thinking of.
-ernie
On 9/15/2009 5:40 PM, Charles F. Munat wrote:
| Quote: | I have had the exact same problem. After following a tutorial (that I
since have lost track of), I had a Embedded DB module, but could not
find the driver when attempting to use it from another module. Checked
everything several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the persistence
entity is never found.
|
|
|
|
| Back to top |
|
 |
Charles F. Munat Posted via mailing list.
|
Posted: Wed Sep 16, 2009 5:27 am Post subject: Embedded Derby in RCP |
|
|
I'll take a look at this when I get a chance. I think I might have
deleted the app when I gave up and decided to try Eclipse (not that
that's going much better).
Actually, I was following Heiko's book (which I bought) chapter by
chapter. I tried loading up the example app, but it did not work on my
Mac because it required Java 1.6. I'm now on Snow Leopard, so maybe I
should try again.
Overall though, I couldn't recommend the book to anyone but a seasoned
pro. There appear to be a lot of unexplained things in it. For example,
there are lots of "here's what the code would look like" sections.
That's nice. Now where does that code go? No clue. I tried searching to
find the code in the examples, but it's nowhere in any of the examples.
After that, I pretty much gave up on the book. A shame, too. It looks
like a really cool system, but I don't have time to figure it out by
trial and error, and posts to this list drew no replies. Maybe it's too
early?
Thanks again for the response. If I try again with NetBeans, I'll
definitely use it.
Chas.
bruehlicke wrote:
| Quote: | There are multiple ways of doing this. One way is to use the
Connection and Driver xml and register the driver and use this
together with the db.explorer.ConnectionManager - or - you could try
to see the example from Heiko's book where he is using Derby to store
some music records.
Below my "DerbyEmbeddedDriver.xml" which is using the Driver form a
module which is a library wrapper around the derby.jar - maybe that
helps.
<?xml version='1.0'?>
<!DOCTYPE driver PUBLIC '-//NetBeans//DTD JDBC Driver 1.1//EN'
'http://www.netbeans.org/dtds/jdbc-driver-1_1.dtd'>
<driver>
<name value='apache_derby_embedded'/>
<display-name value='Java DB (Embedded DerbyDB)'/>
<class value='org.apache.derby.jdbc.EmbeddedDriver'/>
<urls>
<!-- Idea here is to use
nbinst://code.name.base.of.library.wrapper/modules/ext/xyz.jar -->
<url value="nbinst://org.apache.derby/modules/ext/derby.jar"/>
</urls>
</driver>
On Tue, Sep 15, 2009 at 7:40 PM, Charles F. Munat <address-removed> wrote:
| Quote: | I have had the exact same problem. After following a tutorial (that I since
have lost track of), I had a Embedded DB module, but could not find the
driver when attempting to use it from another module. Checked everything
several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the persistence
entity is never found.
|
|
|
|
|
| Back to top |
|
 |
Charles F. Munat Posted via mailing list.
|
Posted: Wed Sep 16, 2009 5:38 am Post subject: Embedded Derby in RCP |
|
|
Looks familiar. Not sure it's exactly the same, but it's very close.
Thanks very much! I've been looking for that one for some time.
Chas.
Ernie Rael wrote:
| Quote: | http://platform.netbeans.org/tutorials/nbm-crud.html might be the
tutorial you were thinking of.
-ernie
On 9/15/2009 5:40 PM, Charles F. Munat wrote:
| Quote: | I have had the exact same problem. After following a tutorial (that I
since have lost track of), I had a Embedded DB module, but could not
find the driver when attempting to use it from another module. Checked
everything several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the persistence
entity is never found.
|
|
|
|
|
| Back to top |
|
 |
bruehlicke Posted via mailing list.
|
Posted: Wed Sep 16, 2009 1:33 pm Post subject: Embedded Derby in RCP |
|
|
Note, all of the source from Heiko's books is on the CD with the book
and there you can see where the code is going since it is all
compilable projects.
B-)
On Wed, Sep 16, 2009 at 12:27 AM, Charles F. Munat <address-removed> wrote:
| Quote: | I'll take a look at this when I get a chance. I think I might have deleted
the app when I gave up and decided to try Eclipse (not that that's going
much better).
Actually, I was following Heiko's book (which I bought) chapter by chapter.
I tried loading up the example app, but it did not work on my Mac because it
required Java 1.6. I'm now on Snow Leopard, so maybe I should try again.
Overall though, I couldn't recommend the book to anyone but a seasoned pro.
There appear to be a lot of unexplained things in it. For example, there are
lots of "here's what the code would look like" sections. That's nice. Now
where does that code go? No clue. I tried searching to find the code in the
examples, but it's nowhere in any of the examples. After that, I pretty much
gave up on the book. A shame, too. It looks like a really cool system, but I
don't have time to figure it out by trial and error, and posts to this list
drew no replies. Maybe it's too early?
Thanks again for the response. If I try again with NetBeans, I'll definitely
use it.
Chas.
bruehlicke wrote:
| Quote: |
There are multiple ways of doing this. One way is to use the
Connection and Driver xml and register the driver and use this
together with the db.explorer.ConnectionManager - or - you could try
to see the example from Heiko's book where he is using Derby to store
some music records.
Below my "DerbyEmbeddedDriver.xml" which is using the Driver form a
module which is a library wrapper around the derby.jar - maybe that
helps.
<?xml version='1.0'?>
<!DOCTYPE driver PUBLIC '-//NetBeans//DTD JDBC Driver 1.1//EN'
'http://www.netbeans.org/dtds/jdbc-driver-1_1.dtd'>
<driver>
|
|
| Back to top |
|
 |
Geertjan Wielenga Posted via mailing list.
|
Posted: Wed Sep 16, 2009 1:41 pm Post subject: Embedded Derby in RCP |
|
|
And, here's a complete tutorial about how to integrate a database into
your NetBeans Platform application:
http://platform.netbeans.org/tutorials/nbm-crud.html
-- Geertjan
bruehlicke wrote:
| Quote: | Note, all of the source from Heiko's books is on the CD with the book
and there you can see where the code is going since it is all
compilable projects.
B-)
On Wed, Sep 16, 2009 at 12:27 AM, Charles F. Munat <address-removed> wrote:
| Quote: | I'll take a look at this when I get a chance. I think I might have deleted
the app when I gave up and decided to try Eclipse (not that that's going
much better).
Actually, I was following Heiko's book (which I bought) chapter by chapter.
I tried loading up the example app, but it did not work on my Mac because it
required Java 1.6. I'm now on Snow Leopard, so maybe I should try again.
Overall though, I couldn't recommend the book to anyone but a seasoned pro.
There appear to be a lot of unexplained things in it. For example, there are
lots of "here's what the code would look like" sections. That's nice. Now
where does that code go? No clue. I tried searching to find the code in the
examples, but it's nowhere in any of the examples. After that, I pretty much
gave up on the book. A shame, too. It looks like a really cool system, but I
don't have time to figure it out by trial and error, and posts to this list
drew no replies. Maybe it's too early?
Thanks again for the response. If I try again with NetBeans, I'll definitely
use it.
Chas.
bruehlicke wrote:
| Quote: | There are multiple ways of doing this. One way is to use the
Connection and Driver xml and register the driver and use this
together with the db.explorer.ConnectionManager - or - you could try
to see the example from Heiko's book where he is using Derby to store
some music records.
Below my "DerbyEmbeddedDriver.xml" which is using the Driver form a
module which is a library wrapper around the derby.jar - maybe that
helps.
<?xml version='1.0'?>
<!DOCTYPE driver PUBLIC '-//NetBeans//DTD JDBC Driver 1.1//EN'
'http://www.netbeans.org/dtds/jdbc-driver-1_1.dtd'>
<driver>
<name value='apache_derby_embedded'/>
<display-name value='Java DB (Embedded DerbyDB)'/>
<class value='org.apache.derby.jdbc.EmbeddedDriver'/>
<urls>
<!-- Idea here is to use
nbinst://code.name.base.of.library.wrapper/modules/ext/xyz.jar -->
<url value="nbinst://org.apache.derby/modules/ext/derby.jar"/>
</urls>
</driver>
On Tue, Sep 15, 2009 at 7:40 PM, Charles F. Munat <address-removed> wrote:
| Quote: | I have had the exact same problem. After following a tutorial (that I
since
have lost track of), I had a Embedded DB module, but could not find the
driver when attempting to use it from another module. Checked everything
several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the persistence
entity is never found.
|
|
|
|
|
|
|
| Back to top |
|
 |
Robert C Kelsey Posted via mailing list.
|
Posted: Wed Sep 16, 2009 5:57 pm Post subject: Embedded Derby in RCP |
|
|
That is an interesting tutorial, but does it address an embedded Derby
database?
Robert
-----Original Message-----
From: address-removed [mailto:address-removed]
Sent: Wednesday, September 16, 2009 8:41 AM
To: address-removed
Subject: Re: [openide-dev] Embedded Derby in RCP
And, here's a complete tutorial about how to integrate a database into your
NetBeans Platform application:
http://platform.netbeans.org/tutorials/nbm-crud.html
-- Geertjan
bruehlicke wrote:
| Quote: | Note, all of the source from Heiko's books is on the CD with the book
and there you can see where the code is going since it is all
compilable projects.
B-)
On Wed, Sep 16, 2009 at 12:27 AM, Charles F. Munat <address-removed> wrote:
| Quote: | I'll take a look at this when I get a chance. I think I might have
deleted the app when I gave up and decided to try Eclipse (not that
that's going much better).
Actually, I was following Heiko's book (which I bought) chapter by
|
| chapter.
| Quote: | | Quote: | I tried loading up the example app, but it did not work on my Mac
because it required Java 1.6. I'm now on Snow Leopard, so maybe I should
|
| try again.
| Quote: | | Quote: |
Overall though, I couldn't recommend the book to anyone but a seasoned
|
| pro.
| Quote: | | Quote: | There appear to be a lot of unexplained things in it. For example,
there are lots of "here's what the code would look like" sections.
That's nice. Now where does that code go? No clue. I tried searching
to find the code in the examples, but it's nowhere in any of the
examples. After that, I pretty much gave up on the book. A shame,
too. It looks like a really cool system, but I don't have time to
figure it out by trial and error, and posts to this list drew no replies.
|
| Maybe it's too early?
| Quote: | | Quote: |
Thanks again for the response. If I try again with NetBeans, I'll
definitely use it.
Chas.
bruehlicke wrote:
| Quote: | There are multiple ways of doing this. One way is to use the
Connection and Driver xml and register the driver and use this
together with the db.explorer.ConnectionManager - or - you could try
to see the example from Heiko's book where he is using Derby to
store some music records.
Below my "DerbyEmbeddedDriver.xml" which is using the Driver form a
module which is a library wrapper around the derby.jar - maybe that
helps.
<?xml version='1.0'?>
<!DOCTYPE driver PUBLIC '-//NetBeans//DTD JDBC Driver 1.1//EN'
'http://www.netbeans.org/dtds/jdbc-driver-1_1.dtd'>
<driver>
<name value='apache_derby_embedded'/> <display-name value='Java DB
(Embedded DerbyDB)'/> <class
value='org.apache.derby.jdbc.EmbeddedDriver'/>
<urls>
<!-- Idea here is to use
nbinst://code.name.base.of.library.wrapper/modules/ext/xyz.jar -->
<url value="nbinst://org.apache.derby/modules/ext/derby.jar"/>
</urls>
</driver>
On Tue, Sep 15, 2009 at 7:40 PM, Charles F. Munat <address-removed>
|
|
| wrote:
| Quote: | | Quote: | | Quote: |
| Quote: | I have had the exact same problem. After following a tutorial (that
I since have lost track of), I had a Embedded DB module, but could
not find the driver when attempting to use it from another module.
Checked everything several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the
persistence entity is never found.
|
|
|
|
|
|
|
| Back to top |
|
 |
David Beer Posted via mailing list.
|
Posted: Wed Sep 16, 2009 7:05 pm Post subject: Embedded Derby in RCP |
|
|
On Wed, 16 Sep 2009 12:56:36 -0500
"Robert C Kelsey" <address-removed> wrote:
| Quote: | That is an interesting tutorial, but does it address an embedded Derby
database?
Robert
-----Original Message-----
From: address-removed [mailto:address-removed]
Sent: Wednesday, September 16, 2009 8:41 AM
To: address-removed
Subject: Re: [openide-dev] Embedded Derby in RCP
And, here's a complete tutorial about how to integrate a database
into your NetBeans Platform application:
http://platform.netbeans.org/tutorials/nbm-crud.html
-- Geertjan
bruehlicke wrote:
| Quote: | Note, all of the source from Heiko's books is on the CD with the
book and there you can see where the code is going since it is all
compilable projects.
B-)
On Wed, Sep 16, 2009 at 12:27 AM, Charles F. Munat <address-removed>
wrote:
| Quote: | I'll take a look at this when I get a chance. I think I might have
deleted the app when I gave up and decided to try Eclipse (not
that that's going much better).
Actually, I was following Heiko's book (which I bought) chapter by
|
| chapter.
| Quote: | | Quote: | I tried loading up the example app, but it did not work on my Mac
because it required Java 1.6. I'm now on Snow Leopard, so maybe I
should
|
| try again.
| Quote: | | Quote: |
Overall though, I couldn't recommend the book to anyone but a
seasoned
|
| pro.
| Quote: | | Quote: | There appear to be a lot of unexplained things in it. For example,
there are lots of "here's what the code would look like" sections.
That's nice. Now where does that code go? No clue. I tried
searching to find the code in the examples, but it's nowhere in
any of the examples. After that, I pretty much gave up on the
book. A shame, too. It looks like a really cool system, but I
don't have time to figure it out by trial and error, and posts to
this list drew no replies.
|
| Maybe it's too early?
| Quote: | | Quote: |
Thanks again for the response. If I try again with NetBeans, I'll
definitely use it.
Chas.
bruehlicke wrote:
| Quote: | There are multiple ways of doing this. One way is to use the
Connection and Driver xml and register the driver and use this
together with the db.explorer.ConnectionManager - or - you could
try to see the example from Heiko's book where he is using Derby
to store some music records.
Below my "DerbyEmbeddedDriver.xml" which is using the Driver form
a module which is a library wrapper around the derby.jar - maybe
that helps.
<?xml version='1.0'?>
<!DOCTYPE driver PUBLIC '-//NetBeans//DTD JDBC Driver 1.1//EN'
'http://www.netbeans.org/dtds/jdbc-driver-1_1.dtd'>
<driver>
<name value='apache_derby_embedded'/> <display-name value='Java
DB (Embedded DerbyDB)'/> <class
value='org.apache.derby.jdbc.EmbeddedDriver'/>
<urls>
<!-- Idea here is to use
nbinst://code.name.base.of.library.wrapper/modules/ext/xyz.jar
--> <url value="nbinst://org.apache.derby/modules/ext/derby.jar"/>
</urls>
</driver>
On Tue, Sep 15, 2009 at 7:40 PM, Charles F. Munat <address-removed>
|
|
| wrote:
| Quote: | | Quote: | | Quote: |
| Quote: | I have had the exact same problem. After following a tutorial
(that I since have lost track of), I had a Embedded DB module,
but could not find the driver when attempting to use it from
another module. Checked everything several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the
persistence entity is never found.
|
|
|
|
|
|
Guys I have been watching this thread with interest, my first NB RCP
application I did back a few years a go used Derby Embeded databse.
I can provide information on how I did it if you need help. My
application is listed on the NetBeans platform website. And is
available for download from www.thebeerfamily.com
--
Thanks
David |
|
| Back to top |
|
 |
Ernie Rael Posted via mailing list.
|
Posted: Wed Sep 16, 2009 7:24 pm Post subject: Embedded Derby in RCP |
|
|
FYI, starting at netbeans.org
Community > Develop NetBeans RCP Applications
This page is a treasure trove. On here under "Latest Tutorials", the tutorial you were looking for is listed. There is also a Tutorials link on that page which lists that tutorial and lots more.
-ernie
On 9/15/2009 10:38 PM, Charles F. Munat wrote: | Quote: | Looks familiar. Not sure it's exactly the same, but it's very close.
Thanks very much! I've been looking for that one for some time.
Chas.
Ernie Rael wrote:
| Quote: | http://platform.netbeans.org/tutorials/nbm-crud.html might be the tutorial you were thinking of.
-ernie
On 9/15/2009 5:40 PM, Charles F. Munat wrote:
| Quote: | I have had the exact same problem. After following a tutorial (that I since have lost track of), I had a Embedded DB module, but could not find the driver when attempting to use it from another module. Checked everything several times over.
If you find a guide, I'd love to see it.
Chas. Munat
Javier Ortiz wrote:
| Quote: | Is there a clear guide on how to do this? In my case the persistence entity is never found.
|
|
|
|
|
|
| Back to top |
|
 |
Fabrizio Giudici Posted via mailing list.
|
Posted: Wed Sep 16, 2009 7:36 pm Post subject: Embedded Derby in RCP |
|
|
David Beer wrote:
| Quote: |
Guys I have been watching this thread with interest, my first NB RCP
application I did back a few years a go used Derby Embeded databse.
I can provide information on how I did it if you need help. My
application is listed on the NetBeans platform website. And is
available for download from www.thebeerfamily.com
| blueMarine also uses embedded Derby. The relevant modules can be checked
out from openbluesky.kenai.com.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
address-removed - mobile: +39 348.150.6941 |
|
| Back to top |
|
 |
javydreamercsw
Joined: 22 Jun 2009 Posts: 456
|
Posted: Thu Sep 17, 2009 12:19 am Post subject: Embedded Derby in RCP |
|
|
Thanks to all! I finally made it work!
I used the tutorial link provided. It turned out that I was doing things correctly. Just changed hibernate for eclipselink as in the tutorial and everything works now!
Should it be a Hibernate bug as both are using the same specification? |
|
| Back to top |
|
 |
Miguel Garcia-Lopez Posted via mailing list.
|
Posted: Thu Sep 17, 2009 8:16 am Post subject: Embedded Derby in RCP |
|
|
On 16/09/2009, at 7:27, Charles F. Munat wrote:
| Quote: | Actually, I was following Heiko's book (which I bought) chapter by
chapter. I tried loading up the example app, but it did not work on
my Mac because it required Java 1.6. I'm now on Snow Leopard, so
maybe I should try again.
|
Might be slightly off-topic, but may I just mention you can also run
Java 1.6 for Mac. If autoupdate did not download it for you, it can be
get from http://developer.apple.com/java/download/.
Chances are, you may already have it installed but not configured as
the default Java platform. To change that, run "Java Preferences"
from /Applications/Utilities.
This applies to (plain) Leopard, but I guess might be the same for
Snow Leopard.
--
Miguel Garc |
|
| Back to top |
|
 |
Charles F. Munat Posted via mailing list.
|
Posted: Thu Sep 17, 2009 8:55 am Post subject: Embedded Derby in RCP |
|
|
Snow Leopard is 1.6 only. On Leopard, I had 1.6 installed in addition to
1.5, but it was not an obvious procedure to get it to work with
NetBeans, and I had reasons not to make it the default. Personally, I
think that it was a mistake to require 1.6 for the example to run in the
book. Surely, it could have been done in a way that would run on 1.5,
making life a lot easier for many people.
Chas.
Miguel Garcia-Lopez wrote:
| Quote: |
On 16/09/2009, at 7:27, Charles F. Munat wrote:
| Quote: | Actually, I was following Heiko's book (which I bought) chapter by
chapter. I tried loading up the example app, but it did not work on my
Mac because it required Java 1.6. I'm now on Snow Leopard, so maybe I
should try again.
|
Might be slightly off-topic, but may I just mention you can also run
Java 1.6 for Mac. If autoupdate did not download it for you, it can be
get from http://developer.apple.com/java/download/.
Chances are, you may already have it installed but not configured as the
default Java platform. To change that, run "Java Preferences" from
/Applications/Utilities.
This applies to (plain) Leopard, but I guess might be the same for Snow
Leopard.
--
Miguel García López
Director Técnico
Technical Manager
.......................................................
E N V I T E L
Parque Científico de Madrid - Local 105
PTM - C/Santiago Grisolía, 2
28760 Tres Cantos - Madrid - Spain
T: +34 91 334 06 56
F: +34 91 358 52 36
M: +34 649 91 60 60
.......................................
address-removed
www.envitel.com
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|