5 Replies Latest reply on Aug 31, 2011 5:54 PM by Mauricio Salatino

    jbpm drools grid error

    Luis Tamayo Newbie

      hi,

       

      Please, I am running jbpm5.1.final, drools 5.2.0.final, HornetQ 2.0.0.GA.

      When i try to create a remote node, when I call conf.configure(grid);, it throws a null pointer error:

       

      private Map<String, GridServiceDescription> coreServicesMap;

          private Grid grid;

          private GridNode remoteN1;

       

      public void createRemoteNode() {

                    grid = new GridImpl(new HashMap<String, Object>());

                    configureGrid1(grid,

                      8000,

                      null);

              GridNode n1 = grid.createGridNode("n1");

              grid.get(SocketService.class).addService("n1", 8000, n1);

              GridServiceDescription<GridNode> n1Gsd = grid.get(WhitePages.class).lookup("n1");

              GridConnection<GridNode> conn = grid.get(ConnectionFactoryService.class).createConnection(n1Gsd);

              remoteN1 = conn.connect();

       

       

          }

       

       

      private void configureGrid1(Grid grid,

                  int port,

                  WhitePages wp) {

                    System.out.println( "=================>Esta en configure grid"  );

              //Local Grid Configuration, for our client

              GridPeerConfiguration conf = new GridPeerConfiguration();

              //Configuring the Core Services White Pages

              GridPeerServiceConfiguration coreSeviceWPConf = new CoreServicesLookupConfiguration(coreServicesMap);

              conf.addConfiguration(coreSeviceWPConf);

              //Configuring the Core Services Scheduler

              GridPeerServiceConfiguration coreSeviceSchedulerConf = new CoreServicesSchedulerConfiguration();

              conf.addConfiguration(coreSeviceSchedulerConf);

              //Configuring the WhitePages

              WhitePagesLocalConfiguration wplConf = new WhitePagesLocalConfiguration();

              wplConf.setWhitePages( wp );

              conf.addConfiguration(wplConf);

              if (port >= 0) {

                  //Configuring the SocketService

                  MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration(new MultiplexSocketServerImpl("127.0.0.1",

                          new MinaAcceptorFactoryService(),

                          SystemEventListenerFactory.getSystemEventListener(),

                          grid));

                  socketConf.addService(WhitePages.class.getName(), wplConf.getWhitePages(), port);

               

       

                  conf.addConfiguration(socketConf);

                }

             

                          conf.configure(grid);// here produce null pointer exception

       

             

          }

       

      17:06:23,521 ERROR [STDERR] java.lang.NullPointerException

      17:06:23,523 ERROR [STDERR]     at org.drools.grid.timer.impl.CoreServicesSchedu

      lerConfiguration.configureService(CoreServicesSchedulerConfiguration.java:23)

      17:06:23,526 ERROR [STDERR]     at org.drools.grid.conf.impl.GridPeerConfigurati

      on.configure(GridPeerConfiguration.java:22)

       

       

       

      thanks in advance

        • 1. Re: jbpm drools grid error
          Luis Tamayo Newbie

          I solved this problem, I must initialize

          private Map<String, GridServiceDescription> coreServicesMap;

           

          I am having another error whe i execute:

          kbuilder.add(ResourceFactory.newClassPathResource( "D:/lincoln/WsJbpm51/PrjJSFBpm5/resources/bpm/RequerimientoPermiso.bpmn"), ResourceType.BPMN2);

           

          17:44:57,182 ERROR [STDERR] java.lang.RuntimeException: Timeout : unable to retr

          ieve Object Id

          17:44:57,183 ERROR [STDERR]     at org.drools.grid.internal.responsehandlers.Blo

          ckingMessageResponseHandler.getMessage(BlockingMessageResponseHandler.java:29)

          17:44:57,184 ERROR [STDERR]     at org.drools.grid.internal.responsehandlers.Blo

          ckingMessageResponseHandler.getMessage(BlockingMessageResponseHandler.java:22)

          17:44:57,185 ERROR [STDERR]     at org.drools.grid.remote.ConversationUtil.sendM

          essage(ConversationUtil.java:82)

          17:44:57,185 ERROR [STDERR]     at org.drools.grid.remote.ConversationUtil.sendM

          essage(ConversationUtil.java:34)

          17:44:57,186 ERROR [STDERR]     at org.drools.grid.remote.KnowledgeBuilderRemote

          Client.add(KnowledgeBuilderRemoteClient.java:79)

          17:44:57,186 ERROR [STDERR]     at org.drools.grid.remote.KnowledgeBuilderRemote

          Client.add(KnowledgeBuilderRemoteClient.java:58)

          17:44:57,187 ERROR [STDERR]     at com.lincoln.jbpm.web.SolicitudPermisoService.

          createPermissionRequestServiceSession(SolicitudPermisoService.java:127)

          17:44:57,188 ERROR [STDERR]     at com.lincoln.jbpm.web.SolicitudPermisoService.

          init(SolicitudPermisoService.java:62)

          • 2. Re: jbpm drools grid error
            Luis Tamayo Newbie

            I have fixed.

            Now i get this error when run:

            KnowledgeBaseConfiguration kbaseConf = remoteN1.get(KnowledgeBaseFactoryService.class).newKnowledgeBaseConfiguration();

             

            16:10:51,075 ERROR [STDERR] java.lang.UnsupportedOperationException: Not support

            ed yet.

            16:10:51,077 ERROR [STDERR]     at org.drools.grid.remote.KnowledgeBaseProviderR

            emoteClient.newKnowledgeBaseConfiguration(KnowledgeBaseProviderRemoteClient.java

            :52)

             

            Thanks in advance

            • 3. Re: jbpm drools grid error
              Mauricio Salatino Master

              drools gird is an experimental module, for that reason you will find a lot of un implemented features. I'm using it to test it and to see if there is interest from the community in this module. Right now in the newKnowledgeBaseConfiguration() method is implemented in 5.3.0.SNAPSHOT, which version are you using?

              I'm working on implement the remaining methods and I will really appreciate some help testing it.

              Cheers

              • 4. Re: jbpm drools grid error
                Luis Tamayo Newbie

                I am using drools-grid-impl-5.2.0.Final, I will try 5.3.0.SNAPSHOT.

                 

                Do you recomend grid for production??

                • 5. Re: jbpm drools grid error
                  Mauricio Salatino Master

                  it's an experimental module we are working on it.. if you start testing it we can help you and improve it for use it in production environments.. Until we don't get feedback from the community we can't warranty anything.

                  Cheers