Bug 1031616 - Errors after importing SY quickstart ear-deployment into JBDS
Errors after importing SY quickstart ear-deployment into JBDS
Status: CLOSED NOTABUG
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Examples, Tooling (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: tcunning
Jiri Sedlacek
:
Depends On: 1033366
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-18 06:56 EST by Andrej Podhradsky
Modified: 2015-08-02 19:45 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If you try to import the ear-deployment quick start into Red Hat JBoss Developer Studio, you will encounter errors. This is because the SwitchYard Validator cannot handle projects with a number of sub-projects. To work around this issue, So import each sub-project (artifacts, order-consumer, order-service and ear-deployment) individually, before importing the parent POM file.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-14 12:38:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SWITCHYARD-1858 Major Open Errors after importing SY quickstart ear-deployment into JBDS 2015-08-15 03:35:23 EDT
JBoss Issue Tracker SWITCHYARD-2385 Major Resolved Cleanup problems/warnings when importing quick starts into JBDS 2015-08-15 03:35:24 EDT

  None (edit)
Description Andrej Podhradsky 2013-11-18 06:56:33 EST
Description of problem:
After importing the quickstart 'ear-deployment' there are the following errors:

Required Capability Missing: The "Bean" capability should be configured on the project when using this type of implementation.
Required Capability Missing: The "Bean" capability should be configured on the project when using this type of implementation.
Required Capability Missing: The "Camel Route" capability should be configured on the project when using this type of implementation.
Required Capability Missing: The "JMS" capability should be configured on the project when using this type of binding.
Required Capability Missing: The "SCA" capability should be configured on the project when using this type of binding.
Required Capability Missing: The "SCA" capability should be configured on the project when using this type of binding.
The deployment descriptor of the module 'switchyard-quickstart-ear-deployment-order-consumer-1.1.0.M3-redhat-2.jar' cannot be loaded or found.
The deployment descriptor of the module 'switchyard-quickstart-ear-deployment-order-service-1.1.0.M3-redhat-2.jar' cannot be loaded or found.
Unresolvable Bean Class: "org.switchyard.quickstarts.demo.multiapp.service.InventoryServiceBean" cannot be resolved for "InventoryService".
Unresolvable Bean Class: "org.switchyard.quickstarts.demo.multiapp.service.OrderServiceBean" cannot be resolved for "OrderService".

Version-Release number of selected component (if applicable):
ER6

How reproducible:
always

Steps to Reproduce:
1. Import the quickstart into JBDS as Maven project

Actual results:


Expected results:


Additional info:
Eroors 'Required Capability Missing' can be fixed by adding appropriate dependencies into pom.xml
Comment 1 Keith Babo 2013-11-18 09:35:02 EST
Do you have Project -> Build Automatically enabled?
Comment 2 Brian Fitzpatrick 2013-11-21 17:04:28 EST
Ok. I can clear up all the "Required Capability Missing" messages by updating the various pom files. But I have no idea why the Enterprise Application Validator is throwing up those "The deployment descriptor of the module" and "Unresolvable Bean Class" messages. The only way to get around that is to go to...

1) Window->Preferences...
2) Find "Validation" in the tree on the left
3) Uncheck the Manual & Build checkboxes for "Enterprise Application (1.x) Validator" 
4) Click OK

I'm not sure what the Enterprise Application Validator does, but it appears to come from WTP and may pertain to EAR configuration.
Comment 3 Brian Fitzpatrick 2013-11-21 17:25:46 EST
However, the problem appears to be with a Maven import where one project has several sub-projects. The SwitchYard validator doesn't handle that use case well. If I import each of the sub-projects individually, I can work around all of the issues but the ones I mentioned in the last comment for the "Enterprise Application Validator". But if I import them all at once from the parent, the SwitchYard Validator appears to get confused.  

So the workaround seems to be to import each sub-project (artifacts, order-consumer, order-service, ear-deployment, then the parent pom). 

Will investigate further as to why the parent import throws the SY validator for a loop.
Comment 4 JBoss JIRA Server 2013-11-21 17:41:05 EST
Brian Fitzpatrick <bfitzpat@redhat.com> made a comment on jira SWITCHYARD-1858

The SwitchYard Validator (tooling) doesn't seem to like parent/child relationships when you import a parent pom through the Maven project import wizard. It works fine if you import each project individually. 

Investigating why it's failing now...
Comment 5 JBoss JIRA Server 2013-11-21 17:57:15 EST
Brian Fitzpatrick <bfitzpat@redhat.com> made a comment on jira SWITCHYARD-1858

What's weird is that there are even duplicate messages... 

I'm wondering if this is an issue with the Maven import that's screwing up the validation... Manually triggering validation doesn't clean it up. Closing and reopening projects doesn't matter. Cleaning/rebuilding doesn't help. Restarting the workbench doesn't clear it...

{code}
Description	Resource	Path	Location	Type
Required Capability Missing: The "Camel Route" capability should be configured on the project when using this type of implementation.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-consumer/src/main/resources/META-INF	Unknown	SwitchYard
Error loading service interface meta-data.  Interface compatibility cannot be verified.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-consumer/src/main/resources/META-INF	Unknown	SwitchYard
Required Capability Missing: The "JMS" capability should be configured on the project when using this type of binding.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-consumer/src/main/resources/META-INF	Unknown	SwitchYard
Required Capability Missing: The "SCA" capability should be configured on the project when using this type of binding.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-consumer/src/main/resources/META-INF	Unknown	SwitchYard
The file cannot be validated as the XML definition "C:\Users\bfitzpat\git\quickstarts\ear-deployment\order-service\src\test\resources\log4j.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located.	log4j.xml	/switchyard-quickstart-ear-deployment-order-service/src/test/resources	line 21	XML Problem
The file cannot be validated as the XML definition "C:\Users\bfitzpat\git\quickstarts\ear-deployment\order-service\target\test-classes\log4j.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located.	log4j.xml	/switchyard-quickstart-ear-deployment/order-service/target/test-classes	line 21	XML Problem
Unresolvable Bean Class: "org.switchyard.quickstarts.demo.multiapp.service.OrderServiceBean" cannot be resolved for "OrderService".	switchyard.xml	/switchyard-quickstart-ear-deployment-order-service/src/main/resources/META-INF	Unknown	SwitchYard
Unresolvable Bean Class: "org.switchyard.quickstarts.demo.multiapp.service.InventoryServiceBean" cannot be resolved for "InventoryService".	switchyard.xml	/switchyard-quickstart-ear-deployment-order-service/src/main/resources/META-INF	Unknown	SwitchYard
Error loading service interface meta-data.  Interface compatibility cannot be verified.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-service/src/main/resources/META-INF	Unknown	SwitchYard
The file cannot be validated as the XML definition "C:\Users\bfitzpat\git\quickstarts\ear-deployment\order-service\src\test\resources\log4j.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located.	log4j.xml	/switchyard-quickstart-ear-deployment/order-service/src/test/resources	line 21	XML Problem
Required Capability Missing: The "Bean" capability should be configured on the project when using this type of implementation.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-service/src/main/resources/META-INF	Unknown	SwitchYard
Required Capability Missing: The "Bean" capability should be configured on the project when using this type of implementation.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-service/src/main/resources/META-INF	Unknown	SwitchYard
Required Capability Missing: The "SCA" capability should be configured on the project when using this type of binding.	switchyard.xml	/switchyard-quickstart-ear-deployment-order-service/src/main/resources/META-INF	Unknown	SwitchYard
{code}

and even XML problems are duplicated
{code}
Description	Resource	Path	Location	Type
The file cannot be validated as the XML definition "C:\Users\bfitzpat\git\quickstarts\ear-deployment\order-service\src\test\resources\log4j.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located.	log4j.xml	/switchyard-quickstart-ear-deployment/order-service/src/test/resources	line 21	XML Problem
The file cannot be validated as the XML definition "C:\Users\bfitzpat\git\quickstarts\ear-deployment\order-service\target\test-classes\log4j.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located.	log4j.xml	/switchyard-quickstart-ear-deployment/order-service/target/test-classes	line 21	XML Problem
The file cannot be validated as the XML definition "C:\Users\bfitzpat\git\quickstarts\ear-deployment\order-service\src\test\resources\log4j.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located.	log4j.xml	/switchyard-quickstart-ear-deployment-order-service/src/test/resources	line 21	XML Problem
{code}
Comment 6 JBoss JIRA Server 2013-11-21 18:58:31 EST
Brian Fitzpatrick <bfitzpat@redhat.com> made a comment on jira SWITCHYARD-1858

This patch fixes the POM warnings in the quickstarts. 

Rob is working on a separate patch for the issues discovered with validating a parent pom with subprojects successfully.
Comment 7 Rob Cernich 2013-11-22 13:43:38 EST
Hey Brian,

The ear plugin needs a <version>6</version> element in its configuration.  This will configure the EAR facet to version 6, which supports modules without descriptors.  The default is 1.3, which requires descriptors.  For more information: http://maven.apache.org/plugins/maven-ear-plugin/ear-mojo.html
Comment 8 Andrej Podhradsky 2013-12-17 10:33:28 EST
Now, in ER7, I'm getting the following errors:

The deployment descriptor of the module 'switchyard-quickstart-ear-deployment-order-consumer-${project.version}.jar' cannot be loaded or found.

The deployment descriptor of the module 'switchyard-quickstart-ear-deployment-order-service-${project.version}.jar' cannot be loaded or found.

in project 'ear-assembly'
Comment 10 Brian Fitzpatrick 2015-07-13 17:09:46 EDT
I haven't looked at this in a very long time, so apologies. However, with the latest tooling, this is what I am seeing.

I was able to import all of the ear-deployment projects with warnings, but no errors, so cannot reproduce what Andrej saw back in December 2013. 

All of the warnings were pretty common (Build path specifies an execution environment that I don't have a JRE installed for, maven-enforcer-plugin (goal "enforce") is ignored by m2e, and some grammar constraints issues with the application.xml and order.xml files). Nothing out of the ordinary.

Tom, I think we can consider this one closed.
Comment 11 Andrej Podhradsky 2015-07-14 11:18:09 EDT
Hi Brian,

I'm still able to reproduce the issue. As you said, if I import only one project (ear-assembly) it works fine - no errors. But if I import another projects order-service and order-consumer then the following errors occur

The deployment descriptor of the module 'switchyard-quickstart-ear-deployment-order-consumer-1.1.1-p9-redhat-1.jar' cannot be loaded or found.
The deployment descriptor of the module 'switchyard-quickstart-ear-deployment-order-service-1.1.1-p9-redhat-1.jar' cannot be loaded or found.

Now, if you delete order-consumer or order-service (it doesn't matter which one) then the errors disappear.
Comment 12 Brian Fitzpatrick 2015-07-14 12:33:17 EDT
I suspect that this is because the sub-projects inherit from the root pom.
Comment 13 Brian Fitzpatrick 2015-07-14 12:34:35 EDT
"The root pom" in this case being ear-deployment, which has its own set of dependencies that the sub-projects depend on.
Comment 14 Brian Fitzpatrick 2015-07-14 12:38:34 EDT
Closing this as a non-issue after talking with Tom. If all the projects are imported the way it wants (i.e. importing all the projects from the ear-deployment level and down) it works great. If you import the projects individually you need to ensure that all the dependencies are met some other way.

Note You need to log in before you can comment on or make changes to this bug.