Error Importing a Symfony project in Eclipse with

2019-08-13 01:46发布

I have troubles trying to import an already existing Symfony 2.3 project into my Eclipse (standard 4.3.1) workspace using dubture's plugin.

I use the Eclipse wizard for importing, but when I click on 'Finish' a popup window shows:

An error ocurred during import. Please see the workspace logs for details.

The log file gives me a bunch of messages like this one:

!ENTRY org.eclipse.dltk.core 2 0 2014-02-18 18:08:35.104
!MESSAGE Error receiving file: /Symfony/app/cache/dev/twig/d1/4c/d23835735a18dbf9b98dd75484f6.php content: retrying(1)
!STACK 1 org.eclipse.core.internal.resources.ResourceException: Resource /Symfony/app/cache/dev/twig/d1/4c/d23835735a18dbf9b98dd75484f6.php' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
at org.eclipse.core.internal.resources.File.getContents(File.java:287)
at org.eclipse.dltk.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:534)
at org.eclipse.dltk.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:491)
at org.eclipse.dltk.internal.core.SourceModule.getBufferContent(SourceModule.java:405)
at org.eclipse.dltk.internal.core.AbstractSourceModule.getSourceAsCharArray(AbstractSourceModule.java:314)
at org.eclipse.dltk.internal.core.AbstractSourceModule.getContentsAsCharArray(AbstractSourceModule.java:335)
at org.eclipse.php.internal.core.compiler.ast.parser.AbstractPHPSourceParser.parse(AbstractPHPSourceParser.java:41)
at org.eclipse.php.internal.core.compiler.ast.parser.PHPSourceParserFactory.parse(PHPSourceParserFactory.java:41)
at com.dubture.twig.core.parser.TwigSourceParserFactory.parse(TwigSourceParserFactory.java:36)
at org.eclipse.dltk.core.SourceParserUtil.parse(SourceParserUtil.java:135)
at org.eclipse.dltk.core.SourceParserUtil.getModuleDeclaration(SourceParserUtil.java:171)
at org.eclipse.dltk.core.SourceParserUtil.getModuleDeclaration(SourceParserUtil.java:166)
at org.eclipse.php.internal.core.index.PhpIndexingParser.parseSourceModule(PhpIndexingParser.java:27)
at org.eclipse.dltk.core.index2.AbstractIndexer.indexDocument(AbstractIndexer.java:45)
at org.eclipse.dltk.internal.core.index.sql.SqlIndexer.indexDocument(SqlIndexer.java:147)
at org.eclipse.dltk.internal.core.index2.SourceModulesRequest.run(SourceModulesRequest.java:78)
at org.eclipse.dltk.core.search.indexing.AbstractJob.execute(AbstractJob.java:76)
at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:467)
at java.lang.Thread.run(Unknown Source)
!SUBENTRY 1 org.eclipse.core.resources 4 368 2014-02-18 18:08:35.104
!MESSAGE Resource '/Symfony/app/cache/dev/twig/d1/4c/d23835735a18dbf9b98dd75484f6.php' does not exist.

I checked if the specified files exist and they do, so I don't understand these messages. Anyone had the same problem and can point me in the right direction?

1条回答
兄弟一词,经得起流年.
2楼-- · 2019-08-13 02:30

You have to make sure youre vendors are installed correctly and also make sure you have a php executable running.

  • In eclipse menu :

window -> preferences -> Php -> php executables.

If you have nothing there :

Click add -> browse the executable (normaly /usr/bin/php5).

use zend debugger and check the "use defaults php.ini" box.

查看更多
登录 后发表回答