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 2022/10/10 06:32:21 UTC

[GitHub] [shardingsphere] 837414750 opened a new issue, #20870: The custom primary key generation policy SPI was not registered successfully

837414750 opened a new issue, #20870:
URL: https://github.com/apache/shardingsphere/issues/20870

   ## Question
   `public class KeyGenerator implements ShardingKeyGenerator {
   
       private SnowflakeShardingKeyGenerator snow = new SnowflakeShardingKeyGenerator();
   
       @Override
       public Comparable<?> generateKey() {
           //return getCurrentDateKey() + snow.generateKey();
           return snow.generateKey();
       }
   
       @Override
       public String getType() {
           return "TRAINKEY";
       }
   
       @Override
       public Properties getProperties() {
           return null;
       }
   
       @Override
       public void setProperties(Properties properties) {
   
       }
   }`
   ![image](https://user-images.githubusercontent.com/29977320/189030019-81e080e7-670b-4c8c-91d8-c39839397365.png)
   ![image](https://user-images.githubusercontent.com/29977320/189030118-1bb31f1a-ed94-400c-8e1d-1e2c20cba7bf.png)
   --
   Startup error:
   Caused by: java.lang.RuntimeException: Invalid `org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator` SPI type `TRAINKEY`.
   	at org.apache.shardingsphere.spi.TypeBasedSPIServiceLoader.newService(TypeBasedSPIServiceLoader.java:46)
   	at org.apache.shardingsphere.core.rule.TableRule.<init>(TableRule.java:113)
   	at org.apache.shardingsphere.core.rule.ShardingRule.lambda$createTableRules$0(ShardingRule.java:91)
   	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
   	at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
   	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
   	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
   	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
   	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
   
   Please help
   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] closed issue #20870: The custom primary key generation policy SPI was not registered successfully

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #20870: The custom primary key generation policy SPI was not registered successfully
URL: https://github.com/apache/shardingsphere/issues/20870


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] RaigorJiang closed issue #20870: The custom primary key generation policy SPI was not registered successfully

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #20870: The custom primary key generation policy SPI was not registered successfully
URL: https://github.com/apache/shardingsphere/issues/20870


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] RaigorJiang commented on issue #20870: The custom primary key generation policy SPI was not registered successfully

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #20870:
URL: https://github.com/apache/shardingsphere/issues/20870#issuecomment-1407553413

   The following information cannot be obtained from the issue description:
   - Are you using ShardingSphere-JDBC or ShardingSphere-Proxy?
   - What version are you using?
   
   Please follow the issue template to submit information in order to get help, thank you.
   
   ---
   Considering this issue has been inactive for a long time, I'm closing it now.
   If you still have the same problem, please reopen it or submit a new one


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] commented on issue #20870: The custom primary key generation policy SPI was not registered successfully

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20870:
URL: https://github.com/apache/shardingsphere/issues/20870#issuecomment-1272348559

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org