Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-129

`show config file` in cli causes server to throw NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.3
    • None
    • None
    • OS X, Java 1.7 (via soylatte)

    • Low

    Description

      Booting up the cli and running the command "show config file" in the lastest from trunk (r771019) on a fresh and empty cassandra instance causes a NullPointerError to be thrown. By looking at the code (but being a not-so-hot java developer), it looks like the problem is simply DatabaseDescriptor.getConfigFileName() returning a null because configFileName_ never gets set anywhere in the code.

      The error in question:

      ERROR - Error occurred during processing of message.
      java.lang.NullPointerException
      at java.io.FileInputStream.<init>(FileInputStream.java:133)
      at java.io.FileInputStream.<init>(FileInputStream.java:96)
      at org.apache.cassandra.service.CassandraServer.getStringProperty(CassandraServer.java:485)
      at org.apache.cassandra.service.Cassandra$Processor$getStringProperty.process(Cassandra.java:1294)
      at org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:860)
      at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:252)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:713)

      Attachments

        1. 129.patch
          0.5 kB
          Sandeep Tata
        2. config_file_name.pach
          1 kB
          Jeff Hodges

        Activity

          People

            sandeep_tata Sandeep Tata
            jmhodges Jeff Hodges
            Sandeep Tata
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: