Liferay - Error while creating first portlet plugi

2019-03-03 19:34发布

I followed the tutorial here to setup Liferay + server + SDK, but I got an error while creating my portlet. It tells me that the portlet gets created, but I still get an error and it doesn't show in my package explorer in Eclipse.

I'm working on a Mac with Eclipse.

Here the error:

org.eclipse.core.runtime.CoreException: Source '/Users/danielstorch/Documents/Develop/workspace/.metadata/.plugins/com.liferay.ide.sdk.core/create/1431263175117' does not exist
    at com.liferay.ide.project.core.PluginsSDKProjectProvider.doCreateNewProject(PluginsSDKProjectProvider.java:182)
    at com.liferay.ide.project.core.NewLiferayProjectProvider.createNewProject(NewLiferayProjectProvider.java:45)
    at com.liferay.ide.project.core.model.NewLiferayPluginProjectOpMethods.execute(NewLiferayPluginProjectOpMethods.java:109)
    at com.liferay.ide.project.core.model.NewLiferayPluginProjectOp$Impl.execute(Unknown Source)
    at org.eclipse.sapphire.ui.forms.swt.SapphireWizard.performFinish(SapphireWizard.java:370)
    at org.eclipse.sapphire.ui.forms.swt.SapphireWizard$3.run(SapphireWizard.java:334)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.io.FileNotFoundException: Source '/Users/danielstorch/Documents/Develop/workspace/.metadata/.plugins/com.liferay.ide.sdk.core/create/1431263175117' does not exist
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1298)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1191)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1160)
    at com.liferay.ide.project.core.PluginsSDKProjectProvider.doCreateNewProject(PluginsSDKProjectProvider.java:176)
    ... 6 more

This is a screenshot after creating the portlet with the message:

enter image description here

Here is a stackoverflow question with the same problem, But I don't understand the solution and I can't comment on it.

1条回答
乱世女痞
2楼-- · 2019-03-03 20:28

I changed the permissions of all folders involved in the task to 777. It worked :)

The comment in the referred link says, he had permissions issue (probably he had read-only) for the folder where he wanted to create portlet. So, he changed it to 777 (read, write, and execute).

Actually, its not the builder which is failing in creating new plugin, it is the OS that is not allowing the contents to be written on file system.

You can change permission of particular folder referring following link:
How to set 777 permission on a particular folder?

However, if you are further interested in permission system, go to:
http://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/

查看更多
登录 后发表回答