niya nair

Greenhorn
+ Follow
since Sep 19, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by niya nair

Hi all

I've created an application in Seam using Hibernate tools.
But when I tried to call the persist method, it leads to an exception
"No CurrentSessionContext configured!"
can anybody help me?
hai all
i am getting an exception like
MySQLSyntaxErrorException multiple primary key defined.
my query is

CREATE TABLE `first_item` (
`itemid` int(5) unsigned NOT NULL default '0',
`subitemid` int(5) unsigned NOT NULL default '0',
PRIMARY KEY (`itemid`,`subitemid`)
)
i am using innodb as the database engine.
can someone give me any suggestion please.

thanks
[ November 19, 2007: Message edited by: niya nair ]
How can i prevent users from directly accessing my pdf files through url.
while the user is supposed to be logged in before viewing the pdf files.
Thanks in advance for any help.
16 years ago
Thanks Paul. it worked

Regards
Niya

Originally posted by trupti nigam:
I am new to Hibernate. IS there any good article to start reading about it. Any link to a good tutorial will be appreciated.

Thanks,
Trupti



http://www.roseindia.net/hibernate/index.shtml is a good site to learn hibernate.
[ September 21, 2007: Message edited by: niya vl ]
Here is my employee.hbm file.


[Edited to use code tags - Paul Sturrock]
[ September 21, 2007: Message edited by: Paul Sturrock ]
I am having some problem with hibernate mapping. when i run my code i am getting an exception like this.

Caused by: org.hibernate.MappingException: Error reading resource: employee.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:447)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1381)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1353)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1335)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1302)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1230)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1216)
at common.HibernateUtil.<clinit>(HibernateUtil.java:32)
... 23 more
Caused by: org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:394)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:444)
... 30 more
Caused by: org.xml.sax.SAXParseException: The content of element type "list" must match "(meta*,subselect?,cache?,synchronize*,key,(index|list-index),(element|one-to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:334)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:393)
... 31 more


pls help

Thanks