RidRoid
RidRoid

Reputation: 961

Cannot create Liferay plugin project

I'm new to Liferay's universe, I'm trying to create a portlet but Eclipse throws this error :

Error Creating Liferay plugin project, please see eclipse error log for more details.

I checked the .log file :

!ENTRY com.liferay.ide.project.core 4 0 2014-06-21 23:56:42.463
!MESSAGE Error creating Liferay plugin project.
!STACK 1
org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
    at (......)
!MESSAGE One or more constraints have not been satisfied.
!STACK 1
org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
at (......)
Contains: Liferay Portlet 6.0 requires Java 1.5 or newer.
Contains: Dynamic Web Module 3.0 requires Java 1.6 or newer.
!SUBENTRY 2 org.eclipse.wst.common.project.facet.core 4 0 2014-06-21 23:56:42.465
!MESSAGE One or more constraints have not been satisfied.
!SUBENTRY 3 org.eclipse.wst.common.project.facet.core 4 0 2014-06-21 23:56:42.465
!MESSAGE Liferay Portlet 6.0 requires Java 1.5 or newer.
!SUBENTRY 3 org.eclipse.wst.common.project.facet.core 4 0 2014-06-21 23:56:42.465
!MESSAGE Dynamic Web Module 3.0 requires Java 1.6 or newer.

I'm using Java 1.7 (tried also with 1.8), so I don't understand from where this error might come from. here is my configuration :

-Eclipse Kepler -Tomcat 7 (Liferay 6.2 CE) -java 1.7 / 1.8

thanks for your help guys :)

Upvotes: 1

Views: 3850

Answers (3)

Kundan Atre
Kundan Atre

Reputation: 3961

If still problem persist download liferay-sdk from this link and update sdk in your eclipse.

I found in this page added by Lu Li.

Upvotes: 0

Saleem Khan
Saleem Khan

Reputation: 339

Solution for this is goto
Windows->preferences->java->compiler
In the Compiler compliance level make sure its 1.7, if its 1.7 change it to some lower value and press ok, the again change it back to 1.7 it should work.

Upvotes: 2

Olaf Kock
Olaf Kock

Reputation: 48067

I haven't seen this problem ever. You might want to check if Eclipse knows the JRE you're working with - note that there's a difference between the JRE Eclipse runs on vs. the JRE/JDK that you're using for projects. You'll find the project's JRE in the preferences dialog (just filter by JRE) and check if the JRE that you're referencing there does indeed exist.

I have seen similar (but not the same) puzzling behaviour when a Java update removed an old directory and installed itself into a different directory. This happens easily when the directory in question contains version numbers/patch levels for your JRE.

Upvotes: 0

Related Questions