[
https://issues.apache.org/jira/browse/GUACAMOLE-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17034747#comment-17034747
]
Nick Couchman commented on GUACAMOLE-942:
-----------------------------------------
So, gathering what I believe are the relevant bits (toward the bottom):
{code:java}
23:01:46.395 [http-nio-8080-exec-7] DEBUG o.a.i.t.jdbc.JdbcTransaction -
Setting autocommit to false on JDBC Connection
[com.mysql.jdbc.JDBC4Connection@3f6d70b6]
23:01:46.395 [http-nio-8080-exec-7] DEBUG o.a.g.a.j.c.C.selectReadable - ==>
Preparing: SELECT guacamole_connection.connection_id,
guacamole_connection.connection_name, parent_id, protocol, max_connections,
max_connections_per_user, proxy_hostname, proxy_port, proxy_encryption_method,
connection_weight, failover_only, MAX(start_date) AS last_active FROM
guacamole_connection JOIN guacamole_connection_permission ON
guacamole_connection_permission.connection_id =
guacamole_connection.connection_id LEFT JOIN guacamole_connection_history ON
guacamole_connection_history.connection_id = guacamole_connection.connection_id
WHERE guacamole_connection.connection_id IN AND (
guacamole_connection_permission.entity_id = ? OR
guacamole_connection_permission.entity_id IN ( SELECT
guacamole_entity.entity_id FROM guacamole_entity JOIN guacamole_user_group ON
guacamole_user_group.entity_id = guacamole_entity.entity_id WHERE type =
'USER_GROUP' AND name IN ( ? ) AND disabled = false ) ) AND permission = 'READ'
GROUP BY guacamole_connection.connection_id; SELECT primary_connection_id,
guacamole_sharing_profile.sharing_profile_id FROM guacamole_sharing_profile
JOIN guacamole_sharing_profile_permission ON
guacamole_sharing_profile_permission.sharing_profile_id =
guacamole_sharing_profile.sharing_profile_id WHERE primary_connection_id IN AND
( entity_id = ? OR entity_id IN ( SELECT guacamole_entity.entity_id FROM
guacamole_entity JOIN guacamole_user_group ON guacamole_user_group.entity_id =
guacamole_entity.entity_id WHERE type = 'USER_GROUP' AND name IN ( ? ) AND
disabled = false ) ) AND permission = 'READ'; SELECT
guacamole_connection_attribute.connection_id, attribute_name, attribute_value
FROM guacamole_connection_attribute JOIN guacamole_connection_permission ON
guacamole_connection_permission.connection_id =
guacamole_connection_attribute.connection_id WHERE
guacamole_connection_attribute.connection_id IN AND ( entity_id = ? OR
entity_id IN ( SELECT guacamole_entity.entity_id FROM guacamole_entity JOIN
guacamole_user_group ON guacamole_user_group.entity_id =
guacamole_entity.entity_id WHERE type = 'USER_GROUP' AND name IN ( ? ) AND
disabled = false ) ) AND permission = 'READ';
23:01:46.395 [http-nio-8080-exec-7] DEBUG o.a.g.a.j.c.C.selectReadable - ==>
Parameters: 7(Integer), Familie(String), 7(Integer), Familie(String),
7(Integer), Familie(String)
23:01:46.402 [http-nio-8080-exec-7] DEBUG o.a.i.t.jdbc.JdbcTransaction -
Resetting autocommit to true on JDBC Connection
[com.mysql.jdbc.JDBC4Connection@3f6d70b6]
23:01:46.406 [http-nio-8080-exec-7] DEBUG o.a.i.t.jdbc.JdbcTransaction -
Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@3f6d70b6]
23:01:46.406 [http-nio-8080-exec-7] DEBUG o.a.i.d.pooled.PooledDataSource -
Testing connection 1064136886 ...
23:01:46.417 [http-nio-8080-exec-7] DEBUG o.a.i.d.pooled.PooledDataSource -
Connection 1064136886 is GOOD!
23:01:46.417 [http-nio-8080-exec-7] DEBUG o.a.i.d.pooled.PooledDataSource -
Returned connection 1064136886 to pool.
23:01:46.417 [http-nio-8080-exec-7] ERROR o.a.g.rest.RESTExceptionMapper -
Unexpected internal error:
### Error querying database. Cause:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in
your SQL syntax; check the manual that corresponds to your MariaDB server
version for the right syntax to use near 'AND
(
guacamole_connection_permission.entity_id = 7
' at line 19
### The error may exist in
org/apache/guacamole/auth/jdbc/connection/ConnectionMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT guacamole_connection.connection_id,
guacamole_connection.connection_name, parent_id,
protocol, max_connections, max_connections_per_user,
proxy_hostname, proxy_port,
proxy_encryption_method, connection_weight,
failover_only, MAX(start_date) AS last_active FROM
guacamole_connection JOIN guacamole_connection_permission ON
guacamole_connection_permission.connection_id =
guacamole_connection.connection_id LEFT JOIN
guacamole_connection_history ON guacamole_connection_history.connection_id =
guacamole_connection.connection_id WHERE
guacamole_connection.connection_id IN AND (
guacamole_connection_permission.entity_id = ?
OR guacamole_connection_permission.entity_id IN (
SELECT guacamole_entity.entity_id FROM guacamole_entity
JOIN guacamole_user_group ON guacamole_user_group.entity_id =
guacamole_entity.entity_id WHERE
type = 'USER_GROUP' AND name IN
( ? )
AND disabled = false )
) AND permission = 'READ' GROUP BY
guacamole_connection.connection_id; SELECT primary_connection_id,
guacamole_sharing_profile.sharing_profile_id FROM
guacamole_sharing_profile JOIN guacamole_sharing_profile_permission ON
guacamole_sharing_profile_permission.sharing_profile_id =
guacamole_sharing_profile.sharing_profile_id WHERE
primary_connection_id IN AND (
entity_id = ? OR entity_id IN (
SELECT guacamole_entity.entity_id FROM guacamole_entity
JOIN guacamole_user_group ON guacamole_user_group.entity_id =
guacamole_entity.entity_id WHERE
type = 'USER_GROUP' AND name IN
( ? )
AND disabled = false )
) AND permission = 'READ'; SELECT
guacamole_connection_attribute.connection_id, attribute_name,
attribute_value FROM guacamole_connection_attribute JOIN
guacamole_connection_permission ON
guacamole_connection_permission.connection_id =
guacamole_connection_attribute.connection_id WHERE
guacamole_connection_attribute.connection_id IN AND
( entity_id = ? OR entity_id
IN ( SELECT guacamole_entity.entity_id
FROM guacamole_entity JOIN guacamole_user_group ON
guacamole_user_group.entity_id = guacamole_entity.entity_id
WHERE type = 'USER_GROUP' AND
name IN ( ?
) AND disabled = false
) ) AND permission = 'READ';
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have
an error in your SQL syntax; check the manual that corresponds to your MariaDB
server version for the right syntax to use near 'AND
(
guacamole_connection_permission.entity_id = 7
' at line 19
23:01:46.423 [http-nio-8080-exec-7] DEBUG o.a.g.rest.RESTExceptionMapper -
Unexpected error in REST endpoint.
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in
your SQL syntax; check the manual that corresponds to your MariaDB server
version for the right syntax to use near 'AND
(
guacamole_connection_permission.entity_id = 7
' at line 19
### The error may exist in
org/apache/guacamole/auth/jdbc/connection/ConnectionMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT guacamole_connection.connection_id,
guacamole_connection.connection_name, parent_id,
protocol, max_connections, max_connections_per_user,
proxy_hostname, proxy_port,
proxy_encryption_method, connection_weight,
failover_only, MAX(start_date) AS last_active FROM
guacamole_connection JOIN guacamole_connection_permission ON
guacamole_connection_permission.connection_id =
guacamole_connection.connection_id LEFT JOIN
guacamole_connection_history ON guacamole_connection_history.connection_id =
guacamole_connection.connection_id WHERE
guacamole_connection.connection_id IN AND (
guacamole_connection_permission.entity_id = ?
OR guacamole_connection_permission.entity_id IN (
SELECT guacamole_entity.entity_id FROM guacamole_entity
JOIN guacamole_user_group ON guacamole_user_group.entity_id =
guacamole_entity.entity_id WHERE
type = 'USER_GROUP' AND name IN
( ? )
AND disabled = false )
) AND permission = 'READ' GROUP BY
guacamole_connection.connection_id; SELECT primary_connection_id,
guacamole_sharing_profile.sharing_profile_id FROM
guacamole_sharing_profile JOIN guacamole_sharing_profile_permission ON
guacamole_sharing_profile_permission.sharing_profile_id =
guacamole_sharing_profile.sharing_profile_id WHERE
primary_connection_id IN AND (
entity_id = ? OR entity_id IN (
SELECT guacamole_entity.entity_id FROM guacamole_entity
JOIN guacamole_user_group ON guacamole_user_group.entity_id =
guacamole_entity.entity_id WHERE
type = 'USER_GROUP' AND name IN
( ? )
AND disabled = false )
) AND permission = 'READ'; SELECT
guacamole_connection_attribute.connection_id, attribute_name,
attribute_value FROM guacamole_connection_attribute JOIN
guacamole_connection_permission ON
guacamole_connection_permission.connection_id =
guacamole_connection_attribute.connection_id WHERE
guacamole_connection_attribute.connection_id IN AND
( entity_id = ? OR entity_id
IN ( SELECT guacamole_entity.entity_id
FROM guacamole_entity JOIN guacamole_user_group ON
guacamole_user_group.entity_id = guacamole_entity.entity_id
WHERE type = 'USER_GROUP' AND
name IN ( ?
) AND disabled = false
) ) AND permission = 'READ';
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have
an error in your SQL syntax; check the manual that corresponds to your MariaDB
server version for the right syntax to use near 'AND
(
guacamole_connection_permission.entity_id = 7
' at line 19
at
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
~[na:na]
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
~[na:na]
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
~[na:na]
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown
Source) ~[na:na]
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at
org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:357)
~[na:na]
at com.sun.proxy.$Proxy32.selectList(Unknown Source) ~[na:na]
at
org.apache.ibatis.session.SqlSessionManager.selectList(SqlSessionManager.java:206)
~[na:na]
at
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139)
~[na:na]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76)
~[na:na]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
~[na:na]
at com.sun.proxy.$Proxy120.selectReadable(Unknown Source) ~[na:na]
at
org.apache.guacamole.auth.jdbc.tunnel.AbstractGuacamoleTunnelService.getActiveConnections(AbstractGuacamoleTunnelService.java:642)
~[na:na]
at
org.apache.guacamole.auth.jdbc.activeconnection.ActiveConnectionService.retrieveObjects(ActiveConnectionService.java:88)
~[na:na]
at
org.apache.guacamole.auth.jdbc.activeconnection.ActiveConnectionDirectory.getAll(ActiveConnectionDirectory.java:53)
~[na:na]
at
org.apache.guacamole.tunnel.UserTunnel.getActiveConnection(UserTunnel.java:100)
~[classes/:na]
at
org.apache.guacamole.rest.tunnel.TunnelResource.getActiveConnection(TunnelResource.java:99)
~[classes/:na]
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:na]
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:na]
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.dispatch(SubLocatorRule.java:190)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.invokeSubLocator(SubLocatorRule.java:183)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:110)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
~[jersey-server-1.17.1.jar:1.17.1]
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
~[jersey-servlet-1.17.1.jar:1.17.1]
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
~[jersey-servlet-1.17.1.jar:1.17.1]
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
~[jersey-servlet-1.17.1.jar:1.17.1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
~[servlet-api.jar:na]
at
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
~[guice-servlet-3.0.jar:na]
at
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
~[guice-servlet-3.0.jar:na]
at
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
~[guice-servlet-3.0.jar:na]
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
~[guice-servlet-3.0.jar:na]
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
~[guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
~[guice-servlet-3.0.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
~[catalina.jar:9.0.30]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
~[catalina.jar:9.0.30]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
~[catalina.jar:9.0.30]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
~[catalina.jar:9.0.30]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
~[catalina.jar:9.0.30]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
~[catalina.jar:9.0.30]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
~[catalina.jar:9.0.30]
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
~[catalina.jar:9.0.30]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
~[catalina.jar:9.0.30]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
~[catalina.jar:9.0.30]
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
~[tomcat-coyote.jar:9.0.30]
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
~[tomcat-coyote.jar:9.0.30]
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
~[tomcat-coyote.jar:9.0.30]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
~[tomcat-coyote.jar:9.0.30]
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
~[tomcat-coyote.jar:9.0.30]
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
~[na:na]
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
~[na:na]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
~[tomcat-util.jar:9.0.30]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have
an error in your SQL syntax; check the manual that corresponds to your MariaDB
server version for the right syntax to use near 'AND
(
guacamole_connection_permission.entity_id = 7
' at line 19
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) ~[na:na]
at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
~[na:na]
at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
~[na:na]
at
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
~[na:na]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[na:na]
at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[na:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
~[na:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976) ~[na:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) ~[na:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) ~[na:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) ~[na:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
~[na:na]
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
~[na:na]
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197) ~[na:na]
at jdk.internal.reflect.GeneratedMethodAccessor80.invoke(Unknown
Source) ~[na:na]
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at
org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
~[na:na]
at com.sun.proxy.$Proxy115.execute(Unknown Source) ~[na:na]
at
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)
~[na:na]
at
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
~[na:na]
at
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
~[na:na]
at
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:326)
~[na:na]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
~[na:na]
at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
~[na:na]
at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
~[na:na]
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
~[na:na]
... 66 common frames omitted
23:02:04.995 [pool-1-thread-1] DEBUG o.a.g.rest.auth.HashTokenSessionMap -
Checking for expired sessions...
23:02:04.995 [pool-1-thread-1] DEBUG o.a.g.rest.auth.HashTokenSessionMap -
Session check completed in 0 ms.
{code}
> MySQL JDBC contains an invalid SQL Query (no RDP Start possible)
> ----------------------------------------------------------------
>
> Key: GUACAMOLE-942
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-942
> Project: Guacamole
> Issue Type: Bug
> Components: guacamole-auth-jdbc-mysql
> Affects Versions: 1.1.0
> Environment: CentOS 8
> Tomcat 9.0.30
> Guacamole 1.1.0, freshly upgraded from 0.9.14.
> LDAP backend
> JDBC MySQL connector 5.1.46 to MariaDB.
> Reporter: Stefan Bluhm
> Priority: Major
> Attachments: catalina.zip
>
>
> After logging in and selecting an RDP connection, the connection fails with:
>
> "The remote desktop server is currently not unreachable."...
>
> The catalona.out log shows the following error:
> {code:none}
> 17:02:02.435 [http-nio-8080-exec-3] ERROR o.a.g.rest.RESTExceptionMapper -
> Unexpected internal error:
> ### Error querying database. Cause:
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error
> in your SQL syntax; check the manual that corresponds to your MariaDB server
> version for the right syntax to use near 'AND
> (
> guacamole_connection_permission.entity_id = 7
> ' at line 19
> ### The error may exist in
> org/apache/guacamole/auth/jdbc/connection/ConnectionMapper.xml
> ### The error may involve defaultParameterMap
> ### The error occurred while setting parameters
> ### SQL: SELECT guacamole_connection.connection_id,
> guacamole_connection.connection_name, parent_id, protocol, max_connections,
> max_connections_per_user, proxy_hostname, proxy_port,
> proxy_encryption_method, connection_weight, failover_only, MAX(start_date) AS
> last_active FROM guacamole_connection JOIN guacamole_connection_permission ON
> guacamole_connection_permission.connection_id =
> guacamole_connection.connection_id LEFT JOIN guacamole_connection_history ON
> guacamole_connection_history.connection_id =
> guacamole_connection.connection_id WHERE guacamole_connection.connection_id
> IN AND ( guacamole_connection_permission.entity_id = ? ) AND permission =
> 'READ' GROUP BY guacamole_connection.connection_id; SELECT
> primary_connection_id, guacamole_sharing_profile.sharing_profile_id FROM
> guacamole_sharing_profile JOIN guacamole_sharing_profile_permission ON
> guacamole_sharing_profile_permission.sharing_profile_id =
> guacamole_sharing_profile.sharing_profile_id WHERE primary_connection_id IN
> AND ( entity_id = ? ) AND permission = 'READ'; SELECT
> guacamole_connection_attribute.connection_id, attribute_name, attribute_value
> FROM guacamole_connection_attribute JOIN guacamole_connection_permission ON
> guacamole_connection_permission.connection_id =
> guacamole_connection_attribute.connection_id WHERE
> guacamole_connection_attribute.connection_id IN AND ( entity_id = ? ) AND
> permission = 'READ';
> ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You
> have an error in your SQL syntax; check the manual that corresponds to your
> MariaDB server version for the right syntax to use near 'AND
> (
> guacamole_connection_permission.entity_id = 7
> ' at line 19
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)