2 Replies Latest reply on Oct 12, 2005 8:52 AM by rosonsandy

    Error: Relationship is not mapped

    Michael Small Newbie

      I am attempting to run the following query:

      SELECT r FROM Relationship r
      WHERE r.relationshipId = :relationshipId
      


      I get the following error when that query is executed:

      Caused by: javax.security.auth.login.LoginException: javax.ejb.EJBTransactionRolledbackException: null; CausedByException is:
       [java] Relationship is not mapped. [SELECT r FROM Relationship r WHERE r.relationshipId = :relationshipId OR r.loginId = :loginId]
       [java] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:65)
       [java] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:117)
       [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:138)
       [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
       [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
       [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
       [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
       [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:195)
       [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
       [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:37)
       [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
       [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:88)
      


      There is a Relationship entity:

      
      @EmbeddableSuperclass
      public class ValueObject {
      
       Long key;
      
       @Id(generate=GeneratorType.AUTO)
       public Long getKey() { ... }
       public void setKey(Long key) { ... }
      
      }
      
      @Entity
      @Table(name="tasc_relationship")
      public class Relationship extends ValueObject {
      
       ...
      
      }
      


      Does anyone know why I would be getting this error?