openjpa - JPA connection error URL may be Invalid -


development environment ibm rad 8.5, websphere 8.5, jsf 2.0 jpa

i getting following error while try connect database in jsf2.0 application

there errors initializing configuration: <openjpa-2.2.1-snapshot-r422266:1325904 fatal user error> org.apache.openjpa.util.userexception: connection not obtained driver class "org.apache.derby.jdbc.embeddeddriver" , url "jdbc:derby:f:\trainingdb;create=true".  may have specified invalid url. 

persistence.xml file below

<?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="trainingjpa">                <provider>org.apache.openjpa.persistence.persistenceproviderimpl</provider>         <class>com.ewt.traningjpa.entity.emptbl</class>                  <properties>             <property name="openjpa.connectiondrivername" value="org.apache.derby.jdbc.embeddeddriver"/>             <property name="openjpa.connectionurl" value="jdbc:derby:f:\trainingdb;create=true"/>         </properties>      </persistence-unit> </persistence> 

i have created connecting using database development option available in rad 8.5

i know sure url correct. other possible reason error.

tia

other possible causes:

  • you don't have f: drive mapped on pc
  • you don't have sufficient permission write file f:\trainingdb (windows acl / uac maybe?)
  • the file f:\trainingdb locked other process

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -