0 Replies Latest reply on Aug 3, 2006 10:58 AM by tinnes

    Startup Deleting Data

    tinnes

      Database - MySQL 5.0
      JBOSS - 4.03SP1

      I have a problem where the startup of JBoss is removing all the data in my tables. I am playing with JSF and have created two tables country and state. The data exists after it is added and even after a re-boot of the machine. Once JBOSS is started all the data is deleted. I think the entire table is being re-created. I am using hibernate as well and at present I am not using EJB's.

      This started after the machine failed and I had to replace the drive and the OS. I was able to recover the complete JBOSS Configuration and only to r-install mysql.

      Obviously something is different, but I don't know what. Is there a way to tell JBOSS not to alter or create the table structures?

      I don't see anything in the logs that indicates JBOSS is dropping or altering the tables but clearly something is. I am attaching the relevant sections of the logs.

      10:35:14,640 INFO [Configuration] Searching for mapping documents in jar: CRM.har
      10:35:14,640 INFO [Configuration] Found mapping document in jar: com/alltiers/crm/server/datatransfer/TCountry.hbm.xml
      10:35:14,765 INFO [HbmBinder] Mapping class: com.alltiers.crm.server.datatransfer.TCountry -> t_country
      10:35:14,812 INFO [Configuration] Found mapping document in jar: com/alltiers/crm/server/datatransfer/TState.hbm.xml
      10:35:14,828 INFO [HbmBinder] Mapping class: com.alltiers.crm.server.datatransfer.TState -> t_state
      10:35:14,953 INFO [Configuration] processing extends queue
      10:35:14,953 INFO [Configuration] processing collection mappings
      10:35:14,953 INFO [HbmBinder] Mapping collection: com.alltiers.crm.server.datatransfer.TCountry.TStates -> t_state
      10:35:14,953 INFO [Configuration] processing association property references
      10:35:14,953 INFO [Configuration] processing foreign key constraints
      10:35:14,968 INFO [NamingHelper] JNDI InitialContext properties:{}
      10:35:14,968 INFO [DatasourceConnectionProvider] Using datasource: java:/CRMDS
      10:35:15,312 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.22-community-nt
      10:35:15,312 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
      10:35:15,343 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
      10:35:15,359 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
      10:35:15,359 INFO [NamingHelper] JNDI InitialContext properties:{}
      10:35:15,359 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      10:35:15,359 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      10:35:15,359 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      10:35:15,359 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      10:35:15,359 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
      10:35:15,359 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
      10:35:15,359 INFO [SettingsFactory] JDBC batch size: 15
      10:35:15,359 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      10:35:15,359 INFO [SettingsFactory] Scrollable result sets: enabled
      10:35:15,359 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
      10:35:15,359 INFO [SettingsFactory] Connection release mode: after_statement
      10:35:15,359 INFO [SettingsFactory] Maximum outer join fetch depth: 2
      10:35:15,359 INFO [SettingsFactory] Default batch fetch size: 1
      10:35:15,359 INFO [SettingsFactory] Generate SQL with comments: disabled
      10:35:15,359 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      10:35:15,359 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      10:35:15,359 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      10:35:15,359 INFO [SettingsFactory] Query language substitutions: {}
      10:35:15,359 INFO [SettingsFactory] Second-level cache: enabled
      10:35:15,359 INFO [SettingsFactory] Query cache: disabled
      10:35:15,359 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
      10:35:15,359 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      10:35:15,359 INFO [SettingsFactory] Structured second-level cache entries: disabled
      10:35:15,375 INFO [SettingsFactory] Echoing all SQL to stdout
      10:35:15,375 INFO [SettingsFactory] Statistics: disabled
      10:35:15,375 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      10:35:15,375 INFO [SettingsFactory] Default entity-mode: POJO
      10:35:15,546 INFO [SessionFactoryImpl] building session factory
      10:35:16,078 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      10:35:16,093 INFO [Configuration] processing extends queue
      10:35:16,093 INFO [Configuration] processing collection mappings
      10:35:16,093 INFO [Configuration] processing association property references
      10:35:16,093 INFO [Configuration] processing foreign key constraints
      10:35:16,093 INFO [Configuration] processing extends queue
      10:35:16,093 INFO [Configuration] processing collection mappings
      10:35:16,093 INFO [Configuration] processing association property references
      10:35:16,093 INFO [Configuration] processing foreign key constraints
      10:35:16,093 INFO [SchemaExport] Running hbm2ddl schema export
      10:35:16,093 INFO [SchemaExport] exporting generated schema to database
      10:35:16,312 INFO [SchemaExport] schema export complete
      10:35:16,312 INFO [Configuration] processing extends queue
      10:35:16,312 INFO [Configuration] processing collection mappings
      10:35:16,312 INFO [Configuration] processing association property references
      10:35:16,312 INFO [Configuration] processing foreign key constraints
      10:35:16,312 INFO [Configuration] processing extends queue
      10:35:16,312 INFO [Configuration] processing collection mappings
      10:35:16,328 INFO [Configuration] processing association property references
      10:35:16,328 INFO [Configuration] processing foreign key constraints
      10:35:16,328 INFO [NamingHelper] JNDI InitialContext properties:{}
      10:35:16,328 INFO [SessionFactoryImpl] Checking 0 named queries
      10:35:16,328 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/HibernateSessionFactory]
      10:35:17,875 INFO [TomcatDeployer] deploy, ctxPath=/CountryState, warUrl=.../tmp/deploy/tmp25286CountryState-exp.war/
      10:35:18,390 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml