Cassandra Springboot Frozen column exception











up vote
0
down vote

favorite












I have a springboot application which I hooked up with cassandra. I am trying to create a map inside a map but getting the below exception.



com.datastax.driver.core.exceptions.InvalidQueryException: Non-frozen collections are not allowed inside collections: map<text, map<text, int>>


Code



@Table
@Data
public class AssessmentSubmissionEntity {

@PrimaryKey()
private UUID id;

@Column
private Map<String, Map<String,Integer>> assessmentMap;


}


man



<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-cassandra</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
</dependency>









share|improve this question


























    up vote
    0
    down vote

    favorite












    I have a springboot application which I hooked up with cassandra. I am trying to create a map inside a map but getting the below exception.



    com.datastax.driver.core.exceptions.InvalidQueryException: Non-frozen collections are not allowed inside collections: map<text, map<text, int>>


    Code



    @Table
    @Data
    public class AssessmentSubmissionEntity {

    @PrimaryKey()
    private UUID id;

    @Column
    private Map<String, Map<String,Integer>> assessmentMap;


    }


    man



    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-cassandra</artifactId>
    </dependency>
    <dependency>
    <groupId>com.datastax.cassandra</groupId>
    <artifactId>cassandra-driver-core</artifactId>
    </dependency>
    <dependency>
    <groupId>com.datastax.cassandra</groupId>
    <artifactId>cassandra-driver-mapping</artifactId>
    </dependency>









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a springboot application which I hooked up with cassandra. I am trying to create a map inside a map but getting the below exception.



      com.datastax.driver.core.exceptions.InvalidQueryException: Non-frozen collections are not allowed inside collections: map<text, map<text, int>>


      Code



      @Table
      @Data
      public class AssessmentSubmissionEntity {

      @PrimaryKey()
      private UUID id;

      @Column
      private Map<String, Map<String,Integer>> assessmentMap;


      }


      man



      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-cassandra</artifactId>
      </dependency>
      <dependency>
      <groupId>com.datastax.cassandra</groupId>
      <artifactId>cassandra-driver-core</artifactId>
      </dependency>
      <dependency>
      <groupId>com.datastax.cassandra</groupId>
      <artifactId>cassandra-driver-mapping</artifactId>
      </dependency>









      share|improve this question













      I have a springboot application which I hooked up with cassandra. I am trying to create a map inside a map but getting the below exception.



      com.datastax.driver.core.exceptions.InvalidQueryException: Non-frozen collections are not allowed inside collections: map<text, map<text, int>>


      Code



      @Table
      @Data
      public class AssessmentSubmissionEntity {

      @PrimaryKey()
      private UUID id;

      @Column
      private Map<String, Map<String,Integer>> assessmentMap;


      }


      man



      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-cassandra</artifactId>
      </dependency>
      <dependency>
      <groupId>com.datastax.cassandra</groupId>
      <artifactId>cassandra-driver-core</artifactId>
      </dependency>
      <dependency>
      <groupId>com.datastax.cassandra</groupId>
      <artifactId>cassandra-driver-mapping</artifactId>
      </dependency>






      spring-boot cassandra






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 36 mins ago









      user3310115

      205311




      205311
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Please have a look into Non frozen collections and user defined types on Cassandra 2.1.8.



          You need to add frozen keyword:



          @Column
          private Map<String, frozen Map<String,Integer>> assessmentMap;




          share





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53202482%2fcassandra-springboot-frozen-column-exception%23new-answer', 'question_page');
            }
            );

            Post as a guest
































            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Please have a look into Non frozen collections and user defined types on Cassandra 2.1.8.



            You need to add frozen keyword:



            @Column
            private Map<String, frozen Map<String,Integer>> assessmentMap;




            share

























              up vote
              0
              down vote













              Please have a look into Non frozen collections and user defined types on Cassandra 2.1.8.



              You need to add frozen keyword:



              @Column
              private Map<String, frozen Map<String,Integer>> assessmentMap;




              share























                up vote
                0
                down vote










                up vote
                0
                down vote









                Please have a look into Non frozen collections and user defined types on Cassandra 2.1.8.



                You need to add frozen keyword:



                @Column
                private Map<String, frozen Map<String,Integer>> assessmentMap;




                share












                Please have a look into Non frozen collections and user defined types on Cassandra 2.1.8.



                You need to add frozen keyword:



                @Column
                private Map<String, frozen Map<String,Integer>> assessmentMap;





                share











                share


                share










                answered 3 mins ago









                Raheela Aslam

                895




                895






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53202482%2fcassandra-springboot-frozen-column-exception%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest




















































































                    Popular posts from this blog

                    横浜市

                    Rostock

                    Europa