[jboss-user] [jBPM] - jbpm drools grid error

Luis Tamayo do-not-reply at jboss.com
Tue Aug 30 18:25:44 EDT 2011


Luis Tamayo [http://community.jboss.org/people/luis.tamayo] created the discussion

"jbpm drools grid error"

To view the discussion, visit: http://community.jboss.org/message/623876#623876

--------------------------------------------------------------
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
[http://community.jboss.org/message/623876#623876]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110830/dc658e7d/attachment-0001.html 


More information about the jboss-user mailing list