1. AdroitLogic
  2. ultraesb
Issue #39 new

FileTransportListender does not initialize zookeeper locks

mkhpalm
created an issue

If you enable clustering, FileTransportListener services stop working properly in ultraesb 2.0.0. This looks to be the result of something missing in the cluster locking and can be replicated with any file poller proxy service configuration.

Here is the traceback when FileTransportListener tries to process a file:

2013-12-12 19:07:39,775 [-] [file-4] ERROR FileTransportListener Error executing onPoll() for transport : FileTransportListener
java.lang.NullPointerException
    at org.adroitlogic.ultraesb.transport.file.FileTransportListener.processFiles(FileTransportListener.java:384)
    at org.adroitlogic.ultraesb.transport.file.FileTransportListener.onPoll(FileTransportListener.java:148)
    at org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener.execute(AbstractPollingTransportListener.java:197)
    at org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener$PollingJob.execute(AbstractPollingTransportListener.java:171)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)

According to line 384 in FileTransportListener:

        String path = clustered ? clusterManager.getDomainZNodeRoot()
                + ClusteringConstants.ZooKeeperZNodePaths.LOCKS_PATH_NAME + separator + "transport" + separator
                + connector.getScheme() + separator + url.getHostname().replace('.', '_') : null;

https://bitbucket.org/adroitlogic/ultraesb/src/0df7445bcfe7c1615139689a307a8d8f9a9e0af2/modules/optional/src/main/java/org/adroitlogic/ultraesb/transport/file/FileTransportListener.java?at=2.0

There should be more to the locks path than what gets initialized in zookeeper:

ls /ultraesb/esb1/locks
time = 0 msec
/ultraesb/esb1/locks: rc = 0
time = 0 msec

It is always going to cause null pointer exceptions since nothing is under locks in zookeeper.

Comments (5)

  1. mkhpalm reporter

    Not sure if this helps but the TODO at FileTransportListener.java:457 seems interesting in light of this issue.

    https://bitbucket.org/adroitlogic/ultraesb/src/cd0525adb3f4594961e854a0f00665b976b72c1d/modules/optional/src/main/java/org/adroitlogic/ultraesb/transport/file/FileTransportListener.java?at=default#cl-457

    EDIT: - Nevermind, it will never make it that far because its already crashed with a NullPointerException. Is this just a chicken and egg situation?

  2. Log in to comment