Skip to content

Instantly share code, notes, and snippets.

@drazzib
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drazzib/35e504e6e689f96dae8f to your computer and use it in GitHub Desktop.
Save drazzib/35e504e6e689f96dae8f to your computer and use it in GitHub Desktop.
Gora 0.4 compiler crash with "enum" type
/bin/gora goracompiler record_with_enum.avsc test/
Compiling: record_with_enum.avsc
74 [main] ERROR AvroVelocityLogChute - ResourceManager : unable to find resource '/org/apache/gora/compiler/templates/enum.vm' in any resource loader.
Exception in thread "main" java.lang.RuntimeException: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/org/apache/gora/compiler/templates/enum.vm'
at org.apache.avro.compiler.specific.SpecificCompiler.renderTemplate(SpecificCompiler.java:329)
at org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:371)
at org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:316)
at org.apache.gora.compiler.GoraCompiler.compileSchema(GoraCompiler.java:65)
at org.apache.gora.compiler.cli.GoraCompilerCLI.main(GoraCompilerCLI.java:56)
Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/org/apache/gora/compiler/templates/enum.vm'
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:373)
at org.apache.avro.compiler.specific.SpecificCompiler.renderTemplate(SpecificCompiler.java:327)
... 4 more
{
"name": "RecordWithEnum",
"namespace": "com.drazzib.com",
"type": "record",
"fields": [
{
"name": "type",
"type": {
"name": "MyEnum",
"type": "enum",
"symbols": [
"PERIOD",
"INSTANT"
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment