java.lang.NumberFormatException

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.

  • Floating decimal problem!!
    via by 843798,
  • Floating Decimal problem!!
    via by 807554,
  • java.lang.StackOverflowError?
    via by Unknown author,
  • (Dynamic) Attribute Calculator
    via by michaelm,
  • How to reproduce: 1. Have a collection with a "2dsphere" index (in my case, i have had a "MyModel" annotated with @GeoSpatialIndexed(type=GeoSpatialIndexType.GEO_2DSPHERE) 2. Get a mongoTemplate and execute the code: {code} final String collectionName = mongoTemplate.getCollectionName(MyModel.class); final IndexOperations indexOps = mongoTemplate.indexOps(collectionName); final List<IndexInfo> indexInfo = indexOps.getIndexInfo(); {code} This raises an exception: {code} Caused by: java.lang.NumberFormatException: For input string: "2dsphere" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.lang.Double.parseDouble(Double.java:538) at java.lang.Double.<init>(Double.java:608) at org.springframework.data.mongodb.core.DefaultIndexOperations$4.getIndexData(DefaultIndexOperations.java:147) at org.springframework.data.mongodb.core.DefaultIndexOperations$4.doInCollection(DefaultIndexOperations.java:125) at org.springframework.data.mongodb.core.DefaultIndexOperations$4.doInCollection(DefaultIndexOperations.java:122) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:410) at org.springframework.data.mongodb.core.DefaultIndexOperations.getIndexInfo(DefaultIndexOperations.java:122) at com.example.config.PersistenceConfig.ensureIndex(PersistenceConfig.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:771) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:277) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at runjettyrun.Bootstrap.main(Bootstrap.java:80){code} I think, this should not happen. What do you think? IMHO the error did not occur, when using MongoDb 2.6.0
    via by Olaf Krische,
    • java.lang.NumberFormatException: -0.715 at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1213) at java.lang.Double.valueOf(Double.java:183) at java.lang.Double.<init>(Double.java:258) at MethodEvaluation.ReadDataIn(MethodEvaluation.java:259) at MethodEvaluation.RunLCV(MethodEvaluation.java:67) at MethodEvaluation.main(MethodEvaluation.java:29)

    Users with the same issue

    osvzsosvzs
    2 times, last one,
    marcbouvierdavmarcbouvierdav
    6 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,