Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink Example: Editor Based CRUD with JFace Databinding (Derby DB)

Hi Tim,

thanks for your help, it works now.

Regards,
Stefan

Am Donnerstag, 10. April 2008 schrieb Tim Hollosy:
> I thought I had gotten rid of the PojoObservables stuff, sorry about
> that. I took out the last import so you don't need that anymore, you
> can update the ui package from svn to get the latest.
>
> As for the DB, you need the Derby Demo DB, you can get it here:
> http://wiki.eclipse.org/EclipseLink/Development/OSGi_Proof_of_Concept#Demo_
>Setup
>
> Let me know if that works & thanks for trying it out.
>
> Tim
>
> On Thu, Apr 10, 2008 at 8:41 AM, Stefan Armbruster
>
> <ml001@xxxxxxxxxxxxxxxx> wrote:
> > Hi Tim,
> >
> >  thanks a lot for providing your CRUD example. A hint for other users:
> > You might use a Eclipse 3.4 target environment, Eclipse 3.3 fails because
> > org.eclipse.core.databinding.beans.PojoObservables seems to be available
> > in 3.4+.
> >
> >  I succeeded in starting up the application, but it fails to connect to
> > the database. In the console I get the stack trace below. The Derby JDBC
> > driver is not registered in the DriverManager. Any hints to solve this?
> >
> >  Thanks,
> >  Stefan
> >
> >
> >  [EPS Config]: The target entity (reference) class for the one to many
> > mapping element [private java.util.List
> >  com.weecode.plugin.comics.model.eo.Title.issues] is being defaulted to:
> > class com.weecode.plugin.comics.model.eo.Issue.
> >  [EPS Info]: TopLink, version: Eclipse Persistence Services - @VERSION@
> > (Build @BUILD_NUMBER@)
> >  [EPS Config]: Connection(16987216)--connecting(DatabaseLogin(
> >         platform=>DerbyPlatform
> >         user name=> "app"
> >         datasource URL=> "jdbc:derby://localhost:1527/sample;create=true"
> >  ))
> >  [EPS Warning]: java.sql.SQLException: No suitable driver found for
> >  jdbc:derby://localhost:1527/sample;create=true
> >  [EPS Severe]: Local Exception Stack:
> >  Exception [EclipseLink-4002] (Eclipse Persistence Services - @VERSION@
> > (Build @BUILD_NUMBER@)):
> > org.eclipse.persistence.exceptions.DatabaseException Internal Exception:
> > java.sql.SQLException: No suitable driver found for
> > jdbc:derby://localhost:1527/sample;create=true
> >  Error Code: 0
> >         at
> > 
> > org.eclipse.persistence.exceptions.DatabaseException.sqlException(Databas
> >eException.java:304) at
> > 
> > org.eclipse.persistence.exceptions.DatabaseException.sqlException(Databas
> >eException.java:299) at
> > 
> > org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnecto
> >r.java:98) at
> > 
> > org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(Data
> >sourceLogin.java:161) at
> > 
> > org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connec
> >tInternal(DatasourceAccessor.java:270) at
> > 
> > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectI
> >nternal(DatabaseAccessor.java:260) at
> > 
> > org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connec
> >t(DatasourceAccessor.java:362) at
> > 
> > org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(Co
> >nnectionPool.java:125) at
> > 
> > org.eclipse.persistence.sessions.server.ConnectionPool.startUp(Connection
> >Pool.java:362) at
> > 
> > org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSessi
> >on.java:444) at
> > 
> > org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(Datab
> >aseSessionImpl.java:608) at
> > 
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(E
> >ntityManagerFactoryProvider.java:225) at
> > 
> > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(Entity
> >ManagerSetupImpl.java:231) at
> > 
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSe
> >ssion(EntityManagerFactoryImpl.java:69) at
> > 
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntit
> >yManagerImpl(EntityManagerFactoryImpl.java:118) at
> > 
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntit
> >yManagerImpl(EntityManagerFactoryImpl.java:112) at
> > 
> > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntit
> >yManager(EntityManagerFactoryImpl.java:100) at
> > 
> > com.weecode.plugin.comics.model.emf.ComicsEntityManagerFactory.createEnti
> >tyManager(ComicsEntityManagerFactory.java:44) at
> > 
> > com.weecode.plugin.comics.model.PublishersModel.<init>(PublishersModel.ja
> >va:22) at
> > 
> > com.weecode.plugin.comics.ui.views.PublishersView$2$1.run(PublishersView.
> >java:136) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> > Caused by: java.sql.SQLException: No suitable driver found for
> >  jdbc:derby://localhost:1527/sample;create=true
> >         at java.sql.DriverManager.getConnection(DriverManager.java:602)
> >         at java.sql.DriverManager.getConnection(DriverManager.java:154)
> >         at
> > 
> > org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnecto
> >r.java:85) ... 18 more
> >
> >  Am Mittwoch, 9. April 2008 schrieb Tim Hollosy:
> > > Thanks to everyone on the mailing list we were able to complete a
> > >
> >  > simple crud with relative ease. I'm pleased to say much more time was
> >  > spent getting JFace Databinding to work than EclipseLink  :)
> >  >
> >  > We've got 2 views: A publisher view & a title view, both open their
> >  > respective editors.
> >  >
> >  > >From the publisher editor you may: Rename a publisher,
> >  >
> >  > view/add/delete/update respective titles
> >  >
> >  > >From the title editor you may: Edit format/name, change publisher.
> >  >
> >  > The editors also all use JFace Databinding and use TableViewers,
> >  > ComboViewers with JFace Databinding. As a consequence of using JFace
> >  > Databinding the entities must have JavaBeans PropertyChangeSupport,
> >  > for that reason our entities extend a BaseEntity class and have some
> >  > extra code in the setters to fire propertychange events.
> >  >
> >  > The CRUD consists of 3 plugin projects:
> >  > com.weecode.app.comics : Base Plugin, sets up default perspective, has
> >  > the eclipse product
> >  > com.weecode.app.comics.model: Contains the entities, sets up the EMF,
> >  > etc. com.weecode.app.comics.ui: All the views & editors
> >  >
> >  > Screenshot:
> >  > http://unvoiced.com/comics_crud_ss.png
> >  >
> >  > Anon SVN:
> >  > http://weecode.com/EclipseLinkRcpCrud/
> >  >
> >  > We'd like to contribute the code to EclipseLink, any help in
> >  > refactoring to the appropriate package names & getting the correct
> >  > copyright notices, etc. in would be helpful.
> >  >
> >  > Also, of course we'd like some more experienced JPA eyes to take a
> >  > look at this to make sure we're not doing something completely stupid.
> >  >
> >  > Warning: There is close to no documentation, so if you see something
> >  > that we're doing that looks odd and would like an explanation let me
> >  > know.
> >  >
> >  > Thanks again!
> >  > Tim
> > >
> > > _______________________________________________
> > >
> >  > eclipselink-users mailing list
> >  > eclipselink-users@xxxxxxxxxxx
> >  > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> >
> >  _______________________________________________
> >  eclipselink-users mailing list
> >  eclipselink-users@xxxxxxxxxxx
> >  https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top