Friday, November 9, 2012

Exception during startup: org.wso2.andes.server.Broker$InitException: File null could not be found. Check the file exists and is readable.







Exception during startup: org.wso2.andes.server.Broker$InitException: File null could not be found. Check the file exists and is readable.
org.wso2.andes.server.Broker$InitException: File null could not be found. Check the file exists and is readable.
at org.wso2.andes.server.Broker.getConfigFile(Broker.java:323)
at org.wso2.andes.server.Broker.startupImpl(Broker.java:120)
at org.wso2.andes.server.Broker.startup(Broker.java:102)
at org.wso2.andes.server.Main.startBroker(Main.java:227)
at org.wso2.andes.server.Main.execute(Main.java:220)
at org.wso2.andes.server.Main.(Main.java:63)
at org.wso2.andes.server.Main.main(Main.java:53)
.....





You may get the pointed out exception when installed Message Broker features in WSO2 carbon or in any other wso2 products. The root cause for this problem is missing a system property in the start up
script. 

You can solve this by adding the system property to the wso2server.sh file or the wso2server.bat file of your server. The property is :

-DandesConfig=qpid-config.xml \

When you added this property to the wso2server.sh file , it should look like;

 $JAVACMD \
    -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
    -Xms256m -Xmx1024m -XX:MaxPermSize=256m \
    -XX:+HeapDumpOnOutOfMemoryError \
    -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \
    $JAVA_OPTS \
     -DandesConfig=qpid-config.xml \
    -Dcom.sun.management.jmxremote \
    -classpath "$CARBON_CLASSPATH" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CARBON_HOME/tmp" \




This issue will be fixed with the 2.0.2 release of the wso2 message broker.