Reputation: 11
I have a general question which challenges my understanding of web applications as I only recently began to work with web apps.
To simplify - I have a maven project which can be successfully installed using mvn clean install
and then it can be started executing catalina start
from the 'apache-tomcat/bin' folder using command line. At this point I will also add that localhost is accessible and working nicely.
The goal is to do the same using eclipse. I can successfully install maven project from eclipse but I cannot start the server - or rather - I can start the server but it's not working properly.
The way I try to start server from eclipse is I add a runtime environment (Windows->Preferences->Runtime Environmentss: tomcat 7), which points to the tomcat root folder /target/apache-tomcat
(please note 'target' folder was created as result of installing/building maven project). At the end I change configuration path (set to apache-tomcat/conf
) in 'Overview' tab in eclipse as well as I tick 'use custom location' radio button, pointing to 'apache-tomcat' folder.
As the result server started but when trying to access localhost, instead of 'home-page' there is exception thrown:
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:295) org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:33) org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:178) org.springframework.security.cas.authentication.CasAuthenticationProvider.authenticateNow(CasAuthenticationProvider.java:131) org.springframework.security.cas.authentication.CasAuthenticationProvider.authenticate(CasAuthenticationProvider.java:117) org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130) org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48) org.springframework.security.cas.web.CasAuthenticationFilter.attemptAuthentication(CasAuthenticationFilter.java:111) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
Obviously eclipse overridden somehow tomcat launch configuration but I don't know why. I'd appreciate any input!
@update: Although I tried everything @skomisa suggested so far, it doesn't seem to work. Interesting enough, that I can run the server via command prompt (e.g. 'catalina run' from tomcat bin directory, once it's built), but I cannot run it inside eclipse as following exception is thrown. I do not access local host via HTTPS, but HTTP. Is that because in 'Add and Remove' window there are no web applications to deploy? At this point I will add, that my eclipse project is simply of Maven nature (it's not converted to dynamic web project, and I'm not sure if it has to be in order to successfully run tomcat).
Upvotes: 0
Views: 2203
Reputation: 17383
Add your Tomcat server to Eclipse as follows:
This tutorial may also be helpful: https://crunchify.com/how-to-create-dynamic-web-project-using-maven-in-eclipse/
As an unrelated issue, the stack trace you posted suggests that you are entered an https URL when you should have entered an http URL. Is that the case?
Upvotes: 1