Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projects Not Listing: JDOUserException Logged #764

Closed
2 tasks done
msymons opened this issue Mar 7, 2024 · 0 comments · Fixed by #767
Closed
2 tasks done

Projects Not Listing: JDOUserException Logged #764

msymons opened this issue Mar 7, 2024 · 0 comments · Fixed by #767
Assignees
Labels
defect Something isn't working
Milestone

Comments

@msymons
Copy link
Member

msymons commented Mar 7, 2024

Current Behavior

Starting around end of February 2024 (and still continuing) , a server running 4.11.0-SNAPSHOT stopped listing projects on the projects page.

image

When the page is accessed via the UI, the log reports:

2024-02-28 12:43:46,514 INFO [ProjectMetricsUpdateTask] Executing metrics update for project 1439fce3-5004-4998-b50f-b0fb66cff328
2024-02-28 12:51:02,388 ERROR [GlobalExceptionHandler] Uncaught internal server error
javax.jdo.JDOUserException: Field org.dependencytrack.model.Project.metrics is not marked as persistent so cannot be queried
	at org.datanucleus.api.jdo.JDOAdapter.getJDOExceptionForNucleusException(JDOAdapter.java:698)
	at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:456)
	at org.datanucleus.api.jdo.JDOQuery.executeWithMap(JDOQuery.java:331)
	at alpine.persistence.AbstractAlpineQueryManager.execute(AbstractAlpineQueryManager.java:241)
	at org.dependencytrack.persistence.ProjectQueryManager.getProjects(ProjectQueryManager.java:127)
	at org.dependencytrack.persistence.QueryManager.getProjects(QueryManager.java:356)
	at org.dependencytrack.resources.v1.ProjectResource.getProjects(ProjectResource.java:106)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
	at alpine.server.filters.ContentSecurityPolicyFilter.doFilter(ContentSecurityPolicyFilter.java:225)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
	at alpine.server.filters.ClickjackingFilter.doFilter(ClickjackingFilter.java:93)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
	at alpine.server.filters.WhitelistUrlFilter.doFilter(WhitelistUrlFilter.java:166)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:598)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
	at org.eclipse.jetty.server.Server.handle(Server.java:563)
	at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.datanucleus.exceptions.NucleusUserException: Field org.dependencytrack.model.Project.metrics is not marked as persistent so cannot be queried
	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.getSQLTableMappingForPrimaryExpression(QueryToSQLMapper.java:3621)
	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processPrimaryExpression(QueryToSQLMapper.java:3365)
	at org.datanucleus.store.query.expression.AbstractExpressionEvaluator.compilePrimaryExpression(AbstractExpressionEvaluator.java:183)
	at org.datanucleus.store.query.expression.AbstractExpressionEvaluator.compileUnaryExpression(AbstractExpressionEvaluator.java:172)
	at org.datanucleus.store.query.expression.AbstractExpressionEvaluator.compileAdditiveMultiplicativeExpression(AbstractExpressionEvaluator.java:151)
	at org.datanucleus.store.query.expression.AbstractExpressionEvaluator.compileRelationalExpression(AbstractExpressionEvaluator.java:126)
	at org.datanucleus.store.query.expression.AbstractExpressionEvaluator.compileOrAndExpression(AbstractExpressionEvaluator.java:68)
	at org.datanucleus.store.query.expression.AbstractExpressionEvaluator.evaluate(AbstractExpressionEvaluator.java:36)
	at org.datanucleus.store.query.expression.Expression.evaluate(Expression.java:338)
	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileOrdering(QueryToSQLMapper.java:1286)
	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:502)
	at org.datanucleus.store.rdbms.query.JDOQLQuery.compileQueryFull(JDOQLQuery.java:935)
	at org.datanucleus.store.rdbms.query.JDOQLQuery.compileInternal(JDOQLQuery.java:376)
	at org.datanucleus.store.query.Query.executeQuery(Query.java:1965)
	at org.datanucleus.store.query.Query.executeWithMap(Query.java:1911)
	at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:437)
	... 73 common frames omitted

The above snippet from logs was the first occurrence but the exceptions are still occurring using:

Dependency-Track v4.11.0-SNAPSHOT
Build ID: dc6d7142-07db-4329-8523-a9621c9bfe00
Built On: 6 Mar 2024 at 10:11:24
Frontend v4.10.0
Build ID: 7cfce3c3-b30c-4d6f-bc88-38a2c32a80fe
Built On: 5 Mar 2024 at 18:38:54 

Steps to Reproduce

I know exactly what I was doing when the problem first occurred. I wanted to test Frontend issue #630 (Project Screen: Add Component Count Column). I enabled the components (count) column and could see counts. ie, at that moment the project screen was working.

Then I clicked to sort the components column and that is when the listing went blank. Now I cannot display anything at all no matter what I do (ie, I tried turning the components column off).

Expected Behavior

Project page displays project listing.

Dependency-Track Frontend Version

4.11.0-SNAPSHOT

Browser

Mozilla Firefox

Browser Version

123.0.1

Operating System

Windows

Checklist

@msymons msymons added defect Something isn't working in triage labels Mar 7, 2024
@nscuro nscuro self-assigned this Mar 7, 2024
@nscuro nscuro added this to the 4.11 milestone Mar 7, 2024
@nscuro nscuro removed the in triage label Mar 7, 2024
nscuro added a commit to nscuro/dependency-track-frontend that referenced this issue Mar 7, 2024
Unfortunately, due to technical limitations, it's not possible to sort by the number of components on the server-side.

Fixes DependencyTrack#764

Signed-off-by: nscuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants