java - Class [org.apache.derby.jdbc.ClientDriver] not found. When trying to connect to db -


i have set project in netbeans, created script, made new database javadb. can connect gui - display tables contents etc, when run application with:

 entitymanager em = persistence.createentitymanagerfactory("lab5pu").createentitymanager(); 

i quite long exception:

[el info]: 2013-04-05 21:40:45.554--serversession(1198260109)--eclipselink, version: eclipse persistence services - 2.3.0.v20110604-r9504 [el severe]: 2013-04-05 21:40:45.574--serversession(1198260109)--local exception stack:  exception [eclipselink-4003] (eclipse persistence services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.databaseexception exception in thread "awt-eventqueue-0" javax.persistence.persistenceexception: exception [eclipselink-4003] (eclipse persistence services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.databaseexception exception description: configuration error.  class [org.apache.derby.jdbc.clientdriver] not found. exception description: configuration error.  class [org.apache.derby.jdbc.clientdriver] not found.     @ org.eclipse.persistence.exceptions.databaseexception.configurationerrorclassnotfound(databaseexception.java:82) 

i can see javadb drivers in driver section in services, have no idea error might be.

edit: persistance.xml requested:

<?xml version="1.0" encoding="utf-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">   <persistence-unit name="lab5pu" transaction-type="resource_local">     <provider>org.eclipse.persistence.jpa.persistenceprovider</provider>     <class>lab5.colleagues</class>     <properties>       <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/lab5"/>       <property name="javax.persistence.jdbc.password" value="mypass"/>       <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.clientdriver"/>       <property name="javax.persistence.jdbc.user" value="admin"/>       <property name="eclipselink.ddl-generation" value="create-tables"/>     </properties>   </persistence-unit> </persistence> 

enter image description here

i think problem have don't have derby driver in classpath of project.

you can achieve adding javadb library project:

  • right-click on project
  • properties -> libraries
  • add library -> javadb driver

this includes derby.jar, derbyclient.jar , derbynet.jar in project's classpath.

the derbyclient.jar contains class org.apache.derby.jdbc.clientdriver code complaining about.


Comments

  1. Java - Class [Org.Apache.Derby.Jdbc.Clientdriver] Not Found. When
    Trying To Connect To Db - >>>>> Download Now

    >>>>> Download Full

    Java - Class [Org.Apache.Derby.Jdbc.Clientdriver] Not Found. When
    Trying To Connect To Db - >>>>> Download LINK

    >>>>> Download Now

    Java - Class [Org.Apache.Derby.Jdbc.Clientdriver] Not Found. When
    Trying To Connect To Db - >>>>> Download Full

    >>>>> Download LINK gI

    ReplyDelete

Post a Comment

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -