-->
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 while running Caveatemptor in WSAD
PostPosted: Fri Oct 15, 2004 2:37 am 
Newbie

Joined: Sun Oct 03, 2004 11:30 pm
Posts: 1
Hi,

I started using Hibernate few days back and am facing few issues while using the caveatemptor sample application. Following are some steps I have performed so far, can someone provide advice on how to proceed?

(a) I used "ant exportddl" to generate the appl ddl statements
(b) Executed the ddl statements in DB2
(c) Created a J2EE project in WSAD (Websphere Application Developer) and imported appl source code
(d) Configuration the WSAD Test Server's Data Source
(e) Configured Hibernate to use the Data Source
(f) Developed sample servlet containing the code from "TestCaseWithData.initData()" method
(g) On running the servlet, I get the following exception:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
[10/15/04 11:17:38:338 IST] 51f5b586 SystemOut O 11:17:38,338 DEBUG [DbTest] Persisting cars
Hibernate: insert into CATEGORY (VERSION, NAME, CREATED, PARENT_CATEGORY_ID, CATEGORY_ID) values (?, ?, ?, ?, default)
[10/15/04 11:17:38:338 IST] 51f5b586 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -407, SQLState: 23502
[10/15/04 11:17:38:369 IST] 51f5b586 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver][DB2/NT] SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=7, COLNO=4" is not allowed. SQLSTATE=23502

[10/15/04 11:17:38:384 IST] 51f5b586 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -407, SQLState: 23502
[10/15/04 11:17:38:384 IST] 51f5b586 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver][DB2/NT] SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=7, COLNO=4" is not allowed. SQLSTATE=23502

[10/15/04 11:17:38:353 IST] 5e06b586 WebGroup E SRVE0026E: [Servlet Error]-[Unresolved compilation problems:
The constructor RuntimeException(String, Throwable) is undefined
The constructor RuntimeException(Throwable) is undefined
]: java.lang.Error: Unresolved compilation problems:
The constructor RuntimeException(String, Throwable) is undefined
The constructor RuntimeException(Throwable) is undefined

at org.hibernate.auction.exceptions.InfrastructureException.<init>(InfrastructureException.java:19)
at org.hibernate.auction.dao.CategoryDAO.makePersistent(CategoryDAO.java:89)
at DbTest.hiaChap3(DbTest.java:353)
at DbTest.doPost(DbTest.java:110)
at DbTest.doGet(DbTest.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`


Category class exposes methods only for setting Name, ParentCategory, ChildCategory and CategoriedItem attributes. How will the "Created" and "Version" fields get updated?

Regards,
Dayanand


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 15, 2004 3:23 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
A. Please use JDK 1.4, not 1.3.
B. Hibernate can access fields directly.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.