Project

General

Profile

bug #8664

SQLGrammarException when opening Specimen selection

Added by Patrick Plitzner 14 days ago. Updated 9 days ago.

Status:
Closed
Priority:
New
Category:
taxeditor
Target version:
Start date:
11/07/2019
Due date:
% Done:

100%

Severity:
normal
Found in Version:
Tags:

Description

… for „Test WorkingSet“ in MatrixEditor

login : admin

editor version : 5.11.0.201911041248

server : test.e-taxonomy.eu (edit-test) / rem_conf_am

schema version : 5.11.0.0.20191104

os : Windows Server 2012 R2 6.3 amd64

java : 1.8.0_121

org.hibernate.exception.SQLGrammarException: could not extract ResultSet

                at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)

                at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)

                at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)

                at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)

                at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79)

                at org.hibernate.loader.Loader.getResultSet(Loader.java:2116)

                at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899)

                at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875)

                at org.hibernate.loader.Loader.doQuery(Loader.java:919)

                at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)

                at org.hibernate.loader.Loader.doList(Loader.java:2611)

                at org.hibernate.loader.Loader.doList(Loader.java:2594)

                at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423)

                at org.hibernate.loader.Loader.list(Loader.java:2418)

                at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)

                at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)

                at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)

                at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326)

                at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)

                at eu.etaxonomy.cdm.persistence.dao.hibernate.occurrence.OccurrenceDaoHibernateImpl.querySpecimen(OccurrenceDaoHibernateImpl.java:547)

                at eu.etaxonomy.cdm.persistence.dao.hibernate.occurrence.OccurrenceDaoHibernateImpl.queryIndividualAssociatedSpecimen(OccurrenceDaoHibernateImpl.java:581)

                at eu.etaxonomy.cdm.persistence.dao.hibernate.occurrence.OccurrenceDaoHibernateImpl.listUuidAndTitleCacheByAssociatedTaxon(OccurrenceDaoHibernateImpl.java:642)

                at eu.etaxonomy.cdm.api.service.OccurrenceServiceImpl.listUuidAndTitleCacheByAssociatedTaxon(OccurrenceServiceImpl.java:373)

                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:498)

                at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

                at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

                at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)

                at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)

                at com.sun.proxy.$Proxy687.listUuidAndTitleCacheByAssociatedTaxon(Unknown Source)

                at eu.etaxonomy.cdm.api.service.DescriptiveDataSetService.loadSpecimens(DescriptiveDataSetService.java:152)

                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:498)

                at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

                at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

                at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)

                at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)

                at com.sun.proxy.$Proxy719.loadSpecimens(Unknown Source)

                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:498)

                at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

                at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:78)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)

                at com.sun.proxy.$Proxy1192.loadSpecimens(Unknown Source)

                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:498)

                at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212)

                at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:39)

                at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)

                at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)

                at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:74)

                at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)

                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)

                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)

                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)

                at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

                at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)

                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)

                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)

                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:213)

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

                at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)

                at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)

                at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

                at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)

                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)

                at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)

                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)

                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)

                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)

                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)

                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)

                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

                at org.eclipse.jetty.server.Server.handle(Server.java:497)

                at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)

                at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

                at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)

                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

                at java.lang.Thread.run(Thread.java:748)

                at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:45)

                at org.springframework.remoting.support.RemoteInvocationResult.recreate(RemoteInvocationResult.java:149)

                at org.springframework.remoting.support.RemoteInvocationBasedAccessor.recreateRemoteInvocationResult(RemoteInvocationBasedAccessor.java:85)

                at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)

                at com.sun.proxy.$Proxy48.loadSpecimens(Unknown Source)

                at eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.SpecimenSelectionDialog.loadSpecimens(SpecimenSelectionDialog.java:196)

                at eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.SpecimenSelectionDialog.createDialogArea(SpecimenSelectionDialog.java:160)

                at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:767)

                at org.eclipse.jface.window.Window.create(Window.java:426)

                at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1095)

                at org.eclipse.jface.window.Window.open(Window.java:783)

                at eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrixBottomToolbar$1.widgetSelected(CharacterMatrixBottomToolbar.java:94)

                at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)

                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)

                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)

                at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)

                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)

                at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)

                at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)

                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)

                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)

                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)

                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:498)

                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)

                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)

                at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1

                at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)

                at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

                at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

                at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:970)

                at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1020)

                at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:353)

                at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)

                ... 167 more

Associated revisions

Revision 46a006fa (diff)
Added by Patrick Plitzner 13 days ago

ref #8450 Fix SQLGrammarException when no taxa could be found

History

#1 Updated by Andreas Müller 13 days ago

I guess an empty list was the reason here. Isn't this fixed yet? If not I guess it is very easy to fix and we should think about doing it in 5.11 still.

#2 Updated by Patrick Plitzner 13 days ago

  • Status changed from New to Resolved
  • Target version changed from Additivity experimental to Release 5.11
  • % Done changed from 0 to 50

#3 Updated by Patrick Plitzner 13 days ago

  • Assignee changed from Patrick Plitzner to Andreas Müller

#4 Updated by Andreas Müller 13 days ago

  • % Done changed from 50 to 80

I can't currently review as the accoding DB can't be connected to via TaxEditor at the moment. But code looks ok. I will do the final review once connection works again.

#5 Updated by Andreas Müller 9 days ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Patrick Plitzner
  • % Done changed from 80 to 100

I tested again and it seems to work now.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)