java - Exception in Running maven -


I imported from the example how the storm book was used

and when I run it I get an exception when executing this

  INFO] Java class. Null 0  

I used this command in the terminal

  mvn -f pom.xml exec: java -Dstorm.topology = TopologyMain  < / Pre> 

Code:

  Import Spot. Word Reader; Import backtype.storm.config; Import backtype.storm.LocalCluster; Import backtype.storm.topology.TopologyBuilder; Import backtype.storm.tuple.Fields; Import bolt Import bolt Wardenomizer; Public class topology {Main Static Virus Main (string [] AGR throws interrupted exposure {// Topology Definition Topology Builder Builder = New Topology Builder (); Builder.setSpout ("word-reader", new WordReader ()); Builder. Setball ("word-generic", new verdermlizer ()). Shuffle Group ("word-reader"); Builder. Setball ("word-counter", new word counter), 1) .FilidShowing ("word-normal", new field ("word")); // configuration configuration conf = new configuration (); Conf.put ("wordfile", args [0]); Conf.setDebug (wrong); // topology conf conf.put (config.TOPOLOGY_MAX_SPOUT_PENDING, 1); LocalCluster cluster = new localcluster (); Cluster submitTopology ("start-top-blogie", conf, builder.createTopology ()); Thread.Sleep (1000); Cluster.shutdown (); }}  

I also tried:

  clear mvn -f pom.xml  

then Try it using

  mvn exec: java -Dexec.mainClass = "TopologyMain" - Dexec.args = "src / main / resources / words.txt"  

error is here

  [0] Specify the following 'exec-maven-plugin' inside the definition for the plugin: & lt; Configure & gt; ... & lt; Main class & gt; VALUE & lt; / MainClass & gt; & Lt; / Configuration & gt;  

You're using a D-log argument incorrectly instead: < / P>

mvn -f pom.xml compile exec: java -Dexec.mainClass = storm.topology.TopologyMain

This will specify the main square to execute it Package should be packed with hurricane. Topology , which is not clear in the code you pasted.


Besides, I do not know why you are clearly specifying that your POM file should create a pom.xml file in the root directory of the project, and then you can call it command line There will be no need to specify. Ideally you should type,

mvn clean install

mvn exec: java -Dexec.mainClass = "storm.topology.TopologyMain "

This will clear your project, compile it, establish a dependency, and then execute the project as an entry point with TopologyMain .


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -