Hello,

first of all, I would like to thank you for suggestions.

I tried loading drl from file and all work fine. The issue append when the application load from Guvnor5.3.0 the pkg. 

In particular the exception (I mentioned above) happens before calling the method "SituationManager.createAccessControlEvent":

      

public static Event createAccessControlEvent(ACObservation obs, String description, int threat_level, Geometry location, int sensorid) {

            Event event = new AccessControlEvent(description, threat_level, (Geometry)location.clone(), sensorid, obs.getLoginfo(), obs.getErrno(), obs.getPersonelId());

            event.addObservation(obs.getServiceIdentification());

            return event;

      }


I opened the source code at line 56 of org.drools.reteoo.ReteooFactHandleFactory (I'm using Drools 5.3.0 final):


45. protected final InternalFactHandle newFactHandle(final int id,   

46.                                                     final Object object,   

47.                                                     final long recency,   

48.                                                     final ObjectTypeConf conf,   

49.                                                     final InternalWorkingMemory workingMemory,   

50.                                                     final WorkingMemoryEntryPoint wmEntryPoint) {   

51.        if ( conf != null && conf.isEvent() ) {   

52.            TypeDeclaration type = conf.getTypeDeclaration();   

53.            long timestamp;   

56.            if ( type.getTimestampExtractor() != null ) {   

57.                if ( Date.class.isAssignableFrom( type.getTimestampExtractor().getExtractToClass() ) ) {   

58.                    timestamp = ((Date) type.getTimestampExtractor().getValue( workingMemory,   

59.                                                                               object )).getTime();   

60.                } else {  

 

it seems that "type" is null.

 

Regards

Carolina


2012/7/23 Wolfgang Laun <wolfgang.laun@gmail.com>
On 23/07/2012, Vincent LEGENDRE <vincent.legendre@eurodecision.com> wrote:
> are you sure that your " SituationManager.createAccessControlEvent" method
> returns something not null ?

An insert of null is handled by insert(): nothing is done, null is returned. NP
-W
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users