-->
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: IllegalArgumentException PropertyAccessException
PostPosted: Thu Dec 11, 2008 6:10 am 
Newbie

Joined: Thu Dec 11, 2008 5:54 am
Posts: 1
Hi,

ich benutze EJB und als Persistence Provider Hibernate.
ich habe Probleme eine einfach Datenbankabfrage zu machen.

in meiner EJB:
Code:
public List<Course> getCoursesForInstructor(CmtUser instructor){
try{
         
   String id = instructor.getId().toString();
       //Long id = instructor.getId();
   Query q = em.createQuery(
         "SELECT c FROM Course c" +
         [b]" WHERE c.instructor = :instrId")[/b];
         q.setParameter("instrId",id);

    List<Course> courses =   (List<Course>) q.getResultList();
    return courses ;
   }
...   


Folgender Code funktioniert:

Code:
WHERE c.instructor = 2   


WEnn ich aber versuche, Parameter zu setzen mit
Code:
q.setParameter("instrId",id);


bekomme ich eine
Code:
IllegalArgumentException ...
...org.hibernate.PropertyAccessException: could not get a field value by reflection getter of de.cmt
.model.CmtUser.id)   


Hier der Code der Entities:

Code:
@Entity
public class Course implements Serializable{
   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private Long id;
   
   private String title;
   private String abbreviation;
   private String description;
   private String semester;
   @Column(columnDefinition="BOOL")
   private boolean active = false;

   @ManyToOne
   @JoinColumn(name="instructor")
   private CmtUser instructor;
   
   public Course(){}
   
   public Course(String title, String abbreviation, String description, String semester,boolean active
,CmtUser instructor){
      this.title = title;
      this.abbreviation = abbreviation;
      this.description = description;
      this.semester = semester;
      this.active = active;
      this.instructor = instructor;
   }
...getter and setter   



CmtUser:
Code:
@Entity
@Table(name="CmtUser", uniqueConstraints=@UniqueConstraint(columnNames={"userName","passWord","email"}))
public class CmtUser implements Serializable{
   
   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private Long id;
   
   private String userName;
   private String firstName;
   private String lastName;
   private String passWord;
   private String email;
   
   @Embedded
   private UserSettings settings = new UserSettings();
   
   @ManyToMany(fetch=FetchType.EAGER)
   private List <Role> roles = new ArrayList<Role>();
   
   public CmtUser(){}
   
   public CmtUser(String userName, String firstName, String lastName, String passWord, String email){
      this.userName = userName;
      this.firstName = firstName;
      this.lastName = lastName;
      this.passWord = passWord;
      this.email = email;
   }
...getter and setter   


Stacktrace aus server.log:

Code:
2008-12-06 21:25:26,375 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] (http-localhost%2F127.0.0.
1-8080-1) parse() - HQL: SELECT c FROM de.cmt.model.Course c WHERE c.instructor = :instrId
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.AST] (http-localhost%2F127.0.0.1-8080-1) --- HQ
L AST ---
\-[QUERY] 'query'
    +-[SELECT_FROM] 'SELECT_FROM'
    |  +-[FROM] 'FROM'
    |  |  \-[RANGE] 'RANGE'
    |  |     +-[DOT] '.'
    |  |     |  +-[DOT] '.'
    |  |     |  |  +-[DOT] '.'
    |  |     |  |  |  +-[IDENT] 'de'
    |  |     |  |  |  \-[IDENT] 'cmt'
    |  |     |  |  \-[IDENT] 'model'
    |  |     |  \-[IDENT] 'Course'
    |  |     \-[ALIAS] 'c'
    |  \-[SELECT] 'SELECT'
    |     \-[IDENT] 'c'
    \-[WHERE] 'WHERE'
       \-[EQ] '='
          +-[DOT] '.'
          |  +-[IDENT] 'c'
          |  \-[IDENT] 'instructor'
          \-[COLON] ':'
             \-[IDENT] 'instrId'

2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.ErrorCounter] (http-localhost%2F127.0.0.1-8080-
1) throwQueryException() : no errors
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] (http-localhost%2F127.0.0.1
-8080-1) select << begin [level=1, statement=select]
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.FromElement] (http-localhost%2F127.0.0.1-8
080-1) FromClause{level=1} :  de.cmt.model.Course (c) -> course0_
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] (http-localhost%2F127.0
.0.1-8080-1) Resolved :  c -> course0_.id
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] (http-localhost%2F127.0
.0.1-8080-1) Resolved :  c -> course0_.id
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.DotNode] (http-localhost%2F127.0.0.1-8080-
1) getDataType() : instructor -> org.hibernate.type.ManyToOneType(de.cmt.model.CmtUser)
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.DotNode] (http-localhost%2F127.0.0.1-8080-
1) dereferenceShortcut() : property instructor in de.cmt.model.Course does not require a join.
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.DotNode] (http-localhost%2F127.0.0.1-8080-
1) terminal propertyPath = [instructor]
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] (http-localhost%2F127.0
.0.1-8080-1) Resolved :  c.instructor -> course0_.instructor
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] (http-localhost%2F127.0.0.1
-8080-1) select : finishing up [level=1, statement=select]
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] (http-localhost%2F127.0.0.1-8080-
1) processQuery() :  ( SELECT ( {select clause} course0_.id ) ( FromClause{level=1} Course course0_
) ( WHERE ( = ( course0_.instructor course0_.id instructor ) ? ) ) )
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] (http-localhost%2F127.0.0.1
-8080-1) Using FROM fragment [Course course0_]
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] (http-localhost%2F127.0.0.1
-8080-1) select >> end [level=1, statement=select]
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.AST] (http-localhost%2F127.0.0.1-8080-1) --- SQ
L AST ---
\-[SELECT] QueryNode: 'SELECT'  querySpaces (Course)
    +-[SELECT_CLAUSE] SelectClause: '{select clause}'
    |  +-[ALIAS_REF] IdentNode: 'course0_.id as id0_' {alias=c, className=de.cmt.model.Course, table
Alias=course0_}
    |  \-[SQL_TOKEN] SqlFragment: 'course0_.abbreviation as abbrevia2_0_, course0_.active as active0
_, course0_.description as descript4_0_, course0_.instructor as instructor0_, course0_.semester as s
emester0_, course0_.title as title0_'
    +-[FROM] FromClause: 'FROM' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElemen
tByClassAlias=[c], fromElementByTableAlias=[course0_], fromElementsByPath=[], collectionJoinFromElem
entsByPath=[], impliedElements=[]}
    |  \-[FROM_FRAGMENT] FromElement: 'Course course0_' FromElement{explicit,not a collection join,n
ot a fetch join,fetch non-lazy properties,classAlias=c,role=null,tableName=Course,tableAlias=course0
_,origin=null,colums={,className=de.cmt.model.Course}}
    \-[WHERE] SqlNode: 'WHERE'
       \-[EQ] BinaryLogicOperatorNode: '='
          +-[DOT] DotNode: 'course0_.instructor' {propertyName=instructor,dereferenceType=ROOT_LEVEL
,propertyPath=instructor,path=c.instructor,tableAlias=course0_,className=de.cmt.model.Course,classAl
ias=c}
          |  +-[ALIAS_REF] IdentNode: 'course0_.id' {alias=c, className=de.cmt.model.Course, tableAl
ias=course0_}
          |  \-[IDENT] IdentNode: 'instructor' {originalText=instructor}
          \-[NAMED_PARAM] ParameterNode: '?' {name=instrId, expectedType=org.hibernate.type.ManyToOn
eType(de.cmt.model.CmtUser)}

2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.ErrorCounter] (http-localhost%2F127.0.0.1-8080-
1) throwQueryException() : no errors
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] (http-localhost%2F127.0.0.
1-8080-1) HQL: SELECT c FROM de.cmt.model.Course c WHERE c.instructor = :instrId
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] (http-localhost%2F127.0.0.
1-8080-1) SQL: select course0_.id as id0_, course0_.abbreviation as abbrevia2_0_, course0_.active as
active0_, course0_.description as descript4_0_, course0_.instructor as instructor0_, course0_.semes
ter as semester0_, course0_.title as title0_ from Course course0_ where course0_.instructor=?
2008-12-06 21:25:26,453 DEBUG [org.hibernate.hql.ast.ErrorCounter] (http-localhost%2F127.0.0.1-8080-
1) throwQueryException() : no errors
2008-12-06 21:25:26,453 DEBUG [org.hibernate.jdbc.AbstractBatcher] (http-localhost%2F127.0.0.1-8080-

1) about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2008-12-06 21:25:26,453 DEBUG [org.hibernate.jdbc.ConnectionManager] (http-localhost%2F127.0.0.1-808
0-1) opening JDBC connection
2008-12-06 21:25:26,453 DEBUG [org.hibernate.SQL] (http-localhost%2F127.0.0.1-8080-1) select course0
_.id as id0_, course0_.abbreviation as abbrevia2_0_, course0_.active as active0_, course0_.descripti
on as descript4_0_, course0_.instructor as instructor0_, course0_.semester as semester0_, course0_.t
itle as title0_ from Course course0_ where course0_.instructor=?
2008-12-06 21:25:26,453 DEBUG [org.hibernate.jdbc.AbstractBatcher] (http-localhost%2F127.0.0.1-8080-
1) about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2008-12-06 21:25:26,453 DEBUG [org.hibernate.jdbc.ConnectionManager] (http-localhost%2F127.0.0.1-808
0-1) aggressively releasing JDBC connection
2008-12-06 21:25:26,453 DEBUG [org.hibernate.jdbc.ConnectionManager] (http-localhost%2F127.0.0.1-808
0-1) releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, glob
ally: 0)]
2008-12-06 21:25:26,453 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] (http-localhost%2F127.0.
0.1-8080-1) mark transaction for rollback
2008-12-06 21:25:26,500 DEBUG [org.jboss.jpa.deployment.ManagedEntityManagerFactory] (http-localhost
%2F127.0.0.1-8080-1) ************** closing entity managersession **************
2008-12-06 21:25:26,718 ERROR [facelets.viewhandler] (http-localhost%2F127.0.0.1-8080-1) Error Rende
ring View[/app/course/show_courses.xhtml]
javax.faces.FacesException: javax.el.ELException: /app/course/show_courses.xhtml @20,90 rendered="#{!empty courseBean.coursesForInstructor}": Error reading 'coursesForInstructor' on type de.cmt.managedBeans.CourseBean
   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:393)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
   at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
   at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
   at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
   at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
   at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   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:235)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)

   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:91)
   at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishm
entValve.java:92)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:325)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)

   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:595)
Caused by: javax.el.ELException: /app/course/show_courses.xhtml @20,90 rendered="#{!empty courseBean.coursesForInstructor}": Error reading 'coursesForInstructor' on type de.cmt.managedBeans.CourseBean
   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
   ... 38 more
Caused by: javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.PropertyAcc
essException: could not get a field value by reflection getter of de.cmt.model.CmtUser.id
   at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.j
ava:157)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:6
5)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterce
ptor.java:67)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:462)
   at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:97)
   at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
   at $Proxy199.invoke(Unknown Source)
   at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecPro
xyInvocationHandlerBase.java:125)
   at $Proxy198.getCoursesForInstructor(Unknown Source)
   at de.cmt.managedBeans.CourseBean.getCoursesForInstructor(CourseBean.java:45)
   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 javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
   at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
   at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
   at org.apache.el.parser.AstValue.getValue(AstValue.java:118)
   at org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:45)
   at org.apache.el.parser.AstNot.getValue(AstNot.java:42)
   at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
   ... 39 more
Caused by: javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: could not
get a field value by reflection getter of de.cmt.model.CmtUser.id
   at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.
java:614)
   at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
   at de.cmt.beans.courseAdministration.CourseHandler.getCoursesForInstructor(CourseHandler.java:56)
   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.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
   at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
   at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
   at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
   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.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterce
ptor.java:72)
   at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_3
0456965.invoke(InvocationContextInterceptor_z_fillMethod_30456965.java)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.
java:88)
   at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_304569
65.invoke(InvocationContextInterceptor_z_setup_30456965.java)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityMa
nagerInterceptor.java:56)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:6
8)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
   ... 76 more
Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter o
f de.cmt.model.CmtUser.id
   at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:58)
   at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:206)

   at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.jav
a:3619)
   at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:
3335)
   at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:204)
   at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:241)
   at org.hibernate.type.EntityType.getIdentifier(EntityType.java:430)
   at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:110)
   at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:61)
   at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:514)
   at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1589)
   at org.hibernate.loader.Loader.doQuery(Loader.java:696)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
   at org.hibernate.loader.Loader.doList(Loader.java:2228)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
   at org.hibernate.loader.Loader.list(Loader.java:2120)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
   at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
   ... 107 more
Caused by: java.lang.IllegalArgumentException
   at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
   at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
   at java.lang.reflect.Field.get(Field.java:357)
   at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)
   ... 128 more   


Ich hoffe es kann jemand helfen ich hänge schon ewig an diesem Problem! Danke, Nicki


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.