You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by "Tony Freeman @ TeamXL" <tf...@teamxl.org> on 2005/05/20 05:49:47 UTC

Using MySQL 4.1.11

I have just upgraded to MySQL 4.1.11 and am now having a problem starting
James as a service...
 
I am using James 2.2.1-RC1 and was using an older version of MySQL without
problems.  This is a development box.
 
I have confirmed that I have the database Jamesmail in place and that the
server is responding and the user jamesmail has all the needed privileges
and the password is correct
 
Here is the appropriate piece of my config file...
        <data-source name="maildb"
class="org.apache.james.util.dbcp.JdbcDataSource">
            <driver>org.gjt.mm.mysql.Driver</driver>
 
<dburl>jdbc:mysql://127.0.0.1/jamesmail?autoReconnect=true</dburl>
            <user>jamesmail</user>
            <password>tafhplt01</password>
            <max>20</max>
         </data-source>
      </data-sources>
   </database-connections>

and here is a piece of the wrapper log file (see below)...
and near the bottom find...it appears that James can not establish a
connection with my MySQL server.  I can telnet into the server on 3306 (of
course I get garbage but I get a connection)...
INFO   | jvm 1    | 2005/05/19 23:15:36 | Caused by:
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Communication failure during handshake. Is there
a server running on 127.0.0.1:3306?)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:855)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.james.util.dbcp.JdbcDataSource$1.createDataSource(JdbcDataSource.
java:120)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:59
8)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.james.util.dbcp.JdbcDataSource.configure(JdbcDataSource.java:155)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  ... 18 more
INFO   | jvm 1    | 2005/05/19 23:15:36 | Caused by: java.sql.SQLException:
Communication failure during handshake. Is there a server running on
127.0.0.1:3306?
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.Driver.connect(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:290)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:877)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  ... 21 more

 
STATUS | wrapper  | 2005/05/19 23:15:32 | Launching a JVM...
INFO   | jvm 1    | 2005/05/19 23:15:33 | Wrapper (Version 2.2.8)
INFO   | jvm 1    | 2005/05/19 23:15:33 | 
INFO   | jvm 1    | 2005/05/19 23:15:33 | 
INFO   | jvm 1    | 2005/05/19 23:15:33 | Phoenix 4.0.1
INFO   | jvm 1    | 2005/05/19 23:15:33 | 
INFO   | jvm 1    | 2005/05/19 23:15:36 |
org.apache.excalibur.containerkit.lifecycle.LifecycleException: Component
named "database-connections" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.configuration.ConfigurationException: Error
configurable datasource).
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHe
lper.java:289)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Lifecycl
eHelper.java:159)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(
DefaultApplication.java:480)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPha
se(DefaultApplication.java:428)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase
(DefaultApplication.java:364)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(De
faultApplication.java:138)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java
:251)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKer
nel.java:178)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(Def
aultKernel.java:254)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Default
Deployer.java:353)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Def
aultEmbeddor.java:498)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Def
aultEmbeddor.java:491)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(De
faultEmbeddor.java:476)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultA
pplications(DefaultEmbeddor.java:466)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(Defaul
tEmbeddor.java:224)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at java.lang.Thread.run(Unknown
Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 | Caused by:
org.apache.avalon.framework.configuration.ConfigurationException: Error
configurable datasource
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.james.util.dbcp.JdbcDataSource.configure(JdbcDataSource.java:198)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.cornerstone.blocks.datasource.DefaultDataSourceSelector.in
itialize(DefaultDataSourceSelector.java:104)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil
.java:235)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Lifecycl
eHelper.java:144)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  ... 15 more
INFO   | jvm 1    | 2005/05/19 23:15:36 | Caused by:
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Communication failure during handshake. Is there
a server running on 127.0.0.1:3306?)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:855)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.james.util.dbcp.JdbcDataSource$1.createDataSource(JdbcDataSource.
java:120)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:59
8)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.james.util.dbcp.JdbcDataSource.configure(JdbcDataSource.java:155)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  ... 18 more
INFO   | jvm 1    | 2005/05/19 23:15:36 | Caused by: java.sql.SQLException:
Communication failure during handshake. Is there a server running on
127.0.0.1:3306?
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.gjt.mm.mysql.Driver.connect(Unknown Source)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:290)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:877)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
INFO   | jvm 1    | 2005/05/19 23:15:36 |  ... 21 more
INFO   | jvm 1    | 2005/05/19 23:15:36 | There was an uncaught exception:
INFO   | jvm 1    | 2005/05/19 23:15:36 |
---------------------------------------------------------

 
Tony Freeman
TEAMXL
678.344.2305 Office
509.693.2598 eFax
tfreeman@teamxl.org
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Using MySQL 4.1.11

Posted by Serge Knystautas <sk...@gmail.com>.
On 5/20/05, Noel J. Bergman <no...@devtech.com> wrote:
> > I have just upgraded to MySQL 4.1.11 and am now having a
> > problem starting James as a service.
> 
> > I am using James 2.2.1-RC1 and was using an older version of MySQL without
> > problems.  This is a development box.
> 
> >  <driver>org.gjt.mm.mysql.Driver</driver>
> 
> Does that old driver still work with 4.1, or do you need to replace it with
> a current driver?

Yes, for a long time (both 3.0 and 3.1 Connector/J) the
org.gjt.mm.mysql.Driver has just been a wrapper class.

I think you've solved it, but the 3.0 Connector/J will not connect to
a 4.1 database, and does not give a version incompatibility error. 
You'll need to use the 3.1 Connector/J, though you could keep the same
class name AFAIK.

-- 
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Using MySQL 4.1.11

Posted by "Tony Freeman @ TeamXL" <tf...@teamxl.org>.
>From the MySQL site, I found the following:
A) MySQL Connector/J is a native Java driver that converts JDBC (Java
Database Connectivity) calls into the network protocol used by the MySQL
database.
B) MySQL Connector/MXJ is an MBean that allows seamlessly embedding the
MySQL database server within the J2EE environment. 

I am not overly JAVA enabled but I believe the connector to use is the JDBC
(A).  To that end, I found the following on the site: 
*******
"MySQL Connector/J is a native Java driver that converts JDBC (Java Database
Connectivity) calls into the network protocol used by the MySQL database. It
lets developers working with the Java programming language easily build
programs and applets that interact with MySQL and connect all corporate
data, even in a heterogeneous environment. MySQL Connector/J is a Type IV
JDBC driver and has a complete JDBC feature set that supports the
capabilities of MySQL.

The latest production version of the driver is now 50-100 percent faster in
most situations than the previous version. It also creates fewer transient
objects than before, leading to better performance and even more stability.
The driver now also supports "streaming" result sets, which allows users to
retrieve large numbers of rows without using a large memory buffer. With
newly added large-packet protocol support, the driver can send rows and
BLOBs up to 2 gigabytes in size.

New features from the JDBC-3.0 API in the latest production version of MySQL
Connector/J include getGeneratedKeys which allows users to retrieve
auto-increment fields in a non-database-specific way. Auto-increment fields
now work with object-relational mapping tools, as well as Enterprise Java
Beans (EJB) servers with Container Managed Persistence (CMP) that support
JDBC-3.0.

The development version is being refactored to support new features in
conjunction with version 4.1 of the MySQL database server, including
server-side prepared statements and improved handling of multiple
simultaneous character sets, including Unicode in the UCS2 and UTF8
encodings.
Downloads, Licensing, and Support

Two versions of MySQL Connector/J are available for download:

    * MySQL Connector/J 3.0 is the production-ready version of the driver,
and is available under the GPL.
    * MySQL Connector/J 3.1 is the production-ready version of the driver,
and is available under the GPL (recommended).

Interoperability

MySQL Connector/J is known to work with the following database tools and
application servers:

    * Apache's Jakarta Projects (Tomcat, Turbine, Velocity, etc.) - MySQL
Connector/J works with all of these tools, and in most cases is the JDBC
driver used in the example applications provided.
    * JBoss The JBoss Open Source J2EE Application server. MySQL Connector/J
works with both BMP and CMP beans in this environment .
    * BEA WebLogic - MySQL Connector/J works with both BMP and CMP beans as
well as servlets and JSPs on this commercial J2EE platform.
    * IBM VisualAge for Java - VisualAge is a Java development environment.
    * IBM WebSphere Application Server 4.0 - MySQL Connector/J works with
this commercial J2EE platform. BMP, servlets, and JSPs are supported.
    * Forte for Java and its open source counterpart, NetBeans - A
world-class, professional IDE. The NetBeans IDE is a platform plus modules
that includes components such as an editor, tools for working with source
code (Java, C++, and others), version control, and a lot more.
    * TableGen - TableGen automatically generates classes to represent
tables within a database. It is released under the GPL."
********

What I didn't find was any notes describing prior release compatability with
MySQL v4.1...I can find information describing the compatability of the
current release connector as follows:
********
MySQL Connector/J supports Java-2 JVMs, including JDK-1.2.x, JDK-1.3.x,
JDK-1.4.x and JDK-1.5.x, and requires JDK-1.4.x or newer to compile (but not
run). MySQL Connector/J does not support JDK-1.1.x or JDK-1.0.x
********

I can find this jar in the work/james*/sar-inf/lib folder of my development
box: mm.mysql-2.0.14.jar (this is the connector, right)
I have no idea of the number or compatability of releases between 2.0.14 and
3.1 of the connector and a brief search of the MySQL site provides no
information.

Assuming the James developers and other supporters suggest that I upgrade
the connector, please expect further requests for help.  The good news is I
am comfortable trying just about anything on my development box...the bad
news is I am comfortable trying about anything on my development box!

Tony Freeman
TEAMXL
678.344.2305 Office
509.693.2598 eFax
tfreeman@teamxl.org
 

-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com] 
Sent: Friday, May 20, 2005 5:09 PM
To: James Users List; tfreeman@teamxl.org
Subject: RE: Using MySQL 4.1.11

> I have just upgraded to MySQL 4.1.11 and am now having a problem 
> starting James as a service.

> I am using James 2.2.1-RC1 and was using an older version of MySQL 
> without problems.  This is a development box.

>  <driver>org.gjt.mm.mysql.Driver</driver>

Does that old driver still work with 4.1, or do you need to replace it with
a current driver?

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Using MySQL 4.1.11

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I have just upgraded to MySQL 4.1.11 and am now having a
> problem starting James as a service.

> I am using James 2.2.1-RC1 and was using an older version of MySQL without
> problems.  This is a development box.

>  <driver>org.gjt.mm.mysql.Driver</driver>

Does that old driver still work with 4.1, or do you need to replace it with
a current driver?

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org