I'm using Eclipse and I installed the Developer tools for WebSphere Liberty Profile 8.5 on Eclipse Kepler. Every time I install an application, it automatically/automagically detects the features inside the applications, and adds them to the feature manager, for example jsp-2.2, beanValidation-1.0, ... .

However, I'm using JPA 2.1 in my application, and everytime I start the Liberty Profile server from within Eclipse, it adds the JPA 2.0 feature to it causing errors of classes/methods which are not found due to mismatching versions. So then I have to remove the feature again, and then the application works as expected.

If I remember correctly, I could choose whether or not the feature manager automatically enables features or not, but I cannot find this setting to undo it. So, is there a setting to disable this?

To disable auto adding of feature right click on the project and click properties. In the dialog expand Liberty Profile and click on Required Features. It should list a set of features that WDT believes the application needs. In the third column next to each feature there is a pull down that can select between Always Add, Prompt before adding, Never add. Select Never add and click ok. Now when you remove the jpa-2.0 feature it won't be added back.

Are you checking all of your application's projects? The list of required features is for a specified project only, it does not include referenced projects. For example, if you have an EAR application that references a web project that contains a servlet the EAR project may not have any required features listed but the web project likely will.

Why require so much manually work ???? IMHO it should be an option on the server to never add features in any project.

I have a server with 15 projects on, and with 15 developers using a own local instance of it, that's a LOT of (unneeded) work. I really thought that the idea of using maven is to have a fixed project setup and be able to execute it without a lot of manually configs ???? (I know this issue is not a maven one, but the solution to really rapid development server setup seems to be maven)

And BTW it doesn't work either ... :-(

I have a project that autocreates a ejbLite feature. If I opens the project settings, Liberty, the Required features is empty.... Not easy to disable the ejbLite in that project. If the ejbLite feature is loaded, the JNDI datasources is claimed to not exist... Not easy to spot that ejbLite is causing that....

The Liberty Server still need some more work to be good enough to beat the competitors... Sorry for that, Alasdair ..

Not only it's not possible to globally disable the automatic feature management in Eclipse, but if you also have an empty list in Project -> Properties -> Liberty -> Required Features, then you can't disable the features AT ALL, which makes the server quite unusable under Eclipse!

I believe Alasdair's response is correct as I've used the same solution to prevent jaxws being added. Unless I'm misunderstanding, it is the WebSphere Developer Tools automatically adding JPA 2.0 for you, not featureManager. This has to be set on a per-project basis, so any projects that make up your application can cause a feature to be pulled in.

For the specific JPA 2.0 feature being added automatically problem that you have, do you already have the JPA 2.1 feature enabled on the server when you start the server? Also, is the JPA 2.1 project facet enabled on the project? What is the exact version of WDT that you are using?

People who like this

Adding my vote for this (again). After downloading the latest WDT my eclipse is constantly destroying my server.xml with a ejbLite-3.2 feature, which is conflicting with the current feature set. Result is that the whole server is broken or whatever I can call it...

It's VERY annoying that it's not possible to disable this globally....

And BTW, none of my projects has any entries in Liberty,Required Feature, but stille the WDT is trashing my server.xml ...