This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Failed communicate with MYSQL Database  RSS feed

 
Ranch Hand
Posts: 37
C++ Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At previous posts, I was questioning about upload the photo file into Amazon S3 and retrieve the file URL to display on the screen.
Now this assignment is upload the file name and file description into the database. However, I hit some error during the execution.

SQLException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
SQLState: 08S01
VendorError: 0
java.lang.NullPointerException

I am using MYSQL Workbench to connect RDS Amazon.
I had create one new database named ("kwongDB"), connection named ("COS80001"), in my MYSQL Workbench.

 
Marshal
Posts: 67226
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is this code in a JSP? That's a bad practice from over 14 years ago. It's time to start writing professional code where the Java code is in Java classes where it belongs.
 
gah hon
Ranch Hand
Posts: 37
C++ Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Why is this code in a JSP? That's a bad practice from over 14 years ago. It's time to start writing professional code where the Java code is in Java classes where it belongs.



I am just follow the example and tutorials provided from my tutor. As she did mentioned that could write the java code into java file, or in the JSP file. So I will do in two versions, but before that,
I always complete one version before I go for another version. Therefore, I could gain the knowledge from both sides.
Could you please focus on the topic, to solve the issue? Until now, I am still have no idea what's going on, even though I check around the webs regarding the issues.
Thanks for advance. =]
 
Sheriff
Posts: 24088
54
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The message seems to suggest that your code isn't connecting to the server. So either the server isn't running on the same computer where that code is running (you asked to connect to "localhost") or there's some firewall or other network activity preventing your code from connecting to the server.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!