d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > A Class To Access My Database In Java > Reward 200 Fg
Prev123Next
Add Reply New Topic New Poll
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 12:43pm
Thanks carteblanche.

Now it complains about the second line:
EntityManager em = factory.createEntityManager();

run:
fyldbord [EL Info]: 2013-03-24 19:38:06.572--ServerSession(2016803362)--EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
[EL Severe]: 2013-03-24 19:38:06.587--ServerSession(2016803362)--Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found

Ill look into it but dont really understand it
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Mar 24 2013 12:52pm
is it in your class path?
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 12:58pm
the persisence xml file is in a folder called META-INF.

The other classes is in the folder called holdem.

Should i add under the ant library manager. And if so which libraries? persistence? persistence jpa2? postgreSQL JDBC Driver?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Mar 24 2013 01:04pm
read the error you just posted. is that class in your classpath?
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 01:30pm
there is something called eclipselink (JPA 2.0) under the compile tab under libraries.

when I press add library. there is nothing called [org.apache.derby.jdbc.ClientDriver]
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 01:34pm
Should it be downloaded separately?
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 01:38pm
have imported import

java.lang.Object.*;
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 02:19pm
Have added some libraries and the first 2 lines seems to work :) TY catablance for your patience

But cant get this line to work
Player player = em.find( entityClass, IDnumber);

What should i write where it says entityClass?

It wont accept If i just write the name of the entityclass or null

This post was edited by tigeranden on Mar 24 2013 02:20pm
Member
Posts: 4,478
Joined: Feb 10 2010
Gold: 1,806.00
Mar 24 2013 02:42pm
Think it may work now. :)

200 fg send to labatymo.

sorry for spamming the thread (I need to be more stubborn). And thanks for all the help I have got. (ty carteblance)

will no doubt have more question at some later point.
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Mar 25 2013 07:06am
Quote (tigeranden @ Mar 24 2013 04:42pm)
Think it may work now. :)

200 fg send to labatymo.

sorry for spamming the thread (I need to be more stubborn). And thanks for all the help I have got. (ty carteblance)

will no doubt have more question at some later point.


thanks, glad i could help
Go Back To Programming & Development Topic List
Prev123Next
Add Reply New Topic New Poll