Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

rodig03
Posts: 44
Joined: Thu Sep 18, 2014 1:27 pm

Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by rodig03 » Sat Mar 14, 2020 8:05 pm

Hi
after upgrading the OpenEmm CVersion from 19.10.000.133 to .169 the webservices stopped working.
If I access the wsdl (or webservices at https://mydomain/2.0/emmservices.wsdl) I get an error like below.
I reverted to .133 an now the system is working again.
Is this seomething on agnitas side or can I change something so that the new version is working?
Best regards,

Robert

Code: Select all

HTTP Status 500 – Internal Server Error
Type Exception Report

Message Servlet.init() for servlet [spring-ws] threw exception

Beschreibung The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Servlet.init() for servlet [spring-ws] threw exception
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)
Root Cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payloadMapping' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Cannot resolve reference to bean 'usageInterceptor' while setting bean property 'interceptors' with key [4]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'usageInterceptor' available
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:382)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:157)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1531)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	javax.servlet.GenericServlet.init(GenericServlet.java:158)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)
Root Cause

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'usageInterceptor' available
	org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
	org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:382)
	org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:157)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1531)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	javax.servlet.GenericServlet.init(GenericServlet.java:158)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)
Hinweis Der komplette Stacktrace der Ursache ist in den Server logs zu finden

Apache Tomcat

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Sat Mar 14, 2020 9:02 pm

Thanks for notification, we will look into this issue.
OpenEMM Maintainer

mdoerschmidt
Posts: 24
Joined: Fri Jan 04, 2013 8:55 am

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by mdoerschmidt » Mon Mar 16, 2020 9:20 am

For a quick fix, open file WEB-INF/spring-ws-servlet.xml and remove the line

Code: Select all

<ref bean="usageInterceptor" />
That line is a left-over and can be removed safely.

Don't forget to restart Tomcat!

rodig03
Posts: 44
Joined: Thu Sep 18, 2014 1:27 pm

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by rodig03 » Mon Mar 16, 2020 12:24 pm

Thanks for the quickfix idea, but somehow it doesn't work.

I did delete the indicated line in
/home/openemm/webapps/webservices/WEB-INF/spring-ws-servlet.xml

I did a openemm.sh stop / openemm.sh start, after modifying. Still the error.
So I now switched back to the .133 version again.

I noticed, however, that I already modified the spring-ws-common.xml because of initial trouble. Maybe that file needs to be updated as well?

Here's the modified vs. the initial file

Code: Select all

[openemm@nl WEB-INF]$ diff spring-ws-common.xml spring-ws-common.xml.20200211
76,77d75
<     <bean id="WebserviceSubscriptionRejectionService"
<       class="com.agnitas.emm.springws.subscriptionrejection.service.NullSubscriptionRejectionServiceImpl" />
[openemm@nl WEB-INF]$

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Thu Mar 19, 2020 5:33 pm

OpenEMM 19.10.000.170 is released now. Please check it.
OpenEMM Maintainer

MSelke
Posts: 28
Joined: Thu Feb 25, 2016 11:19 am

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by MSelke » Tue Feb 16, 2021 11:56 am

I have installed openEMM 20.10.070 from scratch. It is running without any errors so far.
Now i tried the RESTful API and I get the error I found in this thread. I checked the spring-ws-servlet.xml an removed the rev bean line from it. Now I dont get the error but when I make a get request from localhost or remote to this url

curl -X GET -H "Accept: application/json" http://localhost:8080/2.0/restful/recipient/1

or the remote https url instead I get a 405 method not allowed response. What can be the issue.

I tried the URL without 2.0, like in the documentation, also, but then i get a 404.

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Tue Feb 16, 2021 5:16 pm

Sorry, there was a glitch in the configuration. Please re-try with version 20.10.000.132 and set the permission in the database with

Code: Select all

INSERT INTO admin_permission_tbl (admin_id, security_token) VALUES (<admin_id>, 'restful.allowed');
Replace <admin_id> with the ID of your restful user.
Syntax to select data of the first mailing would be

Code: Select all

https://<your.domain.com>/restful/mailing/1
OpenEMM Maintainer

MSelke
Posts: 28
Joined: Thu Feb 25, 2016 11:19 am

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by MSelke » Mon Feb 22, 2021 3:40 pm

I read the Rest documentation and i can't find the spot where i can put a "rest user" for authentification in a curl request for example. Where do i have to put the user for the request? Or who is the restful user?

Thank you in advance

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Mon Feb 22, 2021 4:01 pm

Please use the credentials of a GUI user who has the appropriate permissions.
OpenEMM Maintainer

MSelke
Posts: 28
Joined: Thu Feb 25, 2016 11:19 am

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by MSelke » Fri Feb 26, 2021 2:44 pm

Ok, i want to Update but i get the following error while updating the Database

Code: Select all

DB already contains version 20.10.116

Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages-deleted.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages-openemm.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.10.121-basic.sql
ERROR 1064 (42000) at line 14: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS lock$cust_ban_tbl;
  ALTER TABLE prevent_table_drop DROP KEY IF EXISTS' at line 9
Error while executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.10.121-basic.sql

Sql db update scripts successfully executed
DB update executed
I have the mysql version 5.7.33 and run "yum update" recently.
What can i do to solve this?

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Fri Feb 26, 2021 2:47 pm

Did you update from 19.10 to 20.04 or did you update from 19.10 to 20.04 and to 20.10 as 2nd step?
OpenEMM Maintainer

MSelke
Posts: 28
Joined: Thu Feb 25, 2016 11:19 am

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by MSelke » Fri Feb 26, 2021 3:20 pm

No i installed fresh a 20.10 version. I think it was 20.10.070

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Fri Feb 26, 2021 3:49 pm

20.10.070 is a runtime version. Which OpenEMM version did you install?
OpenEMM Maintainer

MSelke
Posts: 28
Joined: Thu Feb 25, 2016 11:19 am

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by MSelke » Wed Mar 03, 2021 3:06 pm

I installed Version 20.10.000.102 from scratch.

maschoff
Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Websevices crashing after upgrade to OpenEMM Version: 19.10.000.169

Post by maschoff » Wed Mar 03, 2021 3:51 pm

You installed OpenEMM from scratch, but you already had an existing OpenEMM database? If so, of which OpenEMM version?
OpenEMM Maintainer

Post Reply