-->
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: Regarding named query
PostPosted: Fri Jan 09, 2009 9:40 am 
Newbie

Joined: Thu Jan 08, 2009 9:53 am
Posts: 1
hi,

Iam retrieving records from database and displaying on webpage


my database table

CREATE TABLE material_category
(
id integer NOT NULL,
library_id integer NOT NULL,
"name" character varying(500) NOT NULL,
log text,
status character varying(1),
CONSTRAINT "mat_catPkey" PRIMARY KEY (id, library_id),
CONSTRAINT fkey FOREIGN KEY (library_id)
REFERENCES library (library_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT ukey UNIQUE (library_id, name)
)
WITH (OIDS=FALSE);
ALTER TABLE material_category OWNER TO postgres


i have return namedQuery to retrieve data from name coloumn

@NamedQuery(name="MATERIAL_CATEGORY.findByMaterialName",query="select m from MATERIAL_CATEGORY m where m.library_id=:library_id and m.status=:status")


iam getting error with named query and error is

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connections' defined in class path resource [org/verus/ngl/sl/configxml/spring/NGLServiceLayer.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.verus.ngl.sl.utilities.HibernateConnections]: Constructor threw exception; nested exception is org.hibernate.HibernateException: Errors in named queries: MATERIAL_CATEGORY.findByMaterialName


Last edited by sandeepthota on Mon Jan 12, 2009 2:34 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 10, 2009 10:30 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Try following the posting directions. Nobody can help you if you don't list the error message and exact code used.

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


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.