kevnallen / rapla

Automatically exported from code.google.com/p/rapla
0 stars 0 forks source link

Config Error after upgrade from 1.7.0 #440

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We've been running Rapla up to version 1.7.0 on a Ubuntu 12.04-server whose 
data is stored on a MySql-server so far without any problems.

However, we encounter an error when we update it. After copying the 
'contexts/rapla.xml' to the directory of the new version and invoking it, the 
new version will log a Configuration Error and fail to run at all:

[main] WARN  o.e.jetty.xml.XmlConfiguration - Config error at <New id="rapladb" 
class="org.eclipse.jetty.plus.jndi.Resource"><Arg>jdbc/rapladb</Arg><Arg>
       <New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"><Set name="Url">jdbc:mysql://mysql_server/rapla_db</Set><Set name="User">rapla</Set><Set name="Password">password</Set></New>
    </Arg></New>
[main] WARN  o.e.jetty.deploy.DeploymentManager - Unable to reach node goal: 
started
java.lang.ClassNotFoundException: 
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
(...)

I tested this with versions 1.7.1, 1.7.7 and 1.7.8, all show the same result.

Has anything changed regarding the configuration?

Here's how the whole 'rapla.xml' looks lile:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" 
"http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <!-- Note that many rapla installation can point to the same rapla.war -->
  <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/rapla.war</Set>
  <Set name="contextPath">/</Set>
  <New class="org.eclipse.jetty.plus.jndi.EnvEntry">
    <Arg></Arg>
    <Arg>raplafile</Arg>
    <Arg type="java.lang.String"><SystemProperty name="jetty.home" default="." />/data/data.xml</Arg>
    <Arg type="boolean">true</Arg>
  </New>
  <New id="rapladb" class="org.eclipse.jetty.plus.jndi.Resource">
    <Arg>jdbc/rapladb</Arg>
    <Arg>
       <New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
           <Set name="Url">jdbc:mysql://mysql_server/rapla_db</Set>
               <Set name="User">rapla</Set>
               <Set name="Password">password</Set>
       </New>
        </Arg>
  </New>

  <New id="rapladatasource" class="org.eclipse.jetty.plus.jndi.EnvEntry">
    <Arg></Arg>
    <Arg>rapladatasource</Arg>
    <Arg type="java.lang.String">rapladb</Arg>
    <Arg type="boolean">true</Arg>
  </New>
  <!-- Normaly you don't have to modify the settings below -->

  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="." />/etc/webdefault.xml</Set>
  <!--  this is important for large data sets to submit -->
  <Set name="maxFormContentSize">10000000</Set>
  <Set name="extractWAR">true</Set>
  <Set name="LogUrlOnStart">true</Set>
  <Set name="copyWebDir">true</Set>
  <Set name="parentLoaderPriority">false</Set>

  <Set name="configurationClasses">
    <Array type="java.lang.String">
      <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
      <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
      <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
      <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
      <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
      <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
      <Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
      <Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>
    </Array>
  </Set>
</Configure>

Thanks for any hint, and let me know if you need further information.

Cheers, Martin

Original issue reported on code.google.com by la.marti...@gmail.com on 27 Oct 2014 at 7:08

GoogleCodeExporter commented 9 years ago
Hi Martin,

sry for the late reply. Did you check if you have the newest mysql driver.
You can inspect mysql.jar with a zip program and look if the class is there
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

If its not there try another driver or look for anoher mysql datasource class 
in the driver.

Regards Chris

Original comment by christop...@gmail.com on 5 Feb 2015 at 1:39