netbeans windows7 64bit [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

October 21st, 2010

I have installed netbeans 6.5.1. on my windows 7 64 bit computer but I could not connect to the MS access database anymore. The error [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified occurs at running the program.

SOLUTION:
Select 32bit JRE instead of 64 JRE.
1.In menu select Tools->Java Platforms
2.click Add platform button and select 32 bit java (C:\Program Files (x86)\Java\jdk1.6.0_21)
3.remove default java

If you could not to remove the 64bit java open netbeans.conf file and modify line starting with netbeans_jdkhome to point to the 32bit jre (from “C:\Program Files\Java\jdk1.6.0_21″ to “C:\Program Files (x86)\Java\jdk1.6.0_21″ )

install oracle client 11 on ubuntu 10.04

September 27th, 2010

1.download rpm

oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm

2.install converter

sudo apt-get install alien dpkg-dev debhelper build-essential

3.convert a package to debian format

sudo alien oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm

4.install deb package

sudo dpkg -i oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.deb

hibernate pooling is broken after using full-hibernate-plugin-for-struts2

September 27th, 2010

I am using full-hibernate-plugin-for-struts2 to present data in jquery-grid. full-hibernate-plugin-for-struts2 is an interceptor and creates a database session with hibernate before the struts2 action is invoked. full-hibernate-plugin-for-struts2 close the session by the default.

I got the following error when I am using the hibernate connection pooling in the other part of the application;

Struts has detected an unhandled exception:
Messages:
1. com.mchange.v2.c3p0.PoolBackedDataSource…has been closed() — you can no longer use it.

I tried to disable closing the connection after invocation with the following settings but it seems id does not work for my case.
1.I add hibernatePlugin.closeSessionAfterInvoke=false to struts.properties
2.I add to struts.xml

I am using struts2-fullhibernatecore-plugin-2.2.1-GA.

ORA-12170 and TNS-12535 from wmware

September 20th, 2010

I have installed an Oracle Database on my laptop. I tried to connect to an oracle database from my wmware machine. I installed an oracle client on a wmware machine. When I tried to connect to the database from wmware machine to the database running on the host machine I got ORA-12170: TNS:Connect timeout occurred. Tnsping returns TNS-12535: TNS:operation timed out.

SOLUTION:
Modify listener.ora on your host machine from:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
to

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = 1521))
)
)

configure ramdisk at boot

September 19th, 2010

I configured a ramdisk today to increase the performance. I am using virtual CentOS.
I put a firefox cache into a ramdisk and Tomcat.

Basic steps:
#vi /etc/rc.local

#create ramdisk
mkdir /ramdisk
mount none -t tmpfs -o size=256M /ramdisk
mkdir /ramdisk/apache-tomcat-6.0.28
#copy tomcat to ramdisk
cp -r /home/oracle/downloads/apache-tomcat-6.0.28/* /ramdisk/apache-tomcat-6.0.28/

Caused by: java.lang.RuntimeException: No Hibernate Validator class found (neither 3.x nor 4.x)

September 12th, 2010

I could not to deploy my web application to the container. I got the following error;

Caused by: java.lang.RuntimeException: No Hibernate Validator class found (neither 3.x nor 4.x)

I found out that the error does not occur if I remove the package struts2-fullhibernatecore-plugin-2.2.1-GA.jar from the attached libraries. The root cause for error lies in

Caused by: java.lang.RuntimeException: No Hibernate Validator class found (neither 3.x nor 4.x) com.googlecode.s2hibernate.struts2.plugin.s2hibernatevalidator.interceptor.HibernateValidatorInterceptor.configValidator(HibernateValidatorInterceptor.java:51)
at com.googlecode.s2hibernate.struts2.plugin.s2hibernatevalidator.interceptor.HibernateValidatorInterceptor.<clinit>(HibernateValidatorInterceptor.java:24)
… 60 more

SOLUTION:

Add Hibernate-Validator.jar to yout project.

getting started with subversion on centos

September 12th, 2010

1.download the subversion

http://www.wandisco.com/subversion/os/downloads

2.install the subverion as root

sh svninstall_centos5_wandisco.sh

3.Create a new, empty repository at REPOS_PATH

svnadmin create /home/oracle/svn

4.import project into repository

svn import ProjectDirectoryStrutsHibernate file:///home/oracle/svn/ProjectDirectoryStrutsHibernate -m “Initial import”

5.list files in repositoriy

svn list file:///home/oracle/svn/ProjectDirectoryStrutsHibernate

installing missing packages for Oracle 11gR2 on centOS 64bit

September 11th, 2010

The following packages are missing to successfully complete oracle 11gR2 installation on CentOS: compat-libstdc++-33-3.2.3, libaio-devel-0.3.105, sysstat-5.0.5, unixODBC-2.2.11, unixODBC-devel-2.2.11 and pdksh-5.2.14.

SOLUTION:

yum -y install compat-libstdc++-33-3.2.3

yum -y install unixODBC-2.2.11

yum -y install unixODBC-devel-2.2.11

yum -y install pdksh-5.2.14

Packages libaio-devel-0.3.105 and libaio-devel-0.3.105 are not installed because I got an error: No package libaio-devel-0.3.105 available. No package sysstat-5.0.5 available.

I checked out available packages and I found that sysstat.x86_64 is available:

yum list available sysstat*

Available Packages
sysstat.x86_64                      7.0.2-3.el5_5.1                      updates

yum -y install sysstat.x86_64

yum list available libaio-devel*

yum -y install libaio-devel.x86_64

yum -y install libaio-devel.i386

I could installed the database after installing the missing packages.

Install sun-java6-jdk on Ubuntu 10.04

September 9th, 2010
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update

sudo apt-get install sun-java6-jdk

ORA-12514: TNS:listener does not currently know of service requested in connect

September 9th, 2010

I have got ora-12514 after installing oracle 11g.

Check out the listener.ora file. Listener.ora consists from two parts:

1. Listener name could be anything. LISTENER is used by default. Listener name is used when you start the listener (lsnrctl start listner).

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

2. The SID_LIST_LISTENER defines the database list the listener would handle.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oracle\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = “EXTPROC_DLLS=ONLY:C:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll”)
    )
    (SID_DESC =
      (ORACLE_HOME = C:\oracle\product\11.2.0\dbhome_1)
      (SID_NAME = ORCL)
    )
  )