WSO2 API Manager: chpasswd.sh does not work when u

2019-09-09 13:53发布

问题:

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