I found the error.  I was using a previous copy of ofbiz from another
environment.  The configuration is copied at run time to runtime/data/jcr
directory.  It was picking up an old configuration.  I had run clean but
this was not clearing out these directories.

I deleted the data/jcr directory and restarted the server and everything
came up all right after that.


Brett

On Mon, Oct 8, 2012 at 10:43 AM, Brett Palmer <brettgpal...@gmail.com>wrote:

> I'm trying to configure jackrabbit to work with a remote mysql database.
>  I have changed JackRabbit to work with MySql instead of the default derby
> by adding a Versioning and Workspace configuration for mysql.  This same
> configuration works on a local mysql database (ofbiz and mysql on same
> machine), but now when I try to access the remote database I get a
> connection failure.
>
> The same mysql configuration is working for ofbiz because I can correctly
> create the database tables and seed them with the following ant builds:
>
> ant run-install
> ant run-install-seed
>
> But using the same MySql configuration attributes for host, user, and
> password I get the the following error:
>
>
> 20411 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - Failed to
> initialize workspace 'default'
> javax.jcr.RepositoryException: Cannot instantiate persistence manager
> org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> at
> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1346)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.access$300(RepositoryImpl.java:124)
> at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doInitialize(RepositoryImpl.java:2011)
>  at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1994)
> at
> org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:510)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:318)
>
>
>
> I'm not using the standard 'ofbiz' database name.  Would that be a
> possible problem?  Are there other configuration files I am missing to
> setup jackrabbit?  I've only edited the
> ofbiz/framework/jcr/config/jackrabbit.xml file for this mysql change.
>
> Thanks in advance for your help.
>
>
> Brett
>
>
> On Mon, Feb 20, 2012 at 2:34 AM, <m...@javafreedom.org> wrote:
>
>> Hi Brett,
>>
>> let me guess, you have changed the Database to not use derby, right?
>> There was already a short discussion concerning this one here on the list.
>> The solution is rather simple, in that you need to change the
>> jackrabbit.xml file in framework\jcr\config\ to use your database. E.g.:
>>
>>         <PersistenceManager class="org.apache.jackrabbit.**
>> core.persistence.bundle.**PostgreSQLPersistenceManager">
>>           <param name="driver" value="org.postgresql.Driver"/**>
>>           <param name="url" value="jdbc:postgresql://10.**
>> 202.10.80:5432/ofbizcms <http://10.202.10.80:5432/ofbizcms>" />
>>           <param name="schema" value="postgresql" /><!-- warning, this is
>> not the schema name, it's the db type -->
>>           <param name="user" value="ofbiz" />
>>           <param name="password" value="ofbiz" />
>>           <param name="schemaObjectPrefix" value="${wsp.name}_" />
>>           <param name="externalBLOBs" value="false" />
>>         </PersistenceManager>
>>
>> Adopt this for both, the Versioning (Tag: <Versioning>) as well as for
>> the Workspace (Tag: <Workspace>).
>>
>> Hope this helps.
>>
>> R,
>>
>> Markus
>>
>>
>>
>> On Mon, 20 Feb 2012 01:16:49 -0700, Brett Palmer wrote:
>>
>>> This is probably an easy question, but its been a while since we updated
>>> our ofbiz version.  We are trying to update to the latest version from
>>> the
>>> trunk to determine what changes we need to make to our code.
>>>
>>> When I start ofbiz after setting up the database and build, I get a JCR
>>> LoginException and then ofbiz shuts down.
>>>
>>> Is JackRabbit now required to run ofbiz?  If so are there some other
>>> setup
>>> steps that I need to perform?
>>>
>>> Thanks in advance for your help.
>>>
>>>
>>> Brett
>>>
>>>
>>> Here is the stack trace:
>>>
>>>
>>>  dispatcher [auth-dispatcher] (main)^M
>>> 2012-02-20 00:57:42,294 (main) [     JCRFactoryImpl.java:159:ERROR] ^M
>>> ---- exception report
>>> ------------------------------**----------------------------
>>> Exception: javax.jcr.LoginException
>>> Message: LoginModule could not perform authentication: null
>>> ---- cause
>>> ------------------------------**------------------------------**
>>> ---------
>>> Exception: javax.security.auth.login.**LoginException
>>> Message: LoginModule could not perform authentication: null
>>> ---- cause
>>> ------------------------------**------------------------------**
>>> ---------
>>> Exception: java.lang.NullPointerException
>>> Message: null
>>> ---- stack trace
>>> ------------------------------**------------------------------**---
>>> java.lang.NullPointerException
>>>
>>> org.ofbiz.jcr.loader.**OFBizLoginModule.login(**
>>> OFBizLoginModule.java:114)
>>>
>>> org.apache.jackrabbit.core.**security.authentication.**
>>> LocalAuthContext.login(LocalA
>>> uthContext.java:86)
>>>
>>> org.apache.jackrabbit.core.**RepositoryImpl.login(**
>>> RepositoryImpl.java:1458)
>>>
>>> org.apache.jackrabbit.core.**TransientRepository.login(**
>>> TransientRepository.java:38
>>> 1)
>>>
>>> org.apache.jackrabbit.commons.**AbstractRepository.login(**
>>> AbstractRepository.java:1
>>> 23)
>>>
>>> org.ofbiz.jcr.loader.**jackrabbit.JCRFactoryImpl.**
>>> createSession(JCRFactoryImpl.**java
>>> :146)
>>>
>>> org.ofbiz.jcr.loader.**jackrabbit.JCRFactoryImpl.**
>>> start(JCRFactoryImpl.java:100)
>>> org.ofbiz.jcr.loader.**JCRContainer.start(**JCRContainer.java:129)
>>>
>>> org.ofbiz.base.container.**ContainerLoader.start(**
>>> ContainerLoader.java:230)
>>> org.ofbiz.base.start.Start.**startStartLoaders(Start.java:**310)
>>> org.ofbiz.base.start.Start.**start(Start.java:289)
>>> org.ofbiz.base.start.Start.**main(Start.java:119)
>>>
>>> ------------------------------**------------------------------**
>>> --------------------
>>> ^M
>>> 2012-02-20 00:57:42,357 (Thread-0) [    ContainerLoader.java:246:INFO ]
>>> Shutting
>>>  down containers^M
>>> 2012-02-20 00:57:42,357 (Thread-0) [  ServiceDispatcher.java:191:**INFO
>>> ]
>>> De-Regis
>>>
>>
>

Reply via email to