Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded server startup error with Cassandra 3.10 #221

Closed
amichair opened this issue Feb 19, 2017 · 9 comments
Closed

Embedded server startup error with Cassandra 3.10 #221

amichair opened this issue Feb 19, 2017 · 9 comments

Comments

@amichair
Copy link

When upgrading Cassandra from 3.9 to 3.10 (and cassandra-unit 3.1.3.2), the embedded server fails to start:

java.lang.NullPointerException: null
        at org.apache.cassandra.config.DatabaseDescriptor.createAllDirectories(DatabaseDescriptor.java:1152)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.mkdirs(EmbeddedCassandraServerHelper.java:349)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.cleanupAndLeaveDirs(EmbeddedCassandraServerHelper.java:321)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.java:122)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.java:91)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.java:70)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.java:62)
        at org.cassandraunit.utils.EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.java:58)
...

The configuration seems to no longer be applied (it is null) - perhaps Cassandra changed something about its configuration initialization that broke this.

@BrainLogic
Copy link

Hi team.
This is improved in 3.1.4.0-SNAPSHOT. When 3.1.4.0 will be released?

@nevillelyh
Copy link

I found a workaround by calling DatabaseDescriptor.daemonInitialization() after creating the CassandraUnit instance.

@OrangeDog
Copy link

OrangeDog commented Jul 31, 2017

@nevillelyh what exactly did you do? There is no CassandraUnit class to make an instance of.
Before startEmbeddedCassandra it throws a ConfigurationException. After, and it's too late.

OrangeDog referenced this issue Jul 31, 2017
…me (static constructor), so we need to load it on our own
@userx91
Copy link

userx91 commented Sep 4, 2017

We are facing the same issue . It works if we use 3.1.4.0-SNAPSHOT . We cannot use a SNAPSHOT dependency on our production code .is this part of any ongoing milestone ? Can you please let us know when it will be released.
@nevillelyh @OrangeDog - The changes you mentioned are part of EmbeddedCassandraServerHelper.java in 3.1.4.0-SNAPSHOT right ? Which other version of Cassandra unit has this fix ?

@nevillelyh
Copy link

Sorry I ended up not using cassandra-unit since we ran into other problems that are not easily fixable.

@MrChrisPSimmons
Copy link

This seems to work around the problem.

      try {
        EmbeddedCassandraServerHelper.startEmbeddedCassandra(timeout);
      }
      catch (NullPointerException e) {
        DatabaseDescriptor.daemonInitialization();
        EmbeddedCassandraServerHelper.startEmbeddedCassandra(timeout);
      }

@hsn10
Copy link

hsn10 commented Sep 19, 2017

can you publish new JAR with this fix?

@OrangeDog
Copy link

OrangeDog commented Sep 22, 2017

@jsevellec As 3.3.0.1 broke other things (#247) can you please release 3.1.4.0.

@amichair
Copy link
Author

This issue no longer occurs in release 3.3.0.2, so I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants