• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connection Pooling problem connect with MYSQL

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone

i would like to ask few question here,since i try to configure this out for 1 week,i dont find any solution for my problem. T_T
I have develop my java web application in window Environment and now i have buy domain and hosting(linux) where i put my web system there.I deploy the project in WAR file and then i upload to my hosting. The problem come when my system won't be able to connect to database in pooling environment. i try follow some tutorial how to solve it.But thing still remain the same. In my laptop,everything work very well but thing doesnt go well in the real hosting. My humble request if any of you have any idea how to solve it?

here my code for connection:

file name:context.xml



and i have create connection pooling class..here the code

filename: ConnectionPool.java






so what error is occur,i paste it here:

java.lang.NullPointerException
data.ConnectionPool.getConnection(ConnectionPool.java:38)
data.UserDB.checkStoreOfficer(UserDB.java:45)
registration.CheckUser.doPost(CheckUser.java:43)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


,for your information,in my hosting..i'm using tomcat version 5.5.x

Thanks for your concern for spend your time at my question here.I really appreciate it.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have almost similar problem with you, I developed my web app in Windows environment and need to deploy it on Linux.
It has been 4 month since your post, have you solved your problem?

If not yet solved, maybe it was so late, I think you need to check your code below in context.xml in line: url="jdbc:mysql://localhost:3306/database_name?autoReconnect=true". Maybe you forgot to change "localhost:3306" with url database where you get the hosting. Make sure the username and password too.


 
Pay attention! Tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic