Cancel
Showing results for 
Search instead for 
Did you mean: 

TimesSeries SDK with Spring MVC Web App Java

Valued Contributor
Valued Contributor

Hi All,

 

I am building a Spring Web App to fetch data fromTimeseries DB and display it on Web Pages.

The problem I am facing is my web app  works fine and also my Timeseries SDK also working fine but when I merge the dependency of Spring and MindSphere SDK in same project it gives error.

Does anyone has faced similar issue?

Any help will be appreciated..

 

4 REPLIES 4

Re: TimesSeries SDK with Spring MVC Web App Java

Pioneer
Pioneer

Can you share the details of errors you are facing ?

 

Thanks

Divya

Highlighted

Re: TimesSeries SDK with Spring MVC Web App Java

Valued Contributor
Valued Contributor

Hi divgcet1,

 

The error I was getting was:

 

at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/bind/MissingMatrixVariableException
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.getDefaultArgumentResolvers(RequestMappingHandlerAdapter.java:649)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.afterPropertiesSet(RequestMappingHandlerAdapter.java:565)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1753)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1690)
... 25 more
Caused by: java.lang.ClassNotFoundException: org.springframework.web.bind.MissingMatrixVariableException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
... 29 more

May 01, 2019 9:15:41 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [dispatcher] in web application [/MindSphereTimeSeries] threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.bind.MissingMatrixVariableException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)

 

 

But I was able to resolve it by removing the mindsphere-sdk-java-core and keeping other timeseries sdk. My code is working fine now.

 

I will still be interested to undesrtand why this error came.

 

Re: TimesSeries SDK with Spring MVC Web App Java

Pioneer
Pioneer

Looks to me the version conflict. Please check there are two version publish of Mindpshere Java SDK. Thanks

Re: TimesSeries SDK with Spring MVC Web App Java

Valued Contributor
Valued Contributor

Yes, It was a version conflict I was able to resolve it by removing couple of unwanted dependency.