You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Makkus B. (Jira)" <ji...@apache.org> on 2022/05/03 07:31:00 UTC

[jira] [Created] (TOMEE-3933) java.lang.LinkageError on @ViewMap injection

Makkus B. created TOMEE-3933:
--------------------------------

             Summary: java.lang.LinkageError on @ViewMap injection
                 Key: TOMEE-3933
                 URL: https://issues.apache.org/jira/browse/TOMEE-3933
             Project: TomEE
          Issue Type: Bug
          Components: TomEE Build
    Affects Versions: 8.0.11, 8.0.10
         Environment: Windows 10, TomEE 8.0.11, JDK 17
            Reporter: Makkus B.


I suffer from a LinkageError when loading JSF backing beans that utilize the @ViewMap injection. When referencing the Enroll bean (see below)  from JSF I get:

{{{}javax.el.ELException: Fehler beim Lesen von [createNewSession] für den Typ [xrn.portal.ui.Enroll$$OwbNormalScopeProxy0]{}}}{{{}phaseId=RENDER_RESPONSE(6){}}}{{{}Caused by:{}}}
{{java.lang.LinkageError - loader org.apache.tomee.catalina.TomEEWebappClassLoader @eb87c61 attempted duplicate class definition for org.apache.webbeans.custom.Map$$OwbNormalScopeProxy14900025290. (org.apache.webbeans.custom.Map$$OwbNormalScopeProxy14900025290 is in unnamed module of loader org.apache.tomee.catalina.TomEEWebappClassLoader @eb87c61, parent loader java.net.URLClassLoader @4b6995df)}}
{{at java.base/java.lang.ClassLoader.defineClass1(Native Method)}}

 

{{@Named}}
{{@ViewScoped}}
{{public class Enroll implements Serializable {}}{{    }}

{{    @Inject}}
{{    @RequestMap}}
{{    Map<String, Object> requestMap;}}{{    @Inject}}
{{    @ViewMap}}
{{    Map<String, Object> viewMap;}}
{{    private boolean createNewSession = false;}}{{    }}

{{    public void setCreateNewSession(boolean createNewSession) {}}
{{        this.createNewSession = createNewSession;}}
{{    }}}

{{    public boolean isCreateNewSession() {}}
{{        return createNewSession;}}
{{    }}}

{{}}}

 

{{JSF Test-Page:}}

{{<html xmlns="http://www.w3.org/1999/xhtml"}}
{{      xmlns:h="http://java.sun.com/jsf/html"}}
{{      xmlns:f="http://java.sun.com/jsf/core"}}
{{      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">}}{{    }}

{{<h:head></h:head>}}
{{<h:body>}}
{{        <h:selectBooleanCheckbox value="#\{enroll.createNewSession}" label="Create new session"/>}}
{{</h:body>}}
{{</html>}}

{{Once I remove the reference to @ViewMap in Enroll the error will not occur. }}

{{I'm not so firm in the specs, but I don't think this is an expected behaviour, it it?}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)