Tuesday, September 1, 2015

A lunch can never get unhealthier

The lunch at Trst, Italy
I am a big fan of summer. Most probably because I live in a country where the summer is sunny and pleasant, where winter and autumn are cold and wet. Spring is just the anticipation to summer. We never really have well-defined seasons in Sri Lanka, unlike Europe. It is easier to remember the events with the right month that happened thanks to the seasons.

This summer was considerably hot in this part of Europe. I came to Europe for my masters program EMDC, when the summer was almost finishing, in 2012. I was in Sri Lanka during most part of the 2013 summer. I was in Europe for 2014 summer completely, completing my EMDC and beginning my PhD, EMJD-DC. So in fact, 2015 was just my second complete summer in Europe.

My short trip to Trst, Italy was remarkable. It was terribly hot in Trst. I never thought that I would experience a weather hotter than Colombo, in Europe. I was proven wrong. I am not a fan of Italian food. I however was eating all unhealthy food and ice cream during my short trip. :)

Sexism in the viral social media "motivational quotes"

My Sri Lankan Version *
“Your naked body should only belong to those who fall in love with your naked soul.” ― Charles Chaplin.

The above is a message circulated as a viral image by many in Facebook. The message comes written on top of a considerably attractive female, subtly sexualized and directing this advice towards the female members of the network.

As pointed out by many, your body belongs to you; not to anyone else. Nevertheless, just to balance, I have  composed and released this image, which is a Sri Lankan and less sexist version of the original post.

The original viral image

We have a long way to go, to grow up and overcome this imbalance.

 * Special thanks to Kusa Paba crew for the image of the man in the photo. No copyright violations intended.

Google+ cannot get creepier

Google+ just keeps repeating,
"Complete your profile
Are you in a relationship?
Have a special someone? Let the world know."
Why should I "let the world know"?

They should at least have made it less creepier by mentioning "let your friends know". Also showing 75% just to induce you to make it 100%.

Monday, August 31, 2015

Wrong input in features.xml of OpenDaylight and the adventure with error logs. :)

So I was working on OpenDaylight, and the below error was blocking me from building the messaging4transport project locally with maven successfully.
[INFO] Processing feature: odl-messaging4transport
Sep 27, 2015 2:26:12 AM org.apache.bsf.BSFManager eval
SEVERE: Exception: 
java.security.PrivilegedActionException: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 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)
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
 at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
 ... 25 more

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] messaging4transport-api ........................... SUCCESS [11.182s]
[INFO] messaging4transport-impl .......................... SUCCESS [11.951s]
[INFO] messaging4transport-features ...................... FAILURE [2.738s]
[INFO] messaging4transport-karaf ......................... SKIPPED
[INFO] messaging4transport-artifacts ..................... SKIPPED
[INFO] messaging4transport ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.619s
[INFO] Finished at: Sun Sep 27 02:26:12 WEST 2015
[INFO] Final Memory: 110M/771M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :messaging4transport-features
Since this does not give much clue, I built again with -X flag.
[DEBUG] -- end configuration --
[INFO] executing groovy script
[INFO] Updating repository declarations
[INFO] Processing feature: odl-messaging4transport-api
[INFO] Processing feature: odl-messaging4transport
Sep 27, 2015 12:13:14 PM org.apache.bsf.BSFManager eval
SEVERE: Exception: 
java.security.PrivilegedActionException: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 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)
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
 at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
 ... 25 more

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] messaging4transport-api ........................... SUCCESS [11.099s]
[INFO] messaging4transport-impl .......................... SUCCESS [13.164s]
[INFO] messaging4transport-features ...................... FAILURE [3.496s]
[INFO] messaging4transport-karaf ......................... SKIPPED
[INFO] messaging4transport-artifacts ..................... SKIPPED
[INFO] messaging4transport ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.693s
[INFO] Finished at: Sun Sep 27 12:13:14 WEST 2015
[INFO] Final Memory: 109M/762M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 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)
Caused by: org.apache.maven.plugin.MojoExecutionException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:56)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 ... 19 more
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
 at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
 ... 21 more
[ERROR] 
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :messaging4transport-features
This gave me some clue on what went wrong. It is the features.xml entry. I found the wrong entry in my code-
    wrap:mvn:org.opendaylight.controller.config.api/{{VERSION}} 
I fixed it as below.
    wrap:mvn:org.opendaylight.controller/config-api/{{VERSION}}
It was of course a careless mistake. But the error log was crazy and interesting. :-)

Sunday, August 30, 2015

EMDC Summer Event 2015


I represented EMDC 2012 batch at the EMDC Summer Event 2015, in Fejan island, Sweden. The event was targeted towards my juniors, EMDC batch 2014. I presented the thoughts from our batch, as well as my research work at the event.