关于suse和informix连接问题及解决:
1、故障现象
在rhel4中同样的设置,该设置为:
(设置root环境变量(.bashrc--suse,.bash_profile--rhel)
export JAVA_HOME=/usr/java/jdk1.5.0_12
export CATALINA_BASE=/usr/local/tomcat5028
export CATALINA_HOME=/usr/local/tomcat5028
export PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin
export CLASSPATH=$JAVA_HOME/jre/lib/rt.jar
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_LANG
LANG=zh_CN.gbk
LANGUAGE=zh_CN.gbk
SUPPORTED=zh_CN.gbk
export LANG LANGUAGE SUPPORTED
export LANG=zh_CN.GB18030
设置启动加载(/etc/rc.d/rc.local--rhel,/etc/rc.d/boot.local--suse)
su - root /tom_up.sh >/tom_cat.log
/tom_up.sh的内容为:
if ps -ef | grep tomcat | grep -v grep
then
echo "tomcat ok"
else
echo "tomcat is Down!!!!"
cd /usr/local/tomcat5028/bin
./startup.sh
fi
}
但是在suse 10上却是有问题。informix安装在sco unix上。在suse上使用tomcat启动应用服务。查看log,提示连接服务器有问题,log的源文件是:
[06-20 17:06:26] INFO ClsSpringEventListener.java:51 - Available TransactionType: {100=Points, 101=Points, 106=InquiryBalance, 110=AddPoints, 111=AddMerchantPoints, 120=CenterPurchasePointsBack, 170=Void, 180=Void, 181=ChangePin, 182=ActivateCard, 200=InquiryMerchantAccountInfo, 220=DownloadParameters, 221=EndOfDayReport, 150=AddStoringValue, 151=UsingStoringValue}
[06-20 17:06:26] INFO JdbcTransactionObjectSupport.java:60 - JDBC 3.0 Savepoint class is available
[06-20 17:06:56] WARN BasicResourcePool.java:1224 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@d2ee5d -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
[06-20 17:06:56] WARN JDBCExceptionReporter.java:71 - SQL Error: 0, SQLState: null
[06-20 17:06:56] ERROR JDBCExceptionReporter.java:72 - Connections could not be acquired from the underlying database!
[06-20 17:06:56] WARN JDBCExceptionReporter.java:71 - SQL Error: 0, SQLState: null
[06-20 17:06:56] ERROR JDBCExceptionReporter.java:72 - Connections could not be acquired from the underlying database!
[06-20 17:06:56] ERROR ContextLoader.java:205 - Context initialization failed
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connectionorg.hibernate.exception.GenericJDBCException: Cannot open connect
2、解决方法:
由于suse安装的时候选择的默认语言是en,而informix的语言包是中文,从而造成不能访问informix的问题,虽然在suse上设置了lang的环境变量,但是由于没有安装中文包,还是出现不能访问的现象,最后使用yast将默认语言包安装为中文,问题解决。
阅读(2511) | 评论(0) | 转发(0) |