You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Michael Yin <yi...@gmail.com> on 2010/03/17 22:56:31 UTC
Using a mysql db in sling trunk
I am trying to use the trunk sling to run on a clustered db config of
jackrabbit on mysql. I did it for jackrabbit 1.4.x on Sling-5, but on this
version of sling, both before and after installing the Sun Microsystems'
JDBC Driver for MySQL bundle, I get the following exception.
javax.jcr.RepositoryException: File system initialization failure.
at
org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1061)
at
org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:809)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:311)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:673)
at
org.apache.sling.jcr.jackrabbit.server.impl.SlingServerRepository.acquireRepository(SlingServerRepository.java:141)
at
org.apache.sling.jcr.base.AbstractSlingRepository.startRepository(AbstractSlingRepository.java:831)
at
org.apache.sling.jcr.base.AbstractSlingRepository.run(AbstractSlingRepository.java:961)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to
initialize file system
at
org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:210)
at
org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1058)
... 7 more
Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class
com.mysql.jdbc.Driver
at
org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:261)
at
org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:229)
at
org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
at
org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
at
org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
... 8 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:814)
at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:256)
... 12 more
Does the embedded repository bundle need to have an optional import? i'm not
very osgi proficient.
Re: Using a mysql db in sling trunk
Posted by Justin Edelson <ju...@gmail.com>.
This isn't necessary. jackrabbit-server now can load any exported class
from any other bundle because it has a DynamicImport-Package manifest
header.
Justin
On 3/18/10 12:03 PM, Michael Yin wrote:
> Well. I created a JIRA issue just to cover adding more connectors. Thanks
> for the fix!
>
> https://issues.apache.org/jira/browse/SLING-1450
>
> -mike
>
> On Wed, Mar 17, 2010 at 7:46 PM, Justin Edelson <ju...@gmail.com>wrote:
>
>> done in r924557.
>>
>> On 3/17/10 7:41 PM, Eric Norman wrote:
>>> Even better. Thanks justin.
>>>
>>>> On Mar 17, 2010 4:38 PM, "Justin Edelson" <justinedelson@gmail.com
>>>> <ma...@gmail.com>> wrote:
>>>>
>>>> Well, this is a regression. Pre r911430, the Jackrabbit Server bundle
>>>> had a dynamic import. But I commented out this line for some reason
>>>> (actually, it looks like I did this because Felix did so on his original
>>>> JR2 branch).
>>>>
>>>> I'll add it back in.
>>>>
>>>> Justin
>>>>
>>>>
>>>>
>>>> On 3/17/10 7:16 PM, Eric Norman wrote:
>>>>> We should probably add optional imports for all the commo...
>>>>
>>
>>
>
Re: Using a mysql db in sling trunk
Posted by Michael Yin <yi...@gmail.com>.
Well. I created a JIRA issue just to cover adding more connectors. Thanks
for the fix!
https://issues.apache.org/jira/browse/SLING-1450
-mike
On Wed, Mar 17, 2010 at 7:46 PM, Justin Edelson <ju...@gmail.com>wrote:
> done in r924557.
>
> On 3/17/10 7:41 PM, Eric Norman wrote:
> > Even better. Thanks justin.
> >
> >> On Mar 17, 2010 4:38 PM, "Justin Edelson" <justinedelson@gmail.com
> >> <ma...@gmail.com>> wrote:
> >>
> >> Well, this is a regression. Pre r911430, the Jackrabbit Server bundle
> >> had a dynamic import. But I commented out this line for some reason
> >> (actually, it looks like I did this because Felix did so on his original
> >> JR2 branch).
> >>
> >> I'll add it back in.
> >>
> >> Justin
> >>
> >>
> >>
> >> On 3/17/10 7:16 PM, Eric Norman wrote:
> >> > We should probably add optional imports for all the commo...
> >>
>
>
Re: Using a mysql db in sling trunk
Posted by Justin Edelson <ju...@gmail.com>.
done in r924557.
On 3/17/10 7:41 PM, Eric Norman wrote:
> Even better. Thanks justin.
>
>> On Mar 17, 2010 4:38 PM, "Justin Edelson" <justinedelson@gmail.com
>> <ma...@gmail.com>> wrote:
>>
>> Well, this is a regression. Pre r911430, the Jackrabbit Server bundle
>> had a dynamic import. But I commented out this line for some reason
>> (actually, it looks like I did this because Felix did so on his original
>> JR2 branch).
>>
>> I'll add it back in.
>>
>> Justin
>>
>>
>>
>> On 3/17/10 7:16 PM, Eric Norman wrote:
>> > We should probably add optional imports for all the commo...
>>
Re: Using a mysql db in sling trunk
Posted by Eric Norman <er...@gmail.com>.
Even better. Thanks justin.
On Mar 17, 2010 4:38 PM, "Justin Edelson" <ju...@gmail.com> wrote:
Well, this is a regression. Pre r911430, the Jackrabbit Server bundle
had a dynamic import. But I commented out this line for some reason
(actually, it looks like I did this because Felix did so on his original
JR2 branch).
I'll add it back in.
Justin
On 3/17/10 7:16 PM, Eric Norman wrote:
> We should probably add optional imports for all the commo...
Re: Using a mysql db in sling trunk
Posted by Justin Edelson <ju...@gmail.com>.
Well, this is a regression. Pre r911430, the Jackrabbit Server bundle
had a dynamic import. But I commented out this line for some reason
(actually, it looks like I did this because Felix did so on his original
JR2 branch).
I'll add it back in.
Justin
On 3/17/10 7:16 PM, Eric Norman wrote:
> We should probably add optional imports for all the common jdbc drivers to
> the embedded server bundle so updating/rebuilding it would not be
> necessary. Would you mind filing a new issue in JIRA for tracking?
>
> Thanks,
> Eric
>
> On Mar 17, 2010 3:44 PM, "Michael Yin" <yi...@gmail.com> wrote:
>
> I rebuilt the embedded server jar with an optional import for
> com.mysql.jdbc, and that seemed to have done the trick.
>
>
> On Wed, Mar 17, 2010 at 5:56 PM, Michael Yin <yi...@gmail.com> wrote:
>
>> I am trying to use the ...
>
Re: Using a mysql db in sling trunk
Posted by Eric Norman <er...@gmail.com>.
We should probably add optional imports for all the common jdbc drivers to
the embedded server bundle so updating/rebuilding it would not be
necessary. Would you mind filing a new issue in JIRA for tracking?
Thanks,
Eric
On Mar 17, 2010 3:44 PM, "Michael Yin" <yi...@gmail.com> wrote:
I rebuilt the embedded server jar with an optional import for
com.mysql.jdbc, and that seemed to have done the trick.
On Wed, Mar 17, 2010 at 5:56 PM, Michael Yin <yi...@gmail.com> wrote:
> I am trying to use the ...
Re: Using a mysql db in sling trunk
Posted by Michael Yin <yi...@gmail.com>.
I rebuilt the embedded server jar with an optional import for
com.mysql.jdbc, and that seemed to have done the trick.
On Wed, Mar 17, 2010 at 5:56 PM, Michael Yin <yi...@gmail.com> wrote:
> I am trying to use the trunk sling to run on a clustered db config of
> jackrabbit on mysql. I did it for jackrabbit 1.4.x on Sling-5, but on this
> version of sling, both before and after installing the Sun Microsystems'
> JDBC Driver for MySQL bundle, I get the following exception.
>
> javax.jcr.RepositoryException: File system initialization failure.
> at
> org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1061)
> at
> org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:809)
> at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:311)
> at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:673)
> at
> org.apache.sling.jcr.jackrabbit.server.impl.SlingServerRepository.acquireRepository(SlingServerRepository.java:141)
> at
> org.apache.sling.jcr.base.AbstractSlingRepository.startRepository(AbstractSlingRepository.java:831)
> at
> org.apache.sling.jcr.base.AbstractSlingRepository.run(AbstractSlingRepository.java:961)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to
> initialize file system
> at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:210)
> at
> org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1058)
> ... 7 more
> Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class
> com.mysql.jdbc.Driver
> at
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:261)
> at
> org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:229)
> at
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
> at
> org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
> at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
> ... 8 more
> Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
> at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:814)
> at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:256)
> ... 12 more
>
> Does the embedded repository bundle need to have an optional import? i'm
> not very osgi proficient.
>