You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/11/12 03:02:39 UTC
[GitHub] [incubator-shardingsphere] cjml1982 opened a new issue #3503: dataencrypt feature with “java.sql.SQLDataException: Cannot determine value type from string 'NO'”
cjml1982 opened a new issue #3503: dataencrypt feature with “java.sql.SQLDataException: Cannot determine value type from string 'NO'”
URL: https://github.com/apache/incubator-shardingsphere/issues/3503
## Bug Report
Hi I wanna use the data encrypt featur . I have try 4.0.0-RC2 the encrypt feature OK, but I encounter 2 issues. one is if the plain field is null , there would be output NULL exception, another one is if there is text field , also can't works . https://github.com/apache/incubator-shardingsphere/issues/3017
those two issue would be released in 4.0.0-RC3, I download the source code , and maven install by myself. the two issues seams resolved , but a new issue occured.
Before report a bug, make sure you have:
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
4.0.0-RC3
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
sharding-jdbc
### Expected behavior
encrypt feature work well in my product env.
### Actual behavior
java project initial failed, exception occured, data source connect failed,
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
LOG:
Caused by: java.sql.SQLDataException: Cannot determine value type from string 'NO'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:114)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:96)
at com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1382)
at com.mysql.cj.jdbc.result.ResultSetImpl.getBoolean(ResultSetImpl.java:663)
at com.mysql.cj.jdbc.result.ResultSetImpl.getBoolean(ResultSetImpl.java:669)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.context.EncryptRuntimeContext.getColumnMetaDataList(EncryptRuntimeContext.java:95)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.context.EncryptRuntimeContext.createEncryptTableMetas(EncryptRuntimeContext.java:72)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.context.EncryptRuntimeContext.<init>(EncryptRuntimeContext.java:64)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.EncryptDataSource.<init>(EncryptDataSource.java:42)
at org.apache.shardingsphere.shardingjdbc.api.EncryptDataSourceFactory.createDataSource(EncryptDataSourceFactory.java:48)
at org.apache.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration.encryptDataSource(SpringBootConfiguration.java:123)
at org.apache.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration$$EnhancerBySpringCGLIB$$2c1faa12.CGLIB$encryptDataSource$2(<generated>)
at org.apache.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration$$EnhancerBySpringCGLIB$$2c1faa12$$FastClassBySpringCGLIB$$b7accd0c.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at org.apache.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration$$EnhancerBySpringCGLIB$$2c1faa12.encryptDataSource(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 171 common frames omitted
Caused by: com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from string 'NO'
at com.mysql.cj.result.BooleanValueFactory.createFromBytes(BooleanValueFactory.java:116)
at com.mysql.cj.result.BooleanValueFactory.createFromBytes(BooleanValueFactory.java:47)
at com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeByteArray(MysqlTextValueDecoder.java:132)
at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:196)
at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:241)
at com.mysql.cj.protocol.a.result.TextBufferRow.getValue(TextBufferRow.java:132)
at com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1270)
... 189 common frames omitted
### Example codes for reproduce this issue (such as a github link).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services