After removing weld-servlet.jar from the lib/ the application started!

http://examples8x-apachewicket.rhcloud.com/index.html

Now another standard doesn't work - JSR356 :-)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jan 17, 2017 at 10:35 PM, Martin Grigorov <[email protected]>
wrote:

> Hi,
>
> I'm trying to setup Wicket-Examples 8.x at OpenShift Wildfly 10 container
> but it fails with the following exception:
>
> INFO  - servletWeldServlet         - WELD-ENV-001008: Initialize Weld
> using ServletContainerInitializer
> WARN  - DefaultBeanArchiveScanner  - Unable to adapt URL:
> vfs:/content/ROOT.war/WEB-INF/classes/META-INF/beans.xml, using its
> external form instead
> WARN  - DefaultBeanArchiveScanner  - Unable to adapt URL:
> vfs:/content/ROOT.war/WEB-INF/lib/wicket-cdi-1.1-8.0.0-
> SNAPSHOT.jar/META-INF/beans.xml, using its external form instead
> WARN  - AbstractDiscoveryStrategy  - The bean archive reference
> vfs:/content/ROOT.war/WEB-INF/classes/META-INF/beans.xml cannot be
> handled by any BeanArchiveHandler: [org.jboss.weld.env
> ironment.deployment.discovery.FileSystemBeanArchiveHandler@1f30b3f,
> org.jboss.weld.environment.servlet.deployment.
> ServletContextBeanArchiveHandler@7e2d5d]
> WARN  - AbstractDiscoveryStrategy  - The bean archive reference
> vfs:/content/ROOT.war/WEB-INF/lib/wicket-cdi-1.1-8.0.0-
> SNAPSHOT.jar/META-INF/beans.xml cannot be handled by any BeanArchi
> veHandler: [org.jboss.weld.environment.deployment.discovery.
> FileSystemBeanArchiveHandler@1f30b3f, org.jboss.weld.environment.
> servlet.deployment.ServletContextBeanArchiveHandler@7e2d5d]
> ESC[0m16:20:33,668 INFO  [org.jboss.weld.Bootstrap] (ServerService Thread
> Pool -- 77) WELD-000101: Transactional services not available. Injection of
> @Inject UserTransaction not availab
> le. Transactional observers will be invoked synchronously.
> ESC[0mINFO  - servletWeldServlet         - WELD-ENV-001001: No supported
> servlet container detected, CDI injection will NOT be available in
> Servlets, Filters or Listeners
> ESC[31m16:20:48,530 ERROR [org.jboss.msc.service.fail] (ServerService
> Thread Pool -- 77) MSC000001: Failed to start service
> jboss.undertow.deployment.default-server.default-host./ROOT:
> org.jboss.msc.service.StartException in service jboss.undertow.deployment.
> default-server.default-host./ROOT: java.lang.RuntimeException: 
> java.lang.IllegalStateException:
> Unable to acces
> s CDI
>         at org.wildfly.extension.undertow.deployment.
> UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
>         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:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
>         at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: java.lang.RuntimeException: java.lang.IllegalStateException:
> Unable to access CDI
>         at io.undertow.servlet.core.DeploymentManagerImpl.deploy(
> DeploymentManagerImpl.java:236)
>         at org.wildfly.extension.undertow.deployment.
> UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
>         at org.wildfly.extension.undertow.deployment.
> UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
>         ... 6 more
> Caused by: java.lang.IllegalStateException: Unable to access CDI
>         at javax.enterprise.inject.spi.CDI.current(CDI.java:65)
>         at org.jboss.weld.servlet.WeldInitialListener.contextInitialized(
> WeldInitialListener.java:94)
>         at org.jboss.weld.servlet.api.helpers.ForwardingServletListener.
> contextInitialized(ForwardingServletListener.java:34)
>         at org.jboss.weld.environment.servlet.EnhancedListener.
> onStartup(EnhancedListener.java:63)
>         at io.undertow.servlet.core.DeploymentManagerImpl$1.call(
> DeploymentManagerImpl.java:186)
>         at io.undertow.servlet.core.DeploymentManagerImpl$1.call(
> DeploymentManagerImpl.java:171)
>         at io.undertow.servlet.core.ServletRequestContextThreadSet
> upAction$1.call(ServletRequestContextThreadSetupAction.java:42)
>         at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(
> ContextClassLoaderSetupAction.java:43)
>         at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(
> LegacyThreadSetupActionWrapper.java:44)
>         at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(
> LegacyThreadSetupActionWrapper.java:44)
>         at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(
> LegacyThreadSetupActionWrapper.java:44)
>         at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(
> LegacyThreadSetupActionWrapper.java:44)
>         at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(
> LegacyThreadSetupActionWrapper.java:44)
>         at io.undertow.servlet.core.DeploymentManagerImpl.deploy(
> DeploymentManagerImpl.java:234)
>         ... 8 more
>
>
> Any CDI users around to explain what is needed to use the standard CDI in
> a JEE container ?
> The only similar issue I was able to find is https://developer.jboss.org/
> thread/252083?_sscc=t but it doesn't tell what exactly is the problem and
> I wasn't able to find the pom.xml to see what it does in the suggested
> Maven profile.
>
>
>
> P.S. Forgive me but it is funny to me with these standards that do not
> quite work out of the box.
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>

Reply via email to