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

在IntelliJ部署EAR至WebLogic 10.3时遇JSP HTTP 500错误

Hey, let's tackle this JSP 500 error you're facing when switching from MyEclipse to IntelliJ for your EAR deployment on WebLogic 10.3.6. I’ve run into similar deployment quirks before, so here’s a step-by-step breakdown to get to the bottom of it:

1. Fix JSP API Dependency & Classpath Conflicts

That truncated javax.servlet.jsp.Js... error is almost always tied to missing or conflicting JSP-related classes. MyEclipse tends to auto-configure WebLogic's built-in libraries, but IntelliJ might need a nudge:

  • Open IntelliJ's Project Structure (hit Ctrl+Alt+Shift+S), go to Modules and select your web module.
  • In the Dependencies tab:
    • Make sure WebLogic's JSP API (included in weblogic.jar) is marked as Provided—WebLogic supplies these classes, so you don’t want to package them in your EAR/WAR.
    • Delete any standalone servlet-api.jar or jsp-api.jar from your project dependencies. These often clash with WebLogic’s native versions, triggering runtime 500 errors.
2. Verify IntelliJ's WebLogic Deployment Setup

IntelliJ’s deployment flow isn’t identical to MyEclipse’s autodeploy, so misconfigurations here are common:

  • Open Run/Debug Configurations and select your WebLogic server instance:
    • Check the Deployment tab to confirm your EAR is added and deploying to the correct path (either WebLogic’s autodeploy folder or domain/applications).
    • Ensure Build Artifacts is checked in the Before launch section—this guarantees you’re deploying the latest build, not stale cached files.
    • Manually delete WebLogic’s tmp and cache directories (e.g., your_domain/servers/AdminServer/tmp, your_domain/servers/AdminServer/cache), then restart the server. Old cached class files often cause weird classloading issues.
3. Get the Full Error Stack Trace

The truncated error message isn’t enough to pinpoint the root cause. Dig up the full log:

  • Log into the WebLogic admin console, navigate to Deployments, select your app, then go to Monitoring -> Logs to view the complete exception.
  • Or check the server log file directly at your_domain/servers/AdminServer/logs/AdminServer.log. Look for ClassNotFoundException (classpath issue) or NoSuchMethodError (version conflict)—these are the most frequent culprits.
4. Check WebLogic's JSP Compilation Settings

Deployment might skip JSP compilation, leading to runtime failures:

  • In the WebLogic admin console, go to your app’s Configuration -> JSP tab:
    • Enable Compile JSPs During Deployment to ensure JSPs are pre-compiled before the app starts.
    • Confirm the Working Directory has write permissions—WebLogic needs this to compile and store JSP-generated classes.
5. Compare MyEclipse & IntelliJ Build Outputs

There might be differences in the generated EAR/WAR files:

  • Unpack both the MyEclipse-built EAR and IntelliJ-built EAR, then compare the WAR contents:
    • Check WEB-INF/lib for missing or extra JAR files.
    • Verify WEB-INF/web.xml is identical—look for JSP-related settings like isELIgnored or contentType that might have been altered during IntelliJ’s build.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.26 09:53:37