Error injecting Java: Failed to load Java plugin Tweeter: java.lang.NoClassDefFoundError: twitter4j/

Hi,

I am trying to create Apama application as explained here in

but after running application I get below error, Please help

Error injecting Java: Failed to load Java plugin Tweeter: java.lang.NoClassDefFoundError: twitter4j/TwitterException (error reported to client)

Thanks,
Raj

Hi Raj,

I have downloaded twitter4j-core-4.0.2.jar, and executed as its explained in the video. I am not seeing the error. Can you please let me know which version of tweeter jar you are trying?

Thanks,
Sasmita

I have used twitter4j-core-4.0.4.jar

I also have tried with twitter4j-core-4.0.4.jar. I have tested this with Apama 10.0. Have you added the jar to Java Build Path, as it shown in the video? Please let me know which Apama version you are using and also can you send the correlator log.

Thanks,
Sasmita

So did it worked with 4.0.4.jar? I am using Apama 10.1 and i have added the jar to java buildpath as directed in video.

2018-07-18 10:13:26.537 ##### [33204] - Input value - pidfile =
2018-07-18 10:13:26.537 ##### [33204] - Input value - per receiver queue size = 10 s
2018-07-18 10:13:26.537 ##### [33204] - Input value - per receiver queue size = 10240 kb
2018-07-18 10:13:26.537 ##### [33204] - Input value - input queue size = 20000
2018-07-18 10:13:26.537 ##### [33204] - External clocking = disabled
2018-07-18 10:13:26.537 ##### [33204] - Input value - logfile = stdout
2018-07-18 10:13:26.537 ##### [33204] - Input value - loglevel = INFO
2018-07-18 10:13:26.537 ##### [33204] - Input value - inputLog = logs/defaultCorrelator_{START_TIME}_{ID}.input.log
2018-07-18 10:13:26.537 ##### [33204] - Compiler optimizations = enabled - the debugger cannot be used; specify command line option “-g” to use it.
2018-07-18 10:13:26.537 ##### [33204] - Using EPL runtime = interpreted
2018-07-18 10:13:26.565 ##### [33204] - Java support = enabled
2018-07-18 10:13:26.566 INFO [33204] - Starting JVM with options:
2018-07-18 10:13:26.566 INFO [33204] - -Djava.class.path=C:\SoftwareAG\Apama/lib/ap-correlator-extension-api.jar;C:\SoftwareAG\Apama/lib/ap-util.jar
2018-07-18 10:13:26.566 INFO [33204] - -DAPAMA_LOG_LEVEL=INFO
2018-07-18 10:13:26.566 INFO [33204] - -Xrs
2018-07-18 10:13:26.566 INFO [33204] - -DAPAMA_CORRELATOR_NAME=Apama Designer Correlator for WeatherAdvisoryApp(WeatherAdvisoryApp:defaultCorrelator)
2018-07-18 10:13:27.026 ##### [33204] - Java virtual machine created - Java HotSpot™ 64-Bit Server VM 1.8.0_141-b15.
2018-07-18 10:13:28.124 INFO [33204:java] - Logging started
2018-07-18 10:13:28.130 INFO [33204:init] - Log4JLogger.initLoggingSystem() - Configured logging based on APAMA_LOG system properties.
2018-07-18 10:13:28.131 INFO [33204:init] - Log4JLogger.initLoggingSystem() - Default log level will be: INFO
2018-07-18 10:13:28.131 INFO [33204:init] -
2018-07-18 10:13:28.131 INFO [33204:init] - ================================================================================
2018-07-18 10:13:28.132 INFO [33204:init] - Java logging begins at: Jul 18, 2018 10:13:27 AM
2018-07-18 10:13:28.132 INFO [33204:init] - Apama Platform Version: 10.1.0.5.325550 (rel/10.1.0.x@325550)
2018-07-18 10:13:28.132 INFO [33204:init] - ================================================================================
2018-07-18 10:13:28.132 INFO [33204:init] -
2018-07-18 10:13:28.195 INFO [33204:init] - Java maximum heap size = 3618MB
2018-07-18 10:13:28.255 CRIT [33204] - JMon framework ready
2018-07-18 10:13:28.272 CRIT [33204] - Opening new input log: logs/defaultCorrelator_2018-07-18_10.13.26_001.input.log
2018-07-18 10:13:28.276 INFO [33204] - Will log queue size every 5.000000 seconds
2018-07-18 10:13:28.277 INFO [33204] - Starting scheduler with 4 threads (Without a license file the correlator is restricted)
2018-07-18 10:13:28.284 INFO [33204] - Server socket opened listening on 0.0.0.0:15903
2018-07-18 10:13:28.284 ##### [33204] - Component ID: Apama Designer Correlator for WeatherAdvisoryApp(WeatherAdvisoryApp:defaultCorrelator) (correlator/6579560071662706945/6579560071662706945)
2018-07-18 10:13:28.284 ##### [33204] - Correlator, version 10.1.0.5.325550, running
2018-07-18 10:13:28.843 INFO [13332] - Sender Apama Studio (runtime views) (000001DBA8D48690) (component ID 18051274226395643904/12519189515084824576) connected from 127.0.0.1:53864
2018-07-18 10:13:28.844 INFO [27476] - Sender Dashboard Builder: Raj (000001DBA8D4A160) (component ID 1413230942365417472/12519189553739661312) connected from 127.0.0.1:53870
2018-07-18 10:13:28.865 INFO [13332] - Receiver Dashboard Builder: Raj (000001DBA8AF7970) (component ID 1413230942365417472/12519189553739661312) connected from 127.0.0.1:53870
2018-07-18 10:13:28.865 INFO [13332] - Receiver Dashboard Builder: Raj (000001DBA8AF7970) initially subscribed to
2018-07-18 10:13:28.865 INFO [13332] - Blocking receiver Dashboard Builder: Raj (000001DBA8AF7970) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-18 10:13:28.868 INFO [36460] - Receiver Dashboard Builder: Raj (000001DBA8AF7970) unsubscribed from all channels
2018-07-18 10:13:28.869 INFO [36460] - Receiver Dashboard Builder: Raj (000001DBA8AF7970) added subscriptions to [com.apama.scenario]
2018-07-18 10:13:28.872 INFO [28776] - Receiver Dashboard Builder: Raj (000001DBA8AF7970) added subscriptions to [com.apama.scenario.private_1413235503621013615_1531923208870]
2018-07-18 10:13:28.884 INFO [27476] - Receiver Apama Studio (runtime views) (000001DBA8AF86F0) (component ID 18051274226395643904/12519189515084824576) connected from 127.0.0.1:53864
2018-07-18 10:13:28.884 INFO [27476] - Receiver Apama Studio (runtime views) (000001DBA8AF86F0) initially subscribed to
2018-07-18 10:13:28.884 INFO [27476] - Blocking receiver Apama Studio (runtime views) (000001DBA8AF86F0) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-18 10:13:28.887 INFO [36460] - Receiver Apama Studio (runtime views) (000001DBA8AF86F0) unsubscribed from all channels
2018-07-18 10:13:28.887 INFO [28776] - Receiver Apama Studio (runtime views) (000001DBA8AF86F0) added subscriptions to [com.apama.scenario]
2018-07-18 10:13:28.900 INFO [36460] - Receiver Apama Studio (runtime views) (000001DBA8AF86F0) added subscriptions to [com.apama.scenario.private_395467781434507365_1531923208888]
2018-07-18 10:13:28.908 INFO [13332] - Sender ADBC DataService (000001DBA8D48AB0) (component ID 18051274226395643904/12519189648229203968) connected from 127.0.0.1:53874
2018-07-18 10:13:28.938 INFO [27476] - Receiver ADBC DataService (000001DBA8AF8270) (component ID 18051274226395643904/12519189648229203968) connected from 127.0.0.1:53874
2018-07-18 10:13:28.938 INFO [27476] - Receiver ADBC DataService (000001DBA8AF8270) initially subscribed to
2018-07-18 10:13:28.938 INFO [27476] - Blocking receiver ADBC DataService (000001DBA8AF8270) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-18 10:13:28.941 INFO [36460] - Receiver ADBC DataService (000001DBA8AF8270) unsubscribed from all channels
2018-07-18 10:13:28.941 INFO [28776] - Receiver ADBC DataService (000001DBA8AF8270) added subscriptions to []
2018-07-18 10:13:28.948 INFO [28776] - Receiver ADBC DataService (000001DBA8AF8270) added subscriptions to [com.apama.adbc.service]
2018-07-18 10:13:29.026 INFO [13332] - Sender Apama Designer (000001DBA8D48ED0) (component ID 18051274226395643904/12519190189395148800) connected from 127.0.0.1:53867
2018-07-18 10:13:29.149 INFO [27476] - Sender Apama Designer (runtime views) (000001DBA8D4A790) (component ID 18051274226395643904/12519190842230243328) connected from 127.0.0.1:53868
2018-07-18 10:13:29.883 INFO [34508:Inject] - JMonApplicationClassLoader using classpath to load jar:
2018-07-18 10:13:29.889 WARN [34508] - Failed to load Java plugin Tweeter: java.lang.NoClassDefFoundError: twitter4j/TwitterException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
Caused by: java.lang.ClassNotFoundException: twitter4j.TwitterException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at com.apama.jmon.internal.JMonApplicationClassLoader.findClass(JMonApplicationClassLoader.java:430)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.apama.jmon.internal.JMonApplicationClassLoader.loadClass(JMonApplicationClassLoader.java:374)
… 3 more

2018-07-18 10:13:29.889 WARN [34508] - Error injecting Java: Failed to load Java plugin Tweeter: java.lang.NoClassDefFoundError: twitter4j/TwitterException (error reported to client)
2018-07-18 10:13:29.913 INFO [28592] - Loading EPL plugin Tweeter from library Tweeter.dll
2018-07-18 10:13:29.917 WARN [34508] - Error injecting monitorscript from file C:\Users\Raj Vasa\workspace102\WeatherAdvisoryApp\monitors\WeatherAdvisor.mon: Error initializing plugin Tweeter or a library it depends on because “The specified module could not be found. (126)” (error reported to client)
2018-07-18 10:13:29.941 WARN [34508] - Failed to parse the event “com.apama.queries.AllQueriesInjected()” from Apama Designer due to the error: Unable to find event type com.apama.queries.AllQueriesInjected
2018-07-18 10:13:30.034 INFO [36460] - Sender Apama Designer (000001DBA8D48ED0) (component ID 18051274226395643904/12519190189395148800) disconnected cleanly: Other party requested disconnection
2018-07-18 10:13:30.433 INFO [13332] - Sender Apama Designer (000001DBA8D4A580) (component ID 18051274226395643904/12519196880955113472) connected from 127.0.0.1:53889
2018-07-18 10:13:30.498 WARN [25460] - Failed to parse the event “Location(“Cambridge”)” from Apama Designer due to the error: Unable to find event type Location
2018-07-18 10:13:30.499 WARN [25460] - Failed to parse the event “Windspeed(“Cambridge”,7)” from Apama Designer due to the error: Unable to find event type Windspeed
2018-07-18 10:13:30.499 WARN [25460] - Failed to parse the event “Temparature(“Cambridge”,15.0)” from Apama Designer due to the error: Unable to find event type Temparature
2018-07-18 10:13:30.499 WARN [25460] - Failed to parse the event “Rain(“Cambridge”,true)” from Apama Designer due to the error: Unable to find event type Rain
2018-07-18 10:13:30.549 INFO [28776] - Sender Apama Designer (000001DBA8D4A580) (component ID 18051274226395643904/12519196880955113472) disconnected cleanly: Other party requested disconnection
2018-07-18 10:13:30.934 INFO [13332] - Sender Apama Designer (000001DBA8D4B600) (component ID 18051274226395643904/12519199088568631296) connected from 127.0.0.1:53894
2018-07-18 10:13:33.277 WARN [36816] - One event of type “Rain” could not be parsed
2018-07-18 10:13:33.277 WARN [36816] - One event of type “Temparature” could not be parsed
2018-07-18 10:13:33.277 WARN [36816] - One event of type “Windspeed” could not be parsed
2018-07-18 10:13:33.277 WARN [36816] - One event of type “Location” could not be parsed
2018-07-18 10:13:33.277 INFO [36816] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=3 vm=504712 pm=61988 runq=0 si=0.4 so=0.0 srn="" srq=0 (no license file)
2018-07-18 10:13:38.278 INFO [36816] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=3 vm=504712 pm=62024 runq=0 si=0.2 so=0.0 srn="" srq=0 (no license file)
2018-07-18 10:13:43.278 INFO [36816] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=3 vm=504712 pm=62204 runq=0 si=16.6 so=0.0 srn="" srq=0 (no license file)
2018-07-18 10:13:48.277 INFO [36816] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=3 vm=504712 pm=62220 runq=0 si=0.2 so=0.0 srn="" srq=0 (no license file)
2018-07-18 10:13:48.904 INFO [36460] - Sender Apama Designer (000001DBA8D4B600) (component ID 18051274226395643904/12519199088568631296) disconnected cleanly: Other party requested disconnection
2018-07-18 10:13:53.278 INFO [36816] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=3 vm=503812 pm=61748 runq=0 si=1.0 so=0.0 srn="" srq=0 (no license file)
2018-07-18 10:13:54.292 ##### [39224] - Shutting down correlator in response to client (127.0.0.1:53878) request: Shutdown initiated by Software AG Designer (Raj Vasa)
2018-07-18 10:13:54.305 INFO [33204] - Shutting down Java virtual machine
2018-07-18 10:13:54.307 INFO [33204] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 1413230942365417472:12519189553739661312
2018-07-18 10:13:54.311 INFO [33204] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 18051274226395643904:12519189515084824576
2018-07-18 10:13:54.312 INFO [36460] - Sender Dashboard Builder: Raj (000001DBA8D4A160) (component ID 1413230942365417472/12519189553739661312) disconnected cleanly: Other party requested disconnection
2018-07-18 10:13:54.316 INFO [33204] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 18051274226395643904:12519189648229203968
2018-07-18 10:13:54.316 INFO [36460] - Sender Apama Studio (runtime views) (000001DBA8D48690) (component ID 18051274226395643904/12519189515084824576) disconnected cleanly: Other party requested disconnection
2018-07-18 10:13:54.322 INFO [33204] - MessageReceiverImpl.Shutdown() - Disconnecting remote sender 18051274226395643904:12519189648229203968
2018-07-18 10:13:54.361 INFO [33204] - MessageReceiverImpl.Shutdown() - Disconnecting remote sender 18051274226395643904:12519190842230243328
2018-07-18 10:13:54.366 WARN [35588] - Unable to find connection type for client from 127.0.0.1:53932 [ expected HTTP request or Apama client connection ]: TCP socket from 127.0.0.1:53932 is closed: Closed locally: Dispatcher stop
2018-07-18 10:13:54.366 WARN [34508] - Unable to find connection type for client from 127.0.0.1:53934 [ expected HTTP request or Apama client connection ]: TCP socket from 127.0.0.1:53934 is closed: Closed locally: Dispatcher stop
2018-07-18 10:13:54.366 WARN [25460] - Unable to find connection type for client from 127.0.0.1:53936 [ expected HTTP request or Apama client connection ]: TCP socket from 127.0.0.1:53936 is closed: Closed locally: Dispatcher stop
2018-07-18 10:13:54.368 INFO [33204] - Correlator shutdown is complete

Hi Raj,
I am not seeing this error in 10.0 but I can reproduce with 10.1. I should get back to you soon if I find a workaround.

Thanks,
Sasmita

Hi Raj,

From 10.1, for the correlator to pick the jar for the Apama Java Application it needs the additional jar to be configured in the apama java application. To add existing resources to a JMon project, you need to modify the project’s configuration. The configuration information is stored in the project’s config/apama_java.xml file.

  1. Open config/apama_java.xml file
  2. Provide the jar file location in “Classpath” field

You can find the information in Apama Documentation > Using Apama with Software AG Designer > Working with Projects > Adding resources to Apama projects > Adding resources to JMon projects

Thanks,
Sasmita

After providing jar file location in classpath field like

${sys:Users\Raj Vasa\Downloads\twitter4j-4.0.4 (1)}\lib\twitter4j-core-4.0.4.jar

I am getting the below error

Error injecting Java: com.apama.jmon.internal.JMonInternalException: Variable not defined `sys:Users\Raj Vasa\Downloads\twitter4j-4.0.4 (1)’ (error reported to client)

2018-07-19 13:14:51.143 ##### [29988] - Input value - per receiver queue size = 10 s
2018-07-19 13:14:51.143 ##### [29988] - Input value - per receiver queue size = 10240 kb
2018-07-19 13:14:51.143 ##### [29988] - Input value - input queue size = 20000
2018-07-19 13:14:51.143 ##### [29988] - External clocking = disabled
2018-07-19 13:14:51.143 ##### [29988] - Input value - logfile = stdout
2018-07-19 13:14:51.143 ##### [29988] - Input value - loglevel = INFO
2018-07-19 13:14:51.143 ##### [29988] - Input value - inputLog = logs/defaultCorrelator_{START_TIME}_{ID}.input.log
2018-07-19 13:14:51.143 ##### [29988] - Compiler optimizations = enabled - the debugger cannot be used; specify command line option “-g” to use it.
2018-07-19 13:14:51.143 ##### [29988] - Using EPL runtime = interpreted
2018-07-19 13:14:51.157 ##### [29988] - Java support = enabled
2018-07-19 13:14:51.157 INFO [29988] - Starting JVM with options:
2018-07-19 13:14:51.157 INFO [29988] - -Djava.class.path=C:\SoftwareAG\Apama/lib/ap-correlator-extension-api.jar;C:\SoftwareAG\Apama/lib/ap-util.jar
2018-07-19 13:14:51.157 INFO [29988] - -DAPAMA_LOG_LEVEL=INFO
2018-07-19 13:14:51.157 INFO [29988] - -Xrs
2018-07-19 13:14:51.157 INFO [29988] - -DAPAMA_CORRELATOR_NAME=Apama Designer Correlator for WeatherAdvisoryApp(WeatherAdvisoryApp:defaultCorrelator)
2018-07-19 13:14:51.481 ##### [29988] - Java virtual machine created - Java HotSpot™ 64-Bit Server VM 1.8.0_141-b15.
2018-07-19 13:14:51.694 INFO [29988:java] - Logging started
2018-07-19 13:14:51.720 INFO [29988:init] - Log4JLogger.initLoggingSystem() - Configured logging based on APAMA_LOG system properties.
2018-07-19 13:14:51.721 INFO [29988:init] - Log4JLogger.initLoggingSystem() - Default log level will be: INFO
2018-07-19 13:14:51.721 INFO [29988:init] -
2018-07-19 13:14:51.721 INFO [29988:init] - ================================================================================
2018-07-19 13:14:51.722 INFO [29988:init] - Java logging begins at: Jul 19, 2018 1:14:51 PM
2018-07-19 13:14:51.722 INFO [29988:init] - Apama Platform Version: 10.1.0.5.325550 (rel/10.1.0.x@325550)
2018-07-19 13:14:51.722 INFO [29988:init] - ================================================================================
2018-07-19 13:14:51.722 INFO [29988:init] -
2018-07-19 13:14:51.766 INFO [29988:init] - Java maximum heap size = 3618MB
2018-07-19 13:14:51.824 CRIT [29988] - JMon framework ready
2018-07-19 13:14:51.841 CRIT [29988] - Opening new input log: logs/defaultCorrelator_2018-07-19_13.14.51_001.input.log
2018-07-19 13:14:51.845 INFO [29988] - Will log queue size every 5.000000 seconds
2018-07-19 13:14:51.846 INFO [29988] - Starting scheduler with 4 threads (Without a license file the correlator is restricted)
2018-07-19 13:14:51.852 INFO [29988] - Server socket opened listening on 0.0.0.0:15903
2018-07-19 13:14:51.853 ##### [29988] - Component ID: Apama Designer Correlator for WeatherAdvisoryApp(WeatherAdvisoryApp:defaultCorrelator) (correlator/6579977908232429825/6579977908232429825)
2018-07-19 13:14:51.853 ##### [29988] - Correlator, version 10.1.0.5.325550, running
2018-07-19 13:14:52.486 INFO [11352] - Sender Apama Studio (runtime views) (00000206F577BBB0) (component ID 18051274226395643904/12937019206793887744) connected from 127.0.0.1:57687
2018-07-19 13:14:52.528 INFO [11352] - Receiver Apama Studio (runtime views) (00000206F580AA60) (component ID 18051274226395643904/12937019206793887744) connected from 127.0.0.1:57687
2018-07-19 13:14:52.528 INFO [11352] - Receiver Apama Studio (runtime views) (00000206F580AA60) initially subscribed to
2018-07-19 13:14:52.528 INFO [11352] - Blocking receiver Apama Studio (runtime views) (00000206F580AA60) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-19 13:14:52.530 INFO [28200] - Receiver Apama Studio (runtime views) (00000206F580AA60) unsubscribed from all channels
2018-07-19 13:14:52.531 INFO [28200] - Receiver Apama Studio (runtime views) (00000206F580AA60) added subscriptions to [com.apama.scenario]
2018-07-19 13:14:52.546 INFO [11352] - Sender Apama Designer (runtime views) (00000206F577AF50) (component ID 18051274226395643904/12937019296988397568) connected from 127.0.0.1:57693
2018-07-19 13:14:52.550 INFO [28200] - Receiver Apama Studio (runtime views) (00000206F580AA60) added subscriptions to [com.apama.scenario.private_395467781434507437_1532020492532]
2018-07-19 13:14:52.559 INFO [28200] - Sender Apama Designer (runtime views) (00000206F577AF50) (component ID 18051274226395643904/12937019296988397568) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:52.568 INFO [28200] - Receiver Apama Studio (runtime views) (00000206F580AA60) removed subscriptions to [com.apama.scenario]
2018-07-19 13:14:52.570 INFO [11352] - Sender ADBC DataService (00000206F577AB30) (component ID 18051274226395643904/12937019275513430016) connected from 127.0.0.1:57688
2018-07-19 13:14:52.571 INFO [24772] - Receiver Apama Studio (runtime views) (00000206F580AA60) removed subscriptions to [com.apama.scenario.private_395467781434507437_1532020492532]
2018-07-19 13:14:52.572 INFO [24772] - Receiver Apama Studio (runtime views) (00000206F580AA60) (component ID 18051274226395643904/12937019206793887744) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:52.605 INFO [11352] - Receiver ADBC DataService (00000206F580AA60) (component ID 18051274226395643904/12937019275513430016) connected from 127.0.0.1:57688
2018-07-19 13:14:52.605 INFO [11352] - Receiver ADBC DataService (00000206F580AA60) initially subscribed to
2018-07-19 13:14:52.605 INFO [11352] - Blocking receiver ADBC DataService (00000206F580AA60) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-19 13:14:52.607 INFO [28200] - Receiver ADBC DataService (00000206F580AA60) unsubscribed from all channels
2018-07-19 13:14:52.608 INFO [24772] - Receiver ADBC DataService (00000206F580AA60) added subscriptions to []
2018-07-19 13:14:52.620 INFO [28200] - Receiver ADBC DataService (00000206F580AA60) added subscriptions to [com.apama.adbc.service]
2018-07-19 13:14:52.627 INFO [11352] - Sender Apama Studio (runtime views) (00000206F577BFD0) (component ID 18051274226395643904/12937019790909702144) connected from 127.0.0.1:57690
2018-07-19 13:14:52.661 INFO [11352] - Receiver Apama Studio (runtime views) (00000206F57D47C0) (component ID 18051274226395643904/12937019790909702144) connected from 127.0.0.1:57690
2018-07-19 13:14:52.661 INFO [11352] - Receiver Apama Studio (runtime views) (00000206F57D47C0) initially subscribed to
2018-07-19 13:14:52.661 INFO [11352] - Blocking receiver Apama Studio (runtime views) (00000206F57D47C0) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-19 13:14:52.663 INFO [24772] - Receiver Apama Studio (runtime views) (00000206F57D47C0) unsubscribed from all channels
2018-07-19 13:14:52.664 INFO [28200] - Receiver Apama Studio (runtime views) (00000206F57D47C0) added subscriptions to [com.apama.scenario]
2018-07-19 13:14:52.671 INFO [11352] - Sender Apama Designer (00000206F577B9A0) (component ID 18051274226395643904/12937019945528590336) connected from 127.0.0.1:57685
2018-07-19 13:14:52.674 INFO [28200] - Receiver Apama Studio (runtime views) (00000206F57D47C0) added subscriptions to [com.apama.scenario.private_395467781434507438_1532020492664]
2018-07-19 13:14:52.770 INFO [11352] - Sender Dashboard Builder: Raj (00000206F577BDC0) (component ID 1413230942365417472/12937020748687605760) connected from 127.0.0.1:57686
2018-07-19 13:14:52.786 INFO [11352] - Receiver Dashboard Builder: Raj (00000206F58BAAB0) (component ID 1413230942365417472/12937020748687605760) connected from 127.0.0.1:57686
2018-07-19 13:14:52.786 INFO [11352] - Receiver Dashboard Builder: Raj (00000206F58BAAB0) initially subscribed to
2018-07-19 13:14:52.786 INFO [11352] - Blocking receiver Dashboard Builder: Raj (00000206F58BAAB0) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-19 13:14:52.788 INFO [24772] - Receiver Dashboard Builder: Raj (00000206F58BAAB0) unsubscribed from all channels
2018-07-19 13:14:52.789 INFO [28200] - Receiver Dashboard Builder: Raj (00000206F58BAAB0) added subscriptions to [com.apama.scenario]
2018-07-19 13:14:52.791 INFO [28200] - Receiver Dashboard Builder: Raj (00000206F58BAAB0) added subscriptions to [com.apama.scenario.private_1413235503621013675_1532020492789]
2018-07-19 13:14:53.214 INFO [23192:Inject] - JMonApplicationClassLoader using classpath to load jar: ${sys:Users\Raj Vasa\Downloads\twitter4j-4.0.4 (1)}\lib\twitter4j-core-4.0.4.jar
2018-07-19 13:14:53.215 WARN [23192] - Error injecting Java: com.apama.jmon.internal.JMonInternalException: Variable not defined `sys:Users\Raj Vasa\Downloads\twitter4j-4.0.4 (1)’ (error reported to client)
2018-07-19 13:14:53.225 INFO [8736] - Loading EPL plugin Tweeter from library Tweeter.dll
2018-07-19 13:14:53.229 WARN [23192] - Error injecting monitorscript from file C:\Users\Raj Vasa\workspace102\WeatherAdvisoryApp\monitors\WeatherAdvisor.mon: Error initializing plugin Tweeter or a library it depends on because “The specified module could not be found. (126)” (error reported to client)
2018-07-19 13:14:53.239 WARN [23192] - Failed to parse the event “com.apama.queries.AllQueriesInjected()” from Apama Designer due to the error: Unable to find event type com.apama.queries.AllQueriesInjected
2018-07-19 13:14:53.296 INFO [28200] - Sender Apama Designer (00000206F577B9A0) (component ID 18051274226395643904/12937019945528590336) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:53.643 INFO [11352] - Sender Apama Designer (00000206F577D050) (component ID 18051274226395643904/12937025297059020800) connected from 127.0.0.1:57713
2018-07-19 13:14:53.672 WARN [24944] - Failed to parse the event “Location(“Cambridge”)” from Apama Designer due to the error: Unable to find event type Location
2018-07-19 13:14:53.672 WARN [24944] - Failed to parse the event “Windspeed(“Cambridge”,7)” from Apama Designer due to the error: Unable to find event type Windspeed
2018-07-19 13:14:53.672 WARN [24944] - Failed to parse the event “Temparature(“Cambridge”,15.0)” from Apama Designer due to the error: Unable to find event type Temparature
2018-07-19 13:14:53.672 WARN [24944] - Failed to parse the event “Rain(“Cambridge”,true)” from Apama Designer due to the error: Unable to find event type Rain
2018-07-19 13:14:53.709 INFO [28200] - Sender Apama Designer (00000206F577D050) (component ID 18051274226395643904/12937025297059020800) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:54.064 INFO [11352] - Sender Apama Designer (00000206F577C3F0) (component ID 18051274226395643904/12937027075175809024) connected from 127.0.0.1:57718
2018-07-19 13:14:54.572 INFO [24772] - Sender Apama Studio (runtime views) (00000206F577BBB0) (component ID 18051274226395643904/12937019206793887744) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:54.580 INFO [24772] - Receiver ADBC DataService (00000206F580AA60) removed subscriptions to []
2018-07-19 13:14:54.582 INFO [28200] - Receiver ADBC DataService (00000206F580AA60) removed subscriptions to [com.apama.adbc.service]
2018-07-19 13:14:54.583 INFO [24772] - Receiver ADBC DataService (00000206F580AA60) (component ID 18051274226395643904/12937019275513430016) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:54.586 INFO [28200] - Sender ADBC DataService (00000206F577AB30) (component ID 18051274226395643904/12937019275513430016) disconnected cleanly: Other party requested disconnection
2018-07-19 13:14:54.956 INFO [11352] - Sender Apama Designer (runtime views) (00000206F5779480) (component ID 18051274226395643904/12937030871927095296) connected from 127.0.0.1:57721
2018-07-19 13:14:55.215 INFO [11352] - Receiver Apama Designer (runtime views) (00000206F6461350) (component ID 18051274226395643904/12937030871927095296) connected from 127.0.0.1:57721
2018-07-19 13:14:55.215 INFO [11352] - Receiver Apama Designer (runtime views) (00000206F6461350) initially subscribed to
2018-07-19 13:14:55.215 INFO [11352] - Blocking receiver Apama Designer (runtime views) (00000206F6461350) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-19 13:14:55.218 INFO [28200] - Receiver Apama Designer (runtime views) (00000206F6461350) unsubscribed from all channels
2018-07-19 13:14:55.218 INFO [24772] - Receiver Apama Designer (runtime views) (00000206F6461350) added subscriptions to [AlertChannel]
2018-07-19 13:14:55.356 INFO [11352] - Sender ADBC DataService (00000206F577A920) (component ID 18051274226395643904/12937032482540027904) connected from 127.0.0.1:57724
2018-07-19 13:14:55.381 INFO [11352] - Receiver ADBC DataService (00000206F58BE690) (component ID 18051274226395643904/12937032482540027904) connected from 127.0.0.1:57724
2018-07-19 13:14:55.381 INFO [11352] - Receiver ADBC DataService (00000206F58BE690) initially subscribed to
2018-07-19 13:14:55.381 INFO [11352] - Blocking receiver ADBC DataService (00000206F58BE690) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-19 13:14:55.383 INFO [24772] - Receiver ADBC DataService (00000206F58BE690) unsubscribed from all channels
2018-07-19 13:14:55.384 INFO [28200] - Receiver ADBC DataService (00000206F58BE690) added subscriptions to []
2018-07-19 13:14:55.390 INFO [28200] - Receiver ADBC DataService (00000206F58BE690) added subscriptions to [com.apama.adbc.service]
2018-07-19 13:14:56.846 WARN [13140] - One event of type “Rain” could not be parsed
2018-07-19 13:14:56.847 WARN [13140] - One event of type “Temparature” could not be parsed
2018-07-19 13:14:56.847 WARN [13140] - One event of type “Windspeed” could not be parsed
2018-07-19 13:14:56.847 WARN [13140] - One event of type “Location” could not be parsed
2018-07-19 13:14:56.847 INFO [13140] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=4 vm=510456 pm=65332 runq=0 si=0.0 so=0.0 srn="" srq=0 (no license file)
2018-07-19 13:15:01.846 INFO [13140] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=4 vm=510456 pm=65364 runq=0 si=0.2 so=0.0 srn="" srq=0 (no license file)
2018-07-19 13:15:06.846 INFO [13140] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=4 vm=510456 pm=65548 runq=0 si=0.2 so=0.0 srn="" srq=0 (no license file)
2018-07-19 13:15:11.847 INFO [13140] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=4 vm=510456 pm=65568 runq=0 si=0.0 so=0.0 srn="" srq=0 (no license file)

Hi Raj,

If you check the correlator log, you will see " Error injecting Java: com.apama.jmon.internal.JMonInternalException: Variable not defined `sys:Users\Raj Vasa\Downloads\twitter4j-4.0.4 (1)’ (error reported to client) "

You need to define the variable.

Try setting the environment variable or you can try with absolute path.

If using environment variable in classpath (ex: “${env:MY_OTHER_THIRD_PARTY_DIR_ENV_VAR}/twitter4j-core-4.0.4.jar”), define the variable in launch configuration(open launch configuration dialog , select launch configuration under Apama Application in left pan, then select the Environment tab, Add the variable and using New button , provide the variable name(ex: MY_OTHER_THIRD_PARTY_DIR_ENV_VAR) and the location(ex:path\to\jar) in value field, Apply and close the launch configuration).
If using absolute path, provide with “\” (ex: path\to\jar\abc.jar) or mention “/” with double quote(ex:“path/to/jar/abc.jar”).

And if you are seeing still the error, check it (apama_java.xml) lists java class in Java Application classes table, if not add using the Add… button >select Project in Resources Dialog > Expand project and select the required jmon class (ex:Tweeter.java) from Java>src folder.

I tried to recreate the project by deleting old one and find new error now without adding classpath as you said


2018-07-20 13:18:13.663 ##### [37388] - Input value - pidfile =
2018-07-20 13:18:13.663 ##### [37388] - Input value - per receiver queue size = 10 s
2018-07-20 13:18:13.663 ##### [37388] - Input value - per receiver queue size = 10240 kb
2018-07-20 13:18:13.663 ##### [37388] - Input value - input queue size = 20000
2018-07-20 13:18:13.663 ##### [37388] - External clocking = disabled
2018-07-20 13:18:13.663 ##### [37388] - Input value - logfile = stdout
2018-07-20 13:18:13.663 ##### [37388] - Input value - loglevel = INFO
2018-07-20 13:18:13.663 ##### [37388] - Input value - inputLog = logs/defaultCorrelator_{START_TIME}_{ID}.input.log
2018-07-20 13:18:13.663 ##### [37388] - Compiler optimizations = enabled - the debugger cannot be used; specify command line option “-g” to use it.
2018-07-20 13:18:13.663 ##### [37388] - Using EPL runtime = interpreted
2018-07-20 13:18:13.677 ##### [37388] - Java support = enabled
2018-07-20 13:18:13.677 INFO [37388] - Starting JVM with options:
2018-07-20 13:18:13.677 INFO [37388] - -Djava.class.path=C:\SoftwareAG\Apama/lib/ap-correlator-extension-api.jar;C:\SoftwareAG\Apama/lib/ap-util.jar
2018-07-20 13:18:13.677 INFO [37388] - -DAPAMA_LOG_LEVEL=INFO
2018-07-20 13:18:13.677 INFO [37388] - -Xrs
2018-07-20 13:18:13.677 INFO [37388] - -DAPAMA_CORRELATOR_NAME=Apama Designer Correlator for WeatherAdvisoryApp(WeatherAdvisoryApp:defaultCorrelator)
2018-07-20 13:18:13.991 ##### [37388] - Java virtual machine created - Java HotSpot™ 64-Bit Server VM 1.8.0_141-b15.
2018-07-20 13:18:14.205 INFO [37388:java] - Logging started
2018-07-20 13:18:14.231 INFO [37388:init] - Log4JLogger.initLoggingSystem() - Configured logging based on APAMA_LOG system properties.
2018-07-20 13:18:14.232 INFO [37388:init] - Log4JLogger.initLoggingSystem() - Default log level will be: INFO
2018-07-20 13:18:14.233 INFO [37388:init] -
2018-07-20 13:18:14.233 INFO [37388:init] - ================================================================================
2018-07-20 13:18:14.233 INFO [37388:init] - Java logging begins at: Jul 20, 2018 1:18:14 PM
2018-07-20 13:18:14.233 INFO [37388:init] - Apama Platform Version: 10.1.0.5.325550 (rel/10.1.0.x@325550)
2018-07-20 13:18:14.233 INFO [37388:init] - ================================================================================
2018-07-20 13:18:14.233 INFO [37388:init] -
2018-07-20 13:18:14.277 INFO [37388:init] - Java maximum heap size = 3618MB
2018-07-20 13:18:14.340 CRIT [37388] - JMon framework ready
2018-07-20 13:18:14.358 CRIT [37388] - Opening new input log: logs/defaultCorrelator_2018-07-20_13.18.13_001.input.log
2018-07-20 13:18:14.362 INFO [37388] - Will log queue size every 5.000000 seconds
2018-07-20 13:18:14.363 INFO [37388] - Starting scheduler with 4 threads (Without a license file the correlator is restricted)
2018-07-20 13:18:14.369 INFO [37388] - Server socket opened listening on 0.0.0.0:15903
2018-07-20 13:18:14.369 ##### [37388] - Component ID: Apama Designer Correlator for WeatherAdvisoryApp(WeatherAdvisoryApp:defaultCorrelator) (correlator/6580349861097152769/6580349861097152769)
2018-07-20 13:18:14.369 ##### [37388] - Correlator, version 10.1.0.5.325550, running
2018-07-20 13:18:14.972 INFO [24828] - Sender Apama Studio (runtime views) (000001EA65BB4EA0) (component ID 13303171577149325312/13308974138315833344) connected from 127.0.0.1:65317
2018-07-20 13:18:15.002 INFO [24828] - Sender Apama Designer (runtime views) (000001EA65BB2770) (component ID 13303171577149325312/13308974215625375744) connected from 127.0.0.1:65326
2018-07-20 13:18:15.020 INFO [24828] - Receiver Apama Studio (runtime views) (000001EA658DD630) (component ID 13303171577149325312/13308974138315833344) connected from 127.0.0.1:65317
2018-07-20 13:18:15.020 INFO [24828] - Receiver Apama Studio (runtime views) (000001EA658DD630) initially subscribed to
2018-07-20 13:18:15.020 INFO [24828] - Blocking receiver Apama Studio (runtime views) (000001EA658DD630) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-20 13:18:15.023 INFO [41164] - Receiver Apama Studio (runtime views) (000001EA658DD630) unsubscribed from all channels
2018-07-20 13:18:15.023 INFO [31996] - Receiver Apama Studio (runtime views) (000001EA658DD630) added subscriptions to [com.apama.scenario]
2018-07-20 13:18:15.035 INFO [24828] - Receiver Apama Designer (runtime views) (000001EA65A4C300) (component ID 13303171577149325312/13308974215625375744) connected from 127.0.0.1:65326
2018-07-20 13:18:15.035 INFO [24828] - Receiver Apama Designer (runtime views) (000001EA65A4C300) initially subscribed to
2018-07-20 13:18:15.035 INFO [24828] - Blocking receiver Apama Designer (runtime views) (000001EA65A4C300) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-20 13:18:15.036 INFO [41164] - Receiver Apama Designer (runtime views) (000001EA65A4C300) unsubscribed from all channels
2018-07-20 13:18:15.036 INFO [31996] - Receiver Apama Designer (runtime views) (000001EA65A4C300) added subscriptions to [AlertChannel]
2018-07-20 13:18:15.037 INFO [41164] - Receiver Apama Studio (runtime views) (000001EA658DD630) added subscriptions to [com.apama.scenario.private_5142166985649815558_1532107095024]
2018-07-20 13:18:15.082 INFO [24828] - Sender Apama Designer (runtime views) (000001EA65BB1F30) (component ID 13303171577149325312/13308974567812759552) connected from 127.0.0.1:65323
2018-07-20 13:18:15.102 INFO [24828] - Sender Apama Designer (000001EA65BB4660) (component ID 13303171577149325312/13308974606467530752) connected from 127.0.0.1:65319
2018-07-20 13:18:15.111 INFO [31996] - Receiver Apama Designer (runtime views) (000001EA65A4C300) removed subscriptions to [AlertChannel]
2018-07-20 13:18:15.112 INFO [41164] - Receiver Apama Designer (runtime views) (000001EA65A4C300) (component ID 13303171577149325312/13308974215625375744) disconnected cleanly: Other party requested disconnection
2018-07-20 13:18:15.116 INFO [31996] - Sender Apama Designer (runtime views) (000001EA65BB2770) (component ID 13303171577149325312/13308974215625375744) disconnected cleanly: Other party requested disconnection
2018-07-20 13:18:15.124 INFO [31996] - Receiver Apama Studio (runtime views) (000001EA658DD630) removed subscriptions to [com.apama.scenario]
2018-07-20 13:18:15.128 INFO [31996] - Receiver Apama Studio (runtime views) (000001EA658DD630) removed subscriptions to [com.apama.scenario.private_5142166985649815558_1532107095024]
2018-07-20 13:18:15.130 INFO [41164] - Receiver Apama Studio (runtime views) (000001EA658DD630) (component ID 13303171577149325312/13308974138315833344) disconnected cleanly: Other party requested disconnection
2018-07-20 13:18:15.135 INFO [31996] - Sender Apama Studio (runtime views) (000001EA65BB4EA0) (component ID 13303171577149325312/13308974138315833344) disconnected cleanly: Other party requested disconnection
2018-07-20 13:18:15.305 INFO [24828] - Receiver Apama Designer (runtime views) (000001EA658DD630) (component ID 13303171577149325312/13308974567812759552) connected from 127.0.0.1:65323
2018-07-20 13:18:15.305 INFO [24828] - Receiver Apama Designer (runtime views) (000001EA658DD630) initially subscribed to
2018-07-20 13:18:15.305 INFO [24828] - Blocking receiver Apama Designer (runtime views) (000001EA658DD630) will be blocked after 10.000000 seconds or 10240 kb if slow
2018-07-20 13:18:15.306 INFO [31996] - Receiver Apama Designer (runtime views) (000001EA658DD630) unsubscribed from all channels
2018-07-20 13:18:15.307 INFO [41164] - Receiver Apama Designer (runtime views) (000001EA658DD630) added subscriptions to [AlertChannel]
2018-07-20 13:18:15.693 INFO [41120:Inject] - JMonApplicationClassLoader using classpath to load jar:
2018-07-20 13:18:15.729 INFO [41120] - Loaded Java plugin Tweeter [class Tweeter]
2018-07-20 13:18:15.729 INFO [41120] - Added java application WeatherAdvisoryApp
2018-07-20 13:18:15.729 INFO [41120] - Injected JMon application WeatherAdvisoryApp (f61381380587cd2b093d33b236aa24b7), size 1239 bytes, injection time 0.59 seconds
2018-07-20 13:18:15.746 INFO [41120] - Added monitor WeatherAdvisory
2018-07-20 13:18:15.746 INFO [41120] - Added type Windspeed
2018-07-20 13:18:15.746 INFO [41120] - Added type Rain
2018-07-20 13:18:15.746 INFO [41120] - Added type Temparature
2018-07-20 13:18:15.746 INFO [41120] - Added type Location
2018-07-20 13:18:15.746 INFO [41120] - Injected MonitorScript from file C:\Users\Raj Vasa\workspace102\WeatherAdvisoryApp\monitors\WeatherAdvisory.mon (89e6c14c6426a97254144cba082f487c), size 1317 bytes, compile time 0.01 seconds
2018-07-20 13:18:15.755 WARN [41120] - Failed to parse the event “com.apama.queries.AllQueriesInjected()” from Apama Designer due to the error: Unable to find event type com.apama.queries.AllQueriesInjected
2018-07-20 13:18:15.814 INFO [31996] - Sender Apama Designer (000001EA65BB4660) (component ID 13303171577149325312/13308974606467530752) disconnected cleanly: Other party requested disconnection
2018-07-20 13:18:16.215 INFO [24828] - Sender Apama Designer (000001EA65BB1B10) (component ID 13303171577149325312/13308980288710049792) connected from 127.0.0.1:65340
2018-07-20 13:18:16.261 INFO [40532] - WeatherAdvisory [1] MonitoringCambridge
2018-07-20 13:18:16.262 INFO [40532] - WeatherAdvisory [1] MonitoringChepstow
2018-07-20 13:18:16.263 ERROR [40532] - Error on line 60 of monitor WeatherAdvisory: PluginException:java.lang.Error - Unresolved compilation problems:
Status cannot be resolved to a type
Twitter cannot be resolved to a type
TwitterException cannot be resolved to a type

  • C:\Users\Raj Vasa\workspace102\WeatherAdvisoryApp\monitors\WeatherAdvisory.mon
    2018-07-20 13:18:16.263 ERROR [40532] - WeatherAdvisory [1] Stack dump:
    2018-07-20 13:18:16.263 ERROR [40532] - WeatherAdvisory.::listenerAction::8() C:\Users\Raj Vasa\workspace102\WeatherAdvisoryApp\monitors\WeatherAdvisory.mon:60
    2018-07-20 13:18:16.329 INFO [31996] - Sender Apama Designer (000001EA65BB1B10) (component ID 13303171577149325312/13308980288710049792) disconnected cleanly: Other party requested disconnection
    2018-07-20 13:18:16.360 INFO [24828] - Sender Apama Studio (runtime views) (000001EA65BB37F0) (component ID 13303171577149325312/13308980872825733120) connected from 127.0.0.1:65342
    2018-07-20 13:18:16.389 INFO [24828] - Receiver Apama Studio (runtime views) (000001EA65A4C300) (component ID 13303171577149325312/13308980872825733120) connected from 127.0.0.1:65342
    2018-07-20 13:18:16.389 INFO [24828] - Receiver Apama Studio (runtime views) (000001EA65A4C300) initially subscribed to
    2018-07-20 13:18:16.390 INFO [24828] - Blocking receiver Apama Studio (runtime views) (000001EA65A4C300) will be blocked after 10.000000 seconds or 10240 kb if slow
    2018-07-20 13:18:16.392 INFO [41164] - Receiver Apama Studio (runtime views) (000001EA65A4C300) unsubscribed from all channels
    2018-07-20 13:18:16.392 INFO [31996] - Receiver Apama Studio (runtime views) (000001EA65A4C300) added subscriptions to [com.apama.scenario]
    2018-07-20 13:18:16.400 INFO [31996] - Receiver Apama Studio (runtime views) (000001EA65A4C300) added subscriptions to [com.apama.scenario.private_5142166985649815559_1532107096393]
    2018-07-20 13:18:16.697 INFO [24828] - Sender Apama Designer (000001EA65BB2770) (component ID 13303171577149325312/13308982513503436800) connected from 127.0.0.1:65345
    2018-07-20 13:18:16.715 INFO [31996] - Sender Apama Designer (000001EA65BB2770) (component ID 13303171577149325312/13308982513503436800) disconnected cleanly: Other party requested disconnection
    2018-07-20 13:18:19.363 INFO [41340] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=2 vm=512292 pm=72288 runq=0 si=1.7 so=0.0 srn="" srq=0 (no license file)
    2018-07-20 13:18:24.362 INFO [41340] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=2 vm=512292 pm=72308 runq=0 si=0.2 so=0.0 srn="" srq=0 (no license file)
    2018-07-20 13:18:29.363 INFO [41340] - Correlator Status: sm=0 nctx=1 ls=0 rq=0 eq=0 iq=0 oq=0 icq=0 lcn="" lcq=0 lct=0.0 rx=9 tx=0 rt=0 nc=2 vm=512420 pm=72468 runq=0 si=0.2 so=0.0 srn="" srq=0 (no license file)
    2018-07-20 13:18:29.522 ##### [41244] - Shutting down correlator in response to client (127.0.0.1:65318) request: Shutdown initiated by Software AG Designer (Raj Vasa)
    2018-07-20 13:18:29.536 INFO [41164] - Receiver Apama Studio (runtime views) (000001EA65A4C300) removed subscriptions to [com.apama.scenario]
    2018-07-20 13:18:29.540 INFO [31996] - Receiver Apama Studio (runtime views) (000001EA65A4C300) removed subscriptions to [com.apama.scenario.private_5142166985649815559_1532107096393]
    2018-07-20 13:18:29.541 INFO [41164] - Receiver Apama Studio (runtime views) (000001EA65A4C300) (component ID 13303171577149325312/13308980872825733120) disconnected cleanly: Other party requested disconnection
    2018-07-20 13:18:29.543 INFO [31996] - Sender Apama Studio (runtime views) (000001EA65BB37F0) (component ID 13303171577149325312/13308980872825733120) disconnected cleanly: Other party requested disconnection
    2018-07-20 13:18:29.609 INFO [37388] - Unloading plugin Tweeter
    2018-07-20 13:18:29.610 INFO [37388] - Shutting down Java virtual machine
    2018-07-20 13:18:29.612 INFO [37388] - MessageSenderImpl.Shutdown() - Disconnecting remote receiver 13303171577149325312:13308974567812759552
    2018-07-20 13:18:29.617 INFO [37388] - MessageReceiverImpl.Shutdown() - Disconnecting remote sender 13303171577149325312:13308974567812759552
    2018-07-20 13:18:29.620 WARN [35476] - Unable to find connection type for client from 127.0.0.1:65377 [ expected HTTP request or Apama client connection ]: TCP socket from 127.0.0.1:65377 is closed: Closed locally: Dispatcher stop
    2018-07-20 13:18:29.623 INFO [37388] - Correlator shutdown is complete

Thanks Sasmita for the solution

Classpath has to be defined in apama_java.xml, Tweeter.java