-->
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.  [ 1 post ] 
Author Message
 Post subject: Using date as foreign key
PostPosted: Wed Oct 11, 2006 6:54 am 
Newbie

Joined: Tue Mar 07, 2006 3:20 am
Posts: 4
Location: Pune
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: hibernate3

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

>
[hibernatedoclet] Generating mapping file for nims.nihilent.model.Role.
[hibernatedoclet] nims.nihilent.model.Role
[hibernatedoclet] Generating mapping file for nims.nihilent.model.UserCookie.
[hibernatedoclet] nims.nihilent.model.UserCookie
[hibernatedoclet] Generating mapping file for nims.nihilent.model.DateMetaData.
[hibernatedoclet] nims.nihilent.model.DateMetaData
[hibernatedoclet] Generating mapping file for nims.nihilent.model.NimsDate.
[hibernatedoclet] nims.nihilent.model.NimsDate
[hibernatedoclet] (TemplateEngine.invokeMethod 579 ) Invoking method fai
led: xdoclet.modules.hibernate.HibernateTagsHandler.ifHasCompositeId, line=169 o
f template file: jar:file:/C:/Chan%20Folder/Base%20Camp%20-%20Chan/nims/lib/xdoc
let-1.2.3/lib/xdoclet-hibernate-module-1.2.3.jar!/xdoclet/modules/hibernate/reso
urces/hibernate.xdt
[hibernatedoclet] java.lang.reflect.InvocationTargetException
[hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMet
hodAccessorImpl.java:39)
[hibernatedoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Deleg
atingMethodAccessorImpl.java:25)
[hibernatedoclet] at java.lang.reflect.Method.invoke(Method.java:324)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invoke(TemplateEngine
.java:641)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(Template
Engine.java:567)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(Tem
plateEngine.java:965)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleBlockTag(Templa
teEngine.java:932)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEng
ine.java:472)
[hibernatedoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngi
ne.java:348)
[hibernatedoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.
java:415)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.j
ava:562)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubT
ask.java:779)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(Template
SubTask.java:679)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.
java:596)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:227)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(Hi
bernateSubTask.java:136)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:1
05)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:275)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:
369)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1214)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1062)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[hibernatedoclet] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.run(Launcher.jav
a:196)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.main(Launcher.ja
va:55)
[hibernatedoclet] Caused by: java.lang.NullPointerException
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.hasCom
positeId_Impl(HibernateTagsHandler.java:718)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.ifHasC
ompositeId(HibernateTagsHandler.java:198)
[hibernatedoclet] ... 30 more



Name and version of the database you are using: MySql 5

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

I am using x-doclet tags to implement hibernate.

I have a requierment where in I need to use a date field as my primary key and this table and another table needs to have a many-to-many replationship. hence the date key acts as the collection key. This is giving the above error when I am trying to create the hbm file


Read this: http://hibernate.org/42.html


Please help. thank You

K S Chanchal


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.