openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alvaroCab <alvarocaba...@hotmail.com>
Subject Re: OpenJPA not connecting the database
Date Tue, 22 Dec 2009 18:10:21 GMT

Hi, I am using Websphere CE 2.1.  I put the Trace function, but it didn't
execute it, it didn't give any Log because it seems like it is not loading
the openJPA. In my JUnit project's build Path I have this JARs that I found
in (C:\IBM\WASCE21\repository):

        org/apache/openjpa/openjpa/1.0.2/openjpa-1.0.2.jar
        commons-lang/commons-lang/2.3/commons-lang-2.3.jar
        net/sourceforge/serp/serp/1.11.0/serp-1.11.0.jar
       
commons-collections/commons-collections/3.2/commons-collections-3.2.jar

and also the Derby Net Client Jars.

I started the server and derby databases that work on the program and, as I
said before, I used another provider on the persistence.xml and it worked so
it seems the problem is not with the pools or the driver. It allways shows
the error message like if it was not interpreting the openJPA commands.

Thanks,

Alvaro. 




Rick Curtis wrote:
> 
> Try setting <property name="openjpa.Log" value="DefaultLevel=TRACE" /> and
> upload the trace somewhere.... that should give us some more info. To
> reiterate a previous question, what application server are you running
> with?
> 
> -- 
> Thanks,
> Rick
> 
> 
> alvaroCab wrote:
>> 
>> Hi, thank you for your answers. The Persistence I put was a quick
>> modification of the one I had with OpenJPA, so that's why it didn't have
>> the correct properties, the correct one is:
>> 
>>   <?xml version="1.0" encoding="UTF-8" ?> 
>>  <persistence version="1.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_1_0.xsd">
>>   <persistence-unit name="VacationUnit">
>>   	<class>vacation.entities.Employee</class> 
>> 	  <properties>
>> 	  <property name="openjpa.ConnectionURL"
>> value="jdbc:derby://localhost:1527/Vacation" /> 
>> 	  <property name="openjpa.ConnectionDriverName"
>> value="org.apache.derby.jdbc.ClientDriver" /> 
>> 	  <property name="openjpa.ConnectionUserName" value="VACATION" /> 
>> 	  <property name="openjpa.Log" value="SQL=TRACE" /> 
>> 	  </properties>
>>    </persistence-unit>
>> </persistence>
>> 
>> The errors are the ones I said before. I tried adding the provider and
>> nothing. I tested a bit changing parameters and I figured out that it's
>> like if it was not able to load the openjpa properties, like if it was
>> not loading the openjpa library, and I have it added on my project's
>> build path, I can even access to it from my Java class. It looks like it
>> doesn't want to work for me :(
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/OpenJPA-not-connecting-the-database-tp4197138p4204875.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message