Getting ERROR while WAR file deploying in tomcat7 - mysql

I have spring mvc based application. That is running tomcat7 server. Recently i made a few changes in my application. I created war file for entire application again. And i try to redeploy the new war file in tomcat7 server. When i click on my domain name i am getting "the requested page not available".
Why this error coming. I given all the properties file values correctly. could you please help me?
This is the production application. I used Linux servers and MySQL DB. Tomcat7, spring mvc and spring jdbc.

It looks that you are configured incorrect endpoint/url in application. Since the error is 4o4. Kindly revisit your routing configuration. It doesn't look the issue of database also.

The problem happens due jdk version. In my production server have jdk 1.7 but in my local i have jdk 1.8. I created war file with jdk 1.8 version. That's why i am getting that error. now i changed jdk version and recreate war file and deployed in server. Now it's working fine.

Related

How to access MySQL database from deployed JSP web app in Apache Tomcat

I just deployed my first JSP web application on Tomcat server and I'm using MySQL database. However, I keep getting errors when I try to query data from MySQL. Any ideas? and the error I,m seeing is as shown below:
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class
sun.security.ssl.SSLContextImpl$TLSContext
I just solved my problem by including the missing MySQL java connector jar file to the tomcat "lib" folder.
Thanks guys!

How to add mysql drivers to openshift tomcat

I have deployed my war file on openshift tomcat.
As suggested to deploy war file directly we need to remove the src and pom.xml before coping the war file in webapps folder. pre compiled java applications (WAR and EAR files) onto your OpenShift
Now since my application uses mysql driver - when tomcat starts on open shift it throws error of mysql driver classes not found.
How else can I add the mysql driver to openshift tomcat. Putting them in the web-inf/lib directory does not work since the datasources are configured on tomcat context.xml
The data source configuration should not matter for the mysql driver. Before tomcat8 however there are scenarios where you have to deploy the mysql driver in the tomcat/lib (sad but it works). Upgrading to Tomcat8 will get you away from that scenario.

How to use primefaces on cloudbees glassfish server

We are developing an Java EE webapp on a glassfish 4 server running in the cloubeees cloud. We want to use Primefaces 3.5 . Our app runs perfectly on a local glassfish server after we copied the commons-fileupload.jar into the lib domain/lib folder. When we push the app into the cloud it isnt deployed the log says:
Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem
So i think the server misses the fileupload.jar, but we dont have acces to the server administration console or the folder structure. Does anyone here used Primefaces in the cloudbees cloud or knows a other way to fix the problem?
best regards
Peter!

Sonar Tomcat installation fails

I installed both Sonar and Jenkins on the same Tomcat (7.0.29) version. I followed the instructions, which means that I created the sonarqube database (we are using MySQL), that I built and created the WAR file, and that I deployed that file to Tomcat. I also modified the Tomcat CATALINA_OPTS value to give Tomcat more memory. Jenkins will run, but Sonar will give me a "We're sorry, but something went wrong." error. I checked all of the Tomcat logs but could not find anything useful such as an exception. Does anyone have any ideas on this?
Thanks in advance...
Deployment on Tomcat won't be supported as of next version. Therefore, I recommend you to use the standalone mode instead. Note also that is not recommended to install SonarQube and Jenkins on the same machine. See http://docs.codehaus.org/display/SONAR/Installing#Installing-SonarQubePlatformOverview.

No suitable driver found for jdbc:mysql://db4free.net:3306/partnerdb

I am trying to create a sample Spring application with JPA (MySQL DB) and Tomcat 7.0.28 under Mac OSX platform. I placed mysql-connector-java-5.1.22 jar under WEB-INF/lib folder of the application. But when I start the app, I get error mentioned in the Title. I tried to put the same jar under Tomcat lib folder as well but getting the same error.
Same application when I deployed in Glassfish server with driver jar under domain/lib/ext folder, application works fine.
Note: Glassfish was also throwing the same error without putting the driver jar under domain/lib/ext folder.
Does this How to fix: "No suitable driver found for jdbc:mysql://localhost/dbname" error when using pools? help ? Please check the second answer if you are connecting through program.