HSQLDB : java.sql.SQLException: User not found: SA

While running HSQLDB in standalone mode you may face the error

  java.sql.SQLException: User not found: SA

This is because while creating the DB using script file you are not creating the user

CREATE USER SA PASSWORD ""

The above command you have to include in your db.script file db is your database name) this will creates a user by name SA with blank password.

Nokia E71 Memory card not detected as disconnects from PC Suite

Few days back I purchased a New E71. I face a weired issue with the phone when ever I connect to PC Suite via USB and after work  disconnects it from USB
It stop reading Memory card. After restart the phone it again start reading it , in gallery it says corrupt library repairing.

I saw many forums and read many articles about this issue and people suggested following solutions:
-try reset by *#7370#
-hard reset '*' '3' 'Call Key' and Power button
-Replace simm card
-Format memory card
-Replace memory card  etc

But nothing of the above method seems to me working for me.

I noticed whenever after closing PC Suite, I try to disconnect it using USB "Safely Remove Hardware" Option in taskbar, it says "The device '…..Nokia…..' cannot be stopped right now. Try stopping the device again later." Then I saw in the task list there are following services are running:
NclUSBSrv.exe
NclRSSrv.exe
MclMSBTSrv.exe

All of the above services are related to E71 Nokia PC Suite .
Now I have end task the NclUSBSrv.exe service after that I again tried removing USB using "Safely Remove Hardware" Option. And this time it works Perfectly.

My issue got resolved 🙂

Suggestion: Always connect in PC Suite Mode

2/7/2009 Updates – Update to latest PC Suite  this will also resolve the issue. No need to kill the services

org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

Today while running following  JSP

<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:redirect url="/index.htm"/>

I was hitting a error 

org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV 

I checked my classpath and found that standard.jar was missing in my WEB-INF/lib.

I added the same and all set..it works fine 🙂

Client does not support authentication protocol requested by server; consider upgrading MySQL client

I have installed MySql 5.1 version on my lappy and when I try to connect with the DB it was giving me following error:

“Client does not support authentication protocol requested by server; consider upgrading MySQL client”

MySQL 5.1 uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. If you upgrade the server from 4.0, attempts to connect to it with an older client may fail with the above message.

To solve this problem, you should use one of the following approaches:

  • Upgrade all client programs to use a 4.1.1 or newer client library.

  • When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.

  • Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

    mysql> SET PASSWORD FOR -> some_user‘@’some_host‘ = OLD_PASSWORD(‘newpwd‘);

    Alternatively, use UPDATE and FLUSH PRIVILEGES:

    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(‘newpwd‘) -> WHERE Host = ‘some_host‘ AND User = ‘some_user‘; mysql> FLUSH PRIVILEGES;

Earlier to this command password look like this

mysql> select Host,User,Password  from mysql.user;
+———–+——-+——————————————-+
| Host      | User  | Password                                  |
+———–+——-+——————————————-+
| localhost | root  | *F02BB955B742538740F1CF4B7196B8804001C74F |
| %         | nitin | *F02BB955B742538740F1CF4B7196B8804001C74F |
+———–+——-+——————————————-+

After the command it changed it to this.

mysql> select Host,User,Password  from mysql.user;
+———–+——-+——————————————-+
| Host      | User  | Password                                  |
+———–+——-+——————————————-+
| localhost | root  | *F02BB955B742538740F1CF4B7196B8804001C74F |
| %         | nitin | 5b58a62e4240429c |
+———–+——-+——————————————-+

This works for me. Hope this will help

Reference:http://dev.mysql.com/doc/refman/5.1/en/old-client.html

: bad interpreter: No such file or directory

Today I was running a Shell Script on linux server that I uploaded from windows OS to Solaris machine.When I initiated that script I get ": bad interpreter: No such file or directory" error on the command line.

Some History behind this issue will make you understand this clearlly :-

Text files are often incompatible across operating systems. Why? Because each operating systems use different markers to indicate the end of a line. This will really create a big mess you up if you are trying to transfer files from one operating system to another.

The carriage return is often referred to by the capital letters CR. On a Macintosh, every line has a CR (^M – 13) at the end.

Under Linux (a variant of Unix), the end of a line is indicated by a line feed. Every line ends with a line feed or LF (^J – 10).

These are 2 characters with 2 very separate numeric representations on a computer. A CR is a 13 in the ASCII table of characters and an LF is a 10 in the ASCII table of characters.

Contributing to the confusion is that fact that Microsoft Windows does things yet another way. Under Microsoft Windows, lines end with a combination of 2 characters — a CR followed by a LF. Symbolically, this is represented as CRLF or carriage return, line feed.

Solution:
I am having ultraedit editor. In this editor when ever you open any file in the status bar it shouws you its type (DOS/MAC/UNIX)
if you  want to convert a file from DOS to UNIX

File > Conversions > DOS to UNIX

And if you want to make each file bydefault to DOS/MAC/UNIX  Advanced > Configuration > General Tab inside Editing go to "Default file types for new file" and select desired default type.

You can also refer Ultraedit FAQs http://www.ultraedit.com/support/faq.html

OR

Just create a new file inside UNIX and copy paste your DOS type content. When you save it, it will be converted to UNIX.

svnant: java.lang.NoClassDefFoundError: com/trilead/ssh2/InteractiveCallback

Today I was integrating svn with ant using svnant plugin. I encountered the error

java.lang.NoClassDefFoundError: com/trilead/ssh2/InteractiveCallback 

Basically I was operating on SSH layer so it needs a additional support for connecting to the server.

this is looking for trilead-ssh2-build213.zip that can be found  at following url

Link: http://www.trilead.com/Download/Trilead_SSH_for_Java/ 

Java.io.IOException: Invalid header signature; read

Hi,

Today I was creating a Java Program to read a Excel files (created by importing text log files)  using  POI HSSF and faced the following errors:

java.io.IOException: Invalid header signature; read 8751655596022002505, expected -2226271756974174256 .

 After a analysis i found that the excel file I am using is not an Excel binary file. It's a text file with a .xls extension s.t. Excel can quietly convert it and display as a spreadsheet. HSSF deals with files written in Excel format only.

 I used the Save As… command to save that file as Excel . And now the problem is Solved :).

document.forms[0].submit is not a function

Firstly check do you have any fields or buttons etc... on the form that have the name or id "submit".
If so these will shadow (hide) the submit function of the form object and thus attempting to call form.submit()
will give you an error as you are now attempting to call an object that is not of the function type (functions injavascript
are objects to and exist as properties of their parent object in the same way as other objects).

Javascript: Member Not found

I was using the following code to open the pdf files using popup. 

User come to a page that has 2 links that open with the below function. both opens a  pdf. If the user clicks the pdf link and then minimizes it and then clicks the other link  the Member not found error generates.

WRONG 

function popUp(strURL, strType, strWidth, strHeight, winName, leftPos, topPos) {
    var strOptions="";
    if (strType=="nocontrols") {
        strOptions="scrollbars,resizable,height="+ strHeight+",width="+strWidth+",left="+leftPos+",top="+topPos;
    }
    if (strType=="controls") {
        strOptions="toolbar,menubar,location,scrollbars,resizable,height="+strHeight+",width="+strWidth+",left="+leftPos+",top="+topPos;
    }
  var   newWin = window.open(strURL, winName, strOptions);   

newWin.focus() 

 The problem was when the window opens it lost is reference & parent window throws the error use the following modified code to resolve this issue.

 RIGHT

var newWin;
function popUp(strURL, strType, strWidth, strHeight, winName, leftPos, topPos) {
    var strOptions="";
    if (strType=="nocontrols") {
        strOptions="scrollbars,resizable,height="+ strHeight+",width="+strWidth+",left="+leftPos+",top="+topPos;
    }
    if (strType=="controls") {
        strOptions="toolbar,menubar,location,scrollbars,resizable,height="+strHeight+",width="+strWidth+",left="+leftPos+",top="+topPos;
    }
    newWin = window.open("", winName, strOptions);
    newWin.close();
    newWin = window.open(strURL, winName, strOptions);
    if (window.focus)
    {
    newWin.focus()
    }
}