2016-06-15 1 views
1

Azure VM mit Ubuntu Trusty.

Wenn zu testen Cygnus versuchen, erhalte ich eine Ausnahme java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder

Im Folgenden die vollständige Ausgabe des Befehls ist.

$ APACHE_FLUME_HOME/bin/cygnus-flume-ng agent --conf APACHE_FLUME_HOME/conf/ -f APACHE_FLUME_HOME/conf/agent_test.conf -n cygnusagent -Dflume.root.logger=INFO.console 
+ exec /usr/lib/jvm/java-7-openjdk-amd64//bin/java -Xmx20m -Dflume.root.logger=INFO.console -cp '/home/cygnus/APACHE_FLUME_HOME/conf:/home/cygnus/APACHE_FLUME_HOME/lib/*:/home/cygnus/APACHE_FLUME_HOME/plugins.d/cygnus/lib/*:/home/cygnus/APACHE_FLUME_HOME/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f APACHE_FLUME_HOME/conf/agent_test.conf -n cygnusagent 
SLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in [jar:file:/home/cygnus/APACHE_FLUME_HOME/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/home/cygnus/APACHE_FLUME_HOME/plugins.d/cygnus/lib/cygnus-ngsi-1.1.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/home/cygnus/APACHE_FLUME_HOME/plugins.d/cygnus/libext/cygnus-common-1.1.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 
16/06/15 15:03:17 INFO nodes.CygnusApplication: Starting Cygnus, version 1.1.0.a2fe807e6b9210d3c0e584ea52c4242458bdc6ff 
16/06/15 15:03:17 INFO nodes.CygnusApplication: Waiting for valid Flume components references... 
16/06/15 15:03:17 INFO node.PollingPropertiesFileConfigurationProvider: Configuration provider starting 
16/06/15 15:03:17 INFO node.PollingPropertiesFileConfigurationProvider: Reloading configuration file:APACHE_FLUME_HOME/conf/agent_test.conf 
16/06/15 15:03:17 INFO conf.FlumeConfiguration: Processing:test-sink 
16/06/15 15:03:17 INFO conf.FlumeConfiguration: Processing:test_sink 
16/06/15 15:03:17 INFO conf.FlumeConfiguration: Processing:test-sink 
16/06/15 15:03:17 INFO conf.FlumeConfiguration: Processing:test-sink 
16/06/15 15:03:17 INFO conf.FlumeConfiguration: Added sinks: test-sink Agent: cygnusagent 
16/06/15 15:03:17 INFO conf.FlumeConfiguration: Post-validation flume configuration contains configuration for agents: [cygnusagent] 
16/06/15 15:03:17 INFO node.AbstractConfigurationProvider: Creating channels 
16/06/15 15:03:17 INFO channel.DefaultChannelFactory: Creating instance of channel test-channel type memory 
16/06/15 15:03:17 INFO node.AbstractConfigurationProvider: Created channel test-channel 
16/06/15 15:03:17 INFO source.DefaultSourceFactory: Creating instance of source http-source, type org.apache.flume.source.http.HTTPSource 
16/06/15 15:03:17 ERROR handlers.NGSIRestHandler: Bad configuration ('default_service_path' must start with '/') 
16/06/15 15:03:17 INFO handlers.NGSIRestHandler: Startup completed 
16/06/15 15:03:17 ERROR channel.ChannelProcessor: Builder class not found. Exception follows. 
java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:195) 
    at org.apache.flume.interceptor.InterceptorBuilderFactory.newInstance(InterceptorBuilderFactory.java:46) 
    at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:109) 
    at org.apache.flume.channel.ChannelProcessor.configure(ChannelProcessor.java:80) 
    at org.apache.flume.conf.Configurables.configure(Configurables.java:41) 
    at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:353) 
    at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102) 
    at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:745) 
16/06/15 15:03:17 ERROR node.AbstractConfigurationProvider: Source http-source has been removed due to an error during configuration 
org.apache.flume.FlumeException: Interceptor.Builder not found. 
    at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:114) 
    at org.apache.flume.channel.ChannelProcessor.configure(ChannelProcessor.java:80) 
    at org.apache.flume.conf.Configurables.configure(Configurables.java:41) 
    at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:353) 
    at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102) 
    at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:195) 
    at org.apache.flume.interceptor.InterceptorBuilderFactory.newInstance(InterceptorBuilderFactory.java:46) 
    at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:109) 
    ... 12 more 

Das ist mein agent_test.conf

$ cat APACHE_FLUME_HOME/conf/agent_test.conf 
cygnusagent.sources = http-source 
cygnusagent.sinks = test-sink 
cygnusagent.channels = test-channel 

cygnusagent.sources.http-source.channels = test-channel 
cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource 
cygnusagent.sources.http-source.port = 5050 
cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler 
cygnusagent.sources.http-source.handler.notification_target = /notify 
cygnusagent.sources.http-source.handler.default_service = def_serv 
cygnusagent.sources.http-source.handler.default_service_path = def_servpath 
cygnusagent.sources.http-source.handler.events_ttl = 2 
cygnusagent.sources.http-source.interceptors = ts gi 
cygnusagent.sources.http-source.interceptors.ts.type = timestamp 
cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder 
cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /Applications/apache-flume-1.4.0-bin/conf/grouping_rules.conf 

cygnusagent.channels.test-channel.type = memory 
cygnusagent.channels.test-channel.capacity = 1000 
cygnusagent.channels.test-channel.transactionCapacity = 100 

cygnusagent.sinks.test-sink.channel = test-channel 
cygnusagent.sinks.test-sink.type = com.telefonica.iot.cygnus.sinks.NGSITestSink 
cygnusagent.sinks.test-sink.batch_size = 1 
cygnusagent.sinks.test_sink.batch_timeout = 10 
+1

Haben Sie dieses Problem gelöst? – miguelbemartin

+0

@miguelbemartin nein ich habe es noch nicht gelöst. –

+0

das gleiche Problem wie ich hier http://StackOverflow.com/Questions/37680260/How-to-Compile-CYGNUS-1-1-0-from-Sources-and-Update-cygnus-0-13 hoffe, es ist gelöst –

Antwort

2

Der Fehler mit der Gruppierung Interceptor von @frb in this question comments wie gesagt gelöst:

Von Cygnus 1.0.0 Sie NGSIGroupingInterceptor verwenden müssen anstelle von GroupingInterceptor