Tuesday, September 27, 2011

firebird.msg not found



D:\firebird\bin>isql -u sysdba -p masterkey D:\firebird\OpUtilsDB.fdb
can't format message 17:0 -- message file D:\firebird\firebird.msg not found
unavailable database
can't format message 17:3 -- message file D:\firebird\firebird.msg not found
SQL> exit;
To solve this problem,
  1. Stop if you have any firebird instances running
  2. Change the value of the var 'CreateInternalWindow' as 1 in firebird/firebird.conf
  3. Start firebird (run fbserver -a from firebird/bin)
  4. Then run the isql command




Monday, December 27, 2010

Setting character set for tomcat requests and responses

To set character set for your tomcat requests and responses, add param URIEncoding="UTF-8" (if you need your character set to be UTF-8) in the Connector tag of server.xml.


To start firebird in windows

Run command fbserver.exe -a from the firebird/bin directory (Note: firebird dir is the firebird installation dir - the name could differ with the version)

Saturday, December 19, 2009

Call a js function using a string variable having the function name

Hope the following coding snippet helps to know how :

<script>
testFCall();
function testFCall()
{
setTimeout('testCall(109)',0);
}

function testCall(val)
{
alert('val : '+val);
}
<script>




Friday, October 2, 2009

Run os commands from java + print error messages

private void runProcess() throws Exception
{
try
{
Runtime rt = Runtime.getRuntime();
Process process = rt.exec("cmd /c cp C:\\work\\dev\\test.txt C:\\work\\dev\\test1.txt");
BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()));

String line = null;

while ((line = input.readLine()) != null)
{
System.out.println(line);
}

int exitVal = process.waitFor();
if (exitVal != 0)
{
input = new BufferedReader(new InputStreamReader(process.getErrorStream()));
line = null;

while ((line = input.readLine()) != null)
{
System.out.println(line);
}
}
}
catch (Exception e)
{
System.out.println(e.toString());
e.printStackTrace();
}
}

Tuesday, June 23, 2009

cvs command to see the status in a single line

We can use the command - 'cvs status'. But it is too verbose. You may not need all those details all the time.
To see the status in a single line do - cvs -q -n update
Courtesy :
http://stackoverflow.com/questions/211819/is-there-a-way-to-get-a-short-cvs-status-from-command-line


Friday, June 19, 2009

Nebeans debugger msg : delete method not implemented

When I apply code changes using netbeans debugger, i get this message :
The virtual machine does not support this operation: delete method not implemented
and I am not able to apply my code changes.

The problem was :
I had another file where i had added a method and had not compiled. so not able to apply code changes. (debugger does not allow adding new methods. If you add or remove a method [or any other type of class member] you have to compile the code before using debugger).