-->
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.  [ 3 posts ] 
Author Message
 Post subject: object is not mapped error
PostPosted: Thu May 29, 2008 9:04 pm 
Newbie

Joined: Mon May 19, 2008 11:46 pm
Posts: 9
Location: San Francisco Bay Area
Folks-

Apologies for the long post, but I tried to include as much information as I could. I am getting a “<object> not mapped error”. I have looked at the following postings but haven’t been able to figure out my problem yet.

http://forum.springframework.org/archiv ... 16244.html
http://forum.springframework.org/showthread.php?t=19737
http://www.jboss.com/?module=bb&op=viewtopic&t=67660

Here are the contents of the Java file where I try to query the database (modified from the tutorial, section 1.2.6, at http://www.hibernate.org/hib_docs/v3/re ... orial.html):

package com.AlightPlanning.server.db;

import java.util.List;

import org.hibernate.*;
import org.hibernate.cfg.Configuration;
import org.hibernate.Session;

class HibernateUtil {

private static final SessionFactory mSessionFactory;
private static final Session mSession;

static {
try {
// Create the SessionFactory from hibernate.cfg.xml
mSessionFactory = new Configuration().configure().buildSessionFactory();
mSession = mSessionFactory.openSession();
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
}
public static Session getSession() {
return mSession;
}
}
public class DbProto {
public static List<?> listLI() {
Session session = HibernateUtil.getSession();
session.beginTransaction();
List<?> result = session.createQuery("from Lineitemswithcells").list();
// List<?> result = session.createCriteria(Lineitemswithcells.class).list();
// List<?> result = session.createSQLQuery("SELECT * FROM lineitemswithcells")
// .addEntity(Lineitemswithcells.class).list();
session.getTransaction().commit();
return result;
}
public static int listLIcount() {
return listLI().size();
}
}

The Lineitemswithcells.hbm.xml contains:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated May 29, 2008 10:47:16 AM by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="com.AlightPlanning.server.db.Lineitemswithcells" table="lineitemswithcells" catalog="marquesasoftware5">
<composite-id name="id" class="com.AlightPlanning.server.db.LineitemswithcellsId">
<key-property name="sheet" type="string">
<column name="Sheet" length="127" />
</key-property>
<key-property name="row" type="int">
<column name="Row_" />
</key-property>
</composite-id>
<property name="topLevel" type="string">
<column name="TopLevel" length="127" />
</property>
…rest of fields…
</class>
</hibernate-mapping>

The generated Java file is:

package com.AlightPlanning.server.db;
// Generated May 29, 2008 10:47:17 AM by Hibernate Tools 3.2.0.CR1
import java.math.BigDecimal;
/**
* Lineitemswithcells generated by hbm2java
*/
public class Lineitemswithcells implements java.io.Serializable {


private LineitemswithcellsId id;
private String topLevel;
private String category;
…etc…

I tried the other two techniques listed in the first set of postings above, and got the following results:

List<?> result = session.createCriteria(Lineitemswithcells.class).list();

This returns no errors, but returns zero rows (when rows do exist in the database)

List<?> result = session.createSQLQuery("SELECT * FROM lineitemswithcells").addEntity(Lineitemswithcells.class).list();

This gives the runtime error: “org.hibernate.MappingException: Unknown entity: com.AlightPlanning.server.db.Lineitemswithcells.”

I generated the Lineitemswithcells.hbm.xml using this reverse engineering file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<type-mapping>
<sql-type jdbc-type="CHAR" hibernate-type="string" length="127"
not-null="false">
</sql-type>
<sql-type jdbc-type="DECIMAL" hibernate-type="big_decimal"
precision="38" scale="19" not-null="false">
</sql-type>
<sql-type jdbc-type="INTEGER" hibernate-type="java.lang.Integer"
not-null="false">
</sql-type>
</type-mapping>
<table-filter match-name="lineitemswithcells"
match-catalog="marquesasoftware5"
package="com.AlightPlanning.server.db">
</table-filter>
</hibernate-reverse-engineering>

And this ant file:

<project name="AP_GWT" default="AP_GWT">

<property name="sourcedir" value="${basedir}/src" />
<property name="targetdir" value="${basedir}/src" />
<property name="eclipsedir" value="${basedir}/../../../../../dev/Eclipse" />
<property name="hiblibdir"
value="${eclipsedir}/plugins/org.hibernate.eclipse_3.2.0.GA/lib" />

<path id="toolslib">
<path location="${hiblibdir}/tools/hibernate-tools.jar" />
<path location="${hiblibdir}/tools/freemarker.jar" />
<path location="${hiblibdir}/tools/jtidy-r8-20060801.jar" />
<path location="${hiblibdir}/hibernate/asm.jar" />
<path location="${hiblibdir}/hibernate/asm-attrs.jar" />
<path location="${hiblibdir}/hibernate/cglib-2.1.3.jar" />
<path location="${hiblibdir}/hibernate/dom4j-1.6.1.jar" />
<path location="${hiblibdir}/hibernate/hibernate3.jar" />
<path location="${eclipsedir}/plugins/mysql-connector-java-5.1.5-bin.jar" />
<path location="${eclipsedir}/plugins/org.apache.commons.logging_1.0.4.v200706111724.jar" />
<path location="${eclipsedir}/plugins/org.eclipse.tomcat_4.1.230.v20070531/commons-collections.jar" />
</path>

<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />

<!-- for debugging -->
<target name="echo">
<echo message="${eclipsedir}"/>
</target>

<target name="AP_GWT">
<hibernatetool destdir="${targetdir}">
<jdbcconfiguration configurationfile="src/hibernate.cfg.xml"
revengfile="src/hibernate.reveng.xml" />
<hbm2hbmxml />
<hbm2java />
</hibernatetool>
</target>

</project>

I am using:
-Eclipse (for JEE developers) 3.2.2
-Java 6.0
-Hibernate 3.2.0 GA
-MySQL

Any help is appreciated.
-CK


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 31, 2008 9:10 pm 
Newbie

Joined: Mon May 19, 2008 11:46 pm
Posts: 9
Location: San Francisco Bay Area
Here is the debug-level log from my session:

18:06:32,531 INFO Environment:514 - Hibernate 3.2.6
18:06:32,546 INFO Environment:547 - hibernate.properties not found
18:06:32,546 INFO Environment:681 - Bytecode provider name : cglib
18:06:32,562 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling
18:06:32,656 INFO Configuration:1432 - configuring from resource: /hibernate.cfg.xml
18:06:32,656 INFO Configuration:1409 - Configuration resource: /hibernate.cfg.xml
18:06:32,703 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
18:06:32,703 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
18:06:32,718 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
18:06:32,734 DEBUG Configuration:1393 - hibernate.connection.driver_class=com.mysql.jdbc.Driver
18:06:32,734 DEBUG Configuration:1393 - hibernate.connection.password=p0pc0rN
18:06:32,734 DEBUG Configuration:1393 - hibernate.connection.url=jdbc:mysql://localhost/marquesasoftware5
18:06:32,734 DEBUG Configuration:1393 - hibernate.connection.username=nadev
18:06:32,734 DEBUG Configuration:1393 - hibernate.dialect=org.hibernate.dialect.MySQLDialect
18:06:32,734 INFO Configuration:1547 - Configured SessionFactory: sessionFactory
18:06:32,734 DEBUG Configuration:1548 - properties: {hibernate.connection.password=p0pc0rN, java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:\Program Files\Java\jre1.6.0_05\bin, java.vm.version=10.0-b19, hibernate.connection.username=nadev, 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:\Alight\inCVS\etc\ck\workspace\AP_GWT, java.runtime.version=1.6.0_05-b13, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jre1.6.0_05\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=Cp1252, java.library.path=C:\Program Files\Java\jre1.6.0_05\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_05\bin\client;C:\Program Files\Java\jre1.6.0_05\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\cvsnt;C:\Program Files\ImageConverter Plus;;C:\Program Files\Subversion\bin;C:\Alight\dev\apache-ant-1.7.0\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Alight\dev\Google Web Toolkit;C:\cygwin\bin;, java.specification.name=Java Platform API Specification, java.class.version=50.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\Christopher Keith, user.timezone=America/Los_Angeles, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.6, hibernate.connection.driver_class=com.mysql.jdbc.Driver, user.name=Christopher Keith, java.class.path=C:\Alight\inCVS\etc\ck\workspace\AP_GWT\bin;C:\Alight\dev\eclipse\plugins\mysql-connector-java-5.1.5-bin.jar;C:\Alight\dev\Google Web Toolkit\gwt-user.jar;C:\Alight\dev\eclipse\plugins\org.apache.log4j_1.2.13.v200706111418.jar;C:\Alight\dev\eclipse\plugins\org.junit_3.8.2.v200706111738\junit.jar;C:\Alight\dev\eclipse\plugins\org.hibernate.eclipse_3.2.0.GA\lib\hibernate\dom4j-1.6.1.jar;C:\Alight\dev\eclipse\plugins\org.apache.commons.logging_1.0.4.v200706111724.jar;C:\Alight\dev\eclipse\plugins\org.eclipse.tomcat_4.1.230.v20070531\commons-collections.jar;C:\Alight\dev\eclipse\plugins\org.hibernate.eclipse_3.2.0.GA\lib\hibernate\jta.jar;C:\Alight\dev\eclipse\plugins\org.hibernate.eclipse_3.2.0.GA\lib\hibernate\antlr-2.7.6.jar;C:\Alight\inCVS\etc\ck\workspace\AP_GWT\lib\hibernate3;/C:/Alight/dev/eclipse/configuration/org.eclipse.osgi/bundles/192/1/.cp/;/C:/Alight/dev/eclipse/configuration/org.eclipse.osgi/bundles/190/1/.cp/, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\jre1.6.0_05, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/marquesasoftware5, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.6.0_05, java.ext.dirs=C:\Program Files\Java\jre1.6.0_05\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.6.0_05\lib\resources.jar;C:\Program Files\Java\jre1.6.0_05\lib\rt.jar;C:\Program Files\Java\jre1.6.0_05\lib\sunrsasign.jar;C:\Program Files\Java\jre1.6.0_05\lib\jsse.jar;C:\Program Files\Java\jre1.6.0_05\lib\jce.jar;C:\Program Files\Java\jre1.6.0_05\lib\charsets.jar;C:\Program Files\Java\jre1.6.0_05\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.session_factory_name=sessionFactory, 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}
18:06:32,734 DEBUG Configuration:1291 - Preparing to build session factory with filters : {}
18:06:32,734 DEBUG Configuration:1126 - processing extends queue
18:06:32,734 DEBUG Configuration:1130 - processing collection mappings
18:06:32,734 DEBUG Configuration:1141 - processing native query and ResultSetMapping mappings
18:06:32,734 DEBUG Configuration:1149 - processing association property references
18:06:32,734 DEBUG Configuration:1171 - processing foreign key constraints
18:06:32,750 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
18:06:32,750 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
18:06:32,750 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
18:06:32,750 INFO DriverManagerConnectionProvider:80 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/marquesasoftware5
18:06:32,750 INFO DriverManagerConnectionProvider:83 - connection properties: {user=nadev, password=p0pc0rN}
18:06:32,750 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
18:06:32,750 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
18:06:32,968 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:mysql://localhost/marquesasoftware5, Isolation Level: 4
18:06:32,968 INFO SettingsFactory:89 - RDBMS: MySQL, version: 5.0.45-community-nt
18:06:32,968 INFO SettingsFactory:90 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.5 ( Revision: ${svn.Revision} )
18:06:32,968 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
18:06:33,000 INFO Dialect:152 - Using dialect: org.hibernate.dialect.MySQLDialect
18:06:33,046 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
18:06:33,046 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
18:06:33,062 INFO SettingsFactory:143 - Automatic flush during beforeCompletion(): disabled
18:06:33,062 INFO SettingsFactory:147 - Automatic session close at end of transaction: disabled
18:06:33,062 INFO SettingsFactory:154 - JDBC batch size: 15
18:06:33,062 INFO SettingsFactory:157 - JDBC batch updates for versioned data: disabled
18:06:33,062 INFO SettingsFactory:162 - Scrollable result sets: enabled
18:06:33,062 DEBUG SettingsFactory:166 - Wrap result sets: disabled
18:06:33,062 INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(): enabled
18:06:33,062 INFO SettingsFactory:178 - Connection release mode: auto
18:06:33,062 INFO SettingsFactory:202 - Maximum outer join fetch depth: 2
18:06:33,062 INFO SettingsFactory:205 - Default batch fetch size: 1
18:06:33,062 INFO SettingsFactory:209 - Generate SQL with comments: disabled
18:06:33,062 INFO SettingsFactory:213 - Order SQL updates by primary key: disabled
18:06:33,062 INFO SettingsFactory:217 - Order SQL inserts for batching: disabled
18:06:33,062 INFO SettingsFactory:386 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
18:06:33,062 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
18:06:33,062 INFO SettingsFactory:225 - Query language substitutions: {}
18:06:33,062 INFO SettingsFactory:230 - JPA-QL strict compliance: disabled
18:06:33,062 INFO SettingsFactory:235 - Second-level cache: enabled
18:06:33,062 INFO SettingsFactory:239 - Query cache: disabled
18:06:33,062 INFO SettingsFactory:373 - Cache provider: org.hibernate.cache.NoCacheProvider
18:06:33,062 INFO SettingsFactory:254 - Optimize cache for minimal puts: disabled
18:06:33,062 INFO SettingsFactory:263 - Structured second-level cache entries: disabled
18:06:33,062 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
18:06:33,078 INFO SettingsFactory:290 - Statistics: disabled
18:06:33,078 INFO SettingsFactory:294 - Deleted entity synthetic identifier rollback: disabled
18:06:33,078 INFO SettingsFactory:309 - Default entity-mode: pojo
18:06:33,078 INFO SettingsFactory:313 - Named query checking : enabled
18:06:33,125 INFO SessionFactoryImpl:161 - building session factory
18:06:33,125 DEBUG SessionFactoryImpl:173 - Session factory constructed with filter configurations : {}
18:06:33,125 DEBUG SessionFactoryImpl:177 - instantiating session factory with properties: {java.runtime.name=Java(TM) SE Runtime Environment, hibernate.connection.password=p0pc0rN, sun.boot.library.path=C:\Program Files\Java\jre1.6.0_05\bin, java.vm.version=10.0-b19, hibernate.connection.username=nadev, 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:\Alight\inCVS\etc\ck\workspace\AP_GWT, java.runtime.version=1.6.0_05-b13, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jre1.6.0_05\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=Cp1252, java.library.path=C:\Program Files\Java\jre1.6.0_05\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_05\bin\client;C:\Program Files\Java\jre1.6.0_05\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\cvsnt;C:\Program Files\ImageConverter Plus;;C:\Program Files\Subversion\bin;C:\Alight\dev\apache-ant-1.7.0\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Alight\dev\Google Web Toolkit;C:\cygwin\bin;, java.specification.name=Java Platform API Specification, java.class.version=50.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\Christopher Keith, user.timezone=America/Los_Angeles, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.6, hibernate.connection.driver_class=com.mysql.jdbc.Driver, java.class.path=C:\Alight\inCVS\etc\ck\workspace\AP_GWT\bin;C:\Alight\dev\eclipse\plugins\mysql-connector-java-5.1.5-bin.jar;C:\Alight\dev\Google Web Toolkit\gwt-user.jar;C:\Alight\dev\eclipse\plugins\org.apache.log4j_1.2.13.v200706111418.jar;C:\Alight\dev\eclipse\plugins\org.junit_3.8.2.v200706111738\junit.jar;C:\Alight\dev\eclipse\plugins\org.hibernate.eclipse_3.2.0.GA\lib\hibernate\dom4j-1.6.1.jar;C:\Alight\dev\eclipse\plugins\org.apache.commons.logging_1.0.4.v200706111724.jar;C:\Alight\dev\eclipse\plugins\org.eclipse.tomcat_4.1.230.v20070531\commons-collections.jar;C:\Alight\dev\eclipse\plugins\org.hibernate.eclipse_3.2.0.GA\lib\hibernate\jta.jar;C:\Alight\dev\eclipse\plugins\org.hibernate.eclipse_3.2.0.GA\lib\hibernate\antlr-2.7.6.jar;C:\Alight\inCVS\etc\ck\workspace\AP_GWT\lib\hibernate3;/C:/Alight/dev/eclipse/configuration/org.eclipse.osgi/bundles/192/1/.cp/;/C:/Alight/dev/eclipse/configuration/org.eclipse.osgi/bundles/190/1/.cp/, user.name=Christopher Keith, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=C:\Program Files\Java\jre1.6.0_05, hibernate.connection.url=jdbc:mysql://localhost/marquesasoftware5, hibernate.dialect=org.hibernate.dialect.MySQLDialect, java.specification.vendor=Sun Microsystems Inc., user.language=en, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.6.0_05, java.ext.dirs=C:\Program Files\Java\jre1.6.0_05\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.6.0_05\lib\resources.jar;C:\Program Files\Java\jre1.6.0_05\lib\rt.jar;C:\Program Files\Java\jre1.6.0_05\lib\sunrsasign.jar;C:\Program Files\Java\jre1.6.0_05\lib\jsse.jar;C:\Program Files\Java\jre1.6.0_05\lib\jce.jar;C:\Program Files\Java\jre1.6.0_05\lib\charsets.jar;C:\Program Files\Java\jre1.6.0_05\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.session_factory_name=sessionFactory, 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}
18:06:33,125 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
18:06:33,140 DEBUG SessionFactoryObjectFactory:76 - registered: 40288aa01a41a952011a41a952250000 (sessionFactory)
18:06:33,140 INFO SessionFactoryObjectFactory:86 - Factory name: sessionFactory
18:06:33,140 INFO NamingHelper:26 - JNDI InitialContext properties:{}
18:06:33,140 DEBUG NamingHelper:48 - binding: sessionFactory
18:06:33,140 WARN SessionFactoryObjectFactory:98 - Could not bind factory to JNDI
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getNameParser(Unknown Source)
at org.hibernate.util.NamingHelper.bind(NamingHelper.java:52)
at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:306)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at com.AlightPlanning.server.db.HibernateUtil.<clinit>(DbProto.java:17)
at com.AlightPlanning.server.db.DbProto.listLI(DbProto.java:31)
at com.AlightPlanning.server.db.DbProto.listLIcount(DbProto.java:41)
at com.AlightPlanning.server.Test.testCount(Test.java:8)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
18:06:33,140 DEBUG SessionFactoryImpl:308 - instantiated session factory
18:06:33,140 DEBUG SessionFactoryImpl:392 - Checking 0 named HQL queries
18:06:33,140 DEBUG SessionFactoryImpl:412 - Checking 0 named SQL queries
18:06:33,187 DEBUG SessionImpl:220 - opened session at timestamp: 12122823931
18:06:33,187 DEBUG JDBCTransaction:54 - begin
18:06:33,187 DEBUG ConnectionManager:421 - opening JDBC connection
18:06:33,187 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
18:06:33,187 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
18:06:33,187 DEBUG JDBCTransaction:59 - current autocommit status: false
18:06:33,187 DEBUG JDBCContext:214 - after transaction begin
18:06:33,203 DEBUG QueryPlanCache:70 - unable to locate HQL query plan in cache; generating (from Lineitemswithcells)
18:06:33,250 DEBUG QueryTranslatorImpl:246 - parse() - HQL: from Lineitemswithcells
18:06:33,265 DEBUG AST:266 - --- HQL AST ---
\-[QUERY] 'query'
\-[SELECT_FROM] 'SELECT_FROM'
\-[FROM] 'from'
\-[RANGE] 'RANGE'
\-[IDENT] 'Lineitemswithcells'

18:06:33,265 DEBUG ErrorCounter:68 - throwQueryException() : no errors
18:06:33,312 DEBUG HqlSqlBaseWalker:111 - select << begin [level=1, statement=select]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 5:26 pm 
Newbie

Joined: Mon May 19, 2008 11:46 pm
Posts: 9
Location: San Francisco Bay Area
OK, OK. Fixed it by adding

<mapping resource="com/AlightPlanning/server/db/Lineitemswithcells.hbm.xml"/>

to hibernate.cfg.xml


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.