Thursday, 7 April 2011

In Windows 2008 server some of the process are not killed properly

I installed my product in Windows 2008 server. Even though   my product's service was stopped , some of   process are not killed properly. so I tried to kill the process with help of task-manager, on that time I got the Access denied error.
So I tried with the command taskkill to kill the process.

In command prompt type taskkill /? ,It will give the usage of the command 

I tired to kill the process using process ID so I used the option /PID

>taskkill /PID  18684

Here 18684 is a process ID of the process.
After executing the command,I got the message like

 "ERROR: The process with PID 18684 could not be terminated.
Reason: This process can only be terminated forcefully ( with /F option ).
"

So I tried the option with /F
>taskkill /PID  18684 /F /T

/T used to kill the child process of the specified process  ID

Now the processes are killed successfully.and I got the success message.

"SUCCESS: The process with PID 18684 has been terminated. "



Wednesday, 16 February 2011

sun.tools.javac.Main has been deprecated.

 Today I faced the error "Note: sun.tools.javac.Main has been deprecated." while call one java method from jsp file.

It is not an error but only a warning. I thought this warning was occur due to that version mismatch.
I compiled the java file with jdk1.5 but in the apche server use jdk1.4 for execute java class file for that reason  I faced the warnings.

The warning was solved,after complied  the java with jdk1.4 version.

Tuesday, 15 February 2011

java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client.

The error "java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client." was occur due to the jsp sendredirect method was called in between the html code implemention.

Example:

<html>
<body>
<%
while (result.next()) {
           if (result.wasNull()) {
               response.sendRedirect("login.jsp");
           }
           else {
               response.sendRedirect("home.jsp"); 
           }
        }
%>
</body>
</html>

To solve this problem :

  you can make is to be sure that this code(jsp redirection) occurs before any html is written.

Example :


<%
while (result.next()) {
           if (result.wasNull()) {
               response.sendRedirect("login.jsp");
           }
           else {
               response.sendRedirect("home.jsp"); 
           }
        }
%>
<html>
<body>
.......

</body>
</html>


I hope this will be help for solve the java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client exception.














Wednesday, 9 February 2011

Ways to Repair MYSQL Databases

You can't execute any query(select ,update) against the mysql table,if the particular table was corrupted.At that time you need to check the table


How to check the table:

Go to the mysql client and then choose the database
and then tyoe the below command


CHECK TABLE tablename

* tablename-->your table 

out put
 
mysql> CHECK TABLE fixtures;
+-------------------------+-------+----------+----------+
| Table                   | Op    | Msg_type | Msg_text |
+-------------------------+-------+----------+----------+
| sports_results.fixtures | check | status   | OK       |
+-------------------------+-------+----------+----------+
1 row in set (0.01 sec)
 
 
If the table was corrupted you may be received the following errors,
  • Record file is crashed
  • Unexpected end of file
  • can't find file tablethatshouldbethere.MYI
  • tablethatwasworking.frm is locked against change
  • Got error ### from table handler.
 now you need to be repair the table.


How to Repair the table :

Syntax: Repair table tablename <options>;
options is optional 
But some times without option the table doesn't repair so use the following options.

Options:
QUICK
The quickest, as the data file is not modified.
EXTENDED
Will attempt to recover every possible data row file, which can result in garbage rows. Use as a last resort.
USE_FRM
To be used if the .MYI file is missing or has a corrupted header. Uses the .frm file definitions to rebuild the indexes.

Examples:


mysql>REPAIR TABLE table1 QUICK;

mysql>REPAIR TABLE table1 EXTENDED;

mysql>REPAIR TABLE table1 USE_FRM; 


After execute the repair query ,you can execute the query against the table 

  
 

530 5.7.1 Client was not authenticated Exchange 2010

Problem:

The sending host is receiving fallowing command on SMTP handshake from your mail server “530 5.7.1 Client was not authenticated”.

Test :

Open DOS  and type below
telnet <smtp-host> <smtp port>

e.g telnet 192.168.111.1 25  and then type
helo ( hit enter)
you received like below ouput
220 mail2.smtp25.org Microsoft ESMTP MAIL Service
250 mail2.smtp25.org Hello [10.10.10.10]

and then type
mail from:Test@Gmail.com ( Use yours mail) hit enter
530 5.7.1 Client was not authenticated


Solution:

Now lets take care of that, open EMC , go under your Server configuration, hub transport server default receive connector, properties, click on last tab “permission Groups” place check mark into “Anonymous users” click apply and ok.

now go back to DOS and type the same commands and you should be get  250 2.1.0 Sender OK.