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 2021/02/01 09:11:52 UTC

[GitHub] [shardingsphere] huosenyuan opened a new issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

huosenyuan opened a new issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252


   When the springboot project starts, JPA automatically creates a table and prompts for unsupported field types;
   line 5:13 no viable alternative at input 'boolean'


----------------------------------------------------------------
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



[GitHub] [shardingsphere] tuohai666 commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-771536696


   @jingshanglu Can you provide the PR NO. and close this issue?


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan closed issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan closed issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252


   


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773809394


   ~~~
   <dependency>
   	<groupId>org.apache.shardingsphere</groupId>
   	<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
   	<version>5.0.0-RC1-SNAPSHOT</version>
   </dependency>
   <dependency>
   	<groupId>org.apache.shardingsphere</groupId>
   	<artifactId>shardingsphere-sql-parser-hsqldb</artifactId>
   	<version>5.0.0-RC1-SNAPSHOT</version>
   </dependency>
   ~~~
   After I customize the hsql dialect, I execute the query SQL, and a null pointer appears here. This is my modified code. I don't know if it's a bug
   ~~~
   
   package org.apache.shardingsphere.driver.jdbc.core.resultset;
   ...
   /**
    * ShardingSphere result set.
    */
   public final class ShardingSphereResultSet extends AbstractResultSetAdapter {
       
       private final MergedResult mergeResultSet;
       private final Map<String, Integer> columnLabelAndIndexMap;
       
       public ShardingSphereResultSet(final List<ResultSet> resultSets, final MergedResult mergeResultSet, final Statement statement, final ExecutionContext executionContext) throws SQLException {
           super(resultSets, statement, executionContext);
           if (Objects.nonNull(resultSets.get(0))) {
               this.mergeResultSet = mergeResultSet;
               this.columnLabelAndIndexMap = createColumnLabelAndIndexMap( resultSets.get(0).getMetaData());
           } else {
               this.columnLabelAndIndexMap = new HashMap<>();
               this.mergeResultSet = new MergedResult() {
                   @Override
                   public boolean next() throws SQLException {
                       return false;
                   }
   
                   @Override
                   public Object getValue(int columnIndex, Class<?> type) throws SQLException {
                       return null;
                   }
   
                   @Override
                   public Object getCalendarValue(int columnIndex, Class<?> type, Calendar calendar) throws SQLException {
                       return null;
                   }
   
                   @Override
                   public InputStream getInputStream(int columnIndex, String type) throws SQLException {
                       return null;
                   }
   
                   @Override
                   public boolean wasNull() throws SQLException {
                       return true;
                   }
               };
           }
       }
   ~~~


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-771328218


   @huosenyuan you can use 5.0.0-alpha version.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-772332567


   db is HyperSql
   ~~~
   dataSources:
     ds:
       driverClassName: org.hsqldb.jdbc.JDBCDriver
       url: jdbc:hsqldb:file:/opt/db1/testdb1
       username: SA
       password:
   ~~~
   ~~~
                    <dependency>
   			<groupId>org.hsqldb</groupId>
   			<artifactId>hsqldb</artifactId>
   			<version>2.5.1</version>
   		</dependency>
   ~~~


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-771295653


   Whether version 5.0.0 can be released to Maven central warehouse cannot be updated


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-771295653


   Whether version 5.0.0 can be released to Maven central warehouse cannot be updated


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773005071


   @huosenyuan Can you check the version you actually depend on? it is ok when i use 5.0.0-alpha.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-772331445


   use ShardingSphere-JDBC;
   springboot 2.2.2.RELEASE
   ~~~
                    <dependency>
   			<groupId>org.apache.shardingsphere</groupId>
   			<artifactId>shardingsphere-jdbc-core</artifactId>
   			<version>5.0.0-alpha</version>
   		</dependency>
   ~~~
   ~~~
   Hibernate: create table t_job (id bigint not null, birthday bigint, status boolean not null, primary key (id))
   line 1:64 no viable alternative at input 'boolean'
   ~~~
   ~~~
   Hibernate: create table t_job (id bigint not null, birthday bigint, status integer not null, primary key (id))
   16:31:31.902  INFO 34448 --- [           main] ShardingSphere-SQL                       : Logic SQL: create table t_job (id bigint not null, birthday bigint, status integer not null, primary key (id))
   16:31:31.902  INFO 34448 --- [           main] ShardingSphere-SQL                       : SQLStatement: SQL92CreateTableStatement()
   16:31:31.903  INFO 34448 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: create table t_job0 (id bigint not null, birthday bigint, status integer not null, primary key (id))
   16:31:31.903  INFO 34448 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: create table t_job1 (id bigint not null, birthday bigint, status integer not null, primary key (id))
   16:31:31.905 DEBUG 34448 --- [           main] org.hibernate.SQL                        : create index index_job_birthday on t_job (birthday)
   Hibernate: create index index_job_birthday on t_job (birthday)
   line 1:7 no viable alternative at input 'createindex'
   ~~~


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-770752027


    use ShardingSphere-JDBC;
   springboot 2.2.2.RELEASE
   ~~~
            <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
               <version>4.1.1</version>
           </dependency>
   ~~~
   jpa sql is 
   ~~~
   create table t_job (id varchar(50) not null, birthday timestamp not null, done boolean, primary key (id));
   ~~~
   error: no viable alternative at input 'boolean'
   


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-771328218


   @huosenyuan you can use 5.0.0-alpha version.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] tuohai666 commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-770713690


   Please fill in the template:
   
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ### Expected behavior
   
   ### Actual behavior
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### 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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773023218


   db use Mysql is OK;   but db use HyperSql is Not;


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773112982


   @huosenyuan You can refer `shardingsphere-sql-parser-mysql` module.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-770801803


   It has been fixed, plz use 5.0.0.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] tuohai666 commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-771536696


   @jingshanglu Can you provide the PR NO. and close this issue?


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773006269


   @huosenyuan 
   ![image](https://user-images.githubusercontent.com/16559542/106842259-a7dd4080-66de-11eb-93cf-c433af0911f5.png)
   


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773083391


   Your screenshot shows mysql, I use hypersql; can I customize dialect to solve this problem; how can I customize dialec


----------------------------------------------------------------
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



[GitHub] [shardingsphere] jingshanglu commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773112982


   @huosenyuan You can refer `shardingsphere-sql-parser-mysql` module.


----------------------------------------------------------------
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



[GitHub] [shardingsphere] huosenyuan commented on issue #9252: jpa+hsql ; no viable alternative at input 'boolean' ; no viable alternative at input 'time'

Posted by GitBox <gi...@apache.org>.
huosenyuan commented on issue #9252:
URL: https://github.com/apache/shardingsphere/issues/9252#issuecomment-773083391






----------------------------------------------------------------
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