Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO Server crashes at startup with MySQL adapter
CDO Server crashes at startup with MySQL adapter [message #425510] Fri, 28 November 2008 14:18 Go to next message
omoreau is currently offline omoreauFriend
Messages: 11
Registered: July 2009
Junior Member
Hi,
I'm stuck on a ClassLoader trouble while I start my CDO Server.
I created a product configuration with all required plugins
It is OK with a derby database but fails with an MySQL Adapter.
It appears that the DBUtil of the 'org.eclipse.net4j.db' uses the OM
ClassLoader of 'the org.eclipse.net4j.db'. But the MysqlDataSource is not
loaded is this classloader. See exception below...
How can I fix this?
Thanks for your contribution.
Olivier

------------------------------------------------------
cdo-server.xml
------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>

<acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
<!--
<negotiator type="challenge" description="/temp/users.db"/>
-->
</acceptor>

<repository name="repo1">
<property name="overrideUUID"
value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
<property name="supportingAudits" value="true"/>
<property name="supportingRevisionDeltas" value="false"/>
<property name="verifyingRevisions" value="false"/>
<property name="currentLRUCapacity" value="10000"/>
<property name="revisedLRUCapacity" value="100"/>

<store type="db">
<!-- type: horizontal | vertical | <any user-contributed type>-->
<mappingStrategy type="horizontal">
<property name="toManyReferences" value="ONE_TABLE_PER_CLASS"/>
<property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
<property name="mappingPrecedence" value="MODEL"/>
<property name="qualifiedNames" value="true"/>
</mappingStrategy>

<dbAdapter name="mysql"/>
<dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
url="jdbc:mysql://localhost/cdodb1"
user="root"/>

</store>
</repository>

</cdoServer>


------------------------------------------------------
CDOWithMySQLServer.product
------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.4"?>

<product name="CDOMySQL Server" id="org.eclipse.emf.cdo.server.product"
application="org.eclipse.emf.cdo.server.app" version="1.0.0"
useFeatures="false">

<configIni use="default">
</configIni>

<launcherArgs>
<vmArgsMac>-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>

<windowImages/>


<launcher>
<solaris/>
<win useIco="false">
<bmp/>
</win>
</launcher>

<vm>
</vm>

<plugins>
<plugin id="javax.servlet"/>
<plugin id="org.apache.derby"/>
<plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.jobs"/>
<plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.core.runtime.compatibility.auth"/>
<plugin id="org.eclipse.core.runtime.compatibility.registry"
fragment="true"/>
<plugin id="org.eclipse.emf.cdo"/>
<plugin id="org.eclipse.emf.cdo.common"/>
<plugin id="org.eclipse.emf.cdo.server"/>
<plugin id="org.eclipse.emf.cdo.server.db"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.net4j"/>
<plugin id="org.eclipse.net4j.db"/>
<plugin id="org.eclipse.net4j.db.mysql"/>
<plugin id="org.eclipse.net4j.tcp"/>
<plugin id="org.eclipse.net4j.util"/>
<plugin id="org.eclipse.osgi"/>
<plugin id="org.eclipse.osgi.services"/>
</plugins>

</product>


------------------------------------------------------
Traces
------------------------------------------------------
Configuration location:
file:/D:/Eclipse/Applications/EMF-Database
Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/
Configuration file:
file:/D:/Eclipse/Applications/EMF-Database
Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/conf ig.ini
loaded
Install location:
file:/D:/Eclipse/Applications/EMF-Database
Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/
Framework located:
file:/D:/Eclipse/Applications/EMF-Database
Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
Framework classpath:
file:/D:/Eclipse/Applications/EMF-Database
Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
Splash location:
null
Debug options:
file:/D:/Eclipse/Applications/EMF-Database
Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/.opt ions
loaded

osgi> Time to load bundles: 0
Starting application: 1143
[INFO] CDO Server starting
main [debug.repository] Configuring CDO server from
D:\Eclipse\Applications\EMF-Database
Connectors\eclipse-modeling-3.4-win32-Teneo\eclipse\config\c do-server.xml
main [debug.repository] Configuring repository repo1 (type=default)
[ERROR] java.lang.ClassNotFoundException:
com.mysql.jdbc.jdbc2.optional.MysqlDataSource
org.eclipse.net4j.db.DBException: java.lang.ClassNotFoundException:
com.mysql.jdbc.jdbc2.optional.MysqlDataSource
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:69)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:58)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:53)
at
org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.getDat aSource(DBStoreFactory.java:116)
at
org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.create Store(DBStoreFactory.java:52)
at
org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureStore(RepositoryConfigurator.java:130)
at
org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureRepository(RepositoryConfigurator.java:111)
at
org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigure(RepositoryConfigurator.java:80)
at
org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplicat ion.doStart(CDOServerApplication.java:50)
at
org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplicat ion.java:61)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by: java.lang.ClassNotFoundException:
com.mysql.jdbc.jdbc2.optional.MysqlDataSource
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.net4j.util.ReflectUtil.instantiate(ReflectUtil.j ava:414)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:65)
... 22 more
============================================================ =
Re: CDO Server crashes at startup with MySQL adapter [message #425514 is a reply to message #425510] Fri, 28 November 2008 14:59 Go to previous messageGo to next message
Andy Carpenter is currently offline Andy CarpenterFriend
Messages: 145
Registered: July 2009
Senior Member
Oliver,

Which version of CDO are you using? For 1.x we've found the
easiest way to get the MySQL driver onto the classpath is to add
the jar to the org.eclipse.net4j.db.mysql lib directory. You should
find that your eclipse installation has the org.eclipse.net4j.db.mysql
plugin unpacked, so you can directly add the MySQL driver jar
into it. You may need to edit the manifest.mf file to set the version
the same as the one that you have. After adding the jar and
modifying the manifest, just restart eclipse.

Andy.

"omoreau " <olivier.moreau@thalesgroup.com> wrote in message
news:150f537532d4cd42bf47dccd5c9b9871$1@www.eclipse.org...
> Hi,
> I'm stuck on a ClassLoader trouble while I start my CDO Server.
> I created a product configuration with all required plugins It is OK with
> a derby database but fails with an MySQL Adapter.
> It appears that the DBUtil of the 'org.eclipse.net4j.db' uses the OM
> ClassLoader of 'the org.eclipse.net4j.db'. But the MysqlDataSource is not
> loaded is this classloader. See exception below...
> How can I fix this?
> Thanks for your contribution.
> Olivier
>
> ------------------------------------------------------
> cdo-server.xml
> ------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> <!--
> <negotiator type="challenge" description="/temp/users.db"/> -->
> </acceptor>
>
> <repository name="repo1">
> <property name="overrideUUID"
> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
> <property name="supportingAudits" value="true"/>
> <property name="supportingRevisionDeltas" value="false"/>
> <property name="verifyingRevisions" value="false"/>
> <property name="currentLRUCapacity" value="10000"/>
> <property name="revisedLRUCapacity" value="100"/>
> <store type="db">
> <!-- type: horizontal | vertical | <any user-contributed type>-->
> <mappingStrategy type="horizontal">
> <property name="toManyReferences" value="ONE_TABLE_PER_CLASS"/>
> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
> <property name="mappingPrecedence" value="MODEL"/>
> <property name="qualifiedNames" value="true"/>
> </mappingStrategy>
>
> <dbAdapter name="mysql"/>
> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
> url="jdbc:mysql://localhost/cdodb1"
> user="root"/>
>
> </store>
> </repository>
>
> </cdoServer>
>
>
> ------------------------------------------------------
> CDOWithMySQLServer.product
> ------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?pde version="3.4"?>
>
> <product name="CDOMySQL Server" id="org.eclipse.emf.cdo.server.product"
> application="org.eclipse.emf.cdo.server.app" version="1.0.0"
> useFeatures="false">
>
> <configIni use="default">
> </configIni>
>
> <launcherArgs>
> <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
> </launcherArgs>
>
> <windowImages/>
>
>
> <launcher>
> <solaris/>
> <win useIco="false">
> <bmp/>
> </win>
> </launcher>
>
> <vm>
> </vm>
>
> <plugins>
> <plugin id="javax.servlet"/>
> <plugin id="org.apache.derby"/>
> <plugin id="org.eclipse.core.contenttype"/>
> <plugin id="org.eclipse.core.jobs"/>
> <plugin id="org.eclipse.core.runtime"/>
> <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
> <plugin id="org.eclipse.core.runtime.compatibility.registry"
> fragment="true"/>
> <plugin id="org.eclipse.emf.cdo"/>
> <plugin id="org.eclipse.emf.cdo.common"/>
> <plugin id="org.eclipse.emf.cdo.server"/>
> <plugin id="org.eclipse.emf.cdo.server.db"/>
> <plugin id="org.eclipse.equinox.app"/>
> <plugin id="org.eclipse.equinox.common"/>
> <plugin id="org.eclipse.equinox.preferences"/>
> <plugin id="org.eclipse.equinox.registry"/>
> <plugin id="org.eclipse.net4j"/>
> <plugin id="org.eclipse.net4j.db"/>
> <plugin id="org.eclipse.net4j.db.mysql"/>
> <plugin id="org.eclipse.net4j.tcp"/>
> <plugin id="org.eclipse.net4j.util"/>
> <plugin id="org.eclipse.osgi"/>
> <plugin id="org.eclipse.osgi.services"/>
> </plugins>
>
> </product>
>
>
> ------------------------------------------------------
> Traces
> ------------------------------------------------------
> Configuration location:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/
> Configuration file:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/conf ig.ini
> loaded
> Install location:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/
> Framework located:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
> Framework classpath:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
> Splash location:
> null
> Debug options:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/.opt ions
> loaded
>
> osgi> Time to load bundles: 0
> Starting application: 1143
> [INFO] CDO Server starting
> main [debug.repository] Configuring CDO server from
> D:\Eclipse\Applications\EMF-Database
> Connectors\eclipse-modeling-3.4-win32-Teneo\eclipse\config\c do-server.xml
> main [debug.repository] Configuring repository repo1 (type=default)
> [ERROR] java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> org.eclipse.net4j.db.DBException: java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:69)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:58)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:53)
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.getDat aSource(DBStoreFactory.java:116)
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.create Store(DBStoreFactory.java:52)
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureStore(RepositoryConfigurator.java:130)
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureRepository(RepositoryConfigurator.java:111)
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigure(RepositoryConfigurator.java:80)
> at
> org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplicat ion.doStart(CDOServerApplication.java:50)
> at
> org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplicat ion.java:61)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
> Caused by: java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at org.eclipse.net4j.util.ReflectUtil.instantiate(ReflectUtil.j ava:414)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:65)
> ... 22 more
> ============================================================ =
>
>
Re: CDO Server crashes at startup with MySQL adapter [message #425515 is a reply to message #425510] Fri, 28 November 2008 15:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adomas.greicius.nomagic.com

Do your launcher validate. I don`t see any plugin that provides JDBC
drivers.

"omoreau " <olivier.moreau@thalesgroup.com> wrote in message
news:150f537532d4cd42bf47dccd5c9b9871$1@www.eclipse.org...
> Hi,
> I'm stuck on a ClassLoader trouble while I start my CDO Server.
> I created a product configuration with all required plugins It is OK with
> a derby database but fails with an MySQL Adapter.
> It appears that the DBUtil of the 'org.eclipse.net4j.db' uses the OM
> ClassLoader of 'the org.eclipse.net4j.db'. But the MysqlDataSource is not
> loaded is this classloader. See exception below...
> How can I fix this?
> Thanks for your contribution.
> Olivier
>
> ------------------------------------------------------
> cdo-server.xml
> ------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> <!--
> <negotiator type="challenge" description="/temp/users.db"/> -->
> </acceptor>
>
> <repository name="repo1">
> <property name="overrideUUID"
> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
> <property name="supportingAudits" value="true"/>
> <property name="supportingRevisionDeltas" value="false"/>
> <property name="verifyingRevisions" value="false"/>
> <property name="currentLRUCapacity" value="10000"/>
> <property name="revisedLRUCapacity" value="100"/>
> <store type="db">
> <!-- type: horizontal | vertical | <any user-contributed type>-->
> <mappingStrategy type="horizontal">
> <property name="toManyReferences" value="ONE_TABLE_PER_CLASS"/>
> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
> <property name="mappingPrecedence" value="MODEL"/>
> <property name="qualifiedNames" value="true"/>
> </mappingStrategy>
>
> <dbAdapter name="mysql"/>
> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
> url="jdbc:mysql://localhost/cdodb1"
> user="root"/>
>
> </store>
> </repository>
>
> </cdoServer>
>
>
> ------------------------------------------------------
> CDOWithMySQLServer.product
> ------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?pde version="3.4"?>
>
> <product name="CDOMySQL Server" id="org.eclipse.emf.cdo.server.product"
> application="org.eclipse.emf.cdo.server.app" version="1.0.0"
> useFeatures="false">
>
> <configIni use="default">
> </configIni>
>
> <launcherArgs>
> <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
> </launcherArgs>
>
> <windowImages/>
>
>
> <launcher>
> <solaris/>
> <win useIco="false">
> <bmp/>
> </win>
> </launcher>
>
> <vm>
> </vm>
>
> <plugins>
> <plugin id="javax.servlet"/>
> <plugin id="org.apache.derby"/>
> <plugin id="org.eclipse.core.contenttype"/>
> <plugin id="org.eclipse.core.jobs"/>
> <plugin id="org.eclipse.core.runtime"/>
> <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
> <plugin id="org.eclipse.core.runtime.compatibility.registry"
> fragment="true"/>
> <plugin id="org.eclipse.emf.cdo"/>
> <plugin id="org.eclipse.emf.cdo.common"/>
> <plugin id="org.eclipse.emf.cdo.server"/>
> <plugin id="org.eclipse.emf.cdo.server.db"/>
> <plugin id="org.eclipse.equinox.app"/>
> <plugin id="org.eclipse.equinox.common"/>
> <plugin id="org.eclipse.equinox.preferences"/>
> <plugin id="org.eclipse.equinox.registry"/>
> <plugin id="org.eclipse.net4j"/>
> <plugin id="org.eclipse.net4j.db"/>
> <plugin id="org.eclipse.net4j.db.mysql"/>
> <plugin id="org.eclipse.net4j.tcp"/>
> <plugin id="org.eclipse.net4j.util"/>
> <plugin id="org.eclipse.osgi"/>
> <plugin id="org.eclipse.osgi.services"/>
> </plugins>
>
> </product>
>
>
> ------------------------------------------------------
> Traces
> ------------------------------------------------------
> Configuration location:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/
> Configuration file:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/conf ig.ini
> loaded
> Install location:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/
> Framework located:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
> Framework classpath:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
> Splash location:
> null
> Debug options:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/.opt ions
> loaded
>
> osgi> Time to load bundles: 0
> Starting application: 1143
> [INFO] CDO Server starting
> main [debug.repository] Configuring CDO server from
> D:\Eclipse\Applications\EMF-Database
> Connectors\eclipse-modeling-3.4-win32-Teneo\eclipse\config\c do-server.xml
> main [debug.repository] Configuring repository repo1 (type=default)
> [ERROR] java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> org.eclipse.net4j.db.DBException: java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:69)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:58)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:53)
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.getDat aSource(DBStoreFactory.java:116)
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.create Store(DBStoreFactory.java:52)
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureStore(RepositoryConfigurator.java:130)
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureRepository(RepositoryConfigurator.java:111)
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigure(RepositoryConfigurator.java:80)
> at
> org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplicat ion.doStart(CDOServerApplication.java:50)
> at
> org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplicat ion.java:61)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
> Caused by: java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at org.eclipse.net4j.util.ReflectUtil.instantiate(ReflectUtil.j ava:414)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:65)
> ... 22 more
> ============================================================ =
>
>
Re: CDO Server crashes at startup with MySQL adapter [message #425516 is a reply to message #425510] Fri, 28 November 2008 16:11 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6487
Registered: July 2009
Senior Member
Olivier,

We are currently using this bundle from the SpingSource repository:
http://www.springsource.com/repository/app/bundle/version/de tail?name=com.springsource.com.mysql.jdbc&version=5.1.6& amp;searchType=bundlesByName&searchQuery=mysql

please consider *voting* for these JIRAs to make it easier for us to
consume the SpringSource bundles:
https://issuetracker.springsource.com/browse/BRITS-92
https://issuetracker.springsource.com/browse/BRITS-91

Cheers
/Eike

----
http://thegordian.blogspot.com


omoreau schrieb:
> Hi,
> I'm stuck on a ClassLoader trouble while I start my CDO Server.
> I created a product configuration with all required plugins It is OK
> with a derby database but fails with an MySQL Adapter.
> It appears that the DBUtil of the 'org.eclipse.net4j.db' uses the OM
> ClassLoader of 'the org.eclipse.net4j.db'. But the MysqlDataSource is
> not loaded is this classloader. See exception below...
> How can I fix this?
> Thanks for your contribution.
> Olivier
>
> ------------------------------------------------------
> cdo-server.xml
> ------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> <!--
> <negotiator type="challenge" description="/temp/users.db"/> -->
> </acceptor>
>
> <repository name="repo1">
> <property name="overrideUUID"
> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
> <property name="supportingAudits" value="true"/>
> <property name="supportingRevisionDeltas" value="false"/>
> <property name="verifyingRevisions" value="false"/>
> <property name="currentLRUCapacity" value="10000"/>
> <property name="revisedLRUCapacity" value="100"/>
> <store type="db">
> <!-- type: horizontal | vertical | <any user-contributed type>-->
> <mappingStrategy type="horizontal">
> <property name="toManyReferences" value="ONE_TABLE_PER_CLASS"/>
> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
> <property name="mappingPrecedence" value="MODEL"/>
> <property name="qualifiedNames" value="true"/>
> </mappingStrategy>
> <dbAdapter name="mysql"/>
> <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
> url="jdbc:mysql://localhost/cdodb1"
> user="root"/>
>
> </store>
> </repository>
>
> </cdoServer>
>
>
> ------------------------------------------------------
> CDOWithMySQLServer.product
> ------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?pde version="3.4"?>
>
> <product name="CDOMySQL Server"
> id="org.eclipse.emf.cdo.server.product"
> application="org.eclipse.emf.cdo.server.app" version="1.0.0"
> useFeatures="false">
>
> <configIni use="default">
> </configIni>
>
> <launcherArgs>
> <vmArgsMac>-XstartOnFirstThread
> -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
> </launcherArgs>
>
> <windowImages/>
>
>
> <launcher>
> <solaris/>
> <win useIco="false">
> <bmp/>
> </win>
> </launcher>
>
> <vm>
> </vm>
>
> <plugins>
> <plugin id="javax.servlet"/>
> <plugin id="org.apache.derby"/>
> <plugin id="org.eclipse.core.contenttype"/>
> <plugin id="org.eclipse.core.jobs"/>
> <plugin id="org.eclipse.core.runtime"/>
> <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
> <plugin id="org.eclipse.core.runtime.compatibility.registry"
> fragment="true"/>
> <plugin id="org.eclipse.emf.cdo"/>
> <plugin id="org.eclipse.emf.cdo.common"/>
> <plugin id="org.eclipse.emf.cdo.server"/>
> <plugin id="org.eclipse.emf.cdo.server.db"/>
> <plugin id="org.eclipse.equinox.app"/>
> <plugin id="org.eclipse.equinox.common"/>
> <plugin id="org.eclipse.equinox.preferences"/>
> <plugin id="org.eclipse.equinox.registry"/>
> <plugin id="org.eclipse.net4j"/>
> <plugin id="org.eclipse.net4j.db"/>
> <plugin id="org.eclipse.net4j.db.mysql"/>
> <plugin id="org.eclipse.net4j.tcp"/>
> <plugin id="org.eclipse.net4j.util"/>
> <plugin id="org.eclipse.osgi"/>
> <plugin id="org.eclipse.osgi.services"/>
> </plugins>
>
> </product>
>
>
> ------------------------------------------------------
> Traces
> ------------------------------------------------------
> Configuration location:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/
>
> Configuration file:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/conf ig.ini
> loaded
> Install location:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/
> Framework located:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
>
> Framework classpath:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/eclipse/plugins/ org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
>
> Splash location:
> null
> Debug options:
> file:/D:/Eclipse/Applications/EMF-Database
> Connectors/eclipse-modeling-3.4-win32-Teneo/workspace_CDO/.m etadata/.plugins/org.eclipse.pde.core/New_configuration/.opt ions
> loaded
>
> osgi> Time to load bundles: 0
> Starting application: 1143
> [INFO] CDO Server starting
> main [debug.repository] Configuring CDO server from
> D:\Eclipse\Applications\EMF-Database
> Connectors\eclipse-modeling-3.4-win32-Teneo\eclipse\config\c do-server.xml
> main [debug.repository] Configuring repository repo1 (type=default)
> [ERROR] java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> org.eclipse.net4j.db.DBException: java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:69)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:58)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:53)
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.getDat aSource(DBStoreFactory.java:116)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.create Store(DBStoreFactory.java:52)
>
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureStore(RepositoryConfigurator.java:130)
>
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigureRepository(RepositoryConfigurator.java:111)
>
> at
> org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.c onfigure(RepositoryConfigurator.java:80)
>
> at
> org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplicat ion.doStart(CDOServerApplication.java:50)
>
> at
> org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplicat ion.java:61)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
> Caused by: java.lang.ClassNotFoundException:
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.net4j.util.ReflectUtil.instantiate(ReflectUtil.j ava:414)
> at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:65)
> ... 22 more
> ============================================================ =
>
>


Previous Topic:Underscore rules in generated values
Next Topic:[CDO] [ECF] Invoking EMF operations remotely (client - server)
Goto Forum:
  


Current Time: Sun Mar 29 19:33:26 GMT 2020

Powered by FUDForum. Page generated in 0.01936 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top