Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6552] Android: Modules: Unable to build module with <enum>.ordinal()

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2011-12-13T22:28:42.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sRelease 1.8.0.1, Release 2.0.0
ComponentsAndroid
Labelsbranch-v8, verified-1.8.0.1
ReporterJeff English
AssigneeOpie Cyrus
Created2011-12-09T17:46:54.000+0000
Updated2012-01-11T15:30:09.000+0000

Description

Building the BrightCove 2.0 modules for Android throws a series of errors. I have isolated the issue to the definition of the Kroll.Constant values in the module class:
	//
	// Constants
	//
	@Kroll.constant public static final int SORT_BY_PUBLISH_DATE = SortByTypeEnum.PUBLISH_DATE.ordinal();
	@Kroll.constant public static final int SORT_BY_CREATION_DATE = SortByTypeEnum.CREATION_DATE.ordinal();
	@Kroll.constant public static final int SORT_BY_MODIFIED_DATE = SortByTypeEnum.MODIFIED_DATE.ordinal();
	@Kroll.constant public static final int SORT_BY_PLAYS_TOTAL = SortByTypeEnum.PLAYS_TOTAL.ordinal();
	@Kroll.constant public static final int SORT_BY_PLAYS_TRAILING_WEEK = SortByTypeEnum.PLAYS_TRAILING_WEEK.ordinal();
	@Kroll.constant public static final int ORDER_ASCENDING = SortOrderTypeEnum.ASC.ordinal();
	@Kroll.constant public static final int ORDER_DESCENDING = SortOrderTypeEnum.DESC.ordinal();
	@Kroll.constant public static final int STATE_ACTIVE = VideoStateFilterEnum.PLAYABLE.ordinal();
	@Kroll.constant public static final int STATE_INACTIVE = VideoStateFilterEnum.INACTIVE.ordinal();
	@Kroll.constant public static final int STATE_DELETED = VideoStateFilterEnum.DELETED.ordinal();
	@Kroll.constant public static final int PLAYLIST_OLDEST_TO_NEWEST = PlaylistTypeEnum.OLDEST_TO_NEWEST.ordinal();
	@Kroll.constant public static final int PLAYLIST_NEWEST_TO_OLDEST = PlaylistTypeEnum.NEWEST_TO_OLDEST.ordinal();
	@Kroll.constant public static final int PLAYLIST_START_OLDEST_TO_NEWEST = PlaylistTypeEnum.OLDEST_TO_NEWEST.ordinal();
	@Kroll.constant public static final int PLAYLIST_START_NEWEST_TO_OLDEST = PlaylistTypeEnum.NEWEST_TO_OLDEST.ordinal();
	@Kroll.constant public static final int PLAYLIST_ALPHABETICAL = PlaylistTypeEnum.ALPHABETICAL.ordinal();
	@Kroll.constant public static final int PLAYLIST_PLAYS_TOTAL = PlaylistTypeEnum.PLAYSTOTAL.ordinal();
	@Kroll.constant public static final int PLAYLIST_PLAYS_TRAILING_WEEK = PlaylistTypeEnum.PLAYS_TRAILING_WEEK.ordinal();
	@Kroll.constant public static final int PLAYLIST_EXPLICIT = PlaylistTypeEnum.EXPLICIT.ordinal();
	@Kroll.constant public static final int REGION_US = RegionEnum.US.ordinal();
	@Kroll.constant public static final int REGION_JP = RegionEnum.JP.ordinal();
	@Kroll.constant public static final int DELIVERY_DEFAULT = MediaDeliveryTypeEnum.DEFAULT.ordinal();
	@Kroll.constant public static final int DELIVERY_HTTP = MediaDeliveryTypeEnum.HTTP.ordinal();
The use of the ".ordinal()" method on the enumerated type is what triggers the errors. If I comment out the declaration of these Kroll.constant values then the build errors are not generated. The build output is as follows:
JEnglish-MBP:brightcove jenglish$ ant
Buildfile: /Users/jenglish/titanium_mobile_modules/android/brightcove/build.xml

init:
    [mkdir] Created dir: /Users/jenglish/titanium_mobile_modules/android/brightcove/build/classes
    [mkdir] Created dir: /Users/jenglish/titanium_mobile_modules/android/brightcove/dist

process.annotations:
    [mkdir] Created dir: /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/json
    [javac] Compiling 7 source files to /Users/jenglish/titanium_mobile_modules/android/brightcove/build/classes
    [javac] Note: [KrollBindingGen] Running Kroll binding generator.
    [javac] Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/brightcove.json
    [javac] Note: [KrollBindingGen] Found binding for module Brightcove
    [javac] Note: [KrollBindingGen] Found binding for proxy Playlist
    [javac] Note: [KrollBindingGen] Found binding for proxy VideoPlayer
    [javac] Note: [KrollBindingGen] Found binding for proxy Video
    [javac] Note: [KrollBindingGen] Generating JSON: /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/json/org/appcelerator/titanium/bindings/brightcove.json
    [javac] warning: The following options were not recognized by any processor: '[kroll.checkTiContext]'
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

generate.rhino.bindings:
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/PlaylistProxyPrototype.java
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/VideoPlayerProxyPrototype.java
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/VideoProxyPrototype.java
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/BrightcoveModulePrototype.java
     [java] Dec 9, 2011 7:35:28 PM freemarker.log.JDK14LoggerFactory$JDK14Logger error
     [java] SEVERE: constant.value is undefined.
     [java] 
     [java] constant.value is undefined.
     [java] The problematic instruction:
     [java] ----------
     [java] ==> ${constant.value?c} [on line 85, column 43 in ProxyBindingRhino.java.fm]
     [java]  in user-directive Proxy.listConstants [on line 81, column 17 in ProxyBindingRhino.java.fm]
     [java] ----------
     [java] 
     [java] Java backtrace for programmers:
     [java] ----------
     [java] freemarker.core.InvalidReferenceException: constant.value is undefined.
     [java] 	at freemarker.core.EvaluationUtil.getNumber(EvaluationUtil.java:104)
     [java] 	at freemarker.core.NumericalBuiltins$cBI._getAsTemplateModel(NumericalBuiltins.java:157)
     [java] 	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
     [java] 	at freemarker.core.Expression.getStringValue(Expression.java:93)
     [java] 	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IfBlock.accept(IfBlock.java:82)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.visit(Environment.java:395)
     [java] 	at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
     [java] 	at freemarker.core.Environment.visit(Environment.java:417)
     [java] 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Macro$Context.runMacro(Macro.java:172)
     [java] 	at freemarker.core.Environment.visit(Environment.java:603)
     [java] 	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.process(Environment.java:190)
     [java] 	at freemarker.template.Template.process(Template.java:237)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.saveTypeTemplate(KrollBindingGenerator.java:129)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.generateBindings(KrollBindingGenerator.java:296)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.main(KrollBindingGenerator.java:359)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
     [java] 	at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
     [java] 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.Target.execute(Target.java:390)
     [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
     [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     [java] 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
     [java] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
     [java] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
     [java] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
     [java] 
     [java] constant.value is undefined.
     [java] The problematic instruction:
     [java] ----------
     [java] ==> ${constant.value?c} [on line 85, column 43 in ProxyBindingRhino.java.fm]
     [java]  in user-directive Proxy.listConstants [on line 81, column 17 in ProxyBindingRhino.java.fm]
     [java] ----------
     [java] 
     [java] Java backtrace for programmers:
     [java] ----------
     [java] freemarker.core.InvalidReferenceException: constant.value is undefined.
     [java] 	at freemarker.core.EvaluationUtil.getNumber(EvaluationUtil.java:104)
     [java] 	at freemarker.core.NumericalBuiltins$cBI._getAsTemplateModel(NumericalBuiltins.java:157)
     [java] 	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
     [java] 	at freemarker.core.Expression.getStringValue(Expression.java:93)
     [java] 	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IfBlock.accept(IfBlock.java:82)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.visit(Environment.java:395)
     [java] 	at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
     [java] 	at freemarker.core.Environment.visit(Environment.java:417)
     [java] 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Macro$Context.runMacro(Macro.java:172)
     [java] 	at freemarker.core.Environment.visit(Environment.java:603)
     [java] 	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.process(Environment.java:190)
     [java] 	at freemarker.template.Template.process(Template.java:237)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.saveTypeTemplate(KrollBindingGenerator.java:129)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.generateBindings(KrollBindingGenerator.java:296)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.main(KrollBindingGenerator.java:359)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
     [java] 	at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
     [java] 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.Target.execute(Target.java:390)
     [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
     [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     [java] 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
     [java] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
     [java] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
     [java] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/brightcoveGeneratedBindings.java

generate.rhino.idswitch:
     [echo] Generating IDs for /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/brightcoveGeneratedBindings.java
     [echo] Generating IDs for /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/BrightcoveModulePrototype.java
     [echo] Generating IDs for /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/PlaylistProxyPrototype.java
     [echo] Generating IDs for /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/VideoPlayerProxyPrototype.java
     [echo] Generating IDs for /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/java/ti/brightcove/VideoProxyPrototype.java

generate.v8.bindings:
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.PlaylistProxy.h
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.PlaylistProxy.cpp
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.VideoPlayerProxy.h
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.VideoPlayerProxy.cpp
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.VideoProxy.h
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.VideoProxy.cpp
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.BrightcoveModule.h
     [java] Generating /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni/ti.brightcove.BrightcoveModule.cpp
     [java] Dec 9, 2011 7:35:29 PM freemarker.log.JDK14LoggerFactory$JDK14Logger error
     [java] SEVERE: constant.value is undefined.
     [java] 
     [java] constant.value is undefined.
     [java] The problematic instruction:
     [java] ----------
     [java] ==> ${constant.value?c} [on line 134, column 58 in ProxyBindingV8.cpp.fm]
     [java]  in user-directive Proxy.listConstants [on line 130, column 9 in ProxyBindingV8.cpp.fm]
     [java] ----------
     [java] 
     [java] Java backtrace for programmers:
     [java] ----------
     [java] freemarker.core.InvalidReferenceException: constant.value is undefined.
     [java] 	at freemarker.core.EvaluationUtil.getNumber(EvaluationUtil.java:104)
     [java] 	at freemarker.core.NumericalBuiltins$cBI._getAsTemplateModel(NumericalBuiltins.java:157)
     [java] 	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
     [java] 	at freemarker.core.Expression.getStringValue(Expression.java:93)
     [java] 	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IfBlock.accept(IfBlock.java:82)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.visit(Environment.java:395)
     [java] 	at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
     [java] 	at freemarker.core.Environment.visit(Environment.java:417)
     [java] 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Macro$Context.runMacro(Macro.java:172)
     [java] 	at freemarker.core.Environment.visit(Environment.java:603)
     [java] 	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.process(Environment.java:190)
     [java] 	at freemarker.template.Template.process(Template.java:237)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.saveTypeTemplate(KrollBindingGenerator.java:129)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.generateBindings(KrollBindingGenerator.java:290)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.main(KrollBindingGenerator.java:359)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
     [java] 	at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
     [java] 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.Target.execute(Target.java:390)
     [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
     [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     [java] 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
     [java] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
     [java] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
     [java] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
     [java] 
     [java] constant.value is undefined.
     [java] The problematic instruction:
     [java] ----------
     [java] ==> ${constant.value?c} [on line 134, column 58 in ProxyBindingV8.cpp.fm]
     [java]  in user-directive Proxy.listConstants [on line 130, column 9 in ProxyBindingV8.cpp.fm]
     [java] ----------
     [java] 
     [java] Java backtrace for programmers:
     [java] ----------
     [java] freemarker.core.InvalidReferenceException: constant.value is undefined.
     [java] 	at freemarker.core.EvaluationUtil.getNumber(EvaluationUtil.java:104)
     [java] 	at freemarker.core.NumericalBuiltins$cBI._getAsTemplateModel(NumericalBuiltins.java:157)
     [java] 	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
     [java] 	at freemarker.core.Expression.getStringValue(Expression.java:93)
     [java] 	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IfBlock.accept(IfBlock.java:82)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.visit(Environment.java:395)
     [java] 	at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
     [java] 	at freemarker.core.Environment.visit(Environment.java:417)
     [java] 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Macro$Context.runMacro(Macro.java:172)
     [java] 	at freemarker.core.Environment.visit(Environment.java:603)
     [java] 	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:210)
     [java] 	at freemarker.core.Environment.process(Environment.java:190)
     [java] 	at freemarker.template.Template.process(Template.java:237)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.saveTypeTemplate(KrollBindingGenerator.java:129)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.generateBindings(KrollBindingGenerator.java:290)
     [java] 	at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.main(KrollBindingGenerator.java:359)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
     [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
     [java] 	at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
     [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
     [java] 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
     [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
     [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] 	at org.apache.tools.ant.Target.execute(Target.java:390)
     [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
     [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
     [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
     [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
     [java] 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
     [java] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
     [java] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
     [java] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

generate.bindings:

pre.compile:

ndk.build:
     [copy] Copying 1 file to /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated
     [copy] Copying 1 file to /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/jni
     [exec] Compile++ thumb  : ti.brightcove <= ti.brightcove.BrightcoveModule.cpp
     [exec] jni/Android.mk:24: warning: overriding commands for target /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:24: warning: ignoring old commands for target /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:27: warning: overriding commands for target /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/BootstrapJS.cpp'
     [exec] jni/Android.mk:27: warning: ignoring old commands for target /Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/BootstrapJS.cpp'
     [exec] jni/ti.brightcove.BrightcoveModule.cpp:202:1: error: unterminated argument list invoking macro "DEFINE_INT_CONSTANT"
     [exec] jni/ti.brightcove.BrightcoveModule.cpp: In static member function 'static v8::Handle<v8::FunctionTemplate> ti::brightcove::BrightcoveModule::getProxyTemplate()':
     [exec] jni/ti.brightcove.BrightcoveModule.cpp:116: error: 'DEFINE_INT_CONSTANT' was not declared in this scope
     [exec] jni/ti.brightcove.BrightcoveModule.cpp:116: error: expected ';' at end of input
     [exec] jni/ti.brightcove.BrightcoveModule.cpp:116: error: expected '}' at end of input
     [exec] jni/ti.brightcove.BrightcoveModule.cpp: At global scope:
     [exec] jni/ti.brightcove.BrightcoveModule.cpp:116: error: expected '}' at end of input
     [exec] jni/ti.brightcove.BrightcoveModule.cpp:116: error: expected '}' at end of input
     [exec] make: *** [/Users/jenglish/titanium_mobile_modules/android/brightcove/build/generated/obj/local/armeabi/objs/ti.brightcove/ti.brightcove.BrightcoveModule.o] Error 1

BUILD FAILED
/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/module/android/build.xml:226: exec returned: 2

Comments

  1. Natalie Huynh 2011-12-19

    Built module with 1.8.0.1.RC3. Compiles without error. Leaving open to verify with 1.9.0
  2. Wilson Luu 2012-01-11

    Closing bug. Already verified fix on 1.8.0.1

JSON Source