Bug 487631 - Application archive is not resolved for application
Summary: Application archive is not resolved for application
Status: RESOLVED FIXED
Alias: None
Product: CFT
Classification: ECD
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal
Target Milestone: 1.0 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2016-02-10 19:15 EST by Nieraj Singh CLA
Modified: 2016-02-16 15:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nieraj Singh CLA 2016-02-10 19:15:39 EST
The following error occurs when deploying an application:

"Application archive is not available for application"

The problem seems that the CloudFoundryApplicationModule was created using the wrong "local module" (which refers to the IModule that the CloudFoundryApplicationModule wraps around) in the CloudFoundryServer.

So when the ApplicationRegistry attempts to find an archive provider using the module type ID of the "local module", it is using the wrong module ID:

org.eclipse.cft.server.core.CloudFoundryApplicationModule

instead of the actual IModule type which is:

cloudfoundry.standalone.app

Therefore the cloudfoundry.standalone.app does not get loaded and no archive is generated, failing the publish operation of a Spring Boot (Standalone Java) project.
Comment 1 Nieraj Singh CLA 2016-02-10 20:13:17 EST
Upon further examination, it seems that the problem is actually not with how CloudFoundryApplicationModule is created. If the "local module" of the Cloud module is the Cloud module itself, it indicates it is an external module, so there are valid cases when a "local module" will be a CloudFoundryApplicationModule.

The problem is that the push operation is trying to use an external module for generating an archive. In general, if a module is external, it should not be generating archives (external means there is no related workspace project so external modules cannot have their local resources archived for push operation). 

Sounds like it may be an issue of improper refresh of modules in the server or Servers view, and either the module already exists and is external but the view is not refreshed and users need to use "link project" feature, OR the existing external module is an orphan because the application no longer exists, and list of modules in the server needs to be refreshed.
Comment 2 Nieraj Singh CLA 2016-02-16 15:47:19 EST
Appears to have been solved indirectly by fix for: 486691

Cause does seem to be related to updating modules that were previously published with errors.

With the fix above, attempting to publish that module again now correctly loads the right archiver.