Getting Exception while connecting to MySQL Db from weblogic

"Kuldip Shah" <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
Dear Sir,

 

Earlier we were using MySQL connector/J 3.0.9
(mysql-connector-java-3.0.9-stable-bin.jar) with database as MySQL
4.0.24 and web application running on weblogic worked without any
problems. 

 

Now we have decided to use MySQL 4.1.21 for database and so installed
this version on other server. After install, we tried to connect to web
application using same connector (3.0.9) and gave following error (se
below). To fix the problem, we downloaded MySQL/J connector
"mysql-connector-java-3.1.13-bin.jar" and got the same exception. 

 

Now to troubleshoot problem further, we connected to database running on
MySQL 4.0.24 (old version) with downloaded connector (version 3.1.13)
and we could connect to database successfully.

 

This implies that problem lies with connecting to MySQL database version
4.1.21 with both connectors (old and new). 

 

Do we have to set any parameters in database to connect using MySQL
connector?

 

Should we use property "useOldUTF8Behavior=true" while opening
connection?

 

I would appreciate your help.

 


 javax.servlet.UnavailableException: Cannot create connection pool for
dataSource

Name: DEFAULT_DB : Unable to connect to any hosts due to exception:
java.lang.ArrayIndexOutOfBoundsException: 40

        at
com.bst.servlets.AppInitServlet.initializeBSTConnectionPools(AppInitServ
let.java:316)

        at
com.bst.servlets.AppInitServlet.initDataSources(AppInitServlet.java:247)

        at com.bst.servlets.AppInitServlet.init(AppInitServlet.java:86)

        at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletS
tubImpl.java:1018)

        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)

        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)

        at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.
java:894)

        at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp
l.java:873)

        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl
.java:812)

        at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServ
letContext.java:3281)

        at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppSer
vletContext.java:3226)

        at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppSe
rvletContext.java:3207)

        at
weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:69
4)

        at
weblogic.servlet.internal.WebService.preloadResources(WebService.java:48
3)

        at
weblogic.servlet.internal.ServletInitService.resume(ServletInitService.j
ava:30)

        at
weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)

        at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)

        at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)

        at weblogic.Server.main(Server.java:32)



Thank you,

 

Kuldip Shah
Software Engineer,
B Sharp Technologies, Inc.
Email: [email protected]
Ph: (416)445-7162 ext.238
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.