发布日期:2018-07-02 13:51:41

ADF 应用开发如何deploy applications

官方文档:https://docs.oracle.com/cd/E24382_01/user.1112/e17455/deploying_apps.htm#OJDUG542

Section 9.1, "About Deploying Applications"

Section 9.2, "Running Java EE Applications in the Integrated Application Server"

Section 9.3, "Connecting and Deploying Java EE Applications to Application Servers"

Section 9.4, "Deploying Java Applications"

Section 9.5, "Deploying Java EE Applications"

Section 9.6, "Post-Deployment Configuration"

Section 9.7, "Testing the Application and Verifying Deployment"

Section 9.8, "Deploying from the Command Line"

Section 9.9, "Deploying Using Java Web Start"

Section 9.10, "Deploying Using Weblogic SCA Spring"

Section 9.11, "Troubleshooting Deployment"

本文重点将Troubleshooting Deployment的思路理一下:

1) Common Deployment Issues
2) How to Troubleshoot Deployment to Integrated Application Server
3) How to Troubleshoot Deployment to Oracle WebLogic Server
4) How to Troubleshoot Deployment to IBM WebSphere

1. Common Deployment Issue

[Deployer: 149164] The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed

Oracle WebLogic Server instances使用Domain Edit lock来确保同一时间内只有一个用户在deploy application以及修改配置。如果有其他用户在deploy application或者一些change修改了但还没有activated,就会出现这个错。如何activiate做的修改,可以按这个步骤去做:Administration Console -> Change Center ->View changes and restarts -> Change List Tab -> activate any pending changes-> restart.

2. 如何排查部署在Integrated Application Servers时的错

如果你在jdeveloper中想要stop integrated applications server但不成功,可以到jdeveloper-user-home/DefaultDomain/bin中运行stopWebLogic.cmd或者stopWeblogic.sh, 这样就比较安全的关闭server.

如果你看到java.lang.OutOfMemoryError:PerGen, 可以增加MEM_MAX_PERM_SIZE, 在jdeveloper-user-home/DefaultDomain/bin中的setDomainEnv.cmd或者setDomainEnv.sh

 在不同的Location重新安装JDeveloper时你可能遇到一些问题,因为integrated application server使用一些hard-coded references to JDeveloper.你必须做下面的一些事来解决这个问题。 重新设置JDEV_USER_DIR指向新的location。删除老的location,并在application Server Navigator中选择integratedWebLogicServer并Delete Default Domain.

3.如何排查部署在Oracle Weblogic Server时的错

ORA-01005: null password given; logon denied

application-name-jdbc.xml中 <encrypted-password> 为空或者根本不存在 <encrypted-password>。

ORA-01017: invalid username/password; logon denied

application-name-jdbc.xml中 <encrypted-password> 中错误秘密。

[Oracle JDBC Driver] Kerberos Authentication was requested, but is not supported by this Oracle Server

This will cause logon to be denied, and it is due to using the Oracle WebLogic Server database driver, weblogic.jdbcx.oracle.OracleDataSource. This driver is not certified by Oracle and should not be used.

Application Does Not Work After Creating a Global Data Source from the Oracle WebLogic Server Administration Console

Make sure there is a target domain selected for the data source. If you clicked Finish before the last panel of the wizard, then this was not done.Also, make sure that the Java naming lookup call is correct if you are using a lookup in Java code. For example, if the connection name is connection1, the naming lookup should be java:comp/env/jdbc/connection1DS.

Redeploying an Application to a Server that is Down

当server is done的时候只能deploy一次。第二次就会出错:

03:29:47 PM] ---- Deployment started. ----
[03:29:47 PM] Target platform is (Weblogic 10.3).
[03:29:47 PM] Retrieving existing application information
[03:29:47 PM] Running dependency analysis...
[03:29:47 PM] Building...
[03:29:50 PM] Deploying 2 profiles...
[03:29:50 PM] Wrote Web Application Module to /path/oracle/jdeveloper/jdev/mywork/Application1/Project1/deploy/webapp1.war
[03:29:50 PM] Wrote Enterprise Application Module to /path/oracle/jdeveloper/jdev/mywork/Application1/application1.ear
[03:29:50 PM] Redeploying Application...
[03:29:50 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application application1 on Server-1.: [DeploymentService:290049]Deploy failed for id '1,244,759,390,503' since no targets are reachable..
[03:29:50 PM] Weblogic Server Exception: java.lang.Exception: [DeploymentService:290049]Deploy failed for id '1,244,759,390,503' since no targets are reachable.
[03:29:50 PM] See server logs or server console for more details.
[03:29:50 PM] java.lang.Exception: [DeploymentService:290049]Deploy failed for id '1,244,759,390,503' since no targets are reachable.
[03:29:50 PM] #### Deployment incomplete. ####
[03:29:50 PM] Remote deployment failed
Attempting to Deploy to a Server that No Longer Exists

如果之前成功deploy application到一个managed server,之后这个managed server被remove了,再用deployment history action时就会出现这个错:

[02:38:40 PM] ---- Deployment started. ----
[02:38:40 PM] Target platform is (Weblogic 10.3).
[02:38:40 PM] Retrieving existing application information
[02:38:40 PM] #### Deployment incomplete. ####
[02:38:40 PM] [J2EE Deployment SPI:260013]Target array passed to DeploymentManager was null or empty.
Deploying to a remove server fails with HTTP Error Code 502

这个是网络原因导致的,查看是不是用了proxy。

No Credential Mapper Entry Found

If you see the following message, it usually means that an EAR using password indirection did not have the passwords injected via mbeans before deployment.

weblogic.common.ResourceException: No credential mapper entry found for password indirection user=scott for data source Connection1

This usually happens when trying to deploy an EAR manually from the console or from an ant script.

发表评论