openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Feng Zhang (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1799) Exception thrown if @Mapkey refers to a field which belongs superclass
Date Thu, 16 Sep 2010 10:07:32 GMT
Exception thrown if @Mapkey refers to a field which belongs superclass
----------------------------------------------------------------------

                 Key: OPENJPA-1799
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1799
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 2.0.1
            Reporter: Kai Feng Zhang


FriendDb entity has such a field:

  @OneToMany(targetEntity = FriendPropertyDb.class, mappedBy = "friend")
  @MapKey(name="type")
  protected Map<String ListFieldDb> properties;

ListFieldDb is superclass of FriendPropertyDb, and type is a field of ListFieldDb.

But then I get an exception saying:

<openjpa-2.0.1-r422266:989424 fatal user error> org.apache.openjpa.persistence.ArgumentException:
"org.apache.shindig.social.opensocial.jpa.FriendDb.properties<key:class java.lang.String>"
declared that it is mapped by "type", but that is a not a field of the related type.
	at org.apache.openjpa.meta.ValueMetaDataImpl.getValueMappedByMetaData(ValueMetaDataImpl.java:329)
	at org.apache.openjpa.jdbc.meta.ValueMappingImpl.getValueMappedByMapping(ValueMappingImpl.java:121)
	at org.apache.openjpa.jdbc.meta.ValueMappingImpl.getColumns(ValueMappingImpl.java:130)
	at org.apache.openjpa.jdbc.meta.ValueMappingImpl.resolveMapping(ValueMappingImpl.java:518)
	at org.apache.openjpa.jdbc.meta.ValueMappingImpl.resolve(ValueMappingImpl.java:500)
	at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:522)
	at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:461)
	at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:853)
	at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1791)
	at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:790)
	at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:751)
	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:631)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:385)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:358)
	at org.apache.openjpa.meta.MetaDataRepository.resolveAll(MetaDataRepository.java:1923)
	at org.apache.openjpa.meta.MetaDataRepository.getQueryMetaDataInternal(MetaDataRepository.java:1901)
	at org.apache.openjpa.meta.MetaDataRepository.getQueryMetaData(MetaDataRepository.java:1888)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1013)
	at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:100)
	at org.apache.shindig.social.opensocial.jpa.spi.PersonServiceDb.getPerson(PersonServiceDb.java:162)
	at org.apache.shindig.social.opensocial.service.PersonHandler.get(PersonHandler.java:83)
	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:597)
	at org.apache.shindig.protocol.DefaultHandlerRegistry$MethodCaller.call(DefaultHandlerRegistry.java:483)
	at org.apache.shindig.protocol.DefaultHandlerRegistry$RestInvocationHandler.execute(DefaultHandlerRegistry.java:369)
	at org.apache.shindig.protocol.DefaultHandlerRegistry$RestInvocationWrapper.execute(DefaultHandlerRegistry.java:394)
	at org.apache.shindig.protocol.DataServiceServlet.handleSingleRequest(DataServiceServlet.java:162)
	at org.apache.shindig.protocol.DataServiceServlet.executeRequest(DataServiceServlet.java:111)
	at org.apache.shindig.protocol.DataServiceServlet.doGet(DataServiceServlet.java:54)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.shindig.auth.AuthenticationServletFilter.callChain(AuthenticationServletFilter.java:125)
	at org.apache.shindig.auth.AuthenticationServletFilter.doFilter(AuthenticationServletFilter.java:88)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:619)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message