Jump to content

joomleex

Members
  • Posts

    7
  • Joined

  • Last visited

joomleex's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Strangely enough, I get the same error in accessing my Postgres database locally from a java servlet: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "joomleex_mudir", database "joomleex_users", SSL off
  2. I see... yet in other cases the war did deploy and a message about no suitable driver was given. Which version mysql java connector is actually expected to be in WEB-INF/lib? Is there any other project that succeeded in connecting correctly? I'll give a try to your suggestion, of course. Thank you again! Giuliano
  3. Thank you for this link. However, I still cannot understand how the lack of this would hinder a .war file from being deployed. It could make problems when actually launching the servlet, not while deploying it.
  4. Thank you for your answer. Have you any idea about how could I limit the number of simltaneous connections and/or close open connections in order to avoid spawning too many processes?
  5. While waiting for a solution, I found an alternative that works perfectly (even better to me): I opened a free account on MongoDB.Atlas (500 MB space) and connected to it through the Java driver. It worked like a charm (suffices to drop the MongoDB java driver into the WEB-INF/lib folder). To me, the solution is perfect, since I strongly prefer MongoDB over MySql. However, a solution to the issue I raised might still be useful to whomever prefers, or for some reason is compelled, to use MySql.
  6. Update: I erased the .war file, replacet the version 8 of the ConnectorJ with mysql-connector-java-5.1.47-bin.jar, uploaded and deployed. Now there is no deployment error, yet the connection with the MySql database is not working. Here is (part of) the error stack: org.apache.jasper.JasperException: An exception occurred processing JSP page [/index.jsp] at line [65] 62: String mysql_database = "joomleex_idara"; 63: String mysql_username = "joomleex_admin"; 64: String mysql_password = "<removed>"; 65: Connection connection = DriverManager.getConnection( 66: "jdbc:mysql://127.0.0.1/" + mysql_database, 67: mysql_username, 68: mysql_password Root Cause javax.servlet.ServletException: java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1/joomleex_idara I can figure out the error depends from either [a] the connection string (which I copied from the example on heliohost) or the lack of suitable driver on tomcat/lib and java/(jdk/jre)/lib/ext on heliohost server. If anybody has a clue that changing the connection string might solve the issue, please send me suggestions. Case is possible, since I got the same error on my local pc before copying the connector jar on both tomcat and java lib folders. In the latter case, a possible solution would be to upload in the .war WEB-INF/lib folder another connector which matches exactly what is in tomcat (and java) lib folders on the server. Since I have no access to those folders, I can only imagine. Please give me some hint if that could be a solution. Any help will be very appreciated. Thank you, Giuliano
  7. Hello. I have uploaded a deployed a java .war file to my account on Johnny server, following instructions on creating a java/jsp application in eclipse. All worked fine because accessing a MySql database. When trying to do so, I started getting a "java.sql.SQLException: No suitable driver found" error. At first I got the same error while accessing MySql in my local computer. I solved it (following suggestions) by copying the MySql ConnectJ .jar file both in tomcat/lib and jdk/jre/lib/ext folders and in WEB-INF/lib folder in the eclipse project (the latter was immaterial in having the database accessed). However, after uploading and deploying the .war file on heliohost the error continued to obtain. After trying a few additional modifications (such as specifying directly the mysql database address) the server stopped accepting to deploy the .war file and started giving a message "Java deployment failed with errors. For further information please contact support". So, I am stuck now. Thank you for your support, Giuliano
×
×
  • Create New...