[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - "No identifier specified"...but I have one!!!
darretta
do-not-reply at jboss.com
Thu Nov 8 18:34:43 EST 2007
I am getting the "No identifier specified" exception using Hibernate and JBoss 4.3.2.
My identifier is as so:
| private Integer id;
|
| /**
| * Gets the id of this DataArchive.
| * @return the id
| */
| @Id(generate=GeneratorType.AUTO)
| public Integer getId() {
| return this.id;
| }
|
Logs are below:
>From Hibernate:
| 2007-11-07 02:02:55,118 DEBUG [org.hibernate.cfg.AnnotationBinder] Processing annotations of mil.navy.ia.vram.dos.ejb.entity3.DataArchive.id
| 2007-11-07 02:02:55,269 DEBUG [org.hibernate.cfg.Ejb3Column] Binding column id unique false
| 2007-11-07 02:02:55,274 DEBUG [org.hibernate.cfg.AnnotationBinder] id is an id
| 2007-11-07 02:02:55,296 DEBUG [org.hibernate.cfg.annotations.SimpleValueBinder] building SimpleValue for id
| 2007-11-07 02:02:55,302 DEBUG [org.hibernate.cfg.annotations.PropertyBinder] Building property id
| 2007-11-07 02:02:55,406 DEBUG [org.hibernate.cfg.annotations.PropertyBinder] Cascading id with null
| 2007-11-07 02:02:55,407 DEBUG [org.hibernate.cfg.AnnotationBinder] Bind @EmbeddedId on id
|
Note that it is trying bind id to "EmbeddedId"...
>From application log:
| javax.persistence.PersistenceException: org.hibernate.AnnotationException: No identifier specified for entity: mil.navy.ia.vram.dos.ejb.entity3.DataArchiveType
| at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:149)
| at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:73)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
| at mil.navy.ia.vram.dos.ejb.session3.DataArchiveFacade.archive(DataArchiveFacade.java:82)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
| at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
| at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
| at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
| at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
| at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
| at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
| at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
| at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
| at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
| at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
| at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
| at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.hibernate.AnnotationException: No identifier specified for entity: mil.navy.ia.vram.dos.ejb.entity3.DataArchiveType
| at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:645)
| at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:256)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:191)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:988)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:607)
| at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:75)
| at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:473)
| at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:96)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103138#4103138
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103138
More information about the jboss-user
mailing list