Get c3p0 error compiling 52north SOS code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get c3p0 error compiling 52north SOS code

Rafael Cuestas
Hi I tried to build the 52 SOS but I get a error with maven dependencies, exactly the follow

HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources

I process as follow:

#git clone https://github.com/52North/SOS.git
#git checkout master
#mvn clean install -DskipTests=true

after deploy the WAR generate file to my tomcat I follow the install process in

http://localhost:8080/52n-sos-webapp/install/index
http://localhost:8080/52n-sos-webapp/install/datasource
http://localhost:8080/52n-sos-webapp/install/settings
http://localhost:8080/52n-sos-webapp/install/finish

finally when I set the users and password in the final step I get the error [attached in the end]:

it seems that is an  the installation fault, because the client "http://localhost:8080/52n-sos-webapp/client"  appears but not lets select options in the selects.

I tried to fix the problem editing the pom.xml changing the c3p0.version tag but I didn't works.

The only way to fix the problem that I found, it has been  checkout the repository to the commit:

289bc49 Merge branch 'maintenance/4.3' into develop

Any help will be appreciated

I work in a Linux ubuntu 16 and my java tomcat enviroment is:
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.5.5
Server built:   Aug 31 2016 19:51:16 UTC
Server number:  8.5.5.0
OS Name:        Linux
OS Version:     4.4.0-59-generic
Architecture:   amd64
JVM Version:    1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14
JVM Vendor:     Oracle Corporation

-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources

type Exception report

message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources
    org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1259)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.n52.sos.web.install.InstallFilter.doFilter(InstallFilter.java:62)
    org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
    org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:168)
    com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:233)

root cause

java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/DataSources
    org.hibernate.c3p0.internal.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:204)
    org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
    org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)
    org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)
    org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
    org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
    org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
    org.n52.sos.ds.hibernate.UnspecifiedSessionFactoryProvider.initialize(UnspecifiedSessionFactoryProvider.java:152)
    org.n52.sos.service.Configurator.initializeConnectionProviders(Configurator.java:615)
    org.n52.sos.service.Configurator.initialize(Configurator.java:316)
    org.n52.sos.service.Configurator.createInstance(Configurator.java:149)
    org.n52.sos.web.install.InstallFinishController.instantiateConfigurator(InstallFinishController.java:159)
    org.n52.sos.web.install.InstallFinishController.process(InstallFinishController.java:133)
    org.n52.sos.web.install.InstallFinishController.post(InstallFinishController.java:80)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.n52.sos.web.install.InstallFilter.doFilter(InstallFilter.java:62)
    org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
    org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:168)
    com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:233)

root cause

java.lang.ClassNotFoundException: com.mchange.v2.c3p0.DataSources
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    org.hibernate.c3p0.internal.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:204)
    org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
    org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)
    org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)
    org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
    org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
    org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
    org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
    org.n52.sos.ds.hibernate.UnspecifiedSessionFactoryProvider.initialize(UnspecifiedSessionFactoryProvider.java:152)
    org.n52.sos.service.Configurator.initializeConnectionProviders(Configurator.java:615)
    org.n52.sos.service.Configurator.initialize(Configurator.java:316)
    org.n52.sos.service.Configurator.createInstance(Configurator.java:149)
    org.n52.sos.web.install.InstallFinishController.instantiateConfigurator(InstallFinishController.java:159)
    org.n52.sos.web.install.InstallFinishController.process(InstallFinishController.java:133)
    org.n52.sos.web.install.InstallFinishController.post(InstallFinishController.java:80)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:606)
    org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.n52.sos.web.install.InstallFilter.doFilter(InstallFilter.java:62)
    org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
    org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:168)
    com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:233)

note The full stack trace of the root cause is available in the Apache Tomcat/8.5.5 logs.
Apache Tomcat/8.5.5

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Get c3p0 error compiling 52north SOS code

Carsten Hollmann
Hi Rafael,

> #git clone https://github.com/52North/SOS.git
> #git checkout master

Did you checkout the master or the develop branch?

Because the commit you mentioned merges the maintenance/4.3 branch into
the develop branch.

Instead of building the master branch, you can download the pre-build
binaries from here:

https://github.com/52North/SOS/releases/tag/v4.3.9

Best,
Carsten
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines