MyEclipse 10 and Jetty 7.6.3 Upgrade Notes

When I upgraded MyElipse from the version 8.6 to the version 10 and Jetty from the version 7.1.6 to the version 7.6.3, I have encountered some configuration problems. In this document, the problems will be listed along with my solutions. Hopefully it can help you save some time if you find yourself in the same situation.

Problem 1: MyEclipse 10 did not recognize Maven projects automatically

Situation:I encountered this problem when I have just installed MyEclipse 10 on my machine and checked out the AC project from the SVN. After the AC project has been fully downloaded to the MyEclipse 10 workspace, MyEclipse 10 did not recognize it as a Maven project and therefore did not enable the "Maven4MyEclipse" menu item in the popup context menu when I right clicked on the project.

Solution:Right click on the project, in the context menu choose Configuration/Convert to Maven project.

Problem 2: Launch configuration type id org.maven.ide.eclipse.Maven2BuilderConfigurationType does not exist.

Situation:This problem happened when I launched the actioncenters project from MyEclipse 10 (right click on the project folder, choose Run As/MyEclipse Server Application/Jetty 7.x). In the console, it was reported:

      
Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'xxxxxxx.
Launch configuration type id "org.maven.ide.eclipse.Maven2BuilderConfigurationType" does not exist.
Possible causes:
Missing specification of a launch type (missing plug-in)
Incorrect launch configuration XML
Launch configuration type id "org.maven.ide.eclipse.Maven2BuilderConfigurationType" does not exist.
Possible causes:
Missing specification of a launch type (missing plug-in)
Incorrect launch configuration XML
      
		

Solution:

  • Make sure you have installed the "m2eclipse" plugin.
  • From the MyEclipse 10 menu bar, choose Project/Properties. In the popup window, choose Builder, then uncheck the "Javascript Validator" in the Builders list.

Problem 3: No loginService when launching the project on Jetty 7.6.3

Situation:This problem happened when I launched the actioncenters project from MyEclipse 10 on Jetty 7.6.3. In the console, it was reported "No loginService..."

Solution:

  • From the MyEclipse 10 menu bar, go to "Window/Preferences/MyEclipse/Servers/Jetty/Jetty 7.x".
  • Uncheck "Use context deployer" option(so MyEclipse won't create context file for the web application automatically)
  • Go directly to the "contexts" folder of your Jetty distribution, modify the context file for "actioncenters" web app by adding this part:
      
...
<Get name="securityHandler">
   <Set name="loginService">
     <New class="org.eclipse.jetty.security.HashLoginService">
    <Set name="name">Test Realm</Set>
    <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
     </New>
   </Set>
   <Set name="checkWelcomeFiles">true</Set>
 </Get>
...
      
		
  • The context file should look similar to this:
      
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.eclipse.org/configure.dtd">-->
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="configurationClasses">
<Array type="java.lang.String">
<Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
<Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
<Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
<Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
<Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
<Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
</Array>
</Set>
<Get name="securityHandler">
   <Set name="loginService">
     <New class="org.eclipse.jetty.security.HashLoginService">
    <Set name="name">Test Realm</Set>
    <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
     </New>
   </Set>
   <Set name="checkWelcomeFiles">true</Set>
 </Get>
<Set name="contextPath">/Actioncenters</Set><Set name="war">C:\jetty-distribution-7.6.3.v20120416\webapps\Actioncenters</Set><Set name="extractWAR">true</Set><Set name="copyWebDir">false</Set></Configure>
      
		

Problem 4: Project configuration is not updated

Situation:When launching the actioncenters project, it was reported in the console:

      
org.springframework.beans.factory.BeanDefinitionStoreException: 
Invalid bean definition with name 'passwordEncoder' defined in ServletContext resource [/WEB-INF/classes/actioncenters-security.xml]: Could not resolve placeholder 'security.hash.salt'
      
		

Solution:Right click on the "actioncenters" project, choose Maven4MyEclipse>Update Project Configuration. Note: Don't redeploy the application when you do this.