-->
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.  [ 1 post ] 
Author Message
 Post subject: CaveatEmptor Webapp test error, please assist
PostPosted: Fri Jan 06, 2006 2:27 pm 
Beginner
Beginner

Joined: Thu Dec 15, 2005 12:02 pm
Posts: 23
I extracted the caveatemptor.HiA-SE and extracted it. I followed the directions carefully. I want to test the webapp stuff.

So first off I ran
runCleanDatabase.sh

Edited the build.properties and changed the $tomcat.home to my tomcat home.

Then ran "ant.webapp.test.deploy" and accessed the test(not tests) by pointing to http://localhost/caveatemptor-test

I am running on 80 not 8080.

Anyway the first page displays showing me the index.jsp
with this
Run one of the tests:

* FilterTest

After clicking the FilterTest it shows me the next page:
Start:
EventOne


But when I click the EventOne I get the following error: Yes, the database is running, it is still in a window: (see below)


Here is webapp error, which I cannot figure out:
javax.servlet.ServletException: could not insert: [org.hibernate.ce.auction.model.Category]
org.hibernate.ce.auction.web.filter.HibernateThreadExtendedFilter.doFilter(Unknown Source)

root cause

org.hibernate.exception.SQLGrammarException: could not insert: [org.hibernate.ce.auction.model.Category]
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1985)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:502)
org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:496)
org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:492)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
$Proxy2.saveOrUpdate(Unknown Source)
org.hibernate.ce.auction.dao.hibernate.GenericHibernateDAO.makePersistent(Unknown Source)
org.hibernate.ce.auction.web.filter.FilterTestServlet.doGet(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.hibernate.ce.auction.web.filter.HibernateThreadExtendedFilter.doFilter(Unknown Source)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs.



Here its sysout is:
$ ./runCleanDatabase.sh
Removing database files...
rm: cannot remove `database/test.*': No such file or directory
Starting database engine...
[Server@1a758cb]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@1a758cb]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@1a758cb]: Startup sequence initiated from main() method
[Server@1a758cb]: Loaded properties from [C:\caveatEmptor\caveatemptor.HiA-SE\database\server.properties]
[Server@1a758cb]: Initiating startup sequence...
[Server@1a758cb]: Server socket opened successfully in 187 ms.
[Server@1a758cb]: Database [index=0, id=0, db=file:test, alias=] opened sucessfully in 1000 ms.
[Server@1a758cb]: Startup sequence completed in 1250 ms.
[Server@1a758cb]: 2006-01-06 12:17:13.375 HSQLDB server 1.8.0 is online
[Server@1a758cb]: To close normally, connect and execute SHUTDOWN SQL
[Server@1a758cb]: From command line, use [Ctrl]+[C] to abort abruptly


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

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.