| Summary: | RTGov quickstarts cannot be built/run OOTB after importing into JBDS | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Fuse Service Works 6 | Reporter: | Len DiMaggio <ldimaggi> |
| Component: | Examples | Assignee: | Gary Brown <gbrown> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Andrej Podhradsky <apodhrad> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.0 GA | CC: | asantos, atangrin, dlesage, kconner, soa-p-jira |
| Target Milestone: | ER7 | ||
| Target Release: | 6.0.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
If you try to import RTGov quick starts into JBDS 7, you will see the following error message: Dynamic Web Module 3.0 requires Java 1.6 or newer. This is caused by the fact that the org.eclipse.jdt.core.prefs class includes hard-coded references to Java 1.5:
The "samples-jbossas-sla-report" complains about a missing persistence.xml file. This file exists within the project, but is not directly within the classpath, so to fix this issue you will need to add "src/test/resources/META-INF" as the source directory and then select the "Maven->Update Project..." menu item in the "samples-jbossas-sla-report" project.
If JavaServer Faces errors appear associated with the "samples-jbossas-sla-monitor" project, then select the "Maven->Update Project..." menu item on the project. You may need to do this twice, if the errors do not disappear after performing the action the first time.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Len DiMaggio
2013-11-11 19:07:34 UTC
Not sure JBDS is to blame for that https://github.com/Governance/rtgov/blob/master/samples/jbossas/pom.xml#L186 The reference to 1.5 Java is in the pom:
<!-- Specify the compiler options and settings -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<showDeprecation>false</showDeprecation>
<showWarnings>false</showWarnings>
</configuration>
</plugin>
Changing the reference in the pom.xml file from Java 1.5 to Java 1.7 resolves the initial error - but then presents an error of: JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer. See attached screenshot - setting the facet version to 2.5 results in an error of: Cannot change version of project facet Dynamic Web Module to 2.5 Somehow or other I got past the dynamic web module error (I think by building it outside of JBDS). I then ran into an error stating that it was missing the @ApplicationPath annotation - disabling the JAX-RS validator or setting that particular activator to a Warning resolved this. Suggest either documenting the change to JAX-RS or updating the RTGov sample. perhaps this should be in another BZ. samples-jbossas-sla-report also includes an error that it is missing persistence.xml That can be changed to a warning in Preferences/Java Persistence/JPA/Errors / Warnings This should be doc'd or fixed in the quickstart Reference to JDK 1.5 has been removed. The persistence.xml file does exist in src/test/resources/META-INF. To overcome this error, it is necessary to add this location as a 'source folder' and then select the 'Maven->Update Project...' on the 'samples-jbossas-sla-report' project. Unclear why the JavaServer Faces errors occur on the 'samples-jbossas-sla-monitor' project - but if you do 'Maven->Update Project...' on that project (sometimes it has to be done twice) then the errors go - so think this is an Eclipse/maven issue. Also note: if using the maven Eclipse plugin (e.g. mvn eclipse:eclipse) the Eclipse projects can be imported (as a general project) without any issues. So apart from the JDK 1.5 fix, the other errors will require docs. How do I mark this BZ to ensure this happens? Gary Brown <gary> updated the status of jira RTGOV-314 to Resolved Doc changes required when describing importing rtgov quickstarts into JBDS-IS: The "samples-jbossas-sla-report" complains about a missing persistence.xml file. This file exists within the project, but is not directly within the classpath, so to fix this issue you will need to add the folder "src/test/resources/META-INF" as a source folder, and then select the "Maven->Update Project..." menu item on the "samples-jbossas-sla-report" project. If JavaServer Faces errors appear associated with the "samples-jbossas-sla-monitor" project, then select the "Maven->Update Project..." menu item on the project. This may need to be performed twice, if the errors do not disappear after performing the action once. Made additional change, based on a workaround link found by Alan, so the JavaServer Faces errors no longer appear - so only docs required for the first (para) issue related to missing persistence.xml. Verified with FSW 6.0.0.ER7 + JBDS-IS 7.0.0.CR1. Note that there is another error after importing RTGov quickstarts into JBDS, reported as new bug at https://bugzilla.redhat.com/show_bug.cgi?id=1043447 Gary Brown <gary> updated the status of jira RTGOV-314 to Closed |