Giter Site home page Giter Site logo

avro-rpc-quickstart's People

Contributors

dcaba avatar dependabot[bot] avatar kmizumar avatar phunt avatar spullara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avro-rpc-quickstart's Issues

When running mvn command in Windows, should use " instead of '

When I build the jar with java8 and run the mvn command in windows, I got the error:
[ERROR] Unknown lifecycle phase "pat".

mvn -v:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: D:\apache-maven-3.3.9
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: C:\Java\jdk1.8.0_60\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

And I change the
 mvn -e exec:java -Dexec.mainClass=com.lyl.dfs.Main -Dexec.args='avro_user pat Hello_World' 

to

 mvn -e exec:java -Dexec.mainClass=com.lyl.dfs.Main -Dexec.args="avro_user pat Hello_World"

Then it works well...

avro-maven-plugin chicken-and-egg problem.

Thanks for putting this together!

I ran into an issue following the README. The avro-maven-plugin is in the same directory as pom.xml, as a result, when the maven install is run:

mvn install:install-file -Dfile=./avro-maven-plugin-1.0-SNAPSHOT.jar -DpomFile=./avro-maven-plugin-1.0-SNAPSHOT.pom

The project's pom is picked up and complains that the avro-maven-plugin can't be found (because it isn't installed yet). One solution would be to push the plugin into its own subdirectory directory sans pom.

Getting an ClassNotFound exception when using version 1.8.1 of avro

Hello I'm getting an error after downloading and executing:

mvn clean generate-sources

[ERROR] Failed to execute goal org.apache.avro:avro-maven-plugin:1.8.1:protocol (schemas) on project avro-rpc-quickstart: Execution schemas of goal org.apache.avro:avro-maven-plugin:1.8.1:protocol failed: A required class was missing while executing org.apache.avro:avro-maven-plugin:1.8.1:protocol: org/codehaus/jackson/node/TextNode [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.avro:avro-maven-plugin:1.8.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

here

Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.node.TextNode at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) ... 26 more

I'm new to Avro and was looking for an example that works with version 1.8.1, so I found this project but also checking this code out I'm receiving the same error.
I tried first the explination on the official avro page where I received the same error while having everything configured as they mentioned.

I do see the jackson-mapper-asl-1.9.13.jar containing the missing class on my classpath (org.codehaus.jackson.node.TextNode.class) added by maven so I'm not sure why it is not working.

The only version that is working without error for me is Avro version 1.7.5. Newer versions than that are giving me the error mentioned above. Any tips or hint would be helpfull.

I'm running it under
OS: Ubuntu 16.04 LTS,
Java: JDK 1.8.0_121
IDE: Neon.2 Release (4.6.2)
maven: 3.3.9

MVN Fresh install fail

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /mnt/GitHub/apache_avro/avro-rpc-quickstart/target/generated-sources/avro/example/proto/Mail.java:[10,7] error: duplicate class: example.proto.Mail
[ERROR] /mnt/GitHub/apache_avro/avro-rpc-quickstart/target/generated-sources/avro/example/proto/Message.java:[9,7] error: duplicate class: example.proto.Message

avro.io.AvroTypeException

Hello:
I download this quikstart,and it can run well ,but when i change it add an type [add] to this avpr ,and change the messages-send like :"send": { "request": [{"name": "message", "type": "Message"},{"name": "add", "type": "Add"}], then i call send method get then error:avro.io.AvroTypeException. I don't know how to call then method send. then avpr is like:
{"namespace": "example.proto",
"protocol": "Mail",

"types": [
{"name": "Message", "type": "record",
"fields": [
{"name": "to", "type": "string"},
{"name": "from", "type": "string"},
{"name": "body", "type": "string"}
]
}, {"name": "Add", "type": "record",
"fields": [
{"name": "name", "type": "string"},
{"name": "id", "type": "string"},
{"name": "code", "type": "string"}
]
}
],

"messages": {
"send": {
"request": [{"name": "message", "type": "Message"},{"name": "add", "type": "Add"}],
"response": "string"
}
}
}

hope for help!
thinks

Missing Mail and Message class

Error of compilation in example.Main class

import example.proto.Mail;
import example.proto.Message;

just add in pom.xml and after mvn generate-sources , that's all , there will be 2 files generated.

 <executions>
                    <execution>
                        <id>schemas</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>schema</goal>
                            <goal>protocol</goal>
                            <goal>idl-protocol</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
                            <outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>

Interoperability between Java and Ruby doesn't exist

I'm trying to build a Java server with a Ruby client and for some reason doesn't work, apparently there is a error comparing types between Java and Ruby which raise the following exception:

java.lang.IllegalArgumentException: Illegal Capacity: -1985359361
    at java.util.ArrayList.<init>(ArrayList.java:156)
    at org.apache.avro.ipc.NettyTransportCodec$NettyFrameDecoder.decodePackHeader(NettyTransportCodec.java:172)
    at org.apache.avro.ipc.NettyTransportCodec$NettyFrameDecoder.decode(NettyTransportCodec.java:139)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:286)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:208)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:94)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:364)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:238)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:38)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Any idea how to fix this?

Can convert Java project to use CharSequence but not String

Hi, great demo by the way.

I was trying to convert the Java project to use String, but can only get as far as changing Main.java to use String. I can get Mail.java and Message.java to use CharSequence, but I'm surprised that when everything is String I still get an error even though there are seemingly no more Utf8s left in the project:

Caused by: org.apache.avro.AvroRuntimeException: java.lang.ClassCastException: org.apache.avro.util.Utf8 cannot be cast to java.lang.String
    at org.apache.avro.ipc.specific.SpecificRequestor.readError(SpecificRequestor.java:173)
    at org.apache.avro.ipc.Requestor$Response.getResponse(Requestor.java:554)
    at org.apache.avro.ipc.Requestor$TransceiverCallback.handleResult(Requestor.java:359)
    at org.apache.avro.ipc.Requestor$TransceiverCallback.handleResult(Requestor.java:322)
    at org.apache.avro.ipc.NettyTransceiver$NettyClientAvroHandler.messageReceived(NettyTransceiver.java:613)

Any ideas on how to use String throughout?
Thanks

error on running command in the introduciton

Hi,

I've downloaded the zip and compile the project without any issues.
I then run below in the command line
mvn -e exec:java -Dexec.mainClass=example.Main -Dexec.args='avro_user pat Hello_World'

and it has below errors, can you please help?:

[ERROR] Unknown lifecycle phase ".mainClass=example.Main". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
org.apache.maven.lifecycle.LifecyclePhaseNotFoundException: Unknown lifecycle phase ".mainClass=example.Main". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy.
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings(DefaultLifecycleExecutionPlanCalculator.java:246)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:217)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:127)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:145)
at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan(BuilderCommon.java:96)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:109)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.