-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Exception when running HelloWorld with Annotations
PostPosted: Tue Jun 26, 2007 11:17 am 
Newbie

Joined: Mon Jun 25, 2007 12:08 pm
Posts: 8
I am trying to learn hibernate and am trying to follow the samples in the book. The download examples do not include the sample code at this level; before including Entity Manager.

I was able to get HelloWorld working using a mapping file, but when I try to change the code to use Annotations I get the following error:

I have created the mappings in the Message.java file (see below).
I have created the mappings in hibernate.cfg.xml and in the sessionFactory.

I am using a MS-SQL database rather than the HSQLDB database which the samples shows. Other than that the code should follow the book.

I tried to include as much information as possible.

Any help or suggestions would be appreciated.

-Steve Nelligan

Hibernate version:
3.2.4 sp1

Mapping documents:
package hello;

import javax.persistence.*;

/**
* Created by IntelliJ IDEA.
* User: snelligan
* Date: Jun 21, 2007
* Time: 2:34:13 PM
*/
public class Message {

@Id
@GeneratedValue
@Column(name = "MESSAGE_ID")
private Long id;

@Column(name = "MESSAGE_TEXT")
private String text;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "NEXT_MESSAGE_ID")
private Message nextMessage;

protected Message() {}

public Message(String text) {
this.text = text;
}

public Long getId() {
return id;
}
private void setId(Long id) {
this.id = id;
}

public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}

public Message getNextMessage() {
return nextMessage;
}
public void setNextMessage(Message nextMessage) {
this.nextMessage = nextMessage;
}
}
#############################################
<!DOCTYPE hibernate-configuration SYSTEM
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://130.126.4.66:1433;databaseName=StevesTesting;SelectMethod=cursor</property>
<property name="hibernate.connection.username">snelliga</property>
<property name="hibernate.connection.password">smn-1812</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>

<!-- Use the C3P0 connection pool provider -->
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>

<!-- Show and print nice SQL on stdout -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>

<!-- List of annotated classes-->
<mapping class="hello.Message"/>

</session-factory>
</hibernate-configuration>


Code between sessionFactory.openSession() and session.close():
private static SessionFactory sessionFactory;

static {
try {
// AnnotationConfiguration cfg = new AnnotationConfiguration();
// cfg.addAnnotatedClass(hello.Message.class);
// cfg.configure("hibernate.cfg.xml");
// sessionFactory = cfg.buildSessionFactory();
sessionFactory = new AnnotationConfiguration()
.addAnnotatedClass(hello.Message.class)
.configure("hibernate.cfg.xml")
.buildSessionFactory();
}
catch (Throwable ex) {
throw new ExceptionInInitializerError(ex);
}
}

Full stack trace of any exception that occurs:
07:41:12,103DEBUG DefaultSaveOrUpdateEventListener:158 - saving transient instance
Exception in thread "main" org.hibernate.MappingException: Unknown entity: hello.Message
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
at hello.HelloWorld.main(HelloWorld.java:24)

Name and version of the database you are using:
MS-SQL

Debug level Hibernate log excerpt:
07:41:04,702 INFO Version:15 - Hibernate Annotations 3.3.0.GA
07:41:04,732 INFO Environment:514 - Hibernate 3.2.4.sp1
07:41:04,732 INFO Environment:547 - hibernate.properties not found
07:41:04,742 INFO Environment:681 - Bytecode provider name : cglib
07:41:04,742 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling
07:41:04,862 INFO Configuration:1426 - configuring from resource: hibernate.cfg.xml
07:41:04,862 INFO Configuration:1403 - Configuration resource: hibernate.cfg.xml
07:41:04,973DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
07:41:04,973DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
07:41:04,983DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
07:41:05,033DEBUG Configuration:1387 - hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
07:41:05,033DEBUG Configuration:1387 - hibernate.connection.url=jdbc:microsoft:sqlserver://130.126.4.66:1433;databaseName=StevesTesting;SelectMethod=cursor
07:41:05,033DEBUG Configuration:1387 - hibernate.connection.username=snelliga
07:41:05,033DEBUG Configuration:1387 - hibernate.connection.password=smn-1812
07:41:05,033DEBUG Configuration:1387 - hibernate.dialect=org.hibernate.dialect.SQLServerDialect
07:41:05,033DEBUG Configuration:1387 - hibernate.c3p0.min_size=5
07:41:05,033DEBUG Configuration:1387 - hibernate.c3p0.max_size=20
07:41:05,043DEBUG Configuration:1387 - hibernate.c3p0.timeout=300
07:41:05,043DEBUG Configuration:1387 - hibernate.c3p0.max_statements=50
07:41:05,043DEBUG Configuration:1387 - hibernate.c3p0.idle_test_period=3000
07:41:05,043DEBUG Configuration:1387 - show_sql=true
07:41:05,043DEBUG Configuration:1387 - format_sql=true
07:41:05,043DEBUG AnnotationConfiguration:596 - null<-org.dom4j.tree.DefaultAttribute@113beb5 [Attribute: name class value "hello.Message"]
07:41:05,053 INFO Configuration:1541 - Configured SessionFactory: null
07:41:05,053DEBUG Configuration:1542 - properties: {hibernate.connection.password=smn-1812, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\Program Files\Java\jdk1.5.0_11\jre\bin, java.vm.version=1.5.0_11-b03, hibernate.connection.username=snelliga, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations, java.runtime.version=1.5.0_11-b03, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hibernate.c3p0.max_statements=50, java.endorsed.dirs=C:\Program Files\Java\jdk1.5.0_11\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\snelliga\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, hibernate.c3p0.idle_test_period=3000, sun.jnu.encoding=Cp1252, hibernate.c3p0.timeout=300, java.library.path=C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\Program Files\Java\jdk1.5.0_11\bin;c:\oracle\oracle912\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\ClarifyCRM\eFrontOffice11.5\bin;C:\ClarifyCRM\eFrontOffice11.5\ClearConfigurator\Common Files\CCAutomation;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Synergex\SynergyDE\Workbench\win;C:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\system32\Windows System Resource Manager\bin\;C:\Program Files\Synergex\SynergyDE\connect\;C:\Program Files\Synergex\SynergyDE\dbl\bin\;C:\Program Files\MySQL\MySQL Server 5.0\bin, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\snelliga, user.timezone=America/Chicago, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=windows-1252, java.specification.version=1.5, hibernate.format_sql=true, hibernate.c3p0.min_size=5, hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver, show_sql=true, user.name=snelliga, java.class.path=C:\Program Files\Java\jdk1.5.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\sunpkcs11.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\classes\production\JavaPersistenceWithHibernateAnnotations;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\antlr-2.7.6.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\asm-attrs.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\asm.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\c3p0-0.9.0.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\c3p0-0.9.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\cglib-2.1.3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\commons-collections-2.1.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\commons-logging-1.0.4.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\dom4j-1.6.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ejb3-persistence.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate-commons-annotations.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate-tools.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hsqldb.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\j2ee.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jta.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\log4j-1.2.11.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\log4j-1.2.13.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\mssqlserver.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-swing-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-jmx.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\swarmcache-1.0rc2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\syndiag2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-junit-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\checkstyle-all.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jaas.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-launcher-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-common.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\javassist.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jgroups-2.2.8.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-cache.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jdbc2_0-stdext.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\oscache-2.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-system.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\versioncheck.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\xml-apis.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\concurrent-1.3.2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ehcache-1.2.3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\cleanimports.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jaxen-1.1-beta-7.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\junit-3.8.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\xerces-2.6.2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\connector.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-antlr-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jacc-1_0-fr.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\proxool-0.8.3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate-annotations.jar;C:\Program Files\JetBrains\IntelliJ IDEA 7027\lib\idea_rt.jar, format_sql=true, hibernate.bytecode.use_reflection_optimizer=false, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\jdk1.5.0_11\jre, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, hibernate.connection.url=jdbc:microsoft:sqlserver://130.126.4.66:1433;databaseName=StevesTesting;SelectMethod=cursor, user.language=en, java.specification.vendor=Sun Microsystems Inc., hibernate.c3p0.max_size=20, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.5.0_11, java.ext.dirs=C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext, sun.boot.class.path=C:\Program Files\Java\jdk1.5.0_11\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_11\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
07:41:05,053DEBUG AnnotationConfiguration:758 - Validator not present in classpath, ignoring event listener registration
07:41:05,063DEBUG AnnotationConfiguration:831 - Search not present in classpath, ignoring event listener registration
07:41:05,063DEBUG Configuration:1285 - Preparing to build session factory with filters : {}
07:41:05,063DEBUG AnnotationConfiguration:244 - Execute first pass mapping processing
07:41:05,123DEBUG AnnotationConfiguration:481 - Process hbm files
07:41:05,123DEBUG AnnotationConfiguration:489 - Process annotated classes
07:41:05,123DEBUG AnnotationConfiguration:375 - processing manytoone fk mappings
07:41:05,123DEBUG Configuration:1120 - processing extends queue
07:41:05,123DEBUG Configuration:1124 - processing collection mappings
07:41:05,123DEBUG Configuration:1135 - processing native query and ResultSetMapping mappings
07:41:05,123DEBUG Configuration:1143 - processing association property references
07:41:05,123DEBUG Configuration:1165 - processing foreign key constraints
07:41:05,123 INFO AnnotationConfiguration:350 - Hibernate Validator not found: ignoring
07:41:05,133 INFO C3P0ConnectionProvider:81 - C3P0 using driver: com.microsoft.jdbc.sqlserver.SQLServerDriver at URL: jdbc:microsoft:sqlserver://130.126.4.66:1433;databaseName=StevesTesting;SelectMethod=cursor
07:41:05,133 INFO C3P0ConnectionProvider:82 - Connection properties: {user=snelliga, password=****}
07:41:05,133 INFO C3P0ConnectionProvider:85 - autocommit mode: false
07:41:05,774DEBUG SettingsFactory:347 - could not get database version from JDBC metadata
07:41:05,774 INFO SettingsFactory:89 - RDBMS: Microsoft SQL Server, version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

07:41:05,774 INFO SettingsFactory:90 - JDBC driver: SQLServer, version: 2.2.0037
07:41:05,804 INFO Dialect:152 - Using dialect: org.hibernate.dialect.SQLServerDialect
07:41:05,914 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
07:41:05,924 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
07:41:05,924 INFO SettingsFactory:143 - Automatic flush during beforeCompletion(): disabled
07:41:05,924 INFO SettingsFactory:147 - Automatic session close at end of transaction: disabled
07:41:05,924 INFO SettingsFactory:162 - Scrollable result sets: enabled
07:41:05,924DEBUG SettingsFactory:166 - Wrap result sets: disabled
07:41:05,924 INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(): disabled
07:41:05,924 INFO SettingsFactory:178 - Connection release mode: auto
07:41:05,934 INFO SettingsFactory:205 - Default batch fetch size: 1
07:41:05,934 INFO SettingsFactory:209 - Generate SQL with comments: disabled
07:41:05,934 INFO SettingsFactory:213 - Order SQL updates by primary key: disabled
07:41:05,934 INFO SettingsFactory:217 - Order SQL inserts for batching: disabled
07:41:05,934 INFO SettingsFactory:386 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
07:41:05,934 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
07:41:05,934 INFO SettingsFactory:225 - Query language substitutions: {}
07:41:05,934 INFO SettingsFactory:230 - JPA-QL strict compliance: disabled
07:41:05,934 INFO SettingsFactory:235 - Second-level cache: enabled
07:41:05,934 INFO SettingsFactory:239 - Query cache: disabled
07:41:05,934 INFO SettingsFactory:373 - Cache provider: org.hibernate.cache.NoCacheProvider
07:41:05,934 INFO SettingsFactory:254 - Optimize cache for minimal puts: disabled
07:41:05,934 INFO SettingsFactory:263 - Structured second-level cache entries: disabled
07:41:05,944DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
07:41:05,954 INFO SettingsFactory:283 - Echoing all SQL to stdout
07:41:05,954 INFO SettingsFactory:290 - Statistics: disabled
07:41:05,954 INFO SettingsFactory:294 - Deleted entity synthetic identifier rollback: disabled
07:41:05,954 INFO SettingsFactory:309 - Default entity-mode: pojo
07:41:05,954 INFO SettingsFactory:313 - Named query checking : enabled
07:41:06,014 INFO SessionFactoryImpl:161 - building session factory
07:41:06,024DEBUG SessionFactoryImpl:173 - Session factory constructed with filter configurations : {}
07:41:06,024DEBUG SessionFactoryImpl:177 - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=smn-1812, sun.boot.library.path=C:\Program Files\Java\jdk1.5.0_11\jre\bin, java.vm.version=1.5.0_11-b03, hibernate.connection.username=snelliga, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations, java.runtime.version=1.5.0_11-b03, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jdk1.5.0_11\jre\lib\endorsed, os.arch=x86, hibernate.c3p0.max_statements=50, java.io.tmpdir=C:\DOCUME~1\snelliga\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, hibernate.c3p0.idle_test_period=3000, sun.jnu.encoding=Cp1252, hibernate.c3p0.timeout=300, java.library.path=C:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\Program Files\Java\jdk1.5.0_11\bin;c:\oracle\oracle912\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\ClarifyCRM\eFrontOffice11.5\bin;C:\ClarifyCRM\eFrontOffice11.5\ClearConfigurator\Common Files\CCAutomation;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Synergex\SynergyDE\Workbench\win;C:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\system32\Windows System Resource Manager\bin\;C:\Program Files\Synergex\SynergyDE\connect\;C:\Program Files\Synergex\SynergyDE\dbl\bin\;C:\Program Files\MySQL\MySQL Server 5.0\bin, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\snelliga, user.timezone=America/Chicago, java.awt.printerjob=sun.awt.windows.WPrinterJob, java.specification.version=1.5, file.encoding=windows-1252, hibernate.format_sql=true, hibernate.c3p0.min_size=5, hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver, show_sql=true, java.class.path=C:\Program Files\Java\jdk1.5.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext\sunpkcs11.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\classes\production\JavaPersistenceWithHibernateAnnotations;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\antlr-2.7.6.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\asm-attrs.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\asm.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\c3p0-0.9.0.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\c3p0-0.9.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\cglib-2.1.3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\commons-collections-2.1.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\commons-logging-1.0.4.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\dom4j-1.6.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ejb3-persistence.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate-commons-annotations.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate-tools.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hsqldb.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\j2ee.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jta.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\log4j-1.2.11.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\log4j-1.2.13.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\mssqlserver.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-swing-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-jmx.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\swarmcache-1.0rc2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\syndiag2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-junit-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\checkstyle-all.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jaas.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-launcher-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-common.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\javassist.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jgroups-2.2.8.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-cache.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jdbc2_0-stdext.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\oscache-2.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jboss-system.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\versioncheck.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\xml-apis.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\concurrent-1.3.2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ehcache-1.2.3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\cleanimports.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jaxen-1.1-beta-7.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\junit-3.8.1.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\xerces-2.6.2.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\connector.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\ant-antlr-1.6.5.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\jacc-1_0-fr.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\proxool-0.8.3.jar;C:\IDEAProjects\JavaPersistenceWithHibernateAnnotations\lib\hibernate-annotations.jar;C:\Program Files\JetBrains\IntelliJ IDEA 7027\lib\idea_rt.jar, user.name=snelliga, hibernate.bytecode.use_reflection_optimizer=false, format_sql=true, hibernate.show_sql=true, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=C:\Program Files\Java\jdk1.5.0_11\jre, hibernate.connection.url=jdbc:microsoft:sqlserver://130.126.4.66:1433;databaseName=StevesTesting;SelectMethod=cursor, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, java.specification.vendor=Sun Microsystems Inc., user.language=en, awt.toolkit=sun.awt.windows.WToolkit, hibernate.c3p0.max_size=20, java.vm.info=mixed mode, java.version=1.5.0_11, java.ext.dirs=C:\Program Files\Java\jdk1.5.0_11\jre\lib\ext, sun.boot.class.path=C:\Program Files\Java\jdk1.5.0_11\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_11\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, sun.desktop=windows, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
07:41:06,034DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
07:41:06,034DEBUG SessionFactoryObjectFactory:76 - registered: 02fe864b13680ca60113680ca6e80000 (unnamed)
07:41:06,034 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
07:41:06,034DEBUG SessionFactoryImpl:308 - instantiated session factory
07:41:06,034DEBUG SessionFactoryImpl:392 - Checking 0 named HQL queries
07:41:06,034DEBUG SessionFactoryImpl:412 - Checking 0 named SQL queries
07:41:06,134DEBUG SessionImpl:220 - opened session at timestamp: 11828616660
07:41:06,134DEBUG JDBCTransaction:54 - begin
07:41:06,134DEBUG ConnectionManager:421 - opening JDBC connection
07:41:06,144DEBUG JDBCTransaction:59 - current autocommit status: false
07:41:06,144DEBUG JDBCContext:210 - after transaction begin
07:41:12,103DEBUG DefaultSaveOrUpdateEventListener:158 - saving transient instance

_________________
Steve


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 7:41 am 
Newbie

Joined: Mon Jun 25, 2007 12:08 pm
Posts: 8
The problem was that the following two lines were missing from the Message class:

@Entity
@Table(name="MESSAGES")

_________________
Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.