Uh, yeah, I'm a moron. I was doing this inside a try/catch block, and the
class containing my session was autoclosing the session at the end of the
try/ catch (i.e try (Environment env = new Environment() ).

Nvm, I'm an idiot

On Tue, Oct 11, 2016 at 8:29 PM, Ali Akhtar <ali.rac...@gmail.com> wrote:

> This is a little urgent, so any help would be greatly appreciated.
>
> On Tue, Oct 11, 2016 at 8:22 PM, Ali Akhtar <ali.rac...@gmail.com> wrote:
>
>> I'm creating a session, connecting to it, then creating a
>> mappingManager(), then obtaining a mapper for MyPojo.class
>>
>> If I then try to do mapper.save(myPojo), I get the following stacktrace:
>>
>> Oct 11, 2016 8:16:26 PM com.google.common.util.concurrent.ExecutionList
>> executeListener
>> SEVERE: RuntimeException while executing runnable
>> com.google.common.util.concurrent.Futures$ChainingListenable
>> Future@5164e29 with executor com.google.common.util.concurr
>> ent.MoreExecutors$ListeningDecorator@5f77d54d
>> java.util.concurrent.RejectedExecutionException: Task
>> com.google.common.util.concurrent.Futures$ChainingListenable
>> Future@5164e29 rejected from java.util.concurrent.ThreadPoo
>> lExecutor@53213dad[Terminated, pool size = 0, active threads = 0, queued
>> tasks = 0, completed tasks = 0]
>> at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.
>> rejectedExecution(ThreadPoolExecutor.java:2047)
>> at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExe
>> cutor.java:823)
>> at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolEx
>> ecutor.java:1369)
>> at com.google.common.util.concurrent.MoreExecutors$ListeningDec
>> orator.execute(MoreExecutors.java:484)
>> at com.google.common.util.concurrent.ExecutionList.executeListe
>> ner(ExecutionList.java:156)
>> at com.google.common.util.concurrent.ExecutionList.add(Executio
>> nList.java:101)
>> at com.google.common.util.concurrent.AbstractFuture.addListener
>> (AbstractFuture.java:170)
>> at com.google.common.util.concurrent.Futures.transform(Futures.java:608)
>> at com.datastax.driver.core.SessionManager.toPreparedStatement(
>> SessionManager.java:200)
>> at com.datastax.driver.core.SessionManager.prepareAsync(Session
>> Manager.java:161)
>> at com.datastax.driver.core.AbstractSession.prepareAsync(Abstra
>> ctSession.java:134)
>> at com.datastax.driver.mapping.Mapper.getPreparedQueryAsync(Map
>> per.java:121)
>> at com.datastax.driver.mapping.Mapper.saveQueryAsync(Mapper.java:224)
>> at com.datastax.driver.mapping.Mapper.saveAsync(Mapper.java:307)
>> at com.datastax.driver.mapping.Mapper.save(Mapper.java:270)
>>
>>
>>
>> Any ideas what's causing this? Afaik I'm doing all the steps asked for
>>
>>
>

Reply via email to