activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kbd <KDu...@escholar.com>
Subject ActiveMQ 4.1.1 MS SQL Server 2005 ACTIVEMQ_MSGS not found
Date Fri, 04 May 2007 21:18:17 GMT

Hello: 

I am attempting to use MS SQL Server 2005 for persistence storage.
My ACTIVEMQ.XML is below.  Please note I added the useDatabaseLock="false"
to   <persistenceAdapter>
as per a posting on this site.  Made a prior issue go away. 

Now when I boot ActiveMQ 4.1.1 I get the following:


C:\ProgFiles\apache-activemq-4.1.1>bin\activemq
ACTIVEMQ_HOME: C:\ProgFiles\apache-activemq-4.1.1\bin\..
ACTIVEMQ_BASE: C:\ProgFiles\apache-activemq-4.1.1\bin\..
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - ActiveMQ 4.1.1 JMS Message Broker
(eDM) is starting
INFO  BrokerService                  - For help or more information please
see: http://incubator.apache.org/activemq/
WARN  JDBCPersistenceAdapter         - Database driver NOT recognized:
[microsoft_sql_server_2005_jdbc_driver].  Will use def
ault JDBC implementation.
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: CREATE TABLE ACTI
VEMQ_MSGS(ID INTEGER NOT NULL, CONTAINER VARCHAR(250), MSGID_PROD
VARCHAR(250), MSGID_SEQ INTEGER, EXPIRATION BIGINT, MSG BLO
B, PRIMARY KEY ( ID ) ) Message: Column, parameter, or variable #6: Cannot
find data type BLOB. SQLState: S0007 Vendor code:
2715
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: CREATE INDEX ACTI
VEMQ_MSGS_MIDX ON ACTIVEMQ_MSGS (MSGID_PROD,MSGID_SEQ) Message: Cannot find
the object "ACTIVEMQ_MSGS" because it does not ex
ist or you do not have permissions. SQLState: S00012 Vendor code: 1088
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: CREATE INDEX ACTI
VEMQ_MSGS_CIDX ON ACTIVEMQ_MSGS (CONTAINER) Message: Cannot find the object
"ACTIVEMQ_MSGS" because it does not exist or you
do not have permissions. SQLState: S00012 Vendor code: 1088
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: CREATE INDEX ACTI
VEMQ_MSGS_EIDX ON ACTIVEMQ_MSGS (EXPIRATION) Message: Cannot find the object
"ACTIVEMQ_MSGS" because it does not exist or you
 do not have permissions. SQLState: S00012 Vendor code: 1088
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: CREATE TABLE ACTI
VEMQ_ACKS(CONTAINER VARCHAR(250) NOT NULL, CLIENT_ID VARCHAR(250) NOT NULL,
SUB_NAME VARCHAR(250) NOT NULL, SELECTOR VARCHAR(
250), LAST_ACKED_ID INTEGER, PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))
Message: There is already an object named 'ACTIVE
MQ_ACKS' in the database. SQLState: S0001 Vendor code: 2714
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: CREATE TABLE ACTI
VEMQ_LOCK( ID BIGINT NOT NULL, TIME BIGINT, BROKER_NAME VARCHAR(250),
PRIMARY KEY (ID) ) Message: There is already an object
named 'ACTIVEMQ_LOCK' in the database. SQLState: S0001 Vendor code: 2714
WARN  DefaultJDBCAdapter             - Could not create JDBC tables; they
could already exist. Failure was: INSERT INTO ACTIV
EMQ_LOCK(ID) VALUES (1) Message: Violation of PRIMARY KEY constraint
'PK__ACTIVEMQ_LOCK__3CF40B7E'. Cannot insert duplicate k
ey in object 'dbo.ACTIVEMQ_LOCK'. SQLState: 23000 Vendor code: 2627
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
com.microsoft.sqlserver.jdbc.SQLServerException: In
valid object name 'ACTIVEMQ_MSGS'.
INFO  JournalPersistenceAdapter      - Journal Recovery Started from: Active
Journal: using 5 x 20.0 Megs at: C:\ProgFiles\ac
tivemq-data\journal
INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
transactions recovered.
ERROR BrokerService                  - Failed to start ActiveMQ JMS Message
Broker. Reason: java.io.IOException: Failed to ge
t last broker message id: com.microsoft.sqlserver.jdbc.SQLServerException:
Invalid object name 'ACTIVEMQ_MSGS'.
java.io.IOException: Failed to get last broker message id:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object na
me 'ACTIVEMQ_MSGS'.
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:31)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getLastMessageBrokerSequenceId(JDBCPersistenceAdapter.java:1
45)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.getLastMessageBrokerSequenceId(JournalPersistenceAdapt
er.java:185)
        at
org.apache.activemq.broker.region.DestinationFactoryImpl.getLastMessageBrokerSequenceId(DestinationFactoryImpl.jav
a:148)
        at
org.apache.activemq.broker.region.RegionBroker.<init>(RegionBroker.java:104)
        at
org.apache.activemq.broker.jmx.ManagedRegionBroker.<init>(ManagedRegionBroker.java:99)
        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1266)
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
        at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
        at
org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:1439)
        at
org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1425)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:383)
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCap
ableBeanFactory.java:1062)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapabl
eBeanFactory.java:1029)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBea
nFactory.java:420)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.j
ava:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanF
actory.java:290)

The message:

WARN  JDBCPersistenceAdapter   - Database driver NOT recognized:
[microsoft_sql_server_2005_jdbc_driver].  Will use default JDBC
implementation.

Seems to be the root of the problem.  But I do believe it is specified
correctly.  And two tables got created
ACTIVEMQ_ACKS  and ACTIVEMQ_LOCK  in my database.  

Need some help here.  Please.

kd






<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
    http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="eDM" useJmx="true"
xmlns="http://activemq.org/config/1.0">
  
    <!--  Use the following to set the broker memory limit 
    <memoryManager>  
        <usageManager id="memory-manager" limit="20 MB"/>
    </memoryManager>
    -->
    
    <!-- Use the following to configure how ActiveMQ is exposed in JMX
    <managementContext>
       <managementContext connectorPort="1099"
jmxDomainName="org.apache.activemq"/>
    </managementContext>
    -->
    <destinations>
      <queue physicalName="EDM.VALIDATION" />
      <queue physicalName="EDM.ETL" />
      <queue physicalName="EDM.EMAIL" />
      <topic physicalName="EDM.EVENTS" />
    </destinations>

    <!-- In ActiveMQ 4, you can setup destination policies -->  
    <destinationPolicy>
      <policyMap><policyEntries>
        
          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>
  
  
    <persistenceAdapter>
        <!--journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data"/ -->
      <!-- To use a different datasource, use the following syntax : -->
            <journaledJDBC journalLogFiles="5"
dataDirectory="../activemq-data" dataSource="#mssql-ds" 
useDatabaseLock="false" />
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://jcastellani-t60:61616"
discoveryUri="multicast://default"/>
       <!--transportConnector name="ssl"     uri="ssl://localhost:61617"/-->
       <!--transportConnector name="stomp"  
uri="stomp://localhost:61613"/-->
    </transportConnectors>
    
    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
      <networkConnector name="default-nc" uri="multicast://default"/>
      <!--
      <networkConnector name="host1 and host2"
uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
      -->
    </networkConnectors>
    
  </broker>
  
  <!--  This xbean configuration file supports all the standard spring xml
configuration options -->
  
  <!-- Postgres DataSource Sample Setup -->
  <!-- 
  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
    <property name="serverName" value="localhost"/>
    <property name="databaseName" value="activemq"/>
    <property name="portNumber" value="0"/>
    <property name="user" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="dataSourceName" value="postgres"/>
    <property name="initialConnections" value="1"/>
    <property name="maxConnections" value="10"/>
  </bean>
  -->
  
  <!-- MySql DataSource Sample Setup -->
  <!-- 
  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
    <property name="username" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>
  -->  
   
  <!-- Oracle DataSource Sample Setup 

  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
    <property name="url"
value="jdbc:oracle:thin:@jcastellani-t60:1521:VERIFY"/>
    <property name="username" value="esjms"/>
    <property name="password" value="esjms"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>
       -->


  <!-- MSSQL DataSource Sample Setup -->

  <bean id="mssql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="url"
value="jdbc:sqlserver://kduffy-t43.escholar.com:1433"/>
    <property name="username" value="esjms"/>
    <property name="password" value="esjms"/>
  </bean>







        
  <!-- Embedded Derby DataSource Sample Setup -->
  <!-- 
  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
    <property name="databaseName" value="derbydb"/>
    <property name="createDatabase" value="create"/>
  </bean>
  -->  

</beans>
<!-- END SNIPPET: example -->

-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1.1---MS-SQL-Server-2005--ACTIVEMQ_MSGS--not-found-tf3694309s2354.html#a10330576
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message