Thursday, June 4, 2009

Sharepoint cannot display anything, just an error message

I just got an error message on my sharepoint. it does not give any clue, the message in the display is so useless. Then, i am trying to find the log which is usually located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. And again, such a useless log, not telling me anything about the cause.


However, I can delete the problematic webpart by specifying this parameter ?Contents=1 For microsoft, this may be called a hidden secret. They dont want to spread the knowledge on their product. Such a stupid.

Also, Sharepoint has an administration page, it is a different process which runs in the different port... haiiihhh.... it is running on port 42094

Monday, June 1, 2009

Last night, I just finished up my testing and a few additional bugs  on JIRA2JIRA plugin which will be used by Atlassian to transfer issues from https://support.atlassian.com to http:// jira.atlassian.com. which I just found that time. Ugghh..... A few things that I realize abouut JIRA implementation on issue is: 


Issue's comment does not belong to issue.

Everytime I need to create issue using webservice provided by JIRA, I need to use another method to add the comment to the issue. There should be an object to encapsulate this operation. Thus, it will roll back all the the transaction in case, the transaction failed. What I think about this design is a very risky to do it. The reasons are:
  1. During the execution of the method, if in case there is a problem of connection for a few seconds. Maybe, during adding a comment #2, for certain issue, it fails. This will make your issue incomplete and be added in half way. Of course, it will be a trash if it does happen.
  2. Its more effort to maintain both method in the implementation wise.


Saturday, May 30, 2009

Maven integration test

I m currently doing some functional tests using a great build tool Maven (this also has been used much by Atlassian developer) on my Confluence plugin. Yep, as usualy, i got a problem on my test :P. I found there is a "Class not found exception" on the log file. The class that could not be found is JSONObject which is from json-lib. I was wondering how could this be happening. Then, I checked the classpath of my integrationt test. Forgot to mention that I use cargo to startup Tomcat for my functional test.


Checking on the classpath, i could not find any json-lib library. I thought that it is added automatically as I have specified the dependency of my plugin, but in fact it is not. Thus, what I did is to copy the dependency so that the error does not reoccur anymore. Maven defines 3 phases on integration test, they are pre integration test, integration test and post integration test. I didnt choose one of them but I choose phase package. 
This phase will be executed before pre integration test. The first time I was trying pre-integration phase, it does not work. Thus, I pick the phase before executing integration phase and the result it works like a charm.

The following is the code that I have:

There is a few ways to copy any data to any directory using maven. A few plugins available to do that. You can use maven-antrun-plugin, you can reference to maven documentation about plugins availabe.

TargetClassLoaderTransactionProxyFactoryBean vs TransactionProxyFactoryBean

I had an experience on some error which tells me that the Confluence cannot find the interface that I use for TransactionProxyFactoryBean, interface is needed by this class to perform transaction. I checked on my code and directory where my code is compiled, to see whether the interface that Confluence complains to, does actually exist or not.


Checking those things, I was sure that all the things are there, but Confluence keeps complaining about the error. Then, I asked uncle google and found a jira issue saying about Confluence's bug regarding this matter. It also says about the replacement class of TransactionProxyFactoryBean which is TargetClassLoaderTransactionProxyFactoryBean. After changing this class, all the things are working fine. It seems that there is a classloader problem (it is definitely as Confluence cannot find the class file :P )