部署EJB的时候的一个错误:Compiler failed executable.exec at ......

部署EJB的时候碰到的一个这样的错误:

java.io.IOException: Compiler failed executable.exec at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:469) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336) at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:784) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1339) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule

解决方案:

This problem is caused by the way WebLogic calls javac to compile the generated classes for the EJBs deployment. This became a big problem for our project with 50 Entity EJBs 2.0 with CMP/CMR, about 15 EJB-QL statements, 3 MDB and 8 Session EJB. I think that these numbers are limits, so exceeding any of these numbers cause javac to exhaust the memory it allocates by default. Even the WebLogic 8.1.Server's administarion console allows you to supply additional parameters for RMI and EJB compilers, it does not allow to supply the -J-Xmx256M (or more) option needed to increase the memory javac allocates.

Thus:
1. In the active $JAVA_HOME/bin of the Server create the file:
Windows:
javac1.cmd Containing:

javac -J-Xmx256M %*


Linux:
javac1.sh Containing:

#!/bin/bash
javac -J-Xmx256M $*

make it "executable"

NOTE: startWeblogic script sets it own JAVA_HOME, so check it first.

2. In the administraitve console of WebLogic 8.1 Server select the server in the left frame under the
<Domain> / Servers branch. In the right frame select the General tab.

3. In the Java Compiler box change javac to javac1.cmd or javac1.sh respectively. No restart is needed.

 


 

Are you sure that javac is in your path?

You might want to run weblogic.ejbc on your jar prior to deployment.

-- Rob


 

Jyoti...

Try to specify Java compiler path that will be used to compile the EJB module (like "C:/bea/jrockit81sp3_142_04/bin/javac.exe" as aJava Compiler) under Compiler Options in the Configuration.

I had a similar issue and could able to resolve it by doing that...

Go FirmSoft...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值