com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.extjs.gxt.ui.client.data.PagingLoadResult com.ibbs.bbx.diagnostics.report.client.DocsisCapabilityService.getFilteredSubscriberModems(int,int,com.extjs.gxt.ui.client.data.FilterPagingLoadConfig)' threw an unexpected exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

Spring JIRA | Ben Hall | 5 years ago
  1. 0

    org.springframework.data.mongodb.core.mapreduce.MapReduceCounts appears to be typed incorrectly which causes MapReduceResults.parseCounts to fail. MapReduceCounts uses ints to store the output of the M/R result counts however the MongoDB server appears to return a long (see link and CPP code below). {code} Jan 13, 2012 11:14:13 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.extjs.gxt.ui.client.data.PagingLoadResult com.ibbs.bbx.diagnostics.report.client.DocsisCapabilityService.getFilteredSubscriberModems(int,int,com.extjs.gxt.ui.client.data.FilterPagingLoadConfig)' threw an unexpected exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:227) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.parseCounts(MapReduceResults.java:95) at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.<init>(MapReduceResults.java:50) at org.springframework.data.mongodb.core.MongoTemplate.mapReduce(MongoTemplate.java:1026) at com.ibbs.unity.mongodb.services.ModemService.getDocsisCapByCmtsId(ModemService.java:241) at com.ibbs.bbx.diagnostics.report.server.DocsisCapabilityServiceImpl.getDocsisCapabilities(DocsisCapabilityServiceImpl.java:55) at com.ibbs.bbx.diagnostics.report.server.DocsisCapabilityServiceImpl.getFilteredSubscriberModems(DocsisCapabilityServiceImpl.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569) ... 19 more {code} Log output of the actual values: {code} INFO | jvm 1 | 2012/01/13 23:14:13 | input: 55668 class: java.lang.Long INFO | jvm 1 | 2012/01/13 23:14:13 | emit: 55668 class: java.lang.Long INFO | jvm 1 | 2012/01/13 23:14:13 | output: 52 class: java.lang.Long {code} Total number of documents in the collection being queried: 20,057,139 Relevant MongoDB source: https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/mr.cpp {code} 1036 long long num = 0; 1037 long long inReduce = 0; 1140 countsBuilder.appendNumber( "input" , num ); 1141 countsBuilder.appendNumber( "emit" , state.numEmits() ); 1162 long long finalCount = state.postProcessCollection(op, pm); state.appendResults( result ); timingBuilder.append( "total" , t.millis() ); result.append( "timeMillis" , t.millis() ); 1167 countsBuilder.appendNumber( "output" , finalCount ); {code}

    Spring JIRA | 5 years ago | Ben Hall
    com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.extjs.gxt.ui.client.data.PagingLoadResult com.ibbs.bbx.diagnostics.report.client.DocsisCapabilityService.getFilteredSubscriberModems(int,int,com.extjs.gxt.ui.client.data.FilterPagingLoadConfig)' threw an unexpected exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
  2. 0

    org.springframework.data.mongodb.core.mapreduce.MapReduceCounts appears to be typed incorrectly which causes MapReduceResults.parseCounts to fail. MapReduceCounts uses ints to store the output of the M/R result counts however the MongoDB server appears to return a long (see link and CPP code below). {code} Jan 13, 2012 11:14:13 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.extjs.gxt.ui.client.data.PagingLoadResult com.ibbs.bbx.diagnostics.report.client.DocsisCapabilityService.getFilteredSubscriberModems(int,int,com.extjs.gxt.ui.client.data.FilterPagingLoadConfig)' threw an unexpected exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:227) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.parseCounts(MapReduceResults.java:95) at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.<init>(MapReduceResults.java:50) at org.springframework.data.mongodb.core.MongoTemplate.mapReduce(MongoTemplate.java:1026) at com.ibbs.unity.mongodb.services.ModemService.getDocsisCapByCmtsId(ModemService.java:241) at com.ibbs.bbx.diagnostics.report.server.DocsisCapabilityServiceImpl.getDocsisCapabilities(DocsisCapabilityServiceImpl.java:55) at com.ibbs.bbx.diagnostics.report.server.DocsisCapabilityServiceImpl.getFilteredSubscriberModems(DocsisCapabilityServiceImpl.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569) ... 19 more {code} Log output of the actual values: {code} INFO | jvm 1 | 2012/01/13 23:14:13 | input: 55668 class: java.lang.Long INFO | jvm 1 | 2012/01/13 23:14:13 | emit: 55668 class: java.lang.Long INFO | jvm 1 | 2012/01/13 23:14:13 | output: 52 class: java.lang.Long {code} Total number of documents in the collection being queried: 20,057,139 Relevant MongoDB source: https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/mr.cpp {code} 1036 long long num = 0; 1037 long long inReduce = 0; 1140 countsBuilder.appendNumber( "input" , num ); 1141 countsBuilder.appendNumber( "emit" , state.numEmits() ); 1162 long long finalCount = state.postProcessCollection(op, pm); state.appendResults( result ); timingBuilder.append( "total" , t.millis() ); result.append( "timeMillis" , t.millis() ); 1167 countsBuilder.appendNumber( "output" , finalCount ); {code}

    Spring JIRA | 5 years ago | Ben Hall
    com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.extjs.gxt.ui.client.data.PagingLoadResult com.ibbs.bbx.diagnostics.report.client.DocsisCapabilityService.getFilteredSubscriberModems(int,int,com.extjs.gxt.ui.client.data.FilterPagingLoadConfig)' threw an unexpected exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    error writing vector of longs to pail - caused by inconsistent treatment of integer types?

    GitHub | 4 years ago | robinkraft
    cascading.tuple.TupleException: unable to sink into output identifier: /tmp/cascalog_reserved/0b005123-f278-4b53-8e74-a6d5f2d4594a

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Long cannot be cast to java.lang.Integer

      at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.parseCounts()
    2. Spring Data MongoDB - Core
      MongoTemplate.mapReduce
      1. org.springframework.data.mongodb.core.mapreduce.MapReduceResults.parseCounts(MapReduceResults.java:95)
      2. org.springframework.data.mongodb.core.mapreduce.MapReduceResults.<init>(MapReduceResults.java:50)
      3. org.springframework.data.mongodb.core.MongoTemplate.mapReduce(MongoTemplate.java:1026)
      3 frames
    3. com.ibbs.unity
      ModemService.getDocsisCapByCmtsId
      1. com.ibbs.unity.mongodb.services.ModemService.getDocsisCapByCmtsId(ModemService.java:241)
      1 frame
    4. com.ibbs.bbx
      DocsisCapabilityServiceImpl.getFilteredSubscriberModems
      1. com.ibbs.bbx.diagnostics.report.server.DocsisCapabilityServiceImpl.getDocsisCapabilities(DocsisCapabilityServiceImpl.java:55)
      2. com.ibbs.bbx.diagnostics.report.server.DocsisCapabilityServiceImpl.getFilteredSubscriberModems(DocsisCapabilityServiceImpl.java:136)
      2 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    6. Jetty Contrib :: jetty-gwt RemoteServiceServlet
      AbstractRemoteServiceServlet.doPost
      1. com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
      2. com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
      3. com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
      4. com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
      4 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2 frames
    8. Glassfish Core
      StandardEngineValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      7 frames
    9. org.apache.catalina
      ReplicationValve.invoke
      1. org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:227)
      2. org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
      2 frames
    10. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      1 frame
    11. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      3 frames
    12. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:662)
      1 frame