PBG
PBG

Reputation: 9644

Errors running builder 'Flex' on project

This is driving me crazy. When building a project, I get the following error

Errors occurred during the build.
    Errors running builder 'Flex' on project 'my-services'.
    java.lang.NullPointerException

Here's the last error from the Error log in Eclipse

!ENTRY org.eclipse.core.resources 4 75 2011-09-07 16:07:04.391
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 com.adobe.flexbuilder.project 4 75 2011-09-07 16:07:04.391
!MESSAGE Errors running builder 'Flex' on project 'my-services'.
!STACK 0
java.lang.NullPointerException
    at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.calcBuildTotalWork(FlexProjectBuilder.java:148)
    at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuilder.java:160)
    at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncrementalBuilder.java:157)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I've tried cleaning the project, refreshing the project, restarting eclipse, even deleting it from my workspace and re-importing it. I am still lost.

Upvotes: 4

Views: 8113

Answers (2)

Mauricio Gracia Gutierrez
Mauricio Gracia Gutierrez

Reputation: 10844

In my case the cause for this was that folder where the project was located did not have the .actionScriptProperties file in it.

In case you cannot find this file anywhere this is how mine looks

<?xml version="1.0" encoding="UTF-8"?>
<actionScriptProperties mainApplicationPath="YOUR_MAIN_SCREEN.mxml" version="3">
<compiler additionalCompilerArguments="-locale en_US -use-network=false" copyDependentFiles="true" enableModuleDebug="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.0" htmlPlayerVersionCheck="true" outputFolderPath="bin" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path="">
<modifiedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/>
</modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="bin"/>
<libraryPathEntry kind="1" linkType="1" path="${PROJECT_FRAMEWORKS}"/>
<libraryPathEntry kind="1" linkType="1" path="bin/libs"/>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
<libraryPathEntry kind="1" linkType="1" path="Components/ComponentsTesoreria"/>
</libraryPath>
<sourceAttachmentPath>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/>
</sourceAttachmentPath>
</compiler>
<applications>
<application path="YOUR_MAIN_SCREEN.mxml"/>
<application path="ANOTHER_SCREEN.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
<?xml version="1.0" encoding="UTF-8"?>
<actionScriptProperties mainApplicationPath="YOUR_MAIN_SCREEN.mxml" version="3">
<compiler additionalCompilerArguments="-locale en_US -use-network=false" copyDependentFiles="true" enableModuleDebug="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.0" htmlPlayerVersionCheck="true" outputFolderPath="bin" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path="">
<modifiedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/>
</modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="bin"/>
<libraryPathEntry kind="1" linkType="1" path="${PROJECT_FRAMEWORKS}"/>
<libraryPathEntry kind="1" linkType="1" path="bin/libs"/>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
<libraryPathEntry kind="1" linkType="1" path="Components/ComponentsTesoreria"/>
</libraryPath>
<sourceAttachmentPath>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="true"/>
</sourceAttachmentPath>
</compiler>
<applications>
<application path="YOUR_MAIN_SCREEN.mxml"/>
<application path="ANOTHER_SCREEN.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
</actionScriptProperties>

If you had a REPOSITORY linked to this project this can explain why this is happening http://www.blackcj.com/blog/2009/02/22/error-loading-project-missing-project-files/

Upvotes: 0

Marc Loeb
Marc Loeb

Reputation: 555

In my case I am working with modules and I created a special output folder for all modules. I received this in the log :

!ENTRY org.eclipse.core.resources 4 75 2012-03-04 10:27:12.328
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 com.adobe.flexbuilder.project 4 75 2012-03-04 10:27:12.328
!MESSAGE Errors running builder 'Flex' on project 'myProject'.
!STACK 0
java.lang.RuntimeException: Object reference not set to an instance of an object.
I was able to resolve it by editing the .project file - which looked causing the error like this:
...
<linkedResources>
    <link>
        <name>[source path] modules</name>
        <type>2</type>
        <locationURI>DOCUMENTS/modules</locationURI>
    </link>
    <link>
        <name>bin-debug</name>
        <type>2</type>
        <locationURI>DOCUMENTS/modules</locationURI>
    </link>
</linkedResources>
...
I was able to resolve it by editing the .project file - which looked causing the error like this:
...
<linkedResources>
    <link>
        <name>bin-debug</name>
        <type>2</type>
        <locationURI>DOCUMENTS/modules</locationURI>
    </link>
</linkedResources>
...

Hope this helps somebody else solving this annoying error.

Upvotes: 2

Related Questions