[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-5916) Wrong Compiler Compliance Level set when creating new ESB Project

Brian Fitzpatrick (JIRA) jira-events at lists.jboss.org
Wed Feb 24 15:07:10 EST 2010


    [ https://jira.jboss.org/jira/browse/JBIDE-5916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12516443#action_12516443 ] 

Brian Fitzpatrick commented on JBIDE-5916:
------------------------------------------

Ok, I'm still at a loss as to why this occurs, but I can tell you specifically what fixes it from a file settings point of view.

There are two files in [project]/.settings/ that need to be changed:

1. org.eclipse.jdt.core.prefs

Change the lines:

org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5

To:

org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6

2. org.eclipse.wst.common.project.facet.core.xml

Change the line:

  <installed facet="jst.java" version="5.0"/>

 to
 
   <installed facet="jst.java" version="6.0"/>
 
Once those changes have been made, simply do a clean/rebuild and the errors go away. 
 
The only place that I see any references to "5.0" are in the project facet definition in the plugin.xml of org.jboss.tools.esb.project.core. For each version of jst.jboss.esb defined, there's a constraints section that refers to the facet "jst.java" that says it must be at the level 5.0 or above (version = "[5.0"). This jives with the WTP documentation here: http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.wst.doc.isv/reference/extension-points/common/org_eclipse_wst_common_project_facet_core_facets.html which says "version - Specifies the match expression for the facet version. The expression should be of the form "2.2,2.5,[3.0-5.3],(7.3", where the commas function as an OR. Brackets and parenthesis are used as part of the range notation. A bracket means inclusive while a parenthesis means exclusive."
 
       <project-facet-version
            facet="jst.jboss.esb"
            version="4.7">
         <group-member
               id="modules">
         </group-member>
         <constraint>
            <and>
               <conflicts
                     group="modules">
               </conflicts>
               <requires
                     facet="jst.java"
                     version="[5.0">
               </requires>
            </and>
         </constraint>
      </project-facet-version>
 
 Messing with the requires version doesn't seem to do any good. 
 
 Max recalled a similar issue from a while back (https://jira.jboss.org/jira/browse/JBIDE-1647) that was similar to this. 
 
 I'm open to suggestions here. Nothing I've tried has remotely worked. 

> Wrong Compiler Compliance  Level set when creating new ESB Project
> ------------------------------------------------------------------
>
>                 Key: JBIDE-5916
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-5916
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: esb
>    Affects Versions: 3.1.0.CR3
>         Environment: JBDS 3.0.0v201002190339M-H173-CR2
> Java Sun JDK 1.6.0_16-b01
> JBoss [SOA] 5.0.0.GA_SOA (build: SVNTag=5.0.0.GA_SOA date=201002151345)
>            Reporter: Vlado Pakan
>            Assignee: Brian Fitzpatrick
>             Fix For: 3.1.0.CR3, 3.1.1
>
>
> When new ESB Project is created (File > New > Others > ESB Project) this project has set Compiler Compliance Level to 1.5 (Project > Properties > Java Compiler) even when only Java JDK 1.6 Runtime is specified within workspace.
> Then when user adds new ESB Action to this project (File > New > Others > ESB Action) it generates new class with this content (JBoss ESB Runtime jas to be added to project classpath):
> import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
> import org.jboss.soa.esb.helpers.ConfigTree;
> import org.jboss.soa.esb.actions.ActionProcessingException;
> import org.jboss.soa.esb.message.Message;
> public class EsbAction extends AbstractActionPipelineProcessor {
> 	protected ConfigTree _config;
> 	public EsbAction(ConfigTree config) {
> 		_config = config;
> 	}
> 	@Override
> 	public Message process(Message message) throws ActionProcessingException {
> 		//ADD CUSTOM ACTION CODE HERE
> 		return message;
> 	}
> }
> And compiler is complaining about @Override annotation on method process(Message) displaying this error:
> The method process(Message) of type EsbAction must override a superclass method
> Either when Compiler Compliance level is set to 1.6 or Project Facets Java version is set to 6.0 (Project Properties > Project Facets > Java) error disappear.
> I think it should work in the way that when user creates new EBS Action it should be created without errors so Compiler Compliance Level or Project Facets Java should be set properly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list