6 Replies Latest reply on Jun 25, 2009 2:05 PM by Andrew Tillinghast

    No tables no errors

    Andrew Tillinghast Newbie

      I have a clean install of jboss 5.1.0.GA
      Installed from jboss-5.1.0.GA-jdk6.zip
      Deleted hsqldb-ds.xml
      Copied mssql-ds.xml from examples and edited to correct server name and DefaultDS for Jindi name.
      Deleted hsqldb-persistence-service.xml and replaced with mssql-persistence-service.xml

      Jboss starts with no logged errors. No tables are created in the MS SQL database.

      Double checked the mssql-persistence-service.xml true
      Double checked user rights in the MS SQL server and that ports were open/responding.

      Start up info

      =========================================================================
      
       JBoss Bootstrap Environment
      
       JBOSS_HOME: /opt/jboss
      
       JAVA: /usr/java/jdk1.6.0_14/bin/java
      
       JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
      
       CLASSPATH: /opt/jboss/bin/run.jar:/usr/java/jdk1.6.0_14/lib/tools.jar
      
      =========================================================================
      
      15:44:02,834 INFO [ServerImpl] Starting JBoss (Microcontainer)...
      15:44:02,835 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)
      15:44:02,835 INFO [ServerImpl] Bootstrap URL: null
      15:44:02,835 INFO [ServerImpl] Home Dir: /opt/jboss
      15:44:02,836 INFO [ServerImpl] Home URL: file:/opt/jboss/
      15:44:02,836 INFO [ServerImpl] Library URL: file:/opt/jboss/lib/
      15:44:02,837 INFO [ServerImpl] Patch URL: null
      15:44:02,837 INFO [ServerImpl] Common Base URL: file:/opt/jboss/common/
      15:44:02,837 INFO [ServerImpl] Common Library URL: file:/opt/jboss/common/lib/
      15:44:02,838 INFO [ServerImpl] Server Name: default
      15:44:02,838 INFO [ServerImpl] Server Base Dir: /opt/jboss/server
      15:44:02,838 INFO [ServerImpl] Server Base URL: file:/opt/jboss/server/
      15:44:02,838 INFO [ServerImpl] Server Config URL: file:/opt/jboss/server/default/conf/
      15:44:02,839 INFO [ServerImpl] Server Home Dir: /opt/jboss/server/default
      15:44:02,839 INFO [ServerImpl] Server Home URL: file:/opt/jboss/server/default/
      15:44:02,839 INFO [ServerImpl] Server Data Dir: /opt/jboss/server/default/data
      15:44:02,839 INFO [ServerImpl] Server Library URL: file:/opt/jboss/server/default/lib/
      15:44:02,839 INFO [ServerImpl] Server Log Dir: /opt/jboss/server/default/log
      15:44:02,840 INFO [ServerImpl] Server Native Dir: /opt/jboss/server/default/tmp/native
      15:44:02,840 INFO [ServerImpl] Server Temp Dir: /opt/jboss/server/default/tmp
      15:44:02,840 INFO [ServerImpl] Server Temp Deploy Dir: /opt/jboss/server/default/tmp/deploy
      15:44:03,627 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/opt/jboss/server/default/conf/bootstrap.xml
      15:44:04,383 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
      15:44:04,386 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
      15:44:04,745 INFO [CopyMechanism] VFS temp dir: /opt/jboss/server/default/tmp
      15:44:04,746 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
      15:44:06,607 INFO [ServerInfo] Java version: 1.6.0_14,Sun Microsystems Inc.
      15:44:06,607 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
      15:44:06,607 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 14.0-b16,Sun Microsystems Inc.
      15:44:06,607 INFO [ServerInfo] OS-System: Linux 2.6.18-128.1.14.el5,amd64
      15:44:06,608 INFO [ServerInfo] VM arguments: -Dprogram.name=run.sh -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/opt/jboss/lib/endorsed
      15:44:06,656 INFO [JMXKernel] Legacy JMX core initialized
      15:44:10,167 INFO [ProfileServiceBootstrap] Loading profile: ProfileKey@20b124fa[domain=default, server=default, name=default]
      15:44:12,804 INFO [WebService] Using RMI server codebase: http://cameldev1.conncoll.edu:8083/
      15:44:21,821 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
      15:44:21,821 INFO [NativeServerConfig] 3.1.2.GA
      15:44:22,549 INFO [AttributeCallbackItem] Owner callback not implemented.
      15:44:24,177 INFO [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@443acc67[ defaultDomain='jboss' ]
      15:44:38,764 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@349987379{vfsfile:/opt/jboss/server/default/deploy/profileservice-secured.jar/}
      15:44:38,765 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@349987379{vfsfile:/opt/jboss/server/default/deploy/profileservice-secured.jar/}
      15:44:38,765 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@349987379{vfsfile:/opt/jboss/server/default/deploy/profileservice-secured.jar/}
      15:44:38,765 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@349987379{vfsfile:/opt/jboss/server/default/deploy/profileservice-secured.jar/}
      15:44:40,595 INFO [CorbaNamingService] CORBA Naming Started
      15:44:43,941 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://cameldev1.conncoll.edu/jndi/rmi://cameldev1.conncoll.edu:1090/jmxconnector
      15:44:44,378 INFO [MailService] Mail Service bound to Mail/MailSession
      15:44:45,438 INFO [SnmpAgentService] SNMP agent going active
      15:44:49,240 INFO [cameldev] Initializing partition cameldev
      15:44:49,463 INFO [STDOUT]
      ....
      15:45:06,172 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:3s:329ms
      


        • 1. Re: No tables no errors
          Andy Taylor Master

          is 'CreateTablesOnStartup' in the persistence file set to true?

          • 2. Re: No tables no errors
            Andrew Tillinghast Newbie

            yes I had actually said that in the post but had included the tags so it didn't display right.

            Double checked the mssql-persistence-service.xml CreateTablesOnStartup is set to true

            • 3. Re: No tables no errors
              Andy Taylor Master

              daft question, but it is the default configuration that you made the changes too? also have you added the correct database drivers.

              also try running with a higher logging level to see if that throws up anything!

              • 4. Re: No tables no errors
                Andrew Tillinghast Newbie

                Renamed All as Default, removed other configs.
                Logging level is INFO.
                SQLJDBC4.jar is in $JBOSS_HOME/server/default/lib

                mssql-ds.xml

                <?xml version="1.0" encoding="UTF-8"?>
                <datasources>
                 <local-tx-datasource>
                 <jndi-name>DefaultDS</jndi-name>
                 <connection-url>jdbc:sqlserver://devdb.conncoll.edu:1433</connection-url>
                 <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                 <databaseName>JBoss</databaseName>
                 <user-name>xxxxx</user-name>
                 <password>*****</password>
                 <check-valid-connection-sql>SELECT 1 FROM sysobjects</check-valid-connection-sql>
                 <metadata>
                 <type-mapping>MS SQLSERVER2000</type-mapping>
                 </metadata>
                 </local-tx-datasource>
                </datasources>


                Relevant portion of mssql-persistence-service.xml

                <server>
                
                 <!-- Persistence Manager MBean configuration
                 ======================================== -->
                
                 <mbean code="org.jboss.messaging.core.jmx.JDBCPersistenceManagerService"
                 name="jboss.messaging:service=PersistenceManager"
                 xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
                
                 <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
                
                 <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
                
                 <!-- The datasource to use for the persistence manager -->
                
                 <attribute name="DataSource">java:/DefaultDS</attribute>
                
                 <!-- If true will attempt to create tables and indexes on every start-up -->
                
                 <attribute name="CreateTablesOnStartup">true</attribute>
                
                 <!-- If true then we will automatically detect and reject duplicate messages sent during failover -->
                
                 <attribute name="DetectDuplicates">true</attribute>
                
                 <!-- The size of the id cache to use when detecting duplicate messages -->
                
                 <attribute name="IDCacheSize">500</attribute>
                


                Relevant Log entries showing registration of DefaultDS Jndi and start of Messaging
                15:44:57,896 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                15:44:59,954 INFO [ServerPeer] JBoss Messaging 1.4.3.GA server [0] started
                15:45:00,115 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                15:45:00,195 INFO [ConnectionFactory] Connector bisocket://cameldev1.conncoll.edu:4457 has leasing enabled, lease period 10000 milliseconds
                15:45:00,195 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@3c750372 started
                15:45:00,197 INFO [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
                15:45:00,197 INFO [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
                15:45:00,206 INFO [ConnectionFactory] Connector bisocket://cameldev1.conncoll.edu:4457 has leasing enabled, lease period 10000 milliseconds
                15:45:00,206 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@78ab10ed started
                15:45:00,209 INFO [ConnectionFactory] Connector bisocket://cameldev1.conncoll.edu:4457 has leasing enabled, lease period 10000 milliseconds
                15:45:00,209 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@d44d2cc started
                15:45:00,223 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                15:45:00,229 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                


                • 5. Re: No tables no errors
                  Andy Taylor Master

                  change the log level to trace, you should see the tables being created.

                  • 6. Re: No tables no errors
                    Andrew Tillinghast Newbie

                    Thanks, by setting log to trace I was able to figure out the MS SQL driver was ignoring the "databaseName" property and the tables were being dumped into another DB. I change the connection-url and it's working as expected now.