Copy link to clipboard
Copied
We are building FlashBuilder projects as part of continuous integration via ANT scripts. It looks something like this:
<target name="main" description="Build all flex projects">
<fb.exportReleaseBuild project="ProjectA" destdir="somedir" />
</target>
And a .bat file that runs FlashBuilderC with standard parameters:
--launcher.suppressErrors -noSplash -application org.eclipse.ant.core.antRunner -data %WORKSPACE% -file "buildFlexContents.xml" main
So far this has worked great with FlashBuilder 4 and 4.6, but when we updated to 4.7, the following started to happen (parts of the .log file):
!SESSION 2014-04-07 13:25:58.288 -----------------------------------------------
eclipse.buildId=M20110909-1335
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -application org.eclipse.ant.core.antRunner -file buildFlexContents.xml main
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.eclipse.ant.core.antRunner -data C:\workspace -file buildFlexContents.xml main
!ENTRY org.eclipse.core.resources 2 10035 2014-04-07 13:25:59.562
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.osgi 4 0 2014-04-07 13:26:02.478
!MESSAGE An error occurred while automatically activating bundle com.adobe.flexbuilder.codemodel (28).
!STACK 0
org.osgi.framework.BundleException: Exception in com.adobe.flexbuilder.codemodel.CMCoreActivator.start() of bundle com.adobe.flexbuilder.codemodel.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
..
Caused by: java.lang.NullPointerException
at com.adobe.flexbuilder.codemodel.internal.bridge.WorkspaceSpecification.getStateLocation(WorkspaceSpecification.java:157)
at com.adobe.flexbuilder.codemodel.internal.bridge.WorkspaceSpecification.getFileInStateLocation(WorkspaceSpecification.java:149)
..
!ENTRY org.eclipse.osgi 4 0 2014-04-07 13:26:02.482
!MESSAGE An error occurred while automatically activating bundle com.adobe.flexide.codemodel.bridge (100).
!STACK 0
org.osgi.framework.BundleException: Exception in com.adobe.flexide.codemodel.internal.bridge.CMBridgeActivator.start() of bundle com.adobe.flexide.codemodel.bridge.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
...
Caused by: java.lang.NoClassDefFoundError: com/adobe/flexbuilder/codemodel/metadata/IMetadataManager
at com.adobe.flexide.codemodel.internal.bridge.CMBridgeActivator.start(CMBridgeActivator.java:50)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 74 more
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.adobe.flexbuilder.codemodel (28).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
...
!ENTRY org.eclipse.osgi 4 0 2014-04-07 13:26:02.742
!MESSAGE Application error
!STACK 1
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
Caused by: buildFlexContents.xml:8: java.lang.NoClassDefFoundError: com/adobe/flexbuilder/codemodel/common/CMFactory
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
I have tried recreating the workspace, and changing -vm JDK paths to try with 1.7 to no avail.
Funny part about this is, that it works with FlashBuilder.exe (inside the GUI), but not with FlashBuilderC from the commmand line.
Any ideas why it can't find this class?
Copy link to clipboard
Copied
No one with the same problem? Can you build with FlashBuilderC flex projects using ANT?
Copy link to clipboard
Copied
Hi,
I believe I'm having same issue.
did you manage to resolve it?
here is the error I'm receiving:
!SESSION 2014-07-23 11:17:58.307 -----------------------------------------------
eclipse.buildId=M20110909-1335
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -application org.eclipse.ant.core.antRunner -file c:\FB\build_888PokerAndroid_3_2_0.xml main
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.eclipse.ant.core.antRunner -data C:\FB\mobile_Android_3.2.0_WS1 -file c:\FB\build_888PokerAndroid_3_2_0.xml main
!ENTRY org.eclipse.core.resources 2 10035 2014-07-23 11:18:00.960
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.osgi 4 0 2014-07-23 11:18:05.305
!MESSAGE An error occurred while automatically activating bundle com.adobe.flexbuilder.codemodel (29).
!STACK 0
org.osgi.framework.BundleException: Exception in com.adobe.flexbuilder.codemodel.CMCoreActivator.start() of bundle com.adobe.flexbuilder.codemodel.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
I'm also investigating it with Adobe at the moment, so far without much success.
full description is here:
https://forums.adobe.com/message/6516177#6516177
Thanks,
Erez.
Copy link to clipboard
Copied
We are also experiencing this exact same issue! Been working on this for two full days, resetting the workspace from scratch twice without success!
Copy link to clipboard
Copied
Hi,
I'm still investigating this with Adobe Support.
By the way, did you also overlay Air SDK version by any chance? (We did overlay to version 14).
On what OS does it happen? For us it happens on Win2008 R2 Standard 64bit.
Thanks,
Erez.
Copy link to clipboard
Copied
Hi Erez,
Nope haven't overlayed anything on the build environment.
It's on Windows 7 Pro 64bit.
Regards
Carl
Copy link to clipboard
Copied
Hi Carl,
Good to know we are not alone ..
Not sure it's relevant, but we do have both FB 4.6 and 4.7 on those build machines in which the issue occur.
It builds fine in GUI, but gives this nasty error when running from command line.
Is it same for you?
btw, I'm fairly new to Flash environment, so I'm not sure what type of project is it (I do know it works well in the GUI).
I understand from Dev team the the project type is ActionScript Mobile Project.
Is it same for you either?
What else can we possibly check?
thanks,
Erez.
Copy link to clipboard
Copied
Hi,
I was instructed by Adobe Support to open a bug, which I did:
Please review and see if you have more info to add about this bug.
Thanks,
Erez.
Copy link to clipboard
Copied
We actually fixed the problem by removing one of the projects in FB. The project works fine in GUI, but not from command line.
As it's not needed for what we are doing we just removed it.
If you have several projects, try removing them one by one and readding until it fails. That's what we did
Copy link to clipboard
Copied
Hi Mowday,
So you actually got it to work from command line, right?
We have one main project, which has referenced libraries to 3 other SWC files (which were also imported to the project).
When I remove any of them from the GUI, the project fails to build in 4.7 GUI.
Any idea how to debug it?
thanks,
Erez.
Copy link to clipboard
Copied
I was experiencing the same problem and found a solution that works for me.
The build process seems to leave behind a few .snap files in the .metadata directory within the FlashBuilder workspace root. I used the following powershell command to delete the snap files before I attempted the command-line build:
Remove-Item -include *.snap $FLASH_WORKSPACE\.metadata\ -Recurse
$FLASH_WORKSPACE is the variable that points to my workspace.
Copy link to clipboard
Copied
Thanks mrcrowl! You solution just fixed my build process on OS X.
--
Here is how to do the same in Bash:
find "$FLASH_WORKSPACE/.metadata/" -name '*.snap' -print0 | xargs -0 rm -rf
Copy link to clipboard
Copied
Just had the same issue again, googled it and found my own answer here.
Thanks romann for the useful answer!