-->
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: please solve problem
PostPosted: Thu Oct 20, 2005 2:34 am 
Newbie

Joined: Thu Oct 20, 2005 12:35 am
Posts: 1
i got a error while saving data in database
te error is ::::::::::


org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [symbio.jobs.businessObjects.JobAd#0]
at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:573)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:59)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:80)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:133)
at symbio.jobs.businessObjects.JobAd$$EnhancerByCGLIB$$9c315e4b.getTitle()
at org.apache.jsp.basicJobAd_jsp._jspService(basicJobAd_jsp.java:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:323)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:288)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:745)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:635)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:550)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:971)
at org.apache.jsp.JobAdSuccess_jsp._jspService(JobAdSuccess_jsp.java:72)



so please give the solustion


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 20, 2005 4:07 am 
Beginner
Beginner

Joined: Mon Jun 06, 2005 4:23 am
Posts: 41
Location: Hagenberg, AUSTRIA
i received the same exception in the following situation:
there are two tables, a and b with a 1:n relation.
if there's an entry in table b with no regarding entry in table a then i get the exception.

more concrete explanantion:

table a (id, text)
1, test1
2, test2

table b (id, fk_table_a, text)
1, 1, something
2, 1, anything
3, 4, everything

as you can see, there's no value 4 in table a although table b has a foreign key to it. that's why it causes an "ObjectNotFoundException: No row with the given identifier exists".

so have a look at your values in the database if there's an object with id 0 (JobAd#0).

i hope this helps.

best regards
patrik


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 20, 2005 8:03 am 
Regular
Regular

Joined: Mon Aug 29, 2005 9:46 am
Posts: 102
Just adding an info:
if the relation that hasn't been found is not a key, you can add to you mapping:
Code:
<many-to-one column="some_id" not-found="ignore" ....>

_________________
Don't forget to rate if the post helped!


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.