[JBoss JIRA] (WFLY-9961) Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-9961?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar updated WFLY-9961:
------------------------------
Workaround Description:
A workaround to this issue is to compile the application using Java 8 and then deploy the application to WildFly 12.0.0.Final. The Java version to run WildFly itself can be Java 9, if you choose to, as long as the application being deployed in compiled using a version lesser than Java 9.
Other workaround is to replace jandex in server installation with fixed version.
To do that download Jandex 2.0.5.Final (or newer) jar from http://mvnrepository.com/artifact/org.jboss/jandex/2.0.5.Final and place it in WILDFLY_HOME/modules/system/layers/base/org/jboss/jandex/main than open module.xml in that folder and update reference resource-root to point to new jar.
was:A workaround to this issue is to compile the application using Java 8 and then deploy the application to WildFly 12.0.0.Final. The Java version to run WildFly itself can be Java 9, if you choose to, as long as the application being deployed in compiled using a version lesser than Java 9.
> Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
> ----------------------------------------------------------------------------------------------
>
> Key: WFLY-9961
> URL: https://issues.jboss.org/browse/WFLY-9961
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 12.0.0.Final
> Reporter: cnsgithub cnsgithub
> Assignee: Stuart Douglas
> Priority: Blocker
> Fix For: 13.0.0.Beta1
>
>
> After upgrading to WFLY 12 Final, the WebApplicationInitializer class residing in the *.war classes Folder is no longer being detected when built with JDK 9. However with JDK 1.8 it works as expected.
> With WFLY 11, both variants JDK9, and JDK1.8 Build were working.
> {code:java}
> package de.test;
> import javax.servlet.ServletContext;
> import javax.servlet.ServletException;
> import org.springframework.web.WebApplicationInitializer;
> public class MyWebApplicationInitializer implements WebApplicationInitializer {
> @Override
> public void onStartup(ServletContext container) throws ServletException {
> System.out.println("!!!!!!!!!!!!!! ;-) !!!!!!!!!!!!");
> }
> }
> {code}
> Maybe(!) related to this: https://issues.jboss.org/browse/WFLY-9081
> Even more serious: the @WebListener doesn't seem to be recognized with JDK9 as well:
> {code:java}
> package de.test;
> import javax.servlet.ServletContextEvent;
> import javax.servlet.ServletContextListener;
> import javax.servlet.annotation.WebListener;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionIdListener;
> import javax.servlet.http.HttpSessionListener;
> @WebListener
> public class MyWebListener implements ServletContextListener, HttpSessionIdListener, HttpSessionListener {
> @Override
> public void contextInitialized(ServletContextEvent event) {
> System.out.println("contextInitialized !!!!!!!! I'm only working when i was built with JDK8");
> }
>
> @Override
> public void sessionIdChanged(HttpSessionEvent arg0, String arg1) {
> // TODO Auto-generated method stub
>
> }
> }
> {code}
> The actual error seems to happen quite early: JBossWebMetaData
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9961) Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-9961?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar commented on WFLY-9961:
-----------------------------------
I've added additional workaround or better said proper fix, that allows that to deploy java 9 compiled code.
> Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
> ----------------------------------------------------------------------------------------------
>
> Key: WFLY-9961
> URL: https://issues.jboss.org/browse/WFLY-9961
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 12.0.0.Final
> Reporter: cnsgithub cnsgithub
> Assignee: Stuart Douglas
> Priority: Blocker
> Fix For: 13.0.0.Beta1
>
>
> After upgrading to WFLY 12 Final, the WebApplicationInitializer class residing in the *.war classes Folder is no longer being detected when built with JDK 9. However with JDK 1.8 it works as expected.
> With WFLY 11, both variants JDK9, and JDK1.8 Build were working.
> {code:java}
> package de.test;
> import javax.servlet.ServletContext;
> import javax.servlet.ServletException;
> import org.springframework.web.WebApplicationInitializer;
> public class MyWebApplicationInitializer implements WebApplicationInitializer {
> @Override
> public void onStartup(ServletContext container) throws ServletException {
> System.out.println("!!!!!!!!!!!!!! ;-) !!!!!!!!!!!!");
> }
> }
> {code}
> Maybe(!) related to this: https://issues.jboss.org/browse/WFLY-9081
> Even more serious: the @WebListener doesn't seem to be recognized with JDK9 as well:
> {code:java}
> package de.test;
> import javax.servlet.ServletContextEvent;
> import javax.servlet.ServletContextListener;
> import javax.servlet.annotation.WebListener;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionIdListener;
> import javax.servlet.http.HttpSessionListener;
> @WebListener
> public class MyWebListener implements ServletContextListener, HttpSessionIdListener, HttpSessionListener {
> @Override
> public void contextInitialized(ServletContextEvent event) {
> System.out.println("contextInitialized !!!!!!!! I'm only working when i was built with JDK8");
> }
>
> @Override
> public void sessionIdChanged(HttpSessionEvent arg0, String arg1) {
> // TODO Auto-generated method stub
>
> }
> }
> {code}
> The actual error seems to happen quite early: JBossWebMetaData
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-10096) Multi-JSF-Installer broken for MyFaces
by Moritz Becker (JIRA)
Moritz Becker created WFLY-10096:
------------------------------------
Summary: Multi-JSF-Installer broken for MyFaces
Key: WFLY-10096
URL: https://issues.jboss.org/browse/WFLY-10096
Project: WildFly
Issue Type: Bug
Components: JSF
Affects Versions: 12.0.0.Final
Reporter: Moritz Becker
Assignee: Farah Juma
Commit 9738ff2 missed to change {{weld-core-jsf}} to {{weld-jsf}} in {{wildfly/jsf/multi-jsf-installer/src/main/resources/myfaces-injection-module.xml}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9961) Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
by Giovanni Lovato (JIRA)
[ https://issues.jboss.org/browse/WFLY-9961?page=com.atlassian.jira.plugin.... ]
Giovanni Lovato commented on WFLY-9961:
---------------------------------------
The workaround proposed cannot be used if the application makes use of Java 9 features and cannot be compiled with Java 8.
So currently there’s no workaround to deploy Java 9 Spring applications in WildFly 12. Will there be a patch for this, before 13 release?
> Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
> ----------------------------------------------------------------------------------------------
>
> Key: WFLY-9961
> URL: https://issues.jboss.org/browse/WFLY-9961
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 12.0.0.Final
> Reporter: cnsgithub cnsgithub
> Assignee: Stuart Douglas
> Priority: Blocker
> Fix For: 13.0.0.Beta1
>
>
> After upgrading to WFLY 12 Final, the WebApplicationInitializer class residing in the *.war classes Folder is no longer being detected when built with JDK 9. However with JDK 1.8 it works as expected.
> With WFLY 11, both variants JDK9, and JDK1.8 Build were working.
> {code:java}
> package de.test;
> import javax.servlet.ServletContext;
> import javax.servlet.ServletException;
> import org.springframework.web.WebApplicationInitializer;
> public class MyWebApplicationInitializer implements WebApplicationInitializer {
> @Override
> public void onStartup(ServletContext container) throws ServletException {
> System.out.println("!!!!!!!!!!!!!! ;-) !!!!!!!!!!!!");
> }
> }
> {code}
> Maybe(!) related to this: https://issues.jboss.org/browse/WFLY-9081
> Even more serious: the @WebListener doesn't seem to be recognized with JDK9 as well:
> {code:java}
> package de.test;
> import javax.servlet.ServletContextEvent;
> import javax.servlet.ServletContextListener;
> import javax.servlet.annotation.WebListener;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionIdListener;
> import javax.servlet.http.HttpSessionListener;
> @WebListener
> public class MyWebListener implements ServletContextListener, HttpSessionIdListener, HttpSessionListener {
> @Override
> public void contextInitialized(ServletContextEvent event) {
> System.out.println("contextInitialized !!!!!!!! I'm only working when i was built with JDK8");
> }
>
> @Override
> public void sessionIdChanged(HttpSessionEvent arg0, String arg1) {
> // TODO Auto-generated method stub
>
> }
> }
> {code}
> The actual error seems to happen quite early: JBossWebMetaData
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9961) Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
by jaikiran pai (JIRA)
[ https://issues.jboss.org/browse/WFLY-9961?page=com.atlassian.jira.plugin.... ]
jaikiran pai updated WFLY-9961:
-------------------------------
Workaround Description: A workaround to this issue is to compile the application using Java 8 and then deploy the application to WildFly 12.0.0.Final. The Java version to run WildFly itself can be Java 9, if you choose to, as long as the application being deployed in compiled using a version lesser than Java 9.
Workaround: Workaround Exists
> Annotations in applications, compiled using JDK 9, aren't recognized causing deployment issues
> ----------------------------------------------------------------------------------------------
>
> Key: WFLY-9961
> URL: https://issues.jboss.org/browse/WFLY-9961
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 12.0.0.Final
> Reporter: cnsgithub cnsgithub
> Assignee: Stuart Douglas
> Priority: Blocker
> Fix For: 13.0.0.Beta1
>
>
> After upgrading to WFLY 12 Final, the WebApplicationInitializer class residing in the *.war classes Folder is no longer being detected when built with JDK 9. However with JDK 1.8 it works as expected.
> With WFLY 11, both variants JDK9, and JDK1.8 Build were working.
> {code:java}
> package de.test;
> import javax.servlet.ServletContext;
> import javax.servlet.ServletException;
> import org.springframework.web.WebApplicationInitializer;
> public class MyWebApplicationInitializer implements WebApplicationInitializer {
> @Override
> public void onStartup(ServletContext container) throws ServletException {
> System.out.println("!!!!!!!!!!!!!! ;-) !!!!!!!!!!!!");
> }
> }
> {code}
> Maybe(!) related to this: https://issues.jboss.org/browse/WFLY-9081
> Even more serious: the @WebListener doesn't seem to be recognized with JDK9 as well:
> {code:java}
> package de.test;
> import javax.servlet.ServletContextEvent;
> import javax.servlet.ServletContextListener;
> import javax.servlet.annotation.WebListener;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionIdListener;
> import javax.servlet.http.HttpSessionListener;
> @WebListener
> public class MyWebListener implements ServletContextListener, HttpSessionIdListener, HttpSessionListener {
> @Override
> public void contextInitialized(ServletContextEvent event) {
> System.out.println("contextInitialized !!!!!!!! I'm only working when i was built with JDK8");
> }
>
> @Override
> public void sessionIdChanged(HttpSessionEvent arg0, String arg1) {
> // TODO Auto-generated method stub
>
> }
> }
> {code}
> The actual error seems to happen quite early: JBossWebMetaData
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-10092) Wildfly 12 @WebListener don't work
by jaikiran pai (JIRA)
[ https://issues.jboss.org/browse/WFLY-10092?page=com.atlassian.jira.plugin... ]
jaikiran pai commented on WFLY-10092:
-------------------------------------
Which Java version did you use to compile the application? If it's Java 9 then this is a known issue and is tracked in https://issues.jboss.org/browse/WFLY-9961
> Wildfly 12 @WebListener don't work
> ----------------------------------
>
> Key: WFLY-10092
> URL: https://issues.jboss.org/browse/WFLY-10092
> Project: WildFly
> Issue Type: Bug
> Components: EE
> Affects Versions: 12.0.0.Final
> Environment: Linux Mint 18.3 64 bits
> Reporter: Wagner Araujo
>
> Annotation @WebListener don't work, but declaration into web.xml work.
> {color:red}{color:#d04437}
> DON'T WORK
> @WebListener
> public class SessaoListener implements HttpSessionListener {
> @Inject
> private MultiTenant multiTenant;
> @Override
> public void sessionCreated(HttpSessionEvent httpSessionEvent) {
> Locale.setDefault(new Locale("pt", "BR","" + multiTenant.get()));
> }
> @Override
> public void sessionDestroyed(HttpSessionEvent arg0) {
> //
> }
> }{color}{color}
> {color:#14892c}
> BUT INTO WEB.XML WORK
> web.xml
> <listener>
> <listener-class>br.com.jarch.treinamento.listener.ContextoListener</listener-class>
> </listener>
> <listener>
> <listener-class>br.com.jarch.treinamento.listener.SessaoListener</listener-class>
> </listener>
> {color}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month