You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "John Woodlock (Jira)" <ji...@apache.org> on 2022/02/07 00:55:00 UTC

[jira] [Comment Edited] (FINERACT-1478) java.sql.SQLException: 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 '= 'datatable', 'ZZZ', entity_name), entity_name' at line 1

    [ https://issues.apache.org/jira/browse/FINERACT-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487814#comment-17487814 ] 

John Woodlock edited comment on FINERACT-1478 at 2/7/22, 12:54 AM:
-------------------------------------------------------------------

No solution here but testing seems to show that Aleksander in FINERACT-1479 is probably right "I bet this is related to using MariaDB now" and that either the MariaDB jdbc driver or some MariaDB configuration isn't as expected.

Have tried to recreate this issue on the fineract docker image and also local dev from latest github without success (10.6.5-MariaDB) i.e. had no problems.  Hardly likely to be related to localhost vs demo.fineract.dev.

Can easily recreate it on demo.fineract.dev - maybe to do with key works like grouping or office but hard to say.

Attached is a postman file which runs 3 apis  locally and the equivalent 3 on demo.fineract.dev

1. srchtemp local and findev are related to this issue.

2. newrpt local and findev relate to creating a report.  This brings back the key part of the java exception more readily (for demo.fineract.dev
"Unknown data integrity issue with resource: (conn=406597) 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 
'grouping) VALUES ('READ', 0, 'READ_testrpt', 'testrpt', 'report')' at line 1\nQuery is: 
INSERT INTO m_permission (action_name, can_maker_checker, code, entity_name, grouping) VALUES (?, ?, ?, ?, ?), 
parameters ['READ',0,'READ_testrpt','testrpt','report'] {prepstmnt 479777514 
INSERT INTO m_permission (action_name, can_maker_checker, code, entity_name, grouping) VALUES (?, ?, ?, ?, ?)} [code=1064, state=42000]"

 

3. newtable local and findev

But it's not just m_permission reads/inserts as creating a new datatable works on local and findev and that creates permissions too.

Just thought the postman collection might be good for testing if a solution is found.

 [^LocalFineractDemoTest.postman_collection.json]


was (Author: JIRAUSER284767):
No solution here but testing seems to show that Aleksander in FINERACT-1479 is probably right "I bet this is related to using MariaDB now" and that either the MariaDB jdbc driver or some MariaDB configuration isn't as expected.

Have tried to recreate this issue on the fineract docker image and also local dev from latest github without success (10.6.5-MariaDB) i.e. had no problems.  Hardly likely to be related to localhost vs demo.fineract.dev.

Can easily recreate it on demo.fineract.dev - maybe to do with key works like grouping or office but hard to say.

Attached is a postman file which runs 3 apis  locally and the equivalent 3 on demo.fineract.dev

1. srchtemp local and findev are related to this issue.

2. newrpt local and findev relate to creating a report.  This brings back the key part of the java exception more readily (for demo.fineract.dev
"Unknown data integrity issue with resource: (conn=406597) 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 'grouping) VALUES ('READ', 0, 'READ_testrpt', 'testrpt', 'report')' at line 1\nQuery is: INSERT INTO m_permission (action_name, can_maker_checker, code, entity_name, grouping) VALUES (?, ?, ?, ?, ?), parameters ['READ',0,'READ_testrpt','testrpt','report'] \{prepstmnt 479777514 INSERT INTO m_permission (action_name, can_maker_checker, code, entity_name, grouping) VALUES (?, ?, ?, ?, ?)} [code=1064, state=42000]"

 

3. newtable local and findev

But it's not just m_permission reads/inserts as creating a new datatable works on local and findev and that creates permissions too.

Just thought the postman collection might be good for testing if a solution is found.


 [^LocalFineractDemoTest.postman_collection.json]

> java.sql.SQLException: 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 '= 'datatable', 'ZZZ', entity_name), entity_name' at line 1
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-1478
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1478
>             Project: Apache Fineract
>          Issue Type: Bug
>    Affects Versions: 1.6.0
>            Reporter: Michael Vorburger
>            Priority: Blocker
>         Attachments: LocalFineractDemoTest.postman_collection.json
>
>
> See FINERACT-932 for general background; I've found this in logs of https://www.fineract.dev:
> {noformat}java.sql.SQLException: 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 '= 'datatable', 'ZZZ', entity_name), entity_name' at line 1
> at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket (AbstractQueryProtocol.java:1694)
> at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket (AbstractQueryProtocol.java:1556)
> at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult (AbstractQueryProtocol.java:1519)
> at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery (AbstractQueryProtocol.java:256)
> at org.mariadb.jdbc.MariaDbStatement.executeInternal (MariaDbStatement.java:357)
> at org.mariadb.jdbc.MariaDbStatement.executeQuery (MariaDbStatement.java:612)
> at com.zaxxer.hikari.pool.ProxyStatement.executeQuery (ProxyStatement.java:110)
> at com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery (HikariProxyStatement.java)
> at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement (JdbcTemplate.java:452)
> at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:381)
> at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java:465)
> at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java:475)
> at org.apache.fineract.commands.service.AuditReadPlatformServiceImpl.retrieveSearchTemplate (AuditReadPlatformServiceImpl.java:452)
> at org.apache.fineract.commands.api.MakercheckersApiResource.retrieveAuditSearchTemplate (MakercheckersApiResource.java:133)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> 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:124)
> at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke (AbstractJavaResourceMethodDispatcher.java:167)
> at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch (JavaResourceMethodDispatcherProvider.java:219)
> at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch (AbstractJavaResourceMethodDispatcher.java:79)
> at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke (ResourceMethodInvoker.java:475)
> at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply (ResourceMethodInvoker.java:397)
> at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply (ResourceMethodInvoker.java:81)
> at org.glassfish.jersey.server.ServerRuntime$1.run (ServerRuntime.java:255)
> 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:234)
> 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:366)
> at org.glassfish.jersey.servlet.ServletContainer.service (ServletContainer.java:319)
> at org.glassfish.jersey.servlet.ServletContainer.service (ServletContainer.java:205)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:227)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:53)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:189)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.springframework.web.filter.RequestContextFilter.doFilterInternal (RequestContextFilter.java:100)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:189)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:327)
> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke (FilterSecurityInterceptor.java:115)
> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter (FilterSecurityInterceptor.java:81)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:122)
> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:116)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.session.SessionManagementFilter.doFilter (SessionManagementFilter.java:126)
> at org.springframework.security.web.session.SessionManagementFilter.doFilter (SessionManagementFilter.java:81)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter (AnonymousAuthenticationFilter.java:109)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter (SecurityContextHolderAwareRequestFilter.java:149)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter (RequestCacheAwareFilter.java:63)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.apache.fineract.infrastructure.security.filter.InsecureTwoFactorAuthenticationFilter.doFilter (InsecureTwoFactorAuthenticationFilter.java:80)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal (BasicAuthenticationFilter.java:181)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter (LogoutFilter.java:103)
> at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter (LogoutFilter.java:89)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter (HeaderWriterFilter.java:90)
> at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal (HeaderWriterFilter.java:75)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal (BasicAuthenticationFilter.java:181)
> at org.apache.fineract.infrastructure.security.filter.TenantAwareBasicAuthenticationFilter.doFilterInternal (TenantAwareBasicAuthenticationFilter.java:144)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter (SecurityContextPersistenceFilter.java:110)
> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter (SecurityContextPersistenceFilter.java:80)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal (WebAsyncManagerIntegrationFilter.java:55)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter (ChannelProcessingFilter.java:133)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter (FilterChainProxy.java:336)
> at org.springframework.security.web.FilterChainProxy.doFilterInternal (FilterChainProxy.java:211)
> at org.springframework.security.web.FilterChainProxy.doFilter (FilterChainProxy.java:183)
> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate (DelegatingFilterProxy.java:358)
> at org.springframework.web.filter.DelegatingFilterProxy.doFilter (DelegatingFilterProxy.java:271)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:189)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal (WebMvcMetricsFilter.java:96)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:189)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (CharacterEncodingFilter.java:201)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:189)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.springframework.web.filter.ForwardedHeaderFilter.doFilterInternal (ForwardedHeaderFilter.java:156)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:119)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:189)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:162)
> at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:197)
> at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:97)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java:540)
> at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:135)
> at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:92)
> at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:78)
> at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:357)
> at org.apache.coyote.http11.Http11Processor.service (Http11Processor.java:382)
> at org.apache.coyote.AbstractProcessorLight.process (AbstractProcessorLight.java:65)
> at org.apache.coyote.AbstractProtocol$ConnectionHandler.process (AbstractProtocol.java:895)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun (NioEndpoint.java:1722)
> at org.apache.tomcat.util.net.SocketProcessorBase.run (SocketProcessorBase.java:49)
> at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1191)
> at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:659)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run (TaskThread.java:61)
> at java.lang.Thread.run (Thread.java:829){noformat}
> [~ptuomola] or [~aleks] or [~awasum] perhaps digging into and finding a solution for this interests you. (I won't be working on this, I'm just filing issues for what I find in the Fineract.dev logs.)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)