I am getting an error that my table in the database is not mapped. It is strange becuase I can see in the log that is is mapping the class to the table.
The tablename is "candidate" adn the class is "CandidateDTO"
here is the output to the log.
[exec] 12:32:48,443 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
[exec] 12:32:48,443 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
[exec] 12:32:48,693 INFO [Configuration] Mapping resource: com/csg/dto/CandidateDTO.hbm.xml
[exec] 12:32:49,955 INFO [HbmBinder] Mapping class: com.csg.dto.CandidateDTO -> candidate
[exec] 12:32:50,025 INFO [Configuration] Configured SessionFactory: null
[exec] 12:32:50,025 INFO [Configuration] processing extends queue
[exec] 12:32:50,025 INFO [Configuration] processing collection mappings
[exec] 12:32:50,025 INFO [Configuration] processing association property references
[exec] 12:32:50,025 INFO [Configuration] processing foreign key constraints
[exec] 12:32:50,276 INFO [NamingHelper] JNDI InitialContext properties:{}
[exec] 12:32:50,286 INFO [DatasourceConnectionProvider] Using datasource: java:MSSQLDS
[exec] 12:32:52,118 INFO [SettingsFactory] RDBMS: Microsoft SQL Server, version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
[exec] Dec 17 2002 14:22:05
[exec] Copyright (c) 1988-2003 Microsoft Corporation
[exec] Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
[exec] 12:32:52,118 INFO [SettingsFactory] JDBC driver: SQLServer, version: 2.2.0040
[exec] 12:32:52,198 INFO [Dialect] Using dialect: org.hibernate.dialect.SQLServerDialect
[exec] 12:32:52,249 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
[exec] 12:32:52,259 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[exec] 12:32:52,259 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
[exec] 12:32:52,259 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
[exec] 12:32:52,269 INFO [SettingsFactory] Scrollable result sets: enabled
[exec] 12:32:52,269 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
[exec] 12:32:52,269 INFO [SettingsFactory] Connection release mode: null
[exec] 12:32:52,269 INFO [SettingsFactory] Default batch fetch size: 1
[exec] 12:32:52,269 INFO [SettingsFactory] Generate SQL with comments: disabled
[exec] 12:32:52,269 INFO [SettingsFactory] Order SQL updates by primary key: disabled
[exec] 12:32:52,269 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[exec] 12:32:52,309 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
[exec] 12:32:52,319 INFO [SettingsFactory] Query language substitutions: {}
[exec] 12:32:52,319 INFO [SettingsFactory] Second-level cache: enabled
[exec] 12:32:52,319 INFO [SettingsFactory] Query cache: disabled
[exec] 12:32:52,319 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
[exec] 12:32:52,329 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
[exec] 12:32:52,339 INFO [SettingsFactory] Structured second-level cache entries: disabled
[exec] 12:32:52,369 INFO [SettingsFactory] Echoing all SQL to stdout
[exec] 12:32:52,369 INFO [SettingsFactory] Statistics: disabled
[exec] 12:32:52,369 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
[exec] 12:32:52,379 INFO [SettingsFactory] Default entity-mode: pojo
[exec] 12:32:52,799 INFO [SessionFactoryImpl] building session factory
[exec] 12:32:52,839 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Applications/jboss-4.0.2/server/default/tmp/deploy/tmp45759CATS-exp.war/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
[exec] 12:32:53,881 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
[exec] 12:32:53,881 INFO [SessionFactoryImpl] Checking 0 named queries
[exec] 12:32:54,021 INFO [STDOUT] FROM candidate c where c.candidate_id = ?
[exec] 12:32:54,482 ERROR [PARSER] *** ERROR: candidate is not mapped.
[exec] 12:32:54,552 ERROR [PARSER] *** ERROR: Invalid path: 'c.candidate_id'
[exec] 12:32:54,552 ERROR [PARSER] *** ERROR: <AST>: unexpected end of subtree
I see the message:
[exec] 12:32:49,955 INFO [HbmBinder] Mapping class: com.csg.dto.CandidateDTO -> candidate
Which would appear that the mapping is created. Why is it complaining that the table is not mapped?
|