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.
|