WSO2 API Manager: chpasswd.sh does not work when using external database

北城以北 提交于 2020-01-17 01:18:05

问题


When using the script ./chpasswd.sh to change the admin password, it reads all the jar files to setup a classpath. But it does NOT read the $CARBON_HOME/repository/components/lib/*.jar files. In this directory you put the ojdbc6.jar file when you use a database such as Oracle.

When I copy the ojdbc6.jar file into $CARBON_HOME/repository/lib directory, the script works.

My command is:

./chpasswd.sh --db-url "jdbc:oracle:thin:@localhost:1521:orcl" --db-username wso2carbon -db-password wso2carbon --username admin --new-password nimda

Could this be a bug in the script?


回答1:


Yes.. I guess, according to the script, you can see that it adds following directories as the class path.. It does not contains component/lib. Also once ant script is run, It may not copy the jars in component/lib in to repository/lib.

for f in "$CARBON_HOME"/lib/*.jar do CARBON_CLASSPATH=$CARBON_CLASSPATH:$f done

for g in "$CARBON_HOME"/repository/lib/*.jar do CARBON_CLASSPATH=$CARBON_CLASSPATH:$g done

for h in "$CARBON_HOME"/lib/api/*.jar do CARBON_CLASSPATH=$CARBON_CLASSPATH:$h done



来源:https://stackoverflow.com/questions/22200918/wso2-api-manager-chpasswd-sh-does-not-work-when-using-external-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!