JBoss Community

jbpm drools grid error

created by Luis Tamayo in jBPM - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in jBPM at Community