question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NumberFormatException occurred when use `MySQL.NORMAL_REPLICATION`

See original GitHub issue

Master branch https://github.com/apache/shardingsphere/commit/b01c9b3bf5bd44e651649b1e1535884bb6f395f9

Use db-discovery feature - MySQL.NORMAL_REPLICATION

Not set delay-milliseconds-threshold in configuration

Exception in thread "main" java.lang.NumberFormatException: null
	at java.base/java.lang.Long.parseLong(Long.java:655)
	at java.base/java.lang.Long.parseLong(Long.java:817)
	at org.apache.shardingsphere.dbdiscovery.mysql.type.MySQLNormalReplicationDatabaseDiscoveryProviderAlgorithm.loadReplicaStatus(MySQLNormalReplicationDatabaseDiscoveryProviderAlgorithm.java:126)
	at org.apache.shardingsphere.dbdiscovery.algorithm.DatabaseDiscoveryEngine.loadReplicaStatus(DatabaseDiscoveryEngine.java:128)
	at org.apache.shardingsphere.dbdiscovery.algorithm.DatabaseDiscoveryEngine.postReplicaDataSourceDisabledEvent(DatabaseDiscoveryEngine.java:107)
	at org.apache.shardingsphere.dbdiscovery.algorithm.DatabaseDiscoveryEngine.changePrimaryDataSource(DatabaseDiscoveryEngine.java:77)
	at org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule.findPrimaryReplicaRelationship(DatabaseDiscoveryRule.java:122)
	at org.apache.shardingsphere.dbdiscovery.rule.DatabaseDiscoveryRule.<init>(DatabaseDiscoveryRule.java:82)
	at org.apache.shardingsphere.dbdiscovery.rule.builder.DatabaseDiscoveryRuleBuilder.build(DatabaseDiscoveryRuleBuilder.java:47)
	at org.apache.shardingsphere.dbdiscovery.rule.builder.DatabaseDiscoveryRuleBuilder.build(DatabaseDiscoveryRuleBuilder.java:36)
	at org.apache.shardingsphere.infra.rule.builder.database.DatabaseRulesBuilder.build(DatabaseRulesBuilder.java:56)
	at org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase.create(ShardingSphereDatabase.java:75)
	at org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabasesFactory.createGenericDatabases(ShardingSphereDatabasesFactory.java:79)
	at org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabasesFactory.create(ShardingSphereDatabasesFactory.java:67)
	at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.buildMetaDataContexts(ClusterContextManagerBuilder.java:90)
	at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:69)
	at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.createContextManager(BootstrapInitializer.java:66)
	at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:55)
	at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:50)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Oct 8, 2022

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

0reactions
zhaojinchao95commented, Dec 1, 2022

@zhaojinchao95 Is there any progress?

Move to 5.3.1 milestone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve java.lang.NumberFormatException: For input string
I want to insert supplier payment in mysql database.Now the issue is when i try to subtract total balance with total payment and...
Read more >
10 Reasons of java.lang.NumberFormatException in ... - Java67
This error comes when you try to convert a String into numeric data types e.g., int, float, double, long, short, char, or byte....
Read more >
How to Handle the NumberFormat Exception in Java - Rollbar
The NumberFormatException is an unchecked exception in Java that occurs when an attempt is made to convert a string with an incorrect format...
Read more >
java.lang.numberformatexception for input string null
The java.lang.NumberFormatException comes when you try to parse a non-numeric String to a Number like Short, Integer, Float, Double etc.
Read more >
NumberFormatException in Java with Examples
The NumberFormatException occurs when an attempt is made to convert a string with improper format into a numeric value.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found