java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The OAuth20ProfileController in CAS-OAuth attempts to want to serialize and marshal all principal attributes. The JSONFactory parser seems to have a problem with multi-valued attributes, which, in my exact case was "objectclass". {code} objectclass=[top, person, organizationalPerson] {code} Exception trace: {code} FBJqRDG7Zl46MUa-https://mmoayyed.test.org> 2014-06-18 10:45:26,427 DEBUG [org.jasig.cas.web.FlowExecutionExceptionResolver] - <Ignoring the received exception due to a type mismatch> java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Collec ns$UnmodifiableRandomAccessList) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1114) at org.jasig.cas.support.oauth.web.OAuth20ProfileController.handleRequestInternal(OAuth20ProfileController.java:100) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.jasig.cas.support.oauth.web.OAuth20WrapperController.internalHandleRequest(OAuth20WrapperController.java:79) at org.jasig.cas.support.oauth.web.BaseOAuthWrapperController.handleRequestInternal(BaseOAuthWrapperController.java:62) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128) at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57) at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) {code} Also noticed that the code attempts to want to marshal ALL principal attributes into JSON, rather than just what attributes may be allowed for the oauth client service.
    via by Misagh Moayyed,
  • The OAuth20ProfileController in CAS-OAuth attempts to want to serialize and marshal all principal attributes. The JSONFactory parser seems to have a problem with multi-valued attributes, which, in my exact case was "objectclass". {code} objectclass=[top, person, organizationalPerson] {code} Exception trace: {code} FBJqRDG7Zl46MUa-https://mmoayyed.test.org> 2014-06-18 10:45:26,427 DEBUG [org.jasig.cas.web.FlowExecutionExceptionResolver] - <Ignoring the received exception due to a type mismatch> java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Collec ns$UnmodifiableRandomAccessList) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1114) at org.jasig.cas.support.oauth.web.OAuth20ProfileController.handleRequestInternal(OAuth20ProfileController.java:100) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.jasig.cas.support.oauth.web.OAuth20WrapperController.internalHandleRequest(OAuth20WrapperController.java:79) at org.jasig.cas.support.oauth.web.BaseOAuthWrapperController.handleRequestInternal(BaseOAuthWrapperController.java:62) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128) at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57) at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) {code} Also noticed that the code attempts to want to marshal ALL principal attributes into JSON, rather than just what attributes may be allowed for the oauth client service.
    via by Misagh Moayyed,
  • I have a POJO with a java.util.Date attribute in it and when the POJO is being saved I get this error: java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Date) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encodeRecursive(JacksonTranslationService.java:93) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encode(JacksonTranslationService.java:60) at org.springframework.data.couchbase.core.CouchbaseTemplate.translateEncode(CouchbaseTemplate.java:84) at org.springframework.data.couchbase.core.CouchbaseTemplate.access$000(CouchbaseTemplate.java:49) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:120) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234) at org.springframework.data.couchbase.core.CouchbaseTemplate.save(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.save(SimpleCouchbaseRepository.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... The problem seems to be that in JacksonTranslationService.encodeRecursive, the Date is detected as a symple type but then in the jackson core the Date object is not supported, is there any way to translate the dates to JSON?
    via by Jaime L. López Carratalá,
  • I have a POJO with a java.util.Date attribute in it and when the POJO is being saved I get this error: java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Date) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encodeRecursive(JacksonTranslationService.java:93) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encode(JacksonTranslationService.java:60) at org.springframework.data.couchbase.core.CouchbaseTemplate.translateEncode(CouchbaseTemplate.java:84) at org.springframework.data.couchbase.core.CouchbaseTemplate.access$000(CouchbaseTemplate.java:49) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:120) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234) at org.springframework.data.couchbase.core.CouchbaseTemplate.save(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.save(SimpleCouchbaseRepository.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... The problem seems to be that in JacksonTranslationService.encodeRecursive, the Date is detected as a symple type but then in the jackson core the Date object is not supported, is there any way to translate the dates to JSON?
    via by Jaime L. López Carratalá,
  • I have a POJO with a java.util.Date attribute in it and when the POJO is being saved I get this error: java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Date) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encodeRecursive(JacksonTranslationService.java:93) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encode(JacksonTranslationService.java:60) at org.springframework.data.couchbase.core.CouchbaseTemplate.translateEncode(CouchbaseTemplate.java:84) at org.springframework.data.couchbase.core.CouchbaseTemplate.access$000(CouchbaseTemplate.java:49) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:120) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234) at org.springframework.data.couchbase.core.CouchbaseTemplate.save(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.save(SimpleCouchbaseRepository.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... The problem seems to be that in JacksonTranslationService.encodeRecursive, the Date is detected as a symple type but then in the jackson core the Date object is not supported, is there any way to translate the dates to JSON?
    via by Jaime L. López Carratalá,
  • I have a POJO with a java.util.Date attribute in it and when the POJO is being saved I get this error: java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Date) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encodeRecursive(JacksonTranslationService.java:93) at org.springframework.data.couchbase.core.convert.translation.JacksonTranslationService.encode(JacksonTranslationService.java:60) at org.springframework.data.couchbase.core.CouchbaseTemplate.translateEncode(CouchbaseTemplate.java:84) at org.springframework.data.couchbase.core.CouchbaseTemplate.access$000(CouchbaseTemplate.java:49) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:120) at org.springframework.data.couchbase.core.CouchbaseTemplate$2.doInBucket(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234) at org.springframework.data.couchbase.core.CouchbaseTemplate.save(CouchbaseTemplate.java:117) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.save(SimpleCouchbaseRepository.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... The problem seems to be that in JacksonTranslationService.encodeRecursive, the Date is detected as a symple type but then in the jackson core the Date object is not supported, is there any way to translate the dates to JSON?
    via by Jaime L. López Carratalá,
    • java.lang.IllegalStateException: No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed java.util.Collec ns$UnmodifiableRandomAccessList) at com.fasterxml.jackson.core.base.GeneratorBase._writeSimpleObject(GeneratorBase.java:515) at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:262) at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1114) at org.jasig.cas.support.oauth.web.OAuth20ProfileController.handleRequestInternal(OAuth20ProfileController.java:100) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.jasig.cas.support.oauth.web.OAuth20WrapperController.internalHandleRequest(OAuth20WrapperController.java:79) at org.jasig.cas.support.oauth.web.BaseOAuthWrapperController.handleRequestInternal(BaseOAuthWrapperController.java:62) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128) at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57) at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    No Bugmate found.