Skip to main content
Participant
August 6, 2008
Question

Exception initializing velocity engine

  • August 6, 2008
  • 2 replies
  • 956 views
Hi, I am trying to run mxmlc using Flex ant tasks. During execution, i run into the problem below. The ASTprocess class is in the mm-velocity-1.4.jar. I am using Flex SDK 3.0.0. Thanks in advance

[mxmlc] <...>\main.mxml: Error: Exception initializing velocity engine: flex2.compiler.util.VelocityManager$Logger
[mxmlc] Error: java.io.InvalidClassException: org.apache.velocity.runtime.parser.node.ASTprocess; org.apache.velocity.runtime.parser.node.ASTprocess; class invalid for deserialization
[mxmlc] java.lang.RuntimeException: java.io.InvalidClassException: org.apache.velocity.runtime.parser.node.ASTprocess; org.apache.velocity.runtime.parser.node.ASTprocess; class invalid for deserialization
[mxmlc] at flex2.compiler.util.VelocityManager.getTemplate(VelocityManager.java:175)
[mxmlc] at flex2.compiler.util.VelocityManager.getTemplate(VelocityManager.java:151)
[mxmlc] at flex2.compiler.util.VelocityManager.getTemplate(VelocityManager.java:137)
[mxmlc] at flex2.compiler.mxml.InterfaceCompiler.generateSkeleton(InterfaceCompiler.java:697)
[mxmlc] at flex2.compiler.mxml.InterfaceCompiler.parse2(InterfaceCompiler.java:280)
[mxmlc] at flex2.compiler.mxml.Compiler.parse2(Compiler.java:129)
[mxmlc] at flex2.compiler.API.parse2(API.java:2381)
[mxmlc] at flex2.compiler.API.parse2(API.java:2339)
[mxmlc] at flex2.compiler.API.batch2(API.java:373)
[mxmlc] at flex2.compiler.API.batch(API.java:1108)
[mxmlc] at flex2.compiler.API.compile(API.java:1281)
[mxmlc] at flex2.compiler.API.compile(API.java:1201)
[mxmlc] at flex2.tools.Compiler.mxmlc(Compiler.java:240)
[mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc] at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc] at flex.ant.FlexTask.executeInProcess(FlexTask.java:311)
This topic has been closed for replies.

2 replies

Participant
August 7, 2008
Thanks a lot for your help, Jono. It turns out I had a conflicting jar in the ANT lib folder that also had ASTProcess. Once I got rid of the jar, everything worked as expected. Thanks again
Participating Frequently
August 6, 2008
You're going to need to volunteer more data :) Does this compile correctly with the commandline, fb? Did you change *anything* in the SDK? Which JRE are you using? Which ANT? (did you put any custom jars in the ANT lib folder?)

You could also try forking the compile with fork="true" to execute it out of process -- a little slower but more reliable.

Jono