1

I'm new to Liferay/java/Eclipse.

I'm trying to set up a simple Liferay Plugin project, but whenever I try to create the project and click Finish, I get the error message:

"Error creating Liferay plugin project."

Here is the configuration I'm using:

Eclipse-Kepler

Liferay Plugins SDK 6.2

Liferay Portal/Tomcat 6.2

java version: 1.8.0_05

Environment variables are set at:

$JAVA_HOME = C:\Program Files\Java\jdk1.8.0_05 $PATH = /c/Program Files/Java/jre8/bin

Here is my stack trace from the error log:

org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
    at com.liferay.ide.project.core.util.ProjectUtil.importProject(ProjectUtil.java:1214)
    at com.liferay.ide.project.core.PluginsSDKProjectProvider.doCreateNewProject(PluginsSDKProjectProvider.java:177)
    at com.liferay.ide.project.core.NewLiferayProjectProvider.createNewProject(NewLiferayProjectProvider.java:45)
    at com.liferay.ide.project.core.model.NewLiferayPluginProjectOpMethods.execute(NewLiferayPluginProjectOpMethods.java:101)
    at com.liferay.ide.project.core.model.NewLiferayPluginProjectOp$Impl.execute(Unknown Source)
    at org.eclipse.sapphire.ui.forms.swt.SapphireWizard.performFinish(SapphireWizard.java:352)
    at org.eclipse.sapphire.ui.forms.swt.SapphireWizard$3.run(SapphireWizard.java:314)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:363)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1099)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
    at com.liferay.ide.project.core.util.ProjectUtil.createNewSDKProject(ProjectUtil.java:544)
    at com.liferay.ide.project.core.util.ProjectUtil.importProject(ProjectUtil.java:1210)
    ... 7 more

and my Session Data:

eclipse.buildId=4.3.2.M20140221-1700
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

Any ideas as to what is causing this?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Fetus
  • 985
  • 2
  • 12
  • 23
  • As an alternative approach, you could use the built in [create scripts](http://www.liferay.com/community/wiki/-/wiki/Main/Plugins+SDK#section-Plugins+SDK-Creating+a+new+portlet) to generate a project and import it into eclipse. – Origineil Sep 12 '14 at 02:46
  • 1
    great error message that you found there - a good example for what you don't want to see. Wild guess: Try if Java7 is the constraint: Liferay is not yet certified on Java8, as it's running on a wild variation of application servers (down to Java6) adoption isn't that quick. – Olaf Kock Sep 12 '14 at 06:04
  • @OlafKock started from scratch but this time with jre7 instead of jre8, and it works! thanks for your help. – Fetus Sep 12 '14 at 15:33

2 Answers2

1

Problem was fixed by deleting jre8 and using jre7 instead.

Fetus
  • 985
  • 2
  • 12
  • 23
0

I just read from somewhere else about the compiler thing. It can also be a reason. Well I did change mine to 1.6 and it worked greatly perfectly well So you go to:

Windows -> preferences-> java->Compiler

and there you can change it

Draken
  • 3,134
  • 13
  • 34
  • 54
Sonia
  • 1