Monday, August 20, 2012

BundleDbPersistenceManager.java:901 FATAL error while writing the bundle: deadbeef-cafe-babe-cafe-babecafebabe

I got the below exception when I try to configure Jackrabbit with mysql on Tomcat.


BundleDbPersistenceManager.java:901 FATAL error while writing the bundle: deadbeef-cafe-babe-cafe-babecafebabe
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'Þ­¾ïÊþº¾Êþº¾Êþº¾' for key 1
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_05]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_05]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_05]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525) ~[na:1.7.0_05]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379) ~[mysql-connector-java-5.1.21-bin.jar:na]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169) ~[commons-dbcp-1.2.2.jar:1.2.2]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169) ~[commons-dbcp-1.2.2.jar:1.2.2]
        at org.apache.jackrabbit.core.util.db.ConnectionHelper.execute(ConnectionHelper.java:473) ~[jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyUpdate(ConnectionHelper.java:335) ~[jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.util.db.ConnectionHelper$2.call(ConnectionHelper.java:323) ~[jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.util.db.ConnectionHelper$2.call(ConnectionHelper.java:319) ~[jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:486) ~[jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.util.db.ConnectionHelper.update(ConnectionHelper.java:319) ~[jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:888) [jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:769) [jackrabbit-core-2.4.0.jar:2.4.0]
        at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.storeInternal(AbstractBundlePersistenceManager.java:686) [jackrabbit-core-2.4.0.jar:2.4.0]


I was following the instructions here [1], but it doesn't provide the proper instruction on how to edit the repository.xml file. The above issue comes when you give the wrong schemaObjectPrefix
when you edit the repository.xml. If you give the same schemaObjectPrefix for workspace configuration and version configuration it will give you the above error. So when you follow the instructions in [1], you have to make sure that you will give unique schemaObjectPrefix for both configuration. You can download a working repository.xml here.


[1]http://wiki.apache.org/jackrabbit/JackrabbitOnTomcat6

Sunday, April 29, 2012

My Father


I wanted to write a bit about my father for a long time but I didn't have time or may be I was stupid and kind of messed up last 2 months in my life. I would say thats the worst part in my life up to now. Reason why I wanted to write about my father was, he left everyone of us alone on 28th of February 2012.. I was fortunate to see him live, his eyes open, his hands moving few hours before he passed away.
 My father is one of the most generous people I have seen in my life, he would sacrifice anything for a good person when they need his help. He would stop his job and come and help when people need his help with a good heart... Whenever he get to know good things about someone he would always share the happiness with them...I still remember my father once told me he stayed with his father at the hospital for 3 months, he quite from his job and stayed at the hospital with his Dad to help him out... I'm sorry that I couldn't help you much.... but I promise I really wanted to do that...  I have never seen jealous feelings with my father. he always wanted to share the happiness with the people around him. He would advice people with a good heart and always be happy about it...Though my father couldn't be a financially stable person he had most of the good qualities one can have... I am always proud about you thaththa..... I really want to have all of them with me.... I promise I will try my best to help out people, like the way you did !!! His life wasn't an odd one which is just taking care of the wife and kids.. he always had his attention to his relatives, friends, neighbors.
   I know how much hard time he had because of his kids, how much he struggled to earn money for our studies, I have seen immense pressure man can have to raise his kids in my fathers eyes. I don't think I can forget the day that I failed grade 5 exam and at the same day he screwed up with my uncle and he came to me and said .. lets go back to his place and go to a school there....(It did not happen though).. I'm sorry thaththa that I did the test bad and made you unhappy..... But I am glad that I was able to make him happy almost all the exams I took after that ... I know you are always proud about your kids.... I promise you that I'll take care of everyone in our family on behalf of you... I know you knew that I'm gonna do that... I do remember the day I called you very last..... you were not good on that day .... I still hear your voice in my ears....You are always with me thaththa....!

    Seriously I still cannot believe this..... that I can't call my dad and ask something... get some advice.... Ohhh Seriously ... you left me alone ? I keep thinking about my dad every single day after he passed away... when I take the bus 6 or when I walk down to work or when I sit and write some code or when I do my workout... Still I am trying to live without you thaththa .... You know how much I love you, I'm still crying thaththa...even now I'm crying ... why did you do this.... ???? I'm sorry I hardly showed you how much I loved you ... You know I'm a big time hugger(only at home) but I hardly hugged you.  Today I regret that I didn't show my love to my father when he is alive... Please .. anyone who reads this .. if you love someone let them know that you love them when they are alive...Seriously I want you to come back ... but I know you are not gonna come back again.... You made me strong to live my life alone in this world.. I'm so proud of myself to be the son of you !!!! I want to be your son every time I born.. You are the best Dad ever ..... !!!!! Thaththa I love you so much !! 

Wednesday, January 11, 2012

How to reset IntelliJ idea settings in Mac

Recently I had difficulty working with Intellij Idea on MAC (MAC OS X verson 10.6.7) and I wanted to reset the complete setting of Idea and start from the beginning but without reinstalling Intellij Idea. It was very easy ..

Delete following directories and start Intellij Idea again and you will be asked to give the license key again and my issues got fixed when I reset the settings.

1. ~/Library/Caches/IntelliJIdea10
2. ~/Library/Preferences/IntelliJIdea10

I wanted to blog quickly before I forget.. Hope this helped !

Saturday, January 7, 2012

Its been six months since I started working in the US

Before writing anything about my life in US I should thank all the people who helped me to get this opportunity to work at Indiana University. I am sure I will always keep the fact that I got here with the help of bunch of awesome people back in Sri Lanka. I quit working at WSO2 in 2011 June and joined Indiana University to work in a Research Group as a Software Engineer. I think like my new job and its been six months I have been working in this Job. After I got here I couldn't write a single blog and I still don't know why I lost my motivation to write a technical blogs, but I hope I will write more technical blogs in future.

If I explain bit more about my job, I mainly working in a small research group which mainly focus on developing infrastructure for Scientist who are using Super Computers for their researches. I learned initial concepts of science gateways and currently I am working in an Apache project called Airavata. I hope to write few more blogs about Airavata in coming few weeks.

The town I am living, is one of the most peaceful places I have seen ... there's very less traffic less people less noise.. and very less people in busses compare to Sri Lanka. I simply like this environment.. Last few months I was only doing my job and next important thing I have done was going to gym which I am happy about. But I still believe that I need to go back to my country where I belong and live there with my family and friends. I just wanted to explain the good things I have seen here :) I've spent a very slow and peaceful life compare to how I was living in Sri Lanka, but sometimes I feel like thats not the best way to live the life. One main challenge I had after coming here is doing my things by myself. When was an undergrad I could't learn how to live by myself, I used to bring up the cloths every weekend and my parents used to wash them for me.. But here I had to cook my food, wash my cloths (its not hard as my mother or father washing them by hand) and clean my room etc. I learned how to cook Sri Lankan food and my cooking is getting better and I was able to manage live by myself which I am proud of. I practically understood how hard my moms life during last 20-25 years and thanks mom of raising me up to this level so that I can do my stuff by myself.

In General I believe I am doing great at this point and I have to get the maximum use of my time I am spending in United States. I am thankful to everyone who helped me to get here and helped me during my stay in Bloomington. I hope to write more useful blogs than writing about my life !!!