Sunday, November 7, 2010

Installing XAMPP IN UBUNTU

After downloading the file give the below command

1. sudo chown root:byorn xampp-linux-1.7.3a.tar.gz

2. sudo tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt/

3. cd /opt/lampp
sudo ./lampp start

Sunday, September 12, 2010

Groovy, Blob to String

sql.eachRow "select * from table1",
{
///println it.id

String result = ""
blobTest = (oracle.sql.BLOB)it.mydoc

byte_stream_test = blobTest.getBinaryStream()
byte_stream_test.eachLine {charset->

result += charset+"\n" }
println result;


}

Saturday, September 11, 2010

Staring Oracle in Ubuntu. - Problem and work around resolution.

1) /etc/init.d/./oralcle-xe.sh start


2) error:
Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lexi)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
byorn@lexi:/etc/init.d$ sudo ./oracle-xe restart
Shutting down Oracle Database 10g Express Edition Instance.
Stopping Oracle Net Listener

3) Now:
sudo /etc/init.d/./oralcle-xe.sh restart

4) success:
ler(s) for this service...
The command completed successfully


Any body have any idea about this?

Friday, September 10, 2010

DB Connectivity With Groovy

import java.sql.Connection
import java.sql.DriverManager
import javax.sql.DataSource
import groovy.sql.Sql
import oracle.jdbc.driver.OracleTypes

driver = oracle.jdbc.driver.OracleDriver
Connection conn = DriverManager.getConnection(
'jdbc:oracle:thin:rcms/password@localhost:1521:xe');

/*
*
* Here we call a procedural block with a closure.
* ${Sql.INTEGER} and ${Sql.VARCHAR} are out parameters
* which are passed to the closure.
*
*/
Sql sql = new Sql(conn);

//define a closure
myclosure = {println it.cusid + " " + it.cusname }

sql.eachRow("select * from tbl_customer", myclosure);

Tuesday, July 27, 2010

SubVersion Client To Work With Ubuntu For Netbeans 9

Downloaded the rpm from Collabnet, as suggested by Netbeans 9 (Ubuntu 10.4 lts)

extracted the rpm on a folder structure like "myfolder/mysubverclient/[..extracted file..]

when in /bin folder ./svn command is given, the below error appeared.



./svn: error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory


when i put all the .so libraries fro /lib to /usr/lib folder it worked.

Wednesday, June 2, 2010

Sign JARs

(1) Create a Key Store With a Validity Period.
keytool -genkey -alias alias-name -keystore keystore-name -validity 365

(2) Sign the JAR

jarsigner -keystore keystore-name -storepass keystore-password
-keypass key-password jar-file alias-name

thats its, now bundle and deploy.