Magnolia v6.2 大气无法配置 JSR-356。

huangapple go评论81阅读模式
英文:

Magnolia v6.2 atmosphere is unable to configure JSR-356

问题

升级Magnolia从v5.7.1到v6.2后,无法配置JSR-356的问题。

Magnolia v5.7使用Vaadin v7,而Magnolia v6.2使用Vaadin v8。

我们使用Apache Tomcat服务器v8.5.56。

可能有人可以帮助解决这个问题。

英文:

After upgrade Magnolia from v5.7.1 to v6.2 atmosphere is unable to configure JSR-356.

Magnolia v5.7 uses Vaadin v7 while Magnolia v6.2 uses Vaadin v8.

We use Apache Tomcat server v8.5.56.

org.atmosphere.util.IOUtils.guestRawServletPath 
java.lang.IllegalStateException: Unable to configure jsr356 at that stage. No Servlet associated with Admincentral-m5
	at org.atmosphere.util.IOUtils.guestRawServletPath(IOUtils.java:282)
	at org.atmosphere.util.IOUtils.guestServletPath(IOUtils.java:255)
	at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:65)
	at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:42)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:237)
	at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:308)
	at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:294)
	at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2092)
	at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:914)
	at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838)
	at com.vaadin.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:206)
	at com.vaadin.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:79)
	at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:68)
	at info.magnolia.ui.admincentral.AdmincentralVaadinServlet$2.createRequestHandlers(AdmincentralVaadinServlet.java:244)
	at com.vaadin.server.VaadinService.init(VaadinService.java:217)
	at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.createServletService(AdmincentralVaadinServlet.java:272)
	at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:380)
	at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:210)
	at info.magnolia.cms.filters.ServletDispatchingFilter.initializeServlet(ServletDispatchingFilter.java:112)
	at info.magnolia.cms.filters.ServletDispatchingFilter.init(ServletDispatchingFilter.java:103)
	at info.magnolia.cms.filters.CompositeFilter.initFilters(CompositeFilter.java:92)
	at info.magnolia.cms.filters.CompositeFilter.init(CompositeFilter.java:82)
	at info.magnolia.cms.filters.CompositeFilter.initFilters(CompositeFilter.java:92)
	at info.magnolia.cms.filters.CompositeFilter.init(CompositeFilter.java:82)
	at info.magnolia.cms.filters.FilterManagerImpl.initRootFilter(FilterManagerImpl.java:175)
	at info.magnolia.cms.filters.FilterManagerImpl$2.doExec(FilterManagerImpl.java:112)
	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:407)
	at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:404)
	at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:378)
	at info.magnolia.cms.filters.FilterManagerImpl.init(FilterManagerImpl.java:107)
	at info.magnolia.cms.filters.MgnlMainFilter.init(MgnlMainFilter.java:84)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:106)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4538)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5181)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1822)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Maybe someone can help solve this problem?

答案1

得分: 3

在提供的Magnolia 6.2 webapp bundles的web.xml文件中,您可以找到类似以下内容的内容:

<!-以下两个参数阻止大气框架尝试安装-> 
<!-JSR-356(不需要并导致我们的servlet设置出现问题-> 
<context-param> 
<param-name>org.atmosphere.cpr.AtmosphereConfig.getInitParameter</param-name> 
<param-value>true</param-value> 
</context-param> 
<context-param> 
<param-name>org.atmosphere.websocket.suppressJSR356</param-name> 
<param-value>true</param-value> 
</context-param>

将其添加到您的web.xml中应该解决该问题。
英文:

In web.xml file inside of provided Magnolia 6.2 webapp bundles you can find something like this:

      &lt;!--  the following two parameters prevent atmosphere framework from attempting to install --&gt;
      &lt;!--  JSR-356 (not needed and causes issues with our servlet setup--&gt;
      &lt;context-param&gt;
        &lt;param-name&gt;org.atmosphere.cpr.AtmosphereConfig.getInitParameter&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;
      &lt;context-param&gt;
        &lt;param-name&gt;org.atmosphere.websocket.suppressJSR356&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;

Adding it to your web.xml should remove that issue.

答案2

得分: 1

未找到与Admincentral-m5相关的Servlet

看起来您尚未将所有应用程序升级到使用6.x框架,仍然有一些应用程序仍然依赖于5.x框架,但没有同时安装兼容模块。如果是这种情况,将兼容模块添加到您的捆绑包应该解决应用程序的问题。

英文:

> No Servlet associated with Admincentral-m5

Looks like you didn’t upgrade all your apps to use 6.x framework and have some that still rely on 5.x one, but haven’t installed compatibility modules at the same time. If that’s the case, adding compatibility modules to your bundle should take care of the app problem.

huangapple
  • 本文由 发表于 2020年8月14日 00:06:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/63399033.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定