Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

saravanan sambandam

Ranch Hand
+ Follow
since Aug 30, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by saravanan sambandam

I am facing below issue while creating pdf in JAVA itextPdf.

1.  Cell have more space - skipping if the String contain more letters.
2.  Second page always empty and content are printing 3rd page, 4th page itself half page only printing again.  The half of the content moving to 5th page.



I indicated with blue color, and suspect that the problem occurs only here.

Please help me what i done the mistake.
Team i am new to itextpdf, and altering existing Production code.  I am facing below issues
#1. User send htmlContent with contain 5000-characters. Body commentTable overlapping with footer part,
#2. New page not generating, if generated then content will be forwarded.

Problem: getContentAsElementList() - String content parsed using itextPdf xmlParse.  The element is added into cell.  This not forwarding into new page.  If the cell not to accomodate the entire string.



#3.I verified with  standalone programe (GeneratePDF) string  5000-characters.  New page generating header & footer working fine.

Hi,

I am new to springframework, i am facing some issue while reading properties fil using spring MVC (Spring-4.1 -
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd).

I have configured error.message.properties on spring-servlet.xml, enter was


java code is


#1. doImportProcess() method itself i am getting property value.   Where as outside of this method i am getting getErrorProperties() is null.

I am not able to understand why i am getting this.


Thanks.
5 years ago
Hi,

I am using resttemplate to get catalog details. In that case i created one service class, and VO pojo.  By using the  restTemplateObj.getForEntiry(URL, Catalog.class);

It was throws exception.  I goggled they says something, that i need to set jsonSetter.   Could you please let me know.



while hitting this service from rest service tool (postman). It was throws below error message
org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized field "CatalogGrpView" (Class com.marcom.model.catalog.CatalogVO), not marked as ignorable

at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@69e9c8ed; line: 1, column: 44] (through reference chain: com.marcom.model.catalog.CatalogVO["CatalogGrpView"]); nested exception is org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "CatalogGrpView" (Class com.marcom.model.catalog.CatalogVO), not marked as ignorable
at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@69e9c8ed; line: 1, column: 44] (through reference chain: com.marcom.model.catalog.CatalogVO["CatalogGrpView"])
at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readJavaType(MappingJacksonHttpMessageConverter.java:187)
at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.read(MappingJacksonHttpMessageConverter.java:179)
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:95)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:795)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:779)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:559)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:512)
at org.springframework.web.client.RestTemplate.getForEntity(RestTemplate.java:268)
at com.marcom.service.CatalogService .getCatalog(CatalogService .java:29)
at com.marcom.service.CatalogService $$FastClassBySpringCGLIB$$df036979.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at com.marcom.util.logger.doLogging(logger.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)
at com.marcom.service.CatalogService $$EnhancerBySpringCGLIB$$f0545b76.getCatalog(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.VoidVoidDispatchProvider$VoidVoidMethodInvoker._dispatch(VoidVoidDispatchProvider.java:71)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.marcom.filters.AuthorizationFilter.doFilter(AuthorizationFilter.java:54)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "CatalogGrpView" (Class com.marcom.model.catalog.CatalogVO), not marked as ignorable
at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@69e9c8ed; line: 1, column: 44] (through reference chain: com.marcom.model.catalog.CatalogVO["CatalogGrpView"])
at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:246)
at org.codehaus.jackson.map.deser.StdDeserializer.reportUnknownProperty(StdDeserializer.java:604)
at org.codehaus.jackson.map.deser.StdDeserializer.handleUnknownProperty(StdDeserializer.java:590)
at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:689)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:514)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:350)
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2395)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1655)
at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readJavaType(MappingJacksonHttpMessageConverter.java:184)
... 68 more

Could you please let me know what i did the mistake here.  Why this was not getting response as catalog object.

Thanks
saravaan
5 years ago
Thanks for your answers..


Could you able to identify the classes from the screen shot.   Here, those string are getting it from endeca (dB).
5 years ago
Hi,

I am new to spring framework.  I configured tomcat on my eclipse.  I tried to run it from eclipse.  It through below error.  Its an existing project downloaded from svn:
SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.config.MdexConfig] for bean with name 'mdexConfig' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.config.MdexConfig
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.config.MdexConfig] for bean with name 'mdexConfig' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.config.MdexConfig
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.config.ApplicationConfig] for bean with name 'applicationConfig' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.config.ApplicationConfig
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.NonAggSearchResultProcessorImpl] for bean with name 'nonresultProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.NonAggSearchResultProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.SearchResultProcessorImpl] for bean with name 'resultProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.SearchResultProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.RefinementProcessorImpl] for bean with name 'refinementProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.RefinementProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.CombinedGNProcessorImpl] for bean with name 'combinedGnProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.CombinedGNProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.PageZoneGNProcessorImpl] for bean with name 'pageZonegnProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.PageZoneGNProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.LeftColumnProcessorImpl] for bean with name 'contentProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.LeftColumnProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.DefinedSortKey] for bean with name 'definedSortKey' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.DefinedSortKey
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.BaseSortKey] for bean with name 'baseSortKey' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.BaseSortKey
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.EndecaSortKey] for bean with name 'endecaSortKey' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.EndecaSortKey
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.HeaderProcessorImpl] for bean with name 'headerProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.HeaderProcessorImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.service.impl.SearchServiceImpl] for bean with name 'resultOnlySearchService' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.service.impl.SearchServiceImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.PageResultProcessor] for bean with name 'resultspageResultProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.PageResultProcessor
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.service.impl.SearchServiceImpl] for bean with name 'gnOnlySearchService' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.service.impl.SearchServiceImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.PageResultProcessor] for bean with name 'gnpageResultProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.PageResultProcessor
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.service.impl.SearchServiceImpl] for bean with name 'searchService' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.service.impl.SearchServiceImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.PageResultProcessor] for bean with name 'pageResultProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.PageResultProcessor
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.NonAggregatedQueryProcessor] for bean with name 'nonAggQueryProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.NonAggregatedQueryProcessor
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.service.impl.SearchServiceImpl] for bean with name 'aggSearchService' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.service.impl.SearchServiceImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.AggregatedQueryProcessor] for bean with name 'aggQueryProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.AggregatedQueryProcessor
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.processor.impl.PageResultProcessor] for bean with name 'aggpageResultProcessor' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.processor.impl.PageResultProcessor
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.service.impl.BaseEndecaService] for bean with name 'baseEndecaService' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.service.impl.BaseEndecaService
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.service.impl.CacheServiceImpl] for bean with name 'cacheService' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.service.impl.CacheServiceImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.util.UrlMapper] for bean with name 'urlMapper' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.util.UrlMapper
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.urlFormatter.DefaultBehaviorSeoNavStateFormatter] for bean with name 'navStateFormatter' defined in ServletContext resource [/WEB-INF/spring/endeca-url-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.urlFormatter.DefaultBehaviorSeoNavStateFormatter
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.urlFormatter.NoQuoteSearchTermParamEncoder] for bean with name 'Ntt-paramEncoder' defined in ServletContext resource [/WEB-INF/spring/endeca-url-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.urlFormatter.NoQuoteSearchTermParamEncoder
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.urlFormatter.NonFormattedSeoDimLocationFormatter] for bean with name 'nonFormatter' defined in ServletContext resource [/WEB-INF/spring/endeca-url-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.urlFormatter.NonFormattedSeoDimLocationFormatter
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5267)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5557)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.config.MdexConfig] for bean with name 'mdexConfig' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.config.MdexConfig
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1328)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:591)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:434)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:412)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:398)
at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1040)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:142)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:126)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
... 28 more
Caused by: java.lang.ClassNotFoundException: com.endeca.config.MdexConfig
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1722)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1349)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320)
... 40 more
Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.endeca.config.MdexConfig] for bean with name 'mdexConfig' defined in ServletContext resource [/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassNotFoundException: com.endeca.config.MdexConfig
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1328)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:591)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:434)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:404)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:519)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1060)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:277)
at org.springframework.web.servlet.handler.AbstractHandlerMapping.detectMappedInterceptors(AbstractHandlerMapping.java:221)
at org.springframework.web.servlet.handler.AbstractHandlerMapping.initApplicationContext(AbstractHandlerMapping.java:196)
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:120)
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:76)
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:74)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:119)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:94)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5267)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5557)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.endeca.config.MdexConfig
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1722)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1349)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320)
... 45 more
Related cause:

Where as if i run it from command line like
d:\project_path\mvn tomcat:run

it is running without any error.   What is the error.  What i done the mistake.
5 years ago
Hi,

We have created mobile application for that java is an service provider (Presentation Service), which (PS) get request from apps and sent it to WCS(Web Commerce Server 7).  Getting xml based response then we are formatting as json and sending it back to mobile apps.  This was doing the PS layer.  

We have created web project using spring framework, also we have created another one web project which is get the request from PS and get data from endeca and send it back to PS.  This is small application deployed on the same server (tomcat-7).

My application deployed on two instance server#1 and server#2 (tomcat 7).  These two instance are installed two Linux system.  Those two instance are tested with load balance (concurrent user 1000) very beginning.  It was OK.   Now, we are facing issue like Servers are getting shutting down automatically.    We suspected there was some memory leak.  We have executed with jMap tool on two PRODUCTION server, then generated with heapDump.   It shows like



We have provided heap size is min:512m & Maxsize:1024 on tomcat setenv.sh itself.

Do you have any idea, why this occurring.   What i have done the mistake.

The report is below:


Top Consumers : Retained Set :  Possible Memory Waste :  Duplicate Strings

Found 48 occurrences of char[] with at least 10 instances having identical content. Total size is 4,309,320 bytes.

Top elements include:
•16,009 × product.review.avg_rating_range (80 bytes)
•15,844 × Current_Offers (48 bytes)
•15,307 × Brand (32 bytes)
•7,243 × Price (32 bytes)
•9,025 × Type (24 bytes)

Details »

In our spring-config.xml file, we have provided the scope is empty.  So that it act as singleton.  Then how the instance is having same content.   Do you have any idea or any suggestion.  Please let me know

Thanks
saravanan s


[Rob] split a long line
5 years ago
Ok. I gone through this link and implemented

http://stackoverflow.com/questions/17697432/struts2-rest-plugin-making-both-struts-actions-rest-actions-work-together-but


As you said, i will do the basic simple application which have both struts2 action and rest url.


Thanks
6 years ago
My application having struts actions and rest service. Based on the action this customActionMapper will find and call accordingly. Hence, i decided to go with customActionMapper. Is this wrong? Please advise me. Or else any approach is there? Link also provided - Mapping REST URLs to Struts 2 Actions http://struts.apache.org/docs/rest-plugin.html.

You mentioned that the line no.18 was an issue, and was removed the package name & import statement. The full code is below


Can you please help to resolve this issue.

Thanks in advance
6 years ago
Hi, Thanks for your reply. My url is correct, bu the changes in web.xml (LOTTUES --> LOTUS).

Implemented with Struts ActionMapper.java class

also on struts.xml


After login my application. struts other action are working fine, i just hit the REST URL from browser (http://localhost:8080/lotus/MascomWS/languageResource/Language), now my rest service is calling. But, it shows error message. What & where i done the mistake? Please help me.

HTTP Status 500 -

type Exception report

message

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

exception

java.lang.NullPointerException
com.lotus.Mascom.action.CustomActionMapper.getMapping(CustomActionMapper.java:18)
org.apache.struts2.dispatcher.ng.PrepareOperations.findActionMapping(PrepareOperations.java:159)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:84)
com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.61 logs.

Apache Tomcat/7.0.61

6 years ago
Hi Friends,

I am new to struts framework, and i am working on existing struts project for setting LDAP authentication. I don't have any idea of struts2 with REST service. Deployed the war into tomcat7 and hit the urls from browser & REST Client. But, i am not getting response (ERROR)

HTTP Status 404 - There is no Action mapped for namespace [/MascomWS/languageResource/Language/titleId] and action name [1174] associated with context path [/Lottus].

type Status report

message There is no Action mapped for namespace [/MascomWS/languageResource/Language/titleId] and action name [1174] associated with context path [/Lottus].

description The requested resource is not available.

Apache Tomcat/7.0.61



Could you please help to resolve the below issues.

a. Hitting URL from browser? What i made the mistake? why result is not appearing.

b. REST Client not giving result? Here what i made the mistake.

c. What should i check in my codes below? Can you please help me the steps to get result on the browser / REST Client.

my struts.xml

web.xml


Java class



6 years ago
http://localhost:8080/Lottus/languageResource/ - when i hit this URL from browser, i am getting error message no action is mapped with this action. Could you please help me out to resolve this issue. Where i made the mistakes on above.

I am new to strust2 framework and rest service is also new.
6 years ago
Yes, I am taking an existing project.

my struts.xml

web.xml


Java class

6 years ago
Is struts2 supports rest webservice?? If 'Yes' Please provide me the link. I tired but i am not getting any link.

My application was built on struts2 with rest webservice. When they tried to access those service from outside (other application). They are passing client certificate and other keystore file, then they consuming those service.
Our requirement is -- those services need to consume by LDAP based authentication. So i removed all the filters on web.xml which was mapped with the service. Then i tried to hit the url from rest client. Then it says no action is mapped with service.

My doubt is whether struts2 framework will supports rest service?

Please help me to resolve my issue

6 years ago
Hi,

My requirement is i need to call two function on clicking of button event, requirement is below

#1. i have create webstart (java standalone) application which is included as a <a href=" . . . . . . ">. when the user clicked the link it get downloaded and run in client end and insert value in db. This is working fine. what we are doing we are passing user id as a parameter to webstart application. Webstart will check user id in db and if exist then will update the data into db.

while launching the application there is no control between webstart & my web application. So the user clicking other action on web page and saying their no result. We need to display overlay something.

#2. ones the webstart got launched, i need to use another call to check db, if the particular column updated in db, and fetch the data and display in the page instead of overlay.


I thing i am not making any confusion here.......

scenario

user page -----> button --->while clicking the button --> user information stored in db and pass the user id to webstart for further action.
here the user information stored in db and moving to next page. while moving to next page, web start action should be happened automatically. Problem is i unable to call webstart action.

How to implement the two action simultaneously..

please help me.

Thanks
saran
8 years ago