jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Bermejo <jberm...@germinus.com>
Subject Re: SimpleDBPersistenceManager and PostgreSQL
Date Fri, 04 Nov 2005 10:23:27 GMT
Hi Stefan,

I have tested Jackrabbit tests after doing the following modifications:
- src/main/java/org/apache/jackrabbit/core/state/db/postgresql.ddl
- 
src/main/java/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.java 
(the patch I attach you yesterday)
- applications/test/workspaces/test/workspace.xml. In this file I have 
replaced the persistence manager with the next lines:

       <PersistenceManager 
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
           <param name="driver" value="org.postgresql.Driver"/>
           <param name="url" 
value="jdbc:postgresql://localhost/jackrabbit"/>
           <param name="user" value="user"/>
           <param name="password" value="pass"/>
           <param name="schema" value="postgresql"/>
           <param name="schemaObjectPrefix" value="${wsp.name}_"/>
           <param name="externalBLOBs" value="false"/>
       </PersistenceManager>

Also, you need to include the postgresql (and mysqlconnector) driver 
dependency in maven (project.xml)
<dependency>
   <groupId>postgresql</groupId>
   <artifactId>postgresql</artifactId>
   <version>7.4.1-jdbc3</version>
</dependency>
<dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <version>3.0.10-stable-bin</version>
</dependency>


And this is the result of "maven test" command:
test:single:
    [junit] Running org.apache.jackrabbit.init.TestAll
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 4,705 sec


    [junit] Running org.apache.jackrabbit.test.api.query.TestAll
    [junit] Tests run: 82, Failures: 0, Errors: 0, Time elapsed: 8,697 sec
    [junit] Running org.apache.jackrabbit.test.api.nodetype.TestAll
    [junit] Tests run: 99, Failures: 1, Errors: 0, Time elapsed: 30,932 sec
    [junit] [ERROR] TEST org.apache.jackrabbit.test.api.nodetype.TestAll 
FAILED
    [junit] Running org.apache.jackrabbit.test.api.util.TestAll
    [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0,294 sec
    [junit] Running org.apache.jackrabbit.test.api.lock.TestAll
    [junit] Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 5,512 sec
    [junit] Running org.apache.jackrabbit.test.api.version.TestAll
    [junit] Tests run: 211, Failures: 0, Errors: 0, Time elapsed: 44,165 sec
    [junit] Running org.apache.jackrabbit.test.api.observation.TestAll
    [junit] Tests run: 40, Failures: 0, Errors: 0, Time elapsed: 9,984 sec
    [junit] Running org.apache.jackrabbit.test.api.TestAll
    [junit] Tests run: 583, Failures: 0, Errors: 0, Time elapsed: 25,185 sec
    [junit] Running org.apache.jackrabbit.name.TestAll
    [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0,341 sec
    [junit] Running org.apache.jackrabbit.core.state.TestAll
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 3,643 sec
    [junit] Running org.apache.jackrabbit.core.config.TestAll
    [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0,901 sec
    [junit] Running org.apache.jackrabbit.core.query.TestAll
    [junit] Tests run: 70, Failures: 0, Errors: 0, Time elapsed: 11,748 sec
    [junit] Running org.apache.jackrabbit.core.nodetype.xml.TestAll
    [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 1,064 sec
    [junit] Running org.apache.jackrabbit.core.observation.TestAll
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 4,158 sec
    [junit] Running org.apache.jackrabbit.core.TestAll
    [junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 4,587 sec
BUILD SUCCESSFUL
--------------------------------

The 
target/test-reports/TEST-org.apache.jackrabbit.test.api.nodetype.TestAll.txt 
contains:

--------------------------------
Testsuite: org.apache.jackrabbit.test.api.nodetype.TestAll
Tests run: 99, Failures: 1, Errors: 0, Time elapsed: 30,932 sec

Testcase: 
testIsMandatory(org.apache.jackrabbit.test.api.nodetype.PropertyDefTest):     
FAILED
Node 
/jcr:system/jcr:versionStorage/16/b5/bf/16b5bf7f-9ce6-4646-91ef-06a826181441/1.0/jcr:frozenNode/versionab
leNodeName1 does not contain value for mandatory property: jcr:frozenUuid
junit.framework.AssertionFailedError: Node 
/jcr:system/jcr:versionStorage/16/b5/bf/16b5bf7f-9ce6-4646-91ef-06a
826181441/1.0/jcr:frozenNode/versionableNodeName1 does not contain value 
for mandatory property: jcr:frozenUui
d
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.checkMandatoryConstraint(PropertyDefTest.ja
va:392)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:366)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.traverse(PropertyDefTest.java:373)
        at 
org.apache.jackrabbit.test.api.nodetype.PropertyDefTest.testIsMandatory(PropertyDefTest.java:175)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at 
org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:401)
--------------------------------

After that, I have tested replacing the postgresql schema and driver 
with mysql connector obtaining the same results and the same failure 
test (so, it is not caused by using postgresql).

Now I'm going to continue with tests in our CMS implementation using 
Jackrabbit and feedback will be reported.

I hope this info could help you.

Best regards
  Javier Bermejo

Stefan Guggisberg wrote:

>hi javier
>
>On 11/4/05, Javier Bermejo <jbermejo@germinus.com> wrote:
>  
>
>> Hi Stefan,
>>
>> Currently I can say that simpledbpersistence is much faster than
>>orm-persistence module. I'm having some troubles with referencing nodes (it
>>seems it doesn't work fine, but I need to realize more tests to check it
>>correctly).
>>    
>>
>
>do those problems occur with the SimpleDbPersistenceManager?
>i'd be very surprised...
>
>  
>
>> I hope in a few days or one week to post here some performance results
>>about times for creating nodes, sharing them (using references), versioning
>>and so on.
>>    
>>
>
>that would be very appreciated, thanks.
>
>  
>
>>In a short future we will need to implement a cache system over
>>simpledb and times will change (does anyone try to implement it?).
>>    
>>
>
>chaching ItemState objects retrieved from the PersistenceManager is already
>handled by the SharedItemStateManager using a ItemStateReferenceCache.
>
>caching in the PM is IMO unnecessary and even counterproductive as it
>consumes memory that could be more efficiently used by SharedItemStateManager.
>
>  
>
>> I attach you the postgresql.ddl, but I'm not an expert on it, so, somebody
>>would review it. The main change is to change the BLOB data type to BYTEA
>>(http://www.postgresql.org/docs/7.2/interactive/datatype-binary.html)
>>    
>>
>
>thanks a lot! i'll commit it asap.
>
>cheers
>stefan
>
>  
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message