Do you have the error stack ? Cheers
----------------- Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 28/11/2012, at 12:28 AM, Everton Lima <peitin.inu...@gmail.com> wrote: > Hello people. > I was using cassandra 1.1.6 and use the Object CassandraServer() to create > keyspaces by my code. > > But when I update to version 1.2.0-beta2, my code starts to throw Exception > (NullPointerException) in the method: > > in version 1.1.6 > CassandraServer -> state() -> > { > SocketAddress remoteSocket = > SocketSessionManagementService.remoteSocket.get(); > if (remoteSocket == null) > return clientState.get(); > > ClientState cState = > SocketSessionManagementService.instance.get(remoteSocket); > if (cState == null) > { > cState = new ClientState(); > SocketSessionManagementService.instance.put(remoteSocket, cState); > } > return cState; > } > > in version 1.2.0 > CassandraServer -> state() -> > { > return ThriftSessionManager.instance.currentSession(); > } > currtentSession(){ > SocketAddress socket = remoteSocket.get(); > assert socket != null; > > ThriftClientState cState = activeSocketSessions.get(socket); > if (cState == null) > { > cState = new ThriftClientState(); > activeSocketSessions.put(socket, cState); > } > return cState; > } > > > So, in version 1.1.6, it verify if has a remote connection, it not it try to > get o local. In the version 1.2.0 it try to get a remote connection and apply > it > to a ThriftClientState, but if does not have a remote connection (like in > 1.1.6) it will throw a NullPointerException in line: > ThriftClientState cState = activeSocketSessions.get(socket); > > Is any way to use CassandraServer in the new version?? > > Thanks! > > -- > > Everton Lima Aleixo > Bacharel em Ciencia da Computação > Universidade Federal de Goiás