7 Replies Latest reply: Aug 8, 2011 8:51 PM by 880841 RSS

    An exception when get data from Berkeley DB

    795958
      com.sleepycat.util.RuntimeExceptionWrapper: java.io.EOFException
           at com.sleepycat.util.RuntimeExceptionWrapper.wrapIfNeeded(RuntimeExceptionWrapper.java:31)
           at com.sleepycat.bind.serial.SerialBinding.entryToObject(SerialBinding.java:137)
           at com.sleepycat.collections.DataView.makeValue(DataView.java:596)
           at com.sleepycat.collections.DataCursor.getCurrentValue(DataCursor.java:350)
           at com.sleepycat.collections.StoredContainer.getValue(StoredContainer.java:304)
           at com.sleepycat.collections.StoredMap.get(StoredMap.java:241)
           at com.test.cached.DataFootprintCache.get(DataFootprintCache.java:94)
           at com.test.dispatcher.DataDispatcher.setFootprint(DataDispatcher.java:100)
           at com.test.dispatcher.ECodeDataDispatcher.setFootprint(ECodeDataDispatcher.java:89)
           at com.test.dispatcher.ECodeDataDispatcher.calc(ECodeDataDispatcher.java:59)
           at com.test.dispatcher.DataDispatcher.run(DataDispatcher.java:67)
           at com.test.dispatcher.ECodeDataDispatcher.main(ECodeDataDispatcher.java:138)
      Caused by: java.io.EOFException
           at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
           at com.sleepycat.bind.serial.SerialBinding.entryToObject(SerialBinding.java:135)
           ... 10 more

      An exception occured when get data from Berkeley DB
        • 1. Re: An exception when get data from Berkeley DB
          795958
          I found the problem,a null object was put into BDB, it cause the error when get the null value
          • 2. Re: An exception when get data from Berkeley DB
            712739
            Hi, Annie,

            Thanks for reporting us this problem. We are doing further investigation for this problem.

            Eric,
            Berkeley DB, Java Edition
            Oracle
            • 3. Re: An exception when get data from Berkeley DB
              712739
              Hi, Annie,

              We think that it is a bug, and the fix will be in a future BDB JE release.

              Thanks again for reporting this problem to us.
              • 4. Re: An exception when get data from Berkeley DB
                880841
                hello,最近我也遇到了这个问题,但是升级到最新jar后还是没有解决,你们能帮帮我么?email:654166020@qq.com

                下面是错误信息:
                com.sleepycat.util.RuntimeExceptionWrapper: java.io.EOFException
                     at com.sleepycat.util.RuntimeExceptionWrapper.wrapIfNeeded(RuntimeExceptionWrapper.java:30)
                     at com.sleepycat.bind.serial.SerialBinding.entryToObject(SerialBinding.java:136)
                     at com.sleepycat.collections.DataView.makeValue(DataView.java:595)
                     at com.sleepycat.collections.StoredEntrySet.makeIteratorData(StoredEntrySet.java:193)
                     at com.sleepycat.collections.StoredEntrySet.makeIteratorData(StoredEntrySet.java:32)
                     at com.sleepycat.collections.BlockIterator.makeDataObject(BlockIterator.java:175)
                     at com.sleepycat.collections.BlockIterator.next(BlockIterator.java:462)
                     at com.alipay.ecmng.impl.SearchFacadeImpl.findByAnyStr(SearchFacadeImpl.java:61)
                     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.alipay.sofa.service.binding.JVMBindingAdapter$JVMServiceInvoker.doInvoke(JVMBindingAdapter.java:69)
                     at com.alipay.sofa.service.model.ServiceProxy.invoke(ServiceProxy.java:35)
                     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
                     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
                     at $Proxy37.findByAnyStr(Unknown Source)
                     at com.alipay.ecmng.web.home.SearchController.seachAllAsJson(SearchController.java:35)
                     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.alipay.sofa.web.mvc.core.servlet.handler.support.AlipayHandlerMethodInvoker.doInvokeMethod(AlipayHandlerMethodInvoker.java:394)
                     at com.alipay.sofa.web.mvc.core.servlet.handler.support.AlipayHandlerMethodInvoker.invokeHandlerMethod(AlipayHandlerMethodInvoker.java:115)
                     at com.alipay.sofa.web.mvc.core.servlet.handler.support.AbstractMethodHandlerAdapter.invokeHandlerMethod(AbstractMethodHandlerAdapter.java:282)
                     at com.alipay.sofa.web.mvc.core.servlet.handler.support.AbstractMethodHandlerAdapter.handle(AbstractMethodHandlerAdapter.java:266)
                     at com.alipay.sofa.web.mvc.core.servlet.mvc.CarHandlerAdapter.handle(CarHandlerAdapter.java:75)
                     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
                     at com.alipay.sofa.runtime.web.smvc.servlet.CarDispatcherServlet.doDispatch(CarDispatcherServlet.java:163)
                     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
                     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
                     at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayGlobalFilter$VirtualFilterChain.doFilter(AlipayGlobalFilter.java:109)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
                     at com.alipay.sofa.web.mvc.security.LoggingContextMDCFilter.doFilterInternal(LoggingContextMDCFilter.java:35)
                     at com.alipay.sofa.web.mvc.common.filter.AbstractBaseFilter.doFilter(AbstractBaseFilter.java:129)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
                     at net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at com.alipay.ecmng.web.home.filter.AuthTokenProcessingFilter.doFilter(AuthTokenProcessingFilter.java:73)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at com.alipay.sofa.web.mvc.common.session.support.filter.AlipaySessionRequestFilter.doFilterInternal(AlipaySessionRequestFilter.java:49)
                     at com.alipay.sofa.web.mvc.common.filter.AbstractBaseFilter.doFilter(AbstractBaseFilter.java:129)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at com.alipay.service.security.acegi.filter.OperationEnvironmentIntegrationFilter.doFilter(OperationEnvironmentIntegrationFilter.java:85)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at com.alipay.sofa.web.mvc.security.web.SafeHTTPFilter.doFilterInternal(SafeHTTPFilter.java:100)
                     at com.alipay.sofa.web.mvc.common.filter.AbstractBaseFilter.doFilter(AbstractBaseFilter.java:129)
                     at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
                     at net.sf.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayGlobalFilter$VirtualFilterChain.doFilter(AlipayGlobalFilter.java:126)
                     at com.alipay.sofa.web.mvc.common.filter.log.CommonLog4jMDCInitFilter.doFilterInternal(CommonLog4jMDCInitFilter.java:55)
                     at com.alipay.sofa.web.mvc.common.filter.AbstractBaseFilter.doFilter(AbstractBaseFilter.java:129)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayGlobalFilter$VirtualFilterChain.doFilter(AlipayGlobalFilter.java:126)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayCharacterEncodingFilter.doFilterInternal(AlipayCharacterEncodingFilter.java:79)
                     at com.alipay.sofa.web.mvc.common.filter.AbstractBaseFilter.doFilter(AbstractBaseFilter.java:129)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayGlobalFilter$VirtualFilterChain.doFilter(AlipayGlobalFilter.java:126)
                     at com.alipay.sofa.web.mvc.common.filter.profiler.AlipayTimerFilter.doFilterInternal(AlipayTimerFilter.java:69)
                     at com.alipay.sofa.web.mvc.common.filter.AbstractBaseFilter.doFilter(AbstractBaseFilter.java:129)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayGlobalFilter$VirtualFilterChain.doFilter(AlipayGlobalFilter.java:126)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayGlobalFilter.doFilter(AlipayGlobalFilter.java:70)
                     at com.alipay.sofa.web.mvc.common.filter.AlipayDelegatingFilterProxy.doFilter(AlipayDelegatingFilterProxy.java:59)
                     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
                     at com.alipay.sofa.web.integrator.commons.test.JettyQueryStringEncodingFilter.doFilter(JettyQueryStringEncodingFilter.java:69)
                     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
                     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
                     at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
                     at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
                     at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
                     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
                     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
                     at org.mortbay.jetty.Server.handle(Server.java:313)
                     at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
                     at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
                     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
                     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
                     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
                     at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:227)
                     at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
                Caused by: java.io.EOFException
                     at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
                     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
                     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                     at com.sleepycat.bind.serial.SerialBinding.entryToObject(SerialBinding.java:134)
                     ... 86 more
                • 5. Re: An exception when get data from Berkeley DB
                  Greybird-Oracle
                  If you are passing 'null' for the key or value to be serialized, you will get this exception as described above in this thread. This has been fixed for a future release. For the current release you cannot use null with the collections API; you will be able to write the record, but you will not be able to read it.

                  If you are experiencing a different problem, please start a new OTN thread in this forum and specify:
                  + version of JE,
                  + steps to create the problem,
                  + preferably a small program to reproduce the problem.

                  --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                  • 6. Re: An exception when get data from Berkeley DB
                    Greybird-Oracle
                    For future reference, the fix for this problem will be referenced as ticket [#18633] in a future release.

                    (You can't look up this ticket because our bug DB is not public, I include it only because it will be listed in the change log of the future release.)

                    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                    • 7. Re: An exception when get data from Berkeley DB
                      880841
                      谢谢,你说的很对,是因为value为null引起的,昨天已经将这条有问题的数据给剔除掉了,谢谢你的回复,非常高兴!!