Install Problems with OPENJMS and mySQL.
"Dave Campbell" <dcampbell-8BK9//Ps9jJWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <839EC137797F394791D2409542DBE8D39F5237@corp_mail.corp.redsiren.com> |
I'm trying to migrate from the "flat file" db structure to use mySQL.
Unfortunately, I'm seeing some rather odd results.
Here's what I get when I do my regular flat file startup.
OpenJMS 0.7.2 (build 14)
Exolab Inc. (C) 1999-2002. All rights reserved. www.openjms.org
03:25:28.897 INFO [main] - Instantiated the RmiRegistryService service on port
1099
03:25:28.917 INFO [main] - Embedded RMI Registry running on port 1099
03:25:28.927 INFO [main] - Creating the RMI-based JMS Server
03:25:31.551 INFO [main] - Registered the service JndiServer with the registry.
03:25:31.561 INFO [main] - Started service [RmiRegistryService]
03:25:31.571 INFO [main] - Started service [ThreadPoolManager]
03:25:31.571 INFO [main] - Started service [EventManagerThread]
03:25:31.621 INFO [main] - Removed expired messages.
03:25:31.621 INFO [main] - Started service [DatabaseService]
03:25:31.631 INFO [main] - Started service [Scheduler]
03:25:31.631 INFO [main] - Started service [LeaseManagerReaper]
03:25:31.641 INFO [main] - Started service [GCCollectionService]
03:25:31.862 INFO [main] - Started service [MessageManager]
03:25:31.892 INFO [main] - JMS Server is bound to //localhost:1099/OpenJMSServe
r
03:25:31.952 INFO [main] - JMS Admin Server is bound to //localhost:1099/JmsAdm
inServer
No problem!
Here's what happens when I try the startup with the mySQL version.
C:\jms\openjms-0.7.2\bin>startjms -config ..\config\vigs_jms.xml
OpenJMS 0.7.2 (build 14)
Exolab Inc. (C) 1999-2002. All rights reserved. www.openjms.org
03:26:48.302 INFO [main] - Instantiated the RmiRegistryService service on port
1099
03:26:48.322 INFO [main] - Embedded RMI Registry running on port 1099
03:26:48.322 INFO [main] - Creating the RMI-based JMS Server
Starting Tyrex Version 0.9.8.7
Intalio Inc. (C) 1999-2001. All rights reserved.
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.log4j.FileApp
ender: method <init>(Lorg/apache/log4j/Layout;Ljava/io/OutputStream;)V not found
at tyrex.util.Logger.<clinit>(Logger.java:97)
at tyrex.resource.jdbc.xa.XADataSourceImpl.setIsolationLevel(XADataSourc
eImpl.java:493)
at tyrex.resource.jdbc.xa.EnabledDataSource.<init>(EnabledDataSource.jav
a:196)
at org.exolab.jms.persistence.RDBMSAdapter.<init>(Unknown Source)
at org.exolab.jms.persistence.DatabaseService.createRdbmsAdapter(Unknown
Source)
at org.exolab.jms.persistence.DatabaseService.<init>(Unknown Source)
at org.exolab.jms.persistence.DatabaseService.instance(Unknown Source)
at org.exolab.jms.server.JmsServer.<init>(Unknown Source)
at org.exolab.jms.server.JmsServer.main(Unknown Source)
I've been through all the install guides, etc, that I can find. I've looked at the source.
I was able to run the setup. Here's what the mySQL db looks like.
C:\jms\openjms-0.7.2\bin>mysql -uopenjms -popenjms openjms
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.53-max-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show tables;
+-------------------+
| Tables_in_openjms |
+-------------------+
| consumers |
| destinations |
| message_handles |
| message_id |
| messages |
| seeds |
| system_data |
+-------------------+
7 rows in set (0.15 sec)
mysql> select user();
+-------------------+
| user() |
+-------------------+
| [email protected] |
+-------------------+
1 row in set (0.17 sec)
mysql>
Here is the flat file startup script:
<?xml version="1.0"?>
<!-- OpenJMS configuration:
. RMI connectors
. JDBM persistency
. embedded JNDI provider
. embedded RMI registry, running on port 1099
. single host
. preconfigured destinations
NOTES: this configuration shows all configuration elements relevant
when using an RMI connector.
-->
<Configuration>
<!-- Required when using an RMI connector -->
<Connectors>
<Connector scheme="rmi">
<ConnectionFactories>
<QueueConnectionFactory name="JmsQueueConnection
Factory"/>
<TopicConnectionFactory name="JmsTopicConnection
Factory"/>
</ConnectionFactories>
</Connector>
</Connectors>
<!-- Required -->
<DatabaseConfiguration garbageCollectionInterval="600"
garbageCollectionBlockSize="500"
garbageCollectionThreadPriority="5">
<JdbmDatabaseConfiguration name="openjms.db"/>
</DatabaseConfiguration>
<!-- Required -->
<AdminConfiguration script="${openjms.home}\bin\startjms.bat" config="${
openjms.home}\config\rmi_jms.xml"/>
<!-- Optional. If not specified, no destinations will be created -->
<AdministeredDestinations>
<AdministeredTopic name="topic1">
</AdministeredTopic>
<AdministeredTopic name="topic2">
</AdministeredTopic>
<AdministeredTopic name="topic3">
</AdministeredTopic>
<AdministeredQueue name="queue1"/>
</AdministeredDestinations>
</Configuration>
C:\jms\openjms-0.7.2\config>
Here's the mySQL version.
<?xml version="1.0"?>
<!-- OpenJMS configuration:
. TCPS connectors
. embedded JNDI provider
. single host
. preconfigured destinations
-->
<Configuration>
<Connectors>
<Connector scheme="rmi">
<ConnectionFactories>
<QueueConnectionFactory name="JmsQueueConnectionFactory" />
<TopicConnectionFactory name="JmsTopicConnectionFactory" />
</ConnectionFactories>
</Connector>
</Connectors>
<!-- Required -->
<DatabaseConfiguration garbageCollectionInterval="600"
garbageCollectionBlockSize="500"
garbageCollectionThreadPriority="5">
<RdbmsDatabaseConfiguration
driver="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/openjms"
user="openjms"
password="openjms" />
</DatabaseConfiguration>
<!-- Required -->
<AdminConfiguration
script="${openjms.home}\bin\startjms.bat"
config="${openjms.home}\config\vigs_jms.xml" />
<ServerConfiguration host="localhost" embeddedJNDI="true"/>
<!-- Optional. If not specified, no destinations will be created -->
<AdministeredDestinations>
<AdministeredTopic name="topic1"/>
<AdministeredTopic name="topic2"/>
<AdministeredTopic name="topic3"/>
<AdministeredTopic name="topic4"/>
<AdministeredQueue name="queue1" />
<AdministeredQueue name="queue2" />
<AdministeredQueue name="queue3" />
</AdministeredDestinations>
</Configuration>
Here's my OPENJMS_HOME.
C:\jms\openjms-0.7.2\config>set OPENJMS_HOME
OPENJMS_HOME=c:\jms\openjms-0.7.2
C:\jms\openjms-0.7.2\config>
I have two questions.
Does anyone see what might be wrong here?
Is there a more detailed install guide that specifies what jars are needed for certain configurations, what environment variables to set, etc? What I've seen so far is rather brief and not very detailed.
Thanks!