Problem with initiate the graphopper

For initiating the graphhopper, In past i import the shape file or osm file by this method:
Now i want to import the table from the PostgreSQL as my Source File
I write a reader for PostgreSQL and open the database connection in this reader and pass my goal table as “FeatureSource”.
I write the below code for connection to database but datastore object is null
AbstractDataStoreFactory dataStoreFactory = new PostgisNGDataStoreFactory();
Map<String, Serializable> params = Maps.newHashMap();
params.put(PostgisNGDataStoreFactory.DBTYPE.key, “postgis”);
params.put(PostgisNGDataStoreFactory.HOST.key, “”);
params.put(PostgisNGDataStoreFactory.PORT.key, “5432”);
params.put(PostgisNGDataStoreFactory.SCHEMA.key, “public”);
params.put(PostgisNGDataStoreFactory.DATABASE.key, “t1”);
params.put(PostgisNGDataStoreFactory.USER.key, “postgres”);
params.put(PostgisNGDataStoreFactory.PASSWD.key, “****”);
params.put(PostgisNGDataStoreFactory.FETCHSIZE.key, 1000);
params.put(PostgisNGDataStoreFactory.EXPOSE_PK.key, true);
DataStore dataStore;
try {
dataStore= dataStoreFactory.createDataStore(params); } catch (IOException e) {
throw new CommandFailedException(
“Unable to connect using the specified database parameters.”, e);
if (dataStore == null) {
throw new CommandFailedException(
“Unable to connect using the specified database parameters.”);

Best Regards

Again, please do not post duplicates just because no one is answering. Your question is just too broad. Try go ahead implementing it (or hire someone) and ask for specific questions. How can i read routing information from database directly