R repositories not browsable with a PostgreSQL database backend - Sonatype Nexus Repository - Sonatype Community
R repositories not browsable with a PostgreSQL database backend
post by Ralf_Schuchardt on Feb 14, 2025
Ralf Schuchardt
When I configure Nexus (CE, 3.77.1) with a PostgreSQL database, I cannot browse R repositories anymore. Instead an “Database error” is displayed, and the Nexus logfile has the following Exception logged:
2025-02-14 15:53:01,387+0100 ERROR [qtp1706962391-743] admin org.sonatype.nexus.extdirect.internal.ExtDirectExceptionHandler - Failed to invoke action method: coreui_Browse.read, java-method: org.sonatype.nexus.coreui.BrowseComponent.read
org.sonatype.nexus.datastore.api.DataAccessException:
### Error querying database. Cause: java.lang.NumberFormatException: For input string: "conan"
### Cause: java.lang.NumberFormatException: For input string: "conan"
at org.sonatype.nexus.datastore.mybatis.DataAccessSqlSession.unwrapMyBatisException(DataAccessSqlSession.java:125)
at org.sonatype.nexus.datastore.mybatis.DataAccessSqlSession.selectList(DataAccessSqlSession.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:141)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
at jdk.proxy67/jdk.proxy67.$Proxy284.getByDisplayPath(Unknown Source)
at org.sonatype.nexus.repository.content.browse.store.BrowseNodeStore.getByDisplayPath(BrowseNodeStore.java:64)
at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58)
at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
at org.sonatype.nexus.repository.content.browse.store.BrowseNodeManager.getByDisplayPath(BrowseNodeManager.java:67)
at org.sonatype.nexus.repository.content.browse.BrowseFacetImpl.getByDisplayPath(BrowseFacetImpl.java:125)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:298)
at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
at org.sonatype.nexus.repository.content.browse.store.BrowseNodeQueryServiceImpl.lambda$selectByPath$3(BrowseNodeQueryServiceImpl.java:184)
at java.base/java.util.Optional.map(Optional.java:260)
at org.sonatype.nexus.repository.content.browse.store.BrowseNodeQueryServiceImpl.selectByPath(BrowseNodeQueryServiceImpl.java:184)
at org.sonatype.nexus.repository.content.browse.store.BrowseNodeQueryServiceImpl.getByPath(BrowseNodeQueryServiceImpl.java:164)
at org.sonatype.nexus.coreui.BrowseComponent.read(BrowseComponent.java:94)
at com.palominolabs.metrics.guice.ExceptionMeteredInterceptor.invoke(ExceptionMeteredInterceptor.java:23)
at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:26)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native Method)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeJavaMethod(DispatcherBase.java:142)
at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeMethod(DispatcherBase.java:133)
at org.sonatype.nexus.extdirect.internal.ExtDirectDispatcher.invokeMethod(ExtDirectDispatcher.java:82)
at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.dispatch(DispatcherBase.java:63)
at com.softwarementors.extjs.djn.router.processor.standard.StandardRequestProcessorBase.dispatchStandardMethod(StandardRequestProcessorBase.dispatchStandardMethod:73)
at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequest(JsonRequestProcessor.java:502)
at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequestsInThisThread(JsonRequestProcessor.java:150)
at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.process(JsonRequestProcessor.java:133)
at com.softwarementors.extjs.djn.router.RequestRouter.processJsonRequest(RequestRouter.java:83)
at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:632)
at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:595)
at org.sonatype.nexus.extdirect.internal.ExtDirectServlet.doPost(ExtDirectServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.doServiceImpl.java:293)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.doServiceImpl.java:283)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.doServiceImpl.java:184)
at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.executeChain:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.doFilterInternal:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.doFilter(154))
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.doFilter:66)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.executeChain:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.doFilterInternal:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.doFilter(154))
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.doFilter:66)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.executeChain:108)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.doFilter(154))
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.doFilter:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.executeChain:458)
at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.executeChain:96)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter$1.call(373))
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.doCall(90))
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.call(83))
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.execute(387))
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.doFilterInternal(370))
at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.doFilterInternal(112))
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.doFilter(154))
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.doFilter(82))
at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.doFilter(112))
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.doFilter(82))
at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.doFilter(81))
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.doFilter(82))
at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.doFilter(102))
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.doFilter(82))
at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.doFilter(100))
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.doFilter(82))
at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.dispatch(106))
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.doFilter(133))
at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.doFilter(73))
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.doFilter(201))
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler$Chain.doFilter(1626))
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.doHandle(552))
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.handle(143))
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.handle(600))
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.handle(127))
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.nextHandle(235))
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.doHandle(1624))
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.nextHandle(233))
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.doHandle(1440))
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.nextScope(188))
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.doScope(505))
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.doScope(1594))
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.nextScope(186))
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.doScope(1355))
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.handle(141))
at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.handle(239))
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.handle(146))
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.handle(127))
at com.jetty.server.Server.handle(Server.handle(516))
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.lambda$handle$1(487))
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.dispatch(732))
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.handle(479))
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.onFillable(277))
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection$ReadCallback.succeeded(311))
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.fillable(105))
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint$1.run(104))
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.runTask(338))
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.doProduce(315))
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.tryProduce(173))
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.run(131))
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor$ReservedThread.run(409))
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.runJob(883))
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool$Runner.run(1034))
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: java.lang.NumberFormatException: For input string: "conan"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.readJavaFormatString(2054))
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.parseDouble(110))
at java.base/java.lang.Double.parseDouble(Double.parseDouble(651))
at org.apache.ibatis.ognl.OgnlOps.doubleValue(OgnlOps.doubleValue(222))
at org.apache.ibatis.ognl.OgnlOps.compareWithConversion(OgnlOps.compareWithConversion(86))
at org.apache.ibatis.ognl.OgnlOps.isEqual(OgnlOps.isEqual(131))
at org.apache.ibatis.ognl.OgnlOps.equal(OgnlOps.equal(703))
at org.apache.ibatis.ognl.ASTEq.getValueBody(ASTEq.getValueBody(36))
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.evaluateGetValueBody(165))
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.getValue(206))
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.getValue(408))
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.getValue(383))
at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.getValue(47))
at org.apache.ibatis.scripting.xmltags.VarDeclSqlNode.apply(VarDeclSqlNode.apply(33))
at org.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.lambda$apply$0(32))
at java.base/java.util.ArrayList.forEach(ArrayList.forEach(1511))
at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.apply(32))
at java.base/java.util.ArrayList.forEach(ArrayList.forEach(1511))
at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.apply(32))
at java.base/java.util.List.forEach(ArrayList.forEach(1511))
at org.apache.ibatis.scripting.xmltags.VarDeclSqlNode.apply(VarDeclSqlNode.apply(33))
at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.getBoundSql(320))
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.query(88))
at org.sonatype.nexus.datastore.mybatis.EntityExecutor.query(EntityExecutor.query(106))
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.selectList(154))
... 142 common frames omitted
I get this error with a new installation, or an upgraded installation after migrating H2 to PostgreSQL. When I stay on H2 it apparently works.
Has anybody the same issue and found a solution?
post by mpiggott on Feb 14, 2025
Matthew Piggott
If you can, turn on trace logging for com.sonatype.nexus.repository.r.datastore.internal.browse.RBrowseNodeDAO
and capture the output from the log. After triggering the error reset the logger to avoid logging a lot of noise.
If you could then include the query that triggers the error and file it at GitHub · Where software is built
post by Ralf_Schuchardt on Feb 14, 2025
Ralf Schuchardt
For anyone interested, I could solve this by modifying “BrowseNodeDAO.xml” to use an equals method instead of == when comparing “format” with the string “conan".