I am trying to use Scala macro annotations with this library.
I have a schema file at src/main/resources/avsc/FriendRequestAcceptedGson.avsc
I am trying to refer to it in my code as follows:
@AvroTypeProvider("/avsc/FriendRequestAcceptedGson.avsc")
@AvroRecord
case class FriendRequestAcceptedGson()
This is the error I get:
[error] /home/lee/Code/bigdata-friends/java/etl/src/main/scala/com/mxit/bd/friends/etl/Runner.scala:64: exception during macro expansion:
[error] java.io.FileNotFoundException: /avsc/FriendRequestAcceptedGson.avsc (No such file or directory)
[error] at java.io.FileInputStream.open(Native Method)
[error] at java.io.FileInputStream.<init>(FileInputStream.java:146)
[error] at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:504)
[error] at org.apache.avro.Schema$Parser.parse(Schema.java:922)
[error] at com.julianpeeters.avro.annotations.util.SchemaParser$.getSchema(SchemaParser.scala:20)
[error] at com.julianpeeters.avro.annotations.AvroTypeProviderMacro$.impl(TypeProviderMacro.scala:23)
[error] @AvroTypeProvider("/avsc/FriendRequestAcceptedGson.avsc")