You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apache ODE示例无法运行及内存泄漏问题咨询

Troubleshooting Apache ODE 1.3.7 Issues on Tomcat 8 (Ubuntu 17.10)

Let's break down your problems step by step and work through solutions for each one:

1. Fixing Process Deployment & Sendsoap Errors

First, let's tackle why your examples won't run and the sendsoap tool is throwing a class-not-found error:

Process Placement Mistake

You're placing raw example files directly into /var/lib/tomcat/webapps/ode/WEB-INF/processes, but ODE requires processes to be packaged as Business Archive (BAR) files (or ZIP files renamed to .bar). Here's how to fix this:

  • For the official helloWorld example, collect all required files (BPEL definition, WSDL, deploy.xml descriptor) into a single folder.
  • Zip the folder, then rename the zip file to helloWorld.bar.
  • Move this .bar file into /var/lib/tomcat/webapps/ode/WEB-INF/processes, then restart Tomcat. ODE will automatically scan and deploy this archive on startup.

Sendsoap Classpath Issue

The sendsoap tool needs access to ODE's dependency JARs to run correctly—you can't just drop the bin directory into Tomcat's ode webapp. Instead:

  • Use the sendsoap.sh script from the original ODE download package's bin directory (not the one you copied to Tomcat). This script is pre-configured with the correct classpath.
  • If you need to run the command manually, specify the full classpath like this:
    java -cp "/path/to/ode-install/lib/*:/path/to/ode-install/tools/sendsoap/lib/*" org.apache.ode.tools.sendsoap.cline.HttpSoapSender http://localhost:8080/ode/processes/helloWorld testRequest.soap
    
    Replace /path/to/ode-install with the actual path where you extracted the ODE zip file.

2. Getting Processes to Show Up in the ODE Web UI

The ODE web interface only displays processes that have been successfully deployed. After packaging your process as a .bar file and placing it in the correct directory:

  • Check Tomcat's catalina.out log for lines like:

    Deployed process {http://your-namespace}helloWorld

  • If you see this line, the process is deployed and should appear in the web UI. If not, double-check your deploy.xml descriptor and ensure all required files are included in the BAR archive.

3. Resolving Memory Leak Warnings

The memory leak warnings you're seeing are common with ODE 1.3.7's default embedded Derby database on Tomcat. Here are two ways to fix this:

Embedded Derby isn't ideal for consistent development because it doesn't clean up resources properly when Tomcat stops. Switch to MySQL or PostgreSQL instead:

  1. Create a database named ode in your external DB.
  2. Edit /var/lib/tomcat/webapps/ode/WEB-INF/conf/ode-config.xml to replace the default Derby datasource with your external DB config. For MySQL, it would look like this:
    <data-source name="ode-ds" provider="tomcat">
      <param name="driverClassName" value="com.mysql.jdbc.Driver"/>
      <param name="url" value="jdbc:mysql://localhost:3306/ode?createDatabaseIfNotExist=true"/>
      <param name="username" value="your-db-username"/>
      <param name="password" value="your-db-password"/>
      <param name="maxActive" value="20"/>
      <param name="maxIdle" value="5"/>
    </data-source>
    
  3. Download the MySQL JDBC driver JAR and place it in /var/lib/tomcat/webapps/ode/WEB-INF/lib.
  4. Restart Tomcat—Derby-related memory leaks should disappear.

Fix Derby Resource Cleanup (If You Must Use It)

If you want to stick with Derby, configure Tomcat to manage the datasource instead of ODE:

  1. Add this resource to Tomcat's conf/context.xml:
    <Resource name="jdbc/ODE" auth="Container" type="javax.sql.DataSource"
              driverClassName="org.apache.derby.jdbc.ClientDriver"
              url="jdbc:derby://localhost:1527/ode;create=true"
              username="sa" password="" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
    
  2. Update ode-config.xml to use this container-managed datasource. This lets Tomcat handle resource cleanup when the web app stops, preventing leaks.

Final Verification Steps

  1. Restart Tomcat and check catalina.out for successful deployment logs.
  2. Visit http://localhost:8080/ode/#/—your deployed processes should now appear in the service list.
  3. Use sendsoap.sh (or a tool like SoapUI) to send a test request to your process, and verify it responds correctly.

内容的提问来源于stack exchange,提问作者fa__

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:32:21