ディレクトリに関する JSON データを呼び出して受け取る小さな API を作成しています。実行中の開発ボックスで完全に動作しますが、必要なサーバーに配置すると、アプリケーションの途中で停止します。
例外はスローされず、コンソール出力は何も実行せず、サーバーへの GET 要求からの応答を受け取りません。プラグインが停止します。
これは、Wowza サーバーでプラグインとして実行される HTTPProvider ですが、関係ないと思います。サーバーはクラッシュせず、プラグインはコードのこの時点以降は何もしません (コメントの各セットは、コンソール出力でテストした場所であり、最後のものを除いてすべて機能しました):
File dir = new File(appInst.getStreamStoragePath()+"/"+content_path);
//Correct Path is formed and file object created
if(dir.exists() && dir.isDirectory())
{
//Directory exists
File[] files = dir.listFiles();
//Was able to find the 2 files in this directory
JSONObject output = new JSONObject();
JSONArray directories = new JSONArray();
JSONArray videos = new JSONArray();
boolean access_allowed = true;
//Nothing happens after these declarations, no errors
//No thrown exceptions or console output
for (int i = 0; i < files.length; i++) {
//Build JSON objects+arrays with files
}
}
dev box と server はどちらも同じバージョンの java と wowza サーバーです。(1.6)
私の主な質問は、それを修正する方法ではありませんが、何が問題なのかを理解するにはどうすればよいですか?