1 Reply Latest reply on Nov 7, 2009 5:09 PM by nickarls

    Obtaining a @DataModel from an EntityQuery

    stoal

      I used seam-gen to build a EntityQuery class


      When I am trying to get a DataModel from it using getDataModel()
           


      @DataModel
      ListDataModel clients = (ListDataModel) clientList.getDataModel();
      




      I am getting an NPE.


      Caused by: java.lang.NullPointerException
           at org.labprototype.JustList.<init>(JustList.java:33)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at org.jboss.seam.Component.instantiateJavaBean(Component.java:1438)
           at org.jboss.seam.Component.instantiate(Component.java:1359)
           at org.jboss.seam.Component.newInstance(Component.java:2122)
           ... 68 more
      






      Going through the forum, that it could be caused by the ManagedEntityIdentityInterceptor




      http://seamframework.org/Community/CanDataModelBeReplacedWithEntityQuery



      Has this been resolved ? Am I doing something wrong ?


      Thank you for help.