Gaurav
Gaurav

Reputation: 97

API Publisher and Store not displaying API

My wso2registry was pointing to wso2carbon datasource which was configured with h2 db. Other db were configured with mysql. I was getting errors that there are some locks on h2 db and my wso2 server was not starting up .I changed the wso2carbon to point to mysql regdb endpoint. The server started after that. Now the api created earlier in the publisher console are not visible. The api are also not showing up in the store even though the store says that it is listing some 18 apis. If i create the apis again I get a duplicate error. I tried to point the wso2carbon datasource back to the same h2 db but still the publisher and store apis do not come up. Is there a way I can clean up the apis so that I can recreate them with regdb configured with mysql db

Upvotes: 2

Views: 1298

Answers (2)

A_01
A_01

Reputation: 1141

The existing solution given by Bee below did not work for me. Because the file was overwritten with default values every time I restarted my server. Instead I did this.

Go to your Api manager management console 
> Resources 
> Browse 
> Location 
> /_system/local/repository/components/org.wso2.carbon.registry/indexing

Or you can go directly to this url Here you just need to rename it lastaccesstime -> lastaccesstime_old

Screenshot : Screenshot of api mgr mgmt console

Upvotes: 0

Bee
Bee

Reputation: 12512

To see your APIs with H2 database again, reindex the registry.

  1. Change the <lastAccessTimeLocation> element in the <APIM_HOME>/repository/conf/registry.xml file in the Store/Publisher node. For example, change the /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime registry path to /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1.

  2. Restart the server. After a few seconds, it should re-index the APIs.

Upvotes: 1

Related Questions