July 13, 2009

java.io.FileNotFoundException with (Permission Denied)

Error exporting data: java.io.FileNotFoundException: /usr/local/temp/backup.zip (Permission denied)

Root Cause
If the log shows the exception ‘FileNotFoundException’ with the ‘Permission Denied’, the main root cause of this error is the file does not being granted for write permission. It means when the user tries to execute an action to write the data into the file and the file does not have a full permission, this exception will be thrown to tell you that you are trying to performing something that violating the permission.

For example, there are some certain user in Tomcat does not have the write permission to a specific file. If the log shows the information such as ‘user.home’, this will tell you the location of the user directory and which user executing the process:

user.home /usr/share/tomcat5

In this case, the user called ‘tomcat5’ is trying to execute some process to write the data into the directory.

Further Zooming
What is actually the class java.io.FileNotFoundException is trying to do? If just the ‘FileNotFoundException’ exception, the first thing comes into your mind will be the file does not exist in a specific directory. However, this exception will be thrown when the attempt to open the file based on the specified pathname has failed. Besides of the possibility that the specified pathname might not exist that causes this exception to be thrown, another reason will be the file is inaccessible (e.g. the file only has a read-only permission but not for the purpose for writing it).

So, when you see this exception in the future, don’t jump to the conclusion that the file does not exist or keeps struggling of what’s going wrong with the file although the file does exist in the directory. If you are interested to know what does this Class do, you can refer to the following javadocs:

July 12, 2009

‘Interface was expected’ for JPEGImageEncoder

java.lang.IncompatibleClassChangeError: Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface was expected

Root Cause
If you found this error appears in the log file, the biggest possibility and maybe the only reason that this exception being thrown is you are using the OpenJDK instead of Sun JDK. Well, the exception message is obvious to tell you that the com.sun.image.codec.jpeg.JPEGImageEncoder is a class in OpenJDK whereas it is implemented as an interface in Sun JDK.

Further Investigation
After a further research, I just figured out that this interface has been removed from the JDK 6 API documentation and it has been completely being removed in JDK 7. It has been discussed as a reported bug in the Sun site: Retire the non-standard package com.sun.image.jpeg.codec. That’s the reason I don’t even can find the documentation for com.sun.image.codec.jpeg.JPEGImageEncoder in JDK 6 API documentation.

Besides that, as mentioned in the discussion, it has been buried in a separate API heading which I can’t find this package inside the JDK 1.4 API documentation. However, if you are curious to know what the methods are being implemented in the Interface JPEGImageEncoder, you can refer to the following javadocs:

Further Zooming
Please take note that in the javadocs, the documentation had specified the following for the introduction of this Interface:

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun’s JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

July 10, 2009

We Need to Move On….

What is my target of the month?
Difficult cases that either requires a certain technical knowledge or potential “hard-to-deal” customers will be my target everyday since the beginning of the month. What is preventing me from taking the initiative to handle difficult support cases before this? I afraid of ‘Escalation’ process when the case on your hand has been requested by the customer to be handled by other Support Engineer and this easily happens in difficult support cases.

How do I get rid of this mindset? There are several things that come into my mind when I was asking myself with this question to review my scope in handling cases. The first question appears in my mind that also resolves this problem is “Have you ever tried to get rid of this mindset before this?” The answer is ‘No’. So, it means that I never go to the fullest all these time and how I can be so sure that I can’t handle challenging cases?

One of the reasons is to expose and communicates more with variety of customers, regardless of easygoing or grumpy customers. This is one of the methods to research and observe how the customer thinks and what kind of feedback or solutions (i.e. direct to the point, detailed step-by-step) that majority of the customers that require from us. It’s extremely difficult for IT people to think from user’s point of view. What is the main difference on how IT people and typical users think about a great system? Majority of IT people thinks that a great system should be implemented in high technology level. As for typical users, they have no idea of what high technology you had implemented behind of the system and how much effort that you had contributed in the system as long as the system is “EASY TO USE”.

IT field is a broad area that gives you the opportunity and exposure for new discoveries everyday. I used to handle similar area of cases and providing the same advice everyday. If one day you figured out that there is no more new discovery in your daily life and if you are working in this field, it’s time for you to find the ‘Spark’ in your job. I lost the ‘Spark’ because I’m providing the similar advice everyday which I had the familiarity. It’s no point doing the same thing and you had familiar with it. You are staying the standing at the same position everyday. You don’t even have a chance to gain any new knowledge and have any new discoveries in your daily job or even moving forward. It’s time to move on to the next level and find another ‘Spark’.

If you are not willing to do so, I encourage you to better move on now. Why I said so? When you had reached a certain level and you are lacking the knowledge that you suppose to have, you are experiencing a stage called “Knowledge Doesn’t Tally with Experience’. I guessed this is what I’m experiencing right now. Some people measuring your knowledge based on experiences. When you are being thrown with some basic questions by others and your experience telling them that you should know and if you can’t answer the questions, it indicates that you are experiencing that stage.


Weekly Customers’ Stories
As I had mentioned in my last week post, I will try to share out more about some funny or interesting stories about customers that I encountered during the entire week.

Nasty or Funny?
What I would like to share about the first customer is regarding with a nasty customer that had been discussed internally and I curious to know how nasty he is (I heard that he likes to play ‘Escalation’ game). However, without really looking into that detailed on his raised issue (it seems involving a lot of support engineers), there is something captured my interest. ‘Environment’ field is to be filled up by the customer to provide their system information (e.g. Operating System) in order to provide additional information to assists us in our investigation for the root cause of their raised issue. As for this nasty customer, he has filled up in the with “Windows – Yucks :) ”. What will be your first impression if you view the support issue? Do you feel this customer is trying to be funny or a friendly person? However, don’t judge the issue by its words. Some customers look nice in wordings but ends up by transferring their frustration to you. However, some customers sound frustrated and impolite in wordings but you can’t imagine that at least he/she will say “Thanks” to you as an appreciation for your help.

The Example is There, My Dear
This issue was escalated by my colleague that requires some development queries and why the code doesn’t work although the customer had followed the example provided in the documentation. In order to find the root cause, I need to test the code in my testing instance and find the solution for him as well. So, I left a comment as following (not an exact but similar scenario):

If you wish to implement this, you can try to add the following lines into the script:


Update tblsummary SET summary=”xxxx” where field_id=’10000’;


The tblsummary is the table that stores up all the information for that page and summary is the fieldname that you wish to update which is based on the field_id (e.g.10000).

I even provide documentation that includes with sample scripts. However, he replied to me as following:

I have problems with the field. I provided the screenshot that shows the error of invalid field_id. For your information, the ‘summary’ field is exist. Here is what I put in the script:

Update tblsummary SET summary=”xxxx” where field_id=’summary’;

For the next replies after that, I need to explain to him on how to find the id for the field and test every single field and provide him every piece of code for each field. In the end, he said thanks for all and now he has all the pieces for writing his first Java service now. Phew! Luckily, the suggested codes able to resolve the problem and he didn’t ask for any further assistance on how to write a Java service.

July 4, 2009

Do Customers Always Stupid?

There are many blogs which discuss about their professions or jobs that related with their experiences with the customers. I just figured out that most of the technical blogs are more to provide technical advice or their new discoveries in their job scope compared with their experiences in facing some customers or typical users that can be very funny or weird which they don’t even imagine that they will face such person in their life.

What I had discovered for the entire week? If you had read my previous posts, there are several new discoveries for me in technical area for this week. At the same time, I experienced some users that I have no idea to categorize them as weird, funny or smart and I planned to blog more about my experiences and my interactions with the customers in the future.

Most of the people around me always complaining to me how stupid the customers can be and they will start telling me the story that are happening between them and the customers. Whenever anyone starts their stories with the title “Customers are stupid” or “The users are stupid” before proceed to the further descriptions, there is a question mark appears in my mind whether the customers are really stupid? Sometimes, I wish to be straightforward and tell them that if they feel the customers are stupid, in fact, they should more appreciate the customers because without their stupidities, you will lose your current job. What if you are working in sales line? If the customers are stupid, does it sounds a bit contradict when you had successfully sold the products to them, and you are complaining that they are stupid (stupid in purchasing your product?) or the way you present your product causes them more confused and stupid? I’m not sure who is more stupid in this situation.

Well, I personally never categorize any customers as “stupid” based on several reasons:-

1. We are customers too. Are you so sure that you are smart and know well enough in all the products that you are using right now without any brief introduction or any research before using it?
2. More questions are actually leading to higher chances of a successful transaction. If they are not interested in your product, why they are wasting so much time to throw you with more questions? More confusion from the customers increasing the security of your job and the importance of you in your current job.
3. Thirdly, I feel categorize anyone as “stupid” sounds harsh or rude for me.

These two weeks, I experienced two customers that are quite interesting for me to share it here.

Customer #1
There is a customer was raising a support issue and asking whether a particular feature can be done in the system. Unfortunately, that feature does not implemented in the system yet but I told him to share his opinions in the feature request to increase the chances of this feature to be implemented in the shortest time. He appreciated a lot with the provided suggestion but he can’t login to the site to do so. I need to get a further confirmation whether he has login to that site as raising a support issue is different from the site of improvement implementations.

When he came back to me in the next reply, he was so sure that he has login to the site and provided me with two screenshots. The first screenshot shows the Microsoft Paint that edits the screenshot of the appearance of his username at the top of the site to prove that he has login to the site. The second screenshot shows the contents of the feature request with the ‘Log In’ link at the top of the site and also the message on the left panel that advising the user to login to the site if the user wish to perform more operations.

Although I felt a bit surprised with his reply as this situation never happens to me before this but I already knew his current problem and also his confusion. Based from the screenshots, it’s more than enough to indicate that he is confused that both are different sites. I should admit as it seems this is more to my carelessness of just providing the direct link without specifically telling him that both are different sites due to the wrong perception that most of the customers already knew about the differences.

So, I made a clear explanation that both of them are different sites and requested him to try to login to the site whether it works for him. He appreciated my help and told me that he didn’t noticed that he actually login to the support site without logging in to another site through the provided link that directs to another site.

Customer #2
There was a customer raising a support issue last few weeks which is regarding on how to fix a particular function that no longer working anymore. Furthermore, he is from one of a well-known financial firm. Why I need to specify “financial firm”? I seldom have the curiosity to know where the customers from when handling support cases unless they are really make your life into a hard way or any obvious attitudes problem.

I requested all the necessary information to replicate the problem but unfortunately, I can’t find the solution to fix the problem or found any past support cases related to this and even my colleague can’t figure out the root cause. I suggested to him some workarounds that he can try whether the problem still persists. However, he told me that he already tried the workaround before raising the support issue and his motive in raising this out is to check the root cause of the problem as it is affecting the business. He is not expecting an immediate response but wishes to have a “fruitful” solution for this problem and left a last line:
Your innovative and precise views are highly appreciated.

What I wish to reply to him is the following comment:

Hi,
I’m so sorry to tell you that you had totally ruined up your current application. Can you try to deploy a new one and I’m pretty sure this will really resolve the current problem as this is totally free from your innovative customization. This is the most “fruitful” and my most precise view to fix this problem.

By the way, do you interested in joining our support team? I figured out that there is a potential in you in customization and configuration area. Besides that, you know what you should do and had tried all the workaround when you are facing this problem instead of directly raising a support issue. Hope you will consider about the offer.

Finally, just to let you know although we help customers to fix their problems and any errors that they found suspicious appear in the log, however, we do not fix for any messes that you had done in the system. We will provide the best solution to fix the problem but we are not responsible to clean up your mess that you had done to your system.

Hope you will understand our level of intelligence and our job scope as well.

Regards,

Personally, I feel the attitude of every individual customer is more important. Sometimes, I’m wondering whether any colleges or universities in the world offering any courses called ‘Customer Psychology’ or ‘User Psychology’ in IT area so that the students can understand more about what the customers actually want and how they think, as quite similar on how important for the lawyers learning ‘Criminal Psychology’ and staff in education field learning ‘Child Psychology’. I’m getting more interested to know the pattern of their requirements and thinking to share it out more in the blog.

Anyway, I just read an interesting article related in satisfying IT customers and I certainly feel it has been well-written and it seems quite true in what he had discussed in the article. Feel free to have a read in this:

Satisfying IT customers may be a bad idea

July 4, 2009

The Startup Order of Multiple Services

Most of the users do not concern about the order of the startup services. The most important is all the relevant (e.g. database, Tomcat) has been installed successfully in order for the system able to run in a proper manner. If you are lucky, you had set the database service (e.g. MySQL) that able to startup automatically when you startup your pc. However, some users do not configure the database service to be started automatically and might startup the application service before the database service.

The order of the startup services are very important if you had services that depend on each other. If you startup a database service before an application service, you will encounter this error:-


There was a SQL exception checking for database driver correctness. Skipping.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Network error IOException: Connection refused: connect)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)

In order to set the dependency rules to correct the startup order, there are two methods you can give it a try:

1) Via the command prompt:
C:\Documents and Settings\Testing>sc config [application service] depend= [database service]

2) Edit the system registry
This method has been documented in details at http://support.microsoft.com/kb/193888.