ReyYang commented on issue #29401:
URL: 
https://github.com/apache/shardingsphere/issues/29401#issuecomment-1859372570

   > > ```
   > >         // table returns null, causing NPE
   > >        ShardingSphereTable table = schema.getTable(tableName);
   > > ```
   > 
   > Looks table could not be got from schema. Could you debug and take a 
screenshot of `schema` field `Map<String, ShardingSphereTable> tables`?
   > 
   > > mode:
   > > type: Standalone
   > > repository:
   > > type: JDBC
   > 
   > Looks Standalone mode JDBC repository's `jdbc_url` is not defined, the H2 
database is shared by default. Could you try to define `jdbc_url` and test it 
again? e.g.
   > 
   > ```
   > mode:
   >   type: Standalone
   >   repository:
   >     type: JDBC
   >     props:
   >       provider: H2
   >       jdbc_url: 
jdbc:h2:mem:config_random12345;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
   >       username: sa
   >       password:
   > ```
   > 
   > And also define different `jdbc_url` for different sharding-jdbc.yaml 
files.
   
   Here is a screenshot of the schema field map tables
   <img width="932" alt="image" 
src="https://github.com/apache/shardingsphere/assets/29473272/2e7e9e60-93e1-4176-b819-f40e43745fe2";>
   <img width="932" alt="image" 
src="https://github.com/apache/shardingsphere/assets/29473272/1714a625-7c77-4677-9047-f054b6abdc6e";>
   <img width="932" alt="image" 
src="https://github.com/apache/shardingsphere/assets/29473272/c32d270b-44e5-4212-a2b8-cb69f6915034";>
   
   You can see that the table I need isn't in this list, I think it's because I 
didn't get the ```schema``` I needed when I got the``` schema```
   
   About the jdbc_url of H2 I see that a default address is configured for it 
in the JDBCRepository, is it still needed here?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to