22 June 2013

ADF Web Application deployment error

Problem Definition:
When running sample ADF web application, i get below error:

[04:17:15 PM] Wrote Enterprise Application Module to C:\Users\mtalakok\AppData\Roaming\JDeveloper\system11.1.2.0.38.60.17\o.j2ee\drs\Storefront-15
[04:17:15 PM] Redeploying Application...
<Jun 22, 2013 4:17:16 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1371898036126' for task '1'. Error is: 'weblogic.application.ModuleException: Context path '/Storefront2-StorefrontUI-context-root' is already in use by the module: Storefront2-StorefrontUI-context-root application: Storefront-13'
weblogic.application.ModuleException: Context path '/Storefront2-StorefrontUI-context-root' is already in use by the module: Storefront2-StorefrontUI-context-root application: Storefront-13
at weblogic.servlet.internal.WebAppModule.initAndValidateContextPath(WebAppModule.java:1210)
at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:970)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:382)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:433)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
Truncated. see log file for complete stacktrace

<Jun 22, 2013 4:17:16 PM IST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'Storefront-15'.> 
<Jun 22, 2013 4:17:16 PM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'Storefront-15'.> 
<Jun 22, 2013 4:17:16 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Context path '/Storefront2-StorefrontUI-context-root' is already in use by the module: Storefront2-StorefrontUI-context-root application: Storefront-13
at weblogic.servlet.internal.WebAppModule.initAndValidateContextPath(WebAppModule.java:1210)
at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:970)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:382)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:433)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
Truncated. see log file for complete stacktrace

[04:17:16 PM] Deployment cancelled.
[04:17:16 PM] ----  Deployment incomplete  ----.
[04:17:16 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
#### Cannot run application Storefront-15 due to error deploying to IntegratedWebLogicServer.
[Application Storefront-15 stopped and undeployed from Server Instance IntegratedWebLogicServer]
<AppPolicyHandler> <removePolicies> Removal of application policy failed. Reason: oracle.security.jps.service.policystore.PolicyObjectNotFoundException: Application with name "Storefront-13" does not exist.

Environment: Jdeveloper Studio 11.1.2.0.0 with Oracle XE database.

Resolution:

Here main problem it reports is "Context path '/Storefront2-StorefrontUI-context-root' is already in use by the module: Storefront2-StorefrontUI-context-root application: Storefront-13".

two ways to resolve this problem:
Procedure 1:

1. From Jdeveloper interface select View -> Application Server Navigator.
2. from the Application Server Navigator window expand deployments folder and select problematic project (i.e. Storefront-13) and right click and select 'Undeploy'.

3. Now run the main application to resolve the issue.

Procedure 2: 
1. Stop the weblogic server
2. Remove all war files from the 'C:\Oracle\Middleware\wlserver_10.3\server\lib\console-ext\autodeploy' folder in weblogic and then start the weblogic server again.
3. Login to WebLogicServer by using url like http://127.0.0.1:7101/console/ and entering username and password configured during Jdeveloper installation.
4. Go to 'Configure Applications' Link.
5. Under 'Deployments' select all projects/applications and click on Stop -> 'when work completes' as below.

6. Now run the main application which logs errors earlier again to see if the issue got resolved.

4 comments: