質問

I use Java Embedding in Bpel in order to invoke shell commands. Tool used is Jdeveloper 11.1.1.4.0. The problem is that code is compiled OK on IDE, but when deploying to Weblogic it fails with error: java.lang.RuntimeException: failed to compile execlets of project. Underlying error in server log is "unknown source".

The java code is:

try {
Runtime rt = Runtime.getRuntime();

Process  proc= rt.exec("ls -al");
System.out.println("***Executed BPEL Test***");
} catch (IOException e) {  
 e.printStackTrace(); 
 }

In Bpel source is added following imports:

<bpelx:exec import="java.io.*"/>
<bpelx:exec import="java.lang.*"/>
<bpelx:exec import="java.util.*"/>

Any idea what went wrong in this code? Notice that simple code like System.out.println("Hello there, World"); deploys OK on app server.

役に立ちましたか?

解決

This small correction to catch expression has fixed the issue:

catch (Exception e) {  
e.printStackTrace(); 
}

Now Bpel deploys nicely to the application server (Weblogic). Since the problematic code compiles OK in Java, it seems to be a specific problem for this particualr case.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top