Error with SwitchableFieldDefinition with nesting of MultiValueFieldDefinition and CompositeFieldDefinition - dialog

I have a problem when I deploy a dialog of my component, it belongs to class SwitchableFieldDefinition which has an option of containing a MultiValueFieldDefinition and this has a nested CompositeFieldDefinition:
This is the log error when I deploy this dialog:
ERROR info.magnolia.pages.app.editor.PageEditorPresenter 30.03.2016 11:42:31 -- An error occurred while executing action [editElement]
info.magnolia.ui.api.action.ActionExecutionException: Action execution failed for action: editElement
at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:64)
at info.magnolia.pages.app.editor.PageEditorPresenter.onAction(PageEditorPresenter.java:118)
at info.magnolia.ui.vaadin.editor.PageEditor$1.editArea(PageEditor.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
at com.vaadin.server.communication.ServerRpcHandler.handleBurst(ServerRpcHandler.java:214)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:111)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:91)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1371)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.service(AdmincentralVaadinServlet.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:148)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.VirtualUriFilter.doFilter(VirtualUriFilter.java:68)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.module.cache.executor.Bypass.processCacheRequest(Bypass.java:58)
at info.magnolia.module.cache.executor.CompositeExecutor.processCacheRequest(CompositeExecutor.java:66)
at info.magnolia.module.cache.filter.CacheFilter.doFilter(CacheFilter.java:152)
at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.i18n.I18nContentSupportFilter.doFilter(I18nContentSupportFilter.java:73)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.RangeSupportFilter.doFilter(RangeSupportFilter.java:84)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.security.SecurityCallbackFilter.doFilter(SecurityCallbackFilter.java:83)
at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.security.LogoutFilter.doFilter(LogoutFilter.java:94)
at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.module.templatingkit.filters.SiteMergeFilter.doFilter(SiteMergeFilter.java:112)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.multisite.filters.MultiSiteFilter.doFilter(MultiSiteFilter.java:104)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.MultiChannelFilter.doFilter(MultiChannelFilter.java:83)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.module.cache.filter.GZipFilter.doFilter(GZipFilter.java:73)
at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:127)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.enterprise.registration.RegistrationFilter.doFilter(RegistrationFilter.java:56)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.module.devicedetection.filter.DeviceDetectionFilter.doFilter(DeviceDetectionFilter.java:71)
at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.personalization.preview.filter.PreviewFilter.doFilter(PreviewFilter.java:92)
at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82)
at info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:61)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:61)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:112)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:129)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)
at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:106)
at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:66)
at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:107)
at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:93)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: info.magnolia.ui.vaadin.integration.NullItem cannot be cast to info.magnolia.ui.vaadin.integration.jcr.JcrNodeAdapter
at info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueFieldTransformer.getRootItem(DelegatingMultiValueFieldTransformer.java:194)
at info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueFieldTransformer.readFromItem(DelegatingMultiValueFieldTransformer.java:112)
at info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueFieldTransformer.readFromItem(DelegatingMultiValueFieldTransformer.java:76)
at info.magnolia.ui.form.field.transformer.TransformedProperty.<init>(TransformedProperty.java:59)
at info.magnolia.ui.form.field.factory.AbstractFieldFactory.initializeProperty(AbstractFieldFactory.java:238)
at info.magnolia.ui.form.field.factory.AbstractFieldFactory.createField(AbstractFieldFactory.java:114)
at info.magnolia.ui.form.field.AbstractCustomMultiField.createLocalField(AbstractCustomMultiField.java:175)
at info.magnolia.ui.form.field.SwitchableField.initFields(SwitchableField.java:104)
at info.magnolia.ui.form.field.SwitchableField.initFields(SwitchableField.java:62)
at info.magnolia.ui.form.field.AbstractCustomMultiField.initFields(AbstractCustomMultiField.java:140)
at info.magnolia.ui.form.field.SwitchableField.initContent(SwitchableField.java:93)
at com.vaadin.ui.CustomField.getContent(CustomField.java:92)
at com.vaadin.ui.CustomField.attach(CustomField.java:82)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:478)
at com.vaadin.ui.CustomField.getContent(CustomField.java:93)
at com.vaadin.ui.CustomField.attach(CustomField.java:82)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:478)
at com.vaadin.ui.CustomField.getContent(CustomField.java:93)
at com.vaadin.ui.CustomField.attach(CustomField.java:82)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at info.magnolia.ui.dialog.BaseDialogViewImpl.attach(BaseDialogViewImpl.java:180)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:583)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:571)
at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:478)
at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.addOverlay(MagnoliaShell.java:233)
at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.openOverlay(MagnoliaShell.java:203)
at info.magnolia.ui.framework.shell.ShellImpl.openOverlayOnView(ShellImpl.java:221)
at info.magnolia.ui.framework.app.SubAppContextImpl$1.openOverlay(SubAppContextImpl.java:150)
at info.magnolia.ui.framework.context.AbstractUIContext.openOverlay(AbstractUIContext.java:66)
at info.magnolia.ui.dialog.formdialog.FormDialogPresenterImpl.start(FormDialogPresenterImpl.java:144)
at info.magnolia.ui.dialog.formdialog.FormDialogPresenterImpl.start(FormDialogPresenterImpl.java:119)
at info.magnolia.pages.app.action.EditElementAction.execute(EditElementAction.java:88)
at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62)
... 118 more
I´ve tried with other TransformerClass like:
DelegatingMultiValueFieldTransformer
DelegatingCompositeFieldTransformer
but I couldn´t get anything.
Please, any help?

you need add to this "transformerClass" to SwitchableFieldDefinition height.
TransformerClass
I hope resolving your question.

Related

Getting Null pointer exception on overriding assistedServiceService in hybris

After overriding OOB assistedServiceService I am getting NPE in OOB class DefaultAssistedServiceFacade.java for line assistedServiceService.getAsmSession()
To override service I have followed below steps.
1- Declared bean in customextension-core-spring.xml file as below
<alias name="defaultcustomAssistedServiceService" alias="assistedServiceService"/>
<bean id="defaultcustomAssistedServiceService" class="com.custom.core.services.impl.DefaultCustomAssistedServiceService" parent ="defaultAssistedServiceService"><br> <property name="flexibleSearchService" ref="flexibleSearchService"/>
</bean>
2- Created a custom class overriding OOB defaultCustomAssistedServiceService class
public class DefaultCustomAssistedServiceService extends DefaultAssistedServiceService implements CustomAssistedServiceService {
private FlexibleSearchService flexibleSearchService;
#Override
public CartModel getCartByCode(final String cartCode) {
}
public FlexibleSearchService getFlexibleSearchService() {
return flexibleSearchService;
}
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService) {
this.flexibleSearchService = flexibleSearchService;
}
Since Object of assistedServiceService is already been used in other OOB classes, So wherever its been called it is giving NPE. Am I missing something in service overriding?
Please note OOB assistedServiceService is defined in OOB extension 'assistedServiceService' in file assistedserviceservices-spring.xml as
<alias name="defaultAssistedServiceService" alias="assistedServiceService"/>
<bean id="defaultAssistedServiceService" class="de.hybris.platform.assistedserviceservices.impl.DefaultAssistedServiceService">
<property name="modelService" ref="modelService"/>
<property name="userService" ref="userService"/>
<property name="baseSiteService" ref="baseSiteService"/>
<property name="cartService" ref="cartService"/>
<property name="sessionService" ref="sessionService"/>
<property name="flexibleSearchService" ref="flexibleSearchService"/>
<property name="pagedFlexibleSearchService" ref="pagedFlexibleSearchService"/>
<property name="commerceCartService" ref="commerceCartService"/>
<property name="customerAccountService" ref="customerAccountService"/>
<property name="commonI18NService" ref="commonI18NService"/>
<property name="timeService" ref="timeService"/>
</bean>
Below is stacktrace which I am getting
SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [] threw exception [Error while processing internal filterchain. Exception occurred at chain position: 11 of 17. Current filter: 'FilterChainProxy[Filter Chains: [[ Ant [pattern='/_ui/'], []], [ Ant [pattern='/checkout/'], [org.springframework.security.web.access.channel.ChannelProcessingFilter#63e1e0e7, org.springframework.security.web.context.SecurityContextPersistenceFilter#6b94c056, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#21cc977c, org.springframework.security.web.header.HeaderWriterFilter#473f7e49, org.springframework.security.web.authentication.logout.LogoutFilter#2b355891, org.springframework.security.web.csrf.CsrfFilter#666ebbd1, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#235ca717, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#1fad4803, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#1edd7ab7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#dfefa8e, org.springframework.security.web.session.SessionManagementFilter#4bdc9039, org.springframework.security.web.access.ExceptionTranslationFilter#3ec43411, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#4b39f9bc]], [ com.custom.equipment.security.ExcludeUrlRequestMatcher#7c8d71a8, [org.springframework.security.web.access.channel.ChannelProcessingFilter#1b535de5, org.springframework.security.web.context.SecurityContextPersistenceFilter#13338461, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#10e5e5df, org.springframework.security.web.header.HeaderWriterFilter#772c65a, org.springframework.security.web.authentication.logout.LogoutFilter#2b355891, org.springframework.security.web.csrf.CsrfFilter#6cf0f24, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#9d09310, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#36a444e8, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#27750470, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#59bd9995, org.springframework.security.web.session.SessionManagementFilter#5478c9a1, org.springframework.security.web.access.ExceptionTranslationFilter#406f54c2, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#4fb68e3b]], [ org.springframework.security.web.util.matcher.RegexRequestMatcher#76ae7043, [org.springframework.security.web.access.channel.ChannelProcessingFilter#557fbc59, org.springframework.security.web.context.SecurityContextPersistenceFilter#5d8731bd, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#7d6c98eb, org.springframework.security.web.header.HeaderWriterFilter#7845d36d, org.springframework.security.web.csrf.CsrfFilter#50703548, org.springframework.security.web.authentication.logout.LogoutFilter#349efc22, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#2d2c919a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#7ba4f1e9, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#2a2f51a0, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#6993c72b, org.springframework.security.web.session.SessionManagementFilter#207a3bc2, org.springframework.security.web.access.ExceptionTranslationFilter#7c0dbd9d, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#2cff51ed]]]]'!; nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at de.hybris.platform.assistedservicefacades.impl.DefaultAssistedServiceFacade.getAsmSession(DefaultAssistedServiceFacade.java:725)
at de.hybris.platform.assistedservicefacades.impl.DefaultAssistedServiceFacade.isAssistedServiceModeLaunched(DefaultAssistedServiceFacade.java:140)
at com.custom.asm.aspect.ChannelDecisionAspect.isAssistedServiceMode(ChannelDecisionAspect.java:87)
at com.custom.asm.aspect.ChannelDecisionAspect.decideAround(ChannelDecisionAspect.java:53)
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:627)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
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:671)
at org.springframework.security.web.access.channel.ChannelDecisionManagerImpl$$EnhancerBySpringCGLIB$$59a46d4f.decide()
at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.FileUploadFilter.doFilterInternal(FileUploadFilter.java:51)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.UrlEncoderFilter.doFilterInternal(UrlEncoderFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.StorefrontFilter.doFilterInternal(StorefrontFilter.java:74)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.RequestLoggerFilter.doFilterInternal(RequestLoggerFilter.java:71)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:90)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.WebAppMediaFilter.doFilter(WebAppMediaFilter.java:128)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:99)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:44)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.session.HybrisSpringSessionFilter.doFilter(HybrisSpringSessionFilter.java:69)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.processStandardFilterChain(AbstractPlatformFilterChain.java:206)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:183)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at com.custom.equipment.filters.UrlPathFilter.doFilterInternal(UrlPathFilter.java:82)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.custom.equipment.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:90)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at de.hybris.platform.servicelayer.web.XSSFilter.processPatternsAndDoFilter(XSSFilter.java:358)
at de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:306)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1471)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:750)
Mar 02, 2022 11:02:19 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [] threw exception [Error while processing internal filterchain. Exception occurred at chain position: 11 of 17. Current filter: 'FilterChainProxy[Filter Chains: [[ Ant [pattern='/_ui/'], []], [ Ant [pattern='/checkout/'], [org.springframework.security.web.access.channel.ChannelProcessingFilter#63e1e0e7, org.springframework.security.web.context.SecurityContextPersistenceFilter#6b94c056, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#21cc977c, org.springframework.security.web.header.HeaderWriterFilter#473f7e49, org.springframework.security.web.authentication.logout.LogoutFilter#2b355891, org.springframework.security.web.csrf.CsrfFilter#666ebbd1, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#235ca717, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#1fad4803, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#1edd7ab7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#dfefa8e, org.springframework.security.web.session.SessionManagementFilter#4bdc9039, org.springframework.security.web.access.ExceptionTranslationFilter#3ec43411, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#4b39f9bc]], [ com.custom.equipment.security.ExcludeUrlRequestMatcher#7c8d71a8, [org.springframework.security.web.access.channel.ChannelProcessingFilter#1b535de5, org.springframework.security.web.context.SecurityContextPersistenceFilter#13338461, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#10e5e5df, org.springframework.security.web.header.HeaderWriterFilter#772c65a, org.springframework.security.web.authentication.logout.LogoutFilter#2b355891, org.springframework.security.web.csrf.CsrfFilter#6cf0f24, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#9d09310, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#36a444e8, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#27750470, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#59bd9995, org.springframework.security.web.session.SessionManagementFilter#5478c9a1, org.springframework.security.web.access.ExceptionTranslationFilter#406f54c2, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#4fb68e3b]], [ org.springframework.security.web.util.matcher.RegexRequestMatcher#76ae7043, [org.springframework.security.web.access.channel.ChannelProcessingFilter#557fbc59, org.springframework.security.web.context.SecurityContextPersistenceFilter#5d8731bd, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#7d6c98eb, org.springframework.security.web.header.HeaderWriterFilter#7845d36d, org.springframework.security.web.csrf.CsrfFilter#50703548, org.springframework.security.web.authentication.logout.LogoutFilter#349efc22, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#2d2c919a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#7ba4f1e9, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#2a2f51a0, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#6993c72b, org.springframework.security.web.session.SessionManagementFilter#207a3bc2, org.springframework.security.web.access.ExceptionTranslationFilter#7c0dbd9d, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#2cff51ed]]]]'!; nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at de.hybris.platform.assistedservicefacades.impl.DefaultAssistedServiceFacade.getAsmSession(DefaultAssistedServiceFacade.java:725)
at de.hybris.platform.assistedservicefacades.impl.DefaultAssistedServiceFacade.isAssistedServiceModeLaunched(DefaultAssistedServiceFacade.java:140)
at com.custom.asm.aspect.ChannelDecisionAspect.isAssistedServiceMode(ChannelDecisionAspect.java:87)
at com.custom.asm.aspect.ChannelDecisionAspect.decideAround(ChannelDecisionAspect.java:53)
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:627)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
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:671)
at org.springframework.security.web.access.channel.ChannelDecisionManagerImpl$$EnhancerBySpringCGLIB$$59a46d4f.decide()
at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.FileUploadFilter.doFilterInternal(FileUploadFilter.java:51)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.UrlEncoderFilter.doFilterInternal(UrlEncoderFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.StorefrontFilter.doFilterInternal(StorefrontFilter.java:74)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.RequestLoggerFilter.doFilterInternal(RequestLoggerFilter.java:71)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at com.custom.equipment.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:90)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.WebAppMediaFilter.doFilter(WebAppMediaFilter.java:128)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:99)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:44)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.session.HybrisSpringSessionFilter.doFilter(HybrisSpringSessionFilter.java:69)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.processStandardFilterChain(AbstractPlatformFilterChain.java:206)
at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:183)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at com.custom.equipment.filters.UrlPathFilter.doFilterInternal(UrlPathFilter.java:82)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.custom.equipment.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:90)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at de.hybris.platform.servicelayer.web.XSSFilter.processPatternsAndDoFilter(XSSFilter.java:358)
at de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:306)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1471)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:750)
fixed the error by calling super method in facade, where I was setting the object of service.
public void setAssistedServiceService(CustomAssistedServiceService assistedServiceService) {
super.setAssistedServiceService(assistedServiceService);
this.assistedServiceService = assistedServiceService;
}

How can'i download a PDF file from iframe in internet explorer 8

I would to download a PDF file from iframe it worked in Google chrome and firefox but it not worked in Internet explorer.
This is my code
public void downloadSubscriptionDocument(SessionObject object) {
Document dt = getBlobCode(object);
if (dt != null && dt.getData() != null) {
final FacesContext fContext = FacesContext.getCurrentInstance();
ExternalContext eContext = null;
if (fContext != null && dt != null) {
eContext = fContext.getExternalContext();
if (eContext != null) {
final HttpServletResponse response = (HttpServletResponse) eContext.getResponse();
response.setContentType("application/pdf");
response.addHeader("content-disposition", "attachment; filename=" + "BulletinAdhesion" + ".pdf");
if (dt != null && dt.getData() != null) {
response.addHeader("Content-Length", String.valueOf(dt.getData().length));
}
try {
final ServletOutputStream sos = response.getOutputStream();
sos.write(dt.getData());
sos.flush();
sos.close();
fContext.responseComplete();
} catch (final Exception ex) {
LOGGER.log(Level.SEVERE, ex.getMessage());
}
}
}
}
else {
Locale locale = new Locale("fr");
this.addMessageError(ResourceBundle.getBundle("messages", locale).getString("eu.spb.afflelou.pdv.ba.not.found"));
return ;
}
}
I have this exception in console
Servlet] - 2019-12-04 10:30:29,289 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/spb-extranet-afflelou-pdv].[Faces Servlet]] (ajp-/10.7.2.55 {s2jbossrecex.spb.eu} :8809-3) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalStateException: JBWEB000028: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:621) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:191) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:778) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669) [jboss-jsf-api_2.1_spec-2.1.28.SP2-redhat-1.jar:2.1.28.SP2-redhat-1]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:1110) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jboss-jsf-api_2.1_spec-2.1.28.SP2-redhat-1.jar:2.1.28.SP2-redhat-1]
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jboss-jsf-api_2.1_spec-2.1.28.SP2-redhat-1.jar:2.1.28.SP2-redhat-1]
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jboss-jsf-api_2.1_spec-2.1.28.SP2-redhat-1.jar:2.1.28.SP2-redhat-1]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.28.SP11-redhat-1.jar:2.1.28.SP11-redhat-1]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.1.28.SP2-redhat-1.jar:2.1.28.SP2-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)
at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)
at org.jboss.as.web.security.SubjectInfoSetupValve.invoke(SubjectInfoSetupValve.java:34) [jboss-as-web-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134) [jboss-as-web-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:95) [jboss-as-web-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.22.Final-redhat-1.jar:7.5.22.Final-redhat-1]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:490) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:422) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.30.Final-redhat-1.jar:7.5.30.Final-redhat-1]

Stateful Retry Advice does not resubmit message

We are using Spring Integration + JMS + ActiveMQ to exchange messages between microservices using Virtual Topics.
Here is our configuration for the inbound messages:
#Autowired
lateinit var connectionFactory: ConnectionFactory
#Autowired
lateinit var messageConverter: MessageConverter
#Bean("file-uploaded.inbound")
fun inboundChannel() = MessageChannels.queue().get()
#Bean("file-uploaded.inbound.flow")
fun inboundFlow(): IntegrationFlow {
return IntegrationFlows.from(
Jms.messageDrivenChannelAdapter(
Jms.container(connectionFactory,
"Consumer.appId.VirtualTopic.file-uploaded")
.pubSubDomain(false).get()
).jmsMessageConverter(messageConverter)
).channel(inboundChannel()).get()
}
and here is our retry advice (fairly default, except for the retry state generator):
#Bean
fun requestHandlerRetryAdvice(): RequestHandlerRetryAdvice {
return RequestHandlerRetryAdvice().apply {
setRetryStateGenerator(SpelExpressionRetryStateGenerator("headers[\"jms_messageId\"]"))
setRecoveryCallback(ErrorMessageSendingRecoverer())
}
}
and message handler:
#MessageEndpoint
class FileUploadedEventListener() {
#ServiceActivator(inputChannel = "file-uploaded.inbound", adviceChain = ["requestHandlerRetryAdvice"])
fun handleFileUploadedEvent(fileUploadedEvent: FileUploadedEvent) {
LoggerFactory.getLogger(this.javaClass.name).info("Received event: $fileUploadedEvent")
throw RuntimeException()
}
}
Basically the reply advice is not putting the message back on the queue as it is supposed to (as per documentation) and it is sending an error message on the 'errorChannel' after the first try.
Has anyone experienced the same problem using Virtual Topics?
Or are we just missing something in the configuration?
Thanks!
Update here below the debug logging:
2018-09-19 15:40:07.877 DEBUG .i.j.ChannelPublishingJmsMessageListener : converted JMS Message [ActiveMQBytesMessage {commandId = 5, responseRequired = true, messageId = ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, originalDestination = topic://VirtualTopic.file-uploaded, originalTransactionId = null, producerId = ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1, destination = queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, transactionId = null, expiration = 0, timestamp = 1537368007815, arrival = 0, brokerInTime = 1537368007821, brokerOutTime = 1537368007822, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence#732fdf26, marshalledProperties = org.apache.activemq.util.ByteSequence#6ca08492, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {spanTraceId=4770babc94e7d760, spanId=0c31247dd4ed71eb, spanParentSpanId=4770babc94e7d760, _type=FileUploadedEvent, spanSampled=0}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQBytesMessage{ bytesOut = null, dataOut = null, dataIn = java.io.DataInputStream#33c0baa3 }] to integration Message payload [FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1)]
2018-09-19 15:40:07.879 DEBUG o.s.integration.channel.DirectChannel : preSend on channel 'file-uploaded.inbound.flow.channel#0', message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={spanTraceId=4770babc94e7d760, spanId=0c31247dd4ed71eb, spanParentSpanId=4770babc94e7d760, jms_redelivered=false, jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, id=266d356e-dc90-cb33-8818-40a3cf718125, priority=4, spanSampled=0, jms_timestamp=1537368007815, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, timestamp=1537368007879}]
2018-09-19 15:40:07.882 DEBUG o.s.integration.handler.BridgeHandler : file-uploaded.inbound.flow.org.springframework.integration.handler.BridgeHandler#0 received message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, X-B3-ParentSpanId=0c31247dd4ed71eb, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=04c0bd5a812ee159, spanParentSpanId=0c31247dd4ed71eb, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[04c0bd5a812ee159], spanParentSpanId=[0c31247dd4ed71eb], spanSampled=[0]}, jms_redelivered=false, X-B3-SpanId=04c0bd5a812ee159, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=33d89f7b-dbf8-b381-add7-549d875dd914, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, timestamp=1537368007881}]
2018-09-19 15:40:07.883 DEBUG o.s.integration.channel.QueueChannel : preSend on channel 'file-uploaded.inbound', message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, X-B3-ParentSpanId=0c31247dd4ed71eb, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=04c0bd5a812ee159, spanParentSpanId=0c31247dd4ed71eb, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[04c0bd5a812ee159], spanParentSpanId=[0c31247dd4ed71eb], spanSampled=[0]}, jms_redelivered=false, X-B3-SpanId=04c0bd5a812ee159, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=33d89f7b-dbf8-b381-add7-549d875dd914, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, timestamp=1537368007881}]
2018-09-19 15:40:07.884 DEBUG o.s.integration.channel.QueueChannel : postSend (sent=true) on channel 'file-uploaded.inbound', message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, X-B3-ParentSpanId=04c0bd5a812ee159, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=49b4d98b393a623e, spanParentSpanId=04c0bd5a812ee159, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[49b4d98b393a623e], spanParentSpanId=[04c0bd5a812ee159], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[49b4d98b393a623e], X-B3-ParentSpanId=[04c0bd5a812ee159], X-B3-Sampled=[0]}, jms_redelivered=false, X-B3-SpanId=49b4d98b393a623e, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=70e86708-b383-ce4a-61f5-36a69ecadfeb, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, timestamp=1537368007883}]
2018-09-19 15:40:07.884 DEBUG o.s.integration.channel.QueueChannel : postReceive on channel 'file-uploaded.inbound', message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, X-B3-ParentSpanId=04c0bd5a812ee159, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=49b4d98b393a623e, spanParentSpanId=04c0bd5a812ee159, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[49b4d98b393a623e], spanParentSpanId=[04c0bd5a812ee159], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[49b4d98b393a623e], X-B3-ParentSpanId=[04c0bd5a812ee159], X-B3-Sampled=[0]}, jms_redelivered=false, X-B3-SpanId=49b4d98b393a623e, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=70e86708-b383-ce4a-61f5-36a69ecadfeb, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, timestamp=1537368007883}]
2018-09-19 15:40:07.884 DEBUG o.s.i.handler.ServiceActivatingHandler : ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor#62a15309] (fileUploadedEventListener.handleFileUploadedEvent.serviceActivator.handler) received message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[7f9b16d7f7d5b347], spanParentSpanId=[49b4d98b393a623e], spanSampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}]
2018-09-19 15:40:07.884 DEBUG o.s.integration.channel.DirectChannel : postSend (sent=true) on channel 'file-uploaded.inbound.flow.channel#0', message: GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, X-B3-ParentSpanId=0c31247dd4ed71eb, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=04c0bd5a812ee159, spanParentSpanId=0c31247dd4ed71eb, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[7f9b16d7f7d5b347], spanParentSpanId=[49b4d98b393a623e], spanSampled=[0]}, jms_redelivered=false, X-B3-SpanId=04c0bd5a812ee159, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=33d89f7b-dbf8-b381-add7-549d875dd914, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1, timestamp=1537368007881}]
2018-09-19 15:40:07.888 DEBUG o.s.retry.support.RetryTemplate : Retry: count=0
2018-09-19 15:40:07.901 INFO c.b.p.a.a.e.FileUploadedEventListener : Received file uploaded event GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[7f9b16d7f7d5b347], spanParentSpanId=[49b4d98b393a623e], spanSampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}]
2018-09-19 15:40:07.902 DEBUG o.s.retry.support.RetryTemplate : Checking for rethrow: count=1
2018-09-19 15:40:07.902 DEBUG o.s.retry.support.RetryTemplate : Rethrow in retry for policy: count=1
2018-09-19 15:40:07.904 DEBUG o.s.i.channel.PublishSubscribeChannel : preSend on channel 'errorChannel', message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException, failedMessage=GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[7f9b16d7f7d5b347], spanParentSpanId=[49b4d98b393a623e], spanSampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}], headers={id=631dd6f9-0e84-15c7-c953-48d732c25270, timestamp=1537368007904}] for original GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, X-B3-ParentSpanId=49b4d98b393a623e, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[7f9b16d7f7d5b347], spanParentSpanId=[49b4d98b393a623e], spanSampled=[0]}, jms_redelivered=false, X-B3-SpanId=7f9b16d7f7d5b347, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=88313bfb-a45d-c9ff-268f-5c2f50e03156, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}]
2018-09-19 15:40:07.904 DEBUG o.s.i.handler.ServiceActivatingHandler : ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor#484a98b8] (fileUploadedEventListener.handleError.serviceActivator.handler) received message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException, failedMessage=GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[b72c67f61de7c366], spanParentSpanId=[7f9b16d7f7d5b347], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[b72c67f61de7c366], X-B3-ParentSpanId=[7f9b16d7f7d5b347], X-B3-Sampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}], headers={X-B3-ParentSpanId=7f9b16d7f7d5b347, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=69a058ce-deed-f3e2-eb20-d4e874171ba6, X-B3-SpanId=b72c67f61de7c366, timestamp=1537368007904}]
2018-09-19 15:40:07.905 DEBUG o.s.i.handler.ServiceActivatingHandler : handler 'ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor#484a98b8] (fileUploadedEventListener.handleError.serviceActivator.handler)' produced no reply for request Message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException, failedMessage=GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[b72c67f61de7c366], spanParentSpanId=[7f9b16d7f7d5b347], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[b72c67f61de7c366], X-B3-ParentSpanId=[7f9b16d7f7d5b347], X-B3-Sampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}], headers={X-B3-ParentSpanId=7f9b16d7f7d5b347, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=69a058ce-deed-f3e2-eb20-d4e874171ba6, X-B3-SpanId=b72c67f61de7c366, timestamp=1537368007904}]
2018-09-19 15:40:07.905 DEBUG o.s.integration.handler.LoggingHandler : _org.springframework.integration.errorLogger.handler received message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException, failedMessage=GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[b72c67f61de7c366], spanParentSpanId=[7f9b16d7f7d5b347], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[b72c67f61de7c366], X-B3-ParentSpanId=[7f9b16d7f7d5b347], X-B3-Sampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}], headers={X-B3-ParentSpanId=7f9b16d7f7d5b347, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=69a058ce-deed-f3e2-eb20-d4e874171ba6, X-B3-SpanId=b72c67f61de7c366, timestamp=1537368007904}]
2018-09-19 15:40:07.906 ERROR o.s.integration.handler.LoggingHandler : org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException, failedMessage=GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[b72c67f61de7c366], spanParentSpanId=[7f9b16d7f7d5b347], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[b72c67f61de7c366], X-B3-ParentSpanId=[7f9b16d7f7d5b347], X-B3-Sampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}]
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:107)
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:93)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler$AdvisedRequestHandler.handleRequestMessage(AbstractReplyProducingMessageHandler.java:182)
[...]
Caused by: java.lang.RuntimeException
at FileUploadedEventListener.handleFileUploadedEvent(FileUploadedEventListener.kt:35)
at FileUploadedEventListener$$FastClassBySpringCGLIB$$eb75a593.invoke(<generated>)
[...]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114)
at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.invoke(MessagingMethodInvokerHelper.java:1056)
at org.springframework.integration.util.MessagingMethodInvokerHelper.invokeHandlerMethod(MessagingMethodInvokerHelper.java:574)
at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:468)
at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:312)
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:104)
... 29 more
2018-09-19 15:40:07.907 DEBUG o.s.i.channel.PublishSubscribeChannel : postSend (sent=true) on channel 'errorChannel', message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException, failedMessage=GenericMessage [payload=FileUploadedEvent(assetId=c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, objectKey=account-id/c9c73263-e05c-4cb0-bf7b-ea2d3b934c13, bucketName=platform-asset-storage-dev, accountId=account-id, fileName=unknown, userId=1), headers={jms_destination=queue://Consumer.dev-platform-asset-previews.VirtualTopic.file-uploaded, _type=FileUploadedEvent, priority=4, jms_timestamp=1537368007815, spanTraceId=4770babc94e7d760, spanId=7f9b16d7f7d5b347, spanParentSpanId=49b4d98b393a623e, nativeHeaders={spanTraceId=[4770babc94e7d760], spanId=[b72c67f61de7c366], spanParentSpanId=[7f9b16d7f7d5b347], spanSampled=[0], X-B3-TraceId=[4770babc94e7d760], X-B3-SpanId=[b72c67f61de7c366], X-B3-ParentSpanId=[7f9b16d7f7d5b347], X-B3-Sampled=[0]}, jms_redelivered=false, id=4c6d131e-448e-9863-f84b-7a4a8e563b09, spanSampled=0, jms_messageId=ID:Marcos-MBP.intranet-57777-1537280015474-1:71:1:1:1}], headers={X-B3-ParentSpanId=7f9b16d7f7d5b347, X-B3-Sampled=0, X-B3-TraceId=4770babc94e7d760, id=69a058ce-deed-f3e2-eb20-d4e874171ba6, X-B3-SpanId=b72c67f61de7c366, timestamp=1537368007904}]
fun inboundChannel() = MessageChannels.queue().get()
It's because you are using a QueueChannel - you need DirectChannel if you want the exception to be thrown back to inbound channel adapter so the message will be requeued.
With a queue channel, the poller will simply send the exception to the error channel.

C++/CX No Suitable Copy Constructor

I have a problem with C++/CX. I'm trying to create a class that is actually a collection of other Class. The class is declared here in the header file:
#pragma once
namespace AdeptlyAdaptiveLayout
{
public ref class NewsItem sealed
{
public:
NewsItem(int init_Id, Platform::String^ init_Category, Platform::String^ init_Headline, Platform::String^ init_Subhead, Platform::String^ init_DateLine, Platform::String^ Image);
property int Id;
property Platform::String^ Category;
property Platform::String^ Headline;
property Platform::String^ Subhead;
property Platform::String^ DateLine;
property Platform::String^ Image;
};
public ref class NewsItemCollection sealed
{
public:
Platform::Collections::Vector<NewsItem> getNewsItems();
};
}
and this is the source file
#include "pch.h"
#include "NewsItem.h"
using namespace Platform;
using namespace Platform::Collections;
namespace AdeptlyAdaptiveLayout
{
NewsItem::NewsItem(int init_Id,
String^ init_Category,
String^ init_Headline,
String^ init_Subhead,
String^ init_DateLine,
String^ init_Image)
{
Id = init_Id;
Category = init_Category;
Headline = init_Headline;
Subhead = init_Subhead;
DateLine = init_DateLine;
Image = init_Image;
}
Vector<NewsItem> NewsItemCollection::getNewsItems()
{
Vector<NewsItem> temp;
temp.Append(*ref new NewsItem(1, "Financial", "Lorem Ipsum", "doro sit amet", "Nunc tristique nec", "Assets/Financial1.png"));
temp.Append(*ref new NewsItem(2, "Financial", "Etiam ac felis viverra", "vulputate nisl ac, aliquet nisi", "tortor porttitor, eu fermentum ante congue", "Assets/Financial2.png"));
temp.Append(*ref new NewsItem(3, "Financial", "Integer sed turpis erat", "Sed quis hendrerit lorem, quis interdum dolor", "in viverra metus facilisis sed", "Assets/Financial3.png"));
temp.Append(*ref new NewsItem(4, "Financial", "Proin sem neque", "aliquet quis ipsum tincidunt", "Integer eleifend", "Assets/Financial4.png" ));
temp.Append(*ref new NewsItem(5, "Financial", "Mauris bibendum non leo vitae tempor", "In nisl tortor, eleifend sed ipsum eget", "Curabitur dictum augue vitae elementum ultrices", "Assets/Financial5.png" ));
temp.Append(*ref new NewsItem(6, "Food", "Lorem ipsum", "dolor sit amet", "Nunc tristique nec", "Assets/Food1.png" ));
temp.Append(*ref new NewsItem(7, "Food", "Etiam ac felis viverra", "vulputate nisl ac, aliquet nisi", "tortor porttitor, eu fermentum ante congue", "Assets/Food2.png" ));
temp.Append(*ref new NewsItem(8,"Food", "Integer sed turpis erat", "Sed quis hendrerit lorem, quis interdum dolor", "in viverra metus facilisis sed","Assets/Food3.png" ));
temp.Append(*ref new NewsItem(9, "Food","Proin sem neque", "aliquet quis ipsum tincidunt", "Integer eleifend", "Assets/Food4.png" ));
temp.Append(*ref new NewsItem(10, "Food", "Mauris bibendum non leo vitae tempor", "In nisl tortor, eleifend sed ipsum eget", "Curabitur dictum augue vitae elementum ultrices", "Assets/Food5.png" ));
return temp;
}
}
The problem is that I keep having this error message "class 'AdeptlyAdaptiveLayout::NewsItem' has no suitable copy constructor". I don't have any idea what I've done wrong. Can you guys me a clue?
Okay, I found the answer now. I've changed the type from Vector to IVector, explicitly create the copy constructor, and adding several changes in the implementation. Here is the changed code in the header and in the source.
Header:
namespace AdeptlyAdaptiveLayout
{
public ref class NewsItem sealed
{
public:
NewsItem(int init_Id, Platform::String^ init_Category, Platform::String^ init_Headline, Platform::String^ init_Subhead, Platform::String^ init_DateLine, Platform::String^ Image);
NewsItem(NewsItem^ obj);
property int Id;
property Platform::String^ Category;
property Platform::String^ Headline;
property Platform::String^ Subhead;
property Platform::String^ DateLine;
property Platform::String^ Image;
};
public ref class NewsItemCollection sealed
{
public:
Windows::Foundation::Collections::IVector<NewsItem^>^ getNewsItems();
};
}
Source:
#include "pch.h"
#include "NewsItem.h"
using namespace Platform;
using namespace Platform::Collections;
using namespace Windows::Foundation::Collections;
namespace AdeptlyAdaptiveLayout
{
NewsItem::NewsItem(int init_Id,
String^ init_Category,
String^ init_Headline,
String^ init_Subhead,
String^ init_DateLine,
String^ init_Image)
{
Id = init_Id;
Category = init_Category;
Headline = init_Headline;
Subhead = init_Subhead;
DateLine = init_DateLine;
Image = init_Image;
}
NewsItem::NewsItem(NewsItem^ obj)
{
this->Category = obj->Category;
this->DateLine = obj->DateLine;
this->Headline = obj->Headline;
this->Id = obj->Id;
this->Image = obj->Image;
this->Subhead = obj->Subhead;
}
IVector<NewsItem^>^ NewsItemCollection::getNewsItems()
{
IVector<NewsItem^>^ temp = ref new Vector<NewsItem^> ();
temp->Append(ref new NewsItem(1, "Financial", "Lorem Ipsum", "doro sit amet", "Nunc tristique nec", "Assets/Financial1.png"));
temp->Append(ref new NewsItem(2, "Financial", "Etiam ac felis viverra", "vulputate nisl ac, aliquet nisi", "tortor porttitor, eu fermentum ante congue", "Assets/Financial2.png"));
temp->Append(ref new NewsItem(3, "Financial", "Integer sed turpis erat", "Sed quis hendrerit lorem, quis interdum dolor", "in viverra metus facilisis sed", "Assets/Financial3.png"));
temp->Append(ref new NewsItem(4, "Financial", "Proin sem neque", "aliquet quis ipsum tincidunt", "Integer eleifend", "Assets/Financial4.png" ));
temp->Append(ref new NewsItem(5, "Financial", "Mauris bibendum non leo vitae tempor", "In nisl tortor, eleifend sed ipsum eget", "Curabitur dictum augue vitae elementum ultrices", "Assets/Financial5.png" ));
temp->Append(ref new NewsItem( 6, "Food", "Lorem ipsum", "dolor sit amet", "Nunc tristique nec", "Assets/Food1.png" ));
temp->Append(ref new NewsItem(7, "Food", "Etiam ac felis viverra", "vulputate nisl ac, aliquet nisi", "tortor porttitor, eu fermentum ante congue", "Assets/Food2.png" ));
temp->Append(ref new NewsItem(8,"Food", "Integer sed turpis erat", "Sed quis hendrerit lorem, quis interdum dolor", "in viverra metus facilisis sed","Assets/Food3.png" ));
temp->Append(ref new NewsItem(9, "Food","Proin sem neque", "aliquet quis ipsum tincidunt", "Integer eleifend", "Assets/Food4.png" ));
temp->Append(ref new NewsItem(10, "Food", "Mauris bibendum non leo vitae tempor", "In nisl tortor, eleifend sed ipsum eget", "Curabitur dictum augue vitae elementum ultrices", "Assets/Food5.png" ));
return temp;
}
}
However, I still do not understand why it works. I think I'm going to do an in-depth research on this.
When you provided the constructor with this constructor signature:
NewsItem(int init_Id, Platform::String ....
... the compiler will no longer synthesize the default ctors for you. You now need to specify them yourself in this case.
https://msdn.microsoft.com/en-us/library/s16xw1a8.aspx
If any non-default constructors are declared, the compiler does not
provide a default constructor

jsf 1.1 save as box problem

I am using JSF 1.1 on Tomcat 6.0.26 and Java 1.4 version. I have to use them in my project. My jsf page has a datatable and I want them to export but with save as box. After I click export excel commandlink it shows browser like this:
ÐÏࡱá;þÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿ# Workbookÿÿÿÿÿÿÿÿÿÿÿÿ0 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÓÌAá°Áâ\pmusty B°a=œ¯¼=h\:¾#8X#"·Ú1ÈÿArial1ÈÿArial1ÈÿArial1ÈÿArial"$"#,##0_);("$"#,##0)!"$"#,##0_);[Red]("$"#,##0)""$"#,##0.00_);("$"#,##0.00)'""$"#,##0.00_);[Red]("$"#,##0.00)7*2_("$"* #,##0_);_("$"* (#,##0);_("$"* "-");(#).))(* #,##0_);_(* (#,##0);_(* "-");(#)?,:("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??);(#)6+1(* #,##0.00_);_(* (#,##0.00);_(* "-"??);(#_)àõÿ À àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ à À à+õÿ øÀ à)õÿ øÀ à,õÿ øÀ à*õÿ øÀ à õÿ øÀ “€ÿ“€ÿ“€ÿ“€ÿ“€ÿ“€ÿ`…-Sheet0Œü¿ADSOYAD DEPARTMANEVCEPDAHILIerdemaktasYonetici02mesutozenIT03mustafaaydemir Netweaver01yunustastutanDeneme0506004ÿT‘IΆ » ÌÁ dü©ñÒMbP?_*+‚€%ÿÁƒ„¡"d,,à?à?Uý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ý ÿÿÿÿÿ>¶# ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ !"#$þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
How can I solve this?
thnx balusC. But problem not solved. here is my code..
`public String export(List list) {
Iterator i1 = list.iterator();
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet s = wb.createSheet();
HSSFRow r = null;
HSSFCell c = null;
int i = 0;
try {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletResponse resp = (HttpServletResponse) externalContext
.getResponse();
ServletOutputStream out = resp.getOutputStream();
resp.setContentType("application/vnd.ms-excel");
HSSFRow r2 = s.createRow(0);
for (short cellnum = (short) 0; cellnum < 6; cellnum++) {
c = r2.createCell(cellnum);
if (cellnum == 0)
c.setCellValue("AD");
else if (cellnum == 1)
c.setCellValue("SOYAD");
else if (cellnum == 2)
c.setCellValue("DEPARTMAN");
else if (cellnum == 3)
c.setCellValue("EV");
else if (cellnum == 4)
c.setCellValue("CEP");
else if (cellnum == 5)
c.setCellValue("DAHILI");
}
while (i1.hasNext()) {
md1 = new Model();
md1 = (Model) i1.next();
int rownum = i + 1;
r2 = s.createRow(rownum);
for (short cellnum = (short) 0; cellnum < 6; cellnum++) {
c = r2.createCell(cellnum);
if (cellnum == 0)
c.setCellValue(md1.getAd());
else if (cellnum == 1)
c.setCellValue(md1.getSoyad());
else if (cellnum == 2)
c.setCellValue(md1.getDepartman());
else if (cellnum == 3)
c.setCellValue(md1.getEv());
else if (cellnum == 4)
c.setCellValue(md1.getCep());
else if (cellnum == 5)
c.setCellValue(md1.getDahili());
}
i++;
}
resp.setHeader("content-disposition:",
"attachment; filename= \"TelefonRehberi.xls\"");
wb.write(out);
out.flush();
out.close();
facesContext.responseComplete();
} catch (Exception e) {
System.out.println("Error: " + e);
}
return "";
}`
You need to set the content type header so that the browser understands what kind of file it is.
response.setHeader("Content-Type", "application/vnd.ms-excel");
You need to set the content disposition header so that the browser pops a Save as dialog:
response.setHeader("Content-Disposition", "attachment;filename=\"" + yourFileName + "\"");
You need to ensure that you write the file as binary data, not as character data.
InputStream input = getExcelFileContentSomehow();
OutputStream output = response.getOutputStream();
// Write input to output.
Update: as per your code snippet, your Content-Disposition header is incorrect. There's a colon at end of header name. Remove it.

Resources