[JBoss JIRA] (WFLY-6099) JPA's persistence.xml is deployed before datasources are created through application.xml
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-6099?page=com.atlassian.jira.plugin.... ]
Scott Marlow commented on WFLY-6099:
------------------------------------
test ear contents:
{quote}
META-INF/
META-INF/MANIFEST.MF
lib/
META-INF/application.xml
META-INF/jboss-app.xml
DatasourceApllicationXMLTest-ejb.jar
DatasourceApllicationXMLTest-web.war
lib/mariadb-java-client.jar
META-INF/maven/
META-INF/maven/me.renann/
META-INF/maven/me.renann/DatasourceApllicationXMLTest-ear/
META-INF/maven/me.renann/DatasourceApllicationXMLTest-ear/pom.xml
META-INF/maven/me.renann/DatasourceApllicationXMLTest-ear/pom.properties
[smarlow@smarlow datasource_application_xml_test]$ find -name DatasourceApllicationXMLTest-ejb.jar
./DatasourceApllicationXMLTest-ear/target/DatasourceApllicationXMLTest-ear/DatasourceApllicationXMLTest-ejb.jar
./DatasourceApllicationXMLTest-ejb/target/DatasourceApllicationXMLTest-ejb.jar
{quote}
ejb jar contents:
{quote}
[smarlow@smarlow datasource_application_xml_test]$ jar tf ./DatasourceApllicationXMLTest-ear/target/DatasourceApllicationXMLTest-ear/DatasourceApllicationXMLTest-ejb.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/jboss.xml
META-INF/persistence.xml
META-INF/beans.xml
META-INF/maven/
META-INF/maven/me.renann/
META-INF/maven/me.renann/DatasourceApllicationXMLTest-ejb/
META-INF/maven/me.renann/DatasourceApllicationXMLTest-ejb/pom.xml
META-INF/maven/me.renann/DatasourceApllicationXMLTest-ejb/pom.properties
{quote}
> JPA's persistence.xml is deployed before datasources are created through application.xml
> ----------------------------------------------------------------------------------------
>
> Key: WFLY-6099
> URL: https://issues.jboss.org/browse/WFLY-6099
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Reporter: Renann Prado
> Assignee: Scott Marlow
> Attachments: server_with_mysql_driver.log
>
>
> Please refer to discussion
> https://developer.jboss.org/thread/267371
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months
[JBoss JIRA] (WFCORE-1343) Memory leak in host controller
by Aparna Chaudhary (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1343?page=com.atlassian.jira.plugi... ]
Aparna Chaudhary commented on WFCORE-1343:
------------------------------------------
[~brian.stansberry] The request is to backport the fix to 1.x. I've submitted a PR.
> Memory leak in host controller
> ------------------------------
>
> Key: WFCORE-1343
> URL: https://issues.jboss.org/browse/WFCORE-1343
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 1.0.0.Final
> Reporter: Aparna Chaudhary
> Assignee: Brian Stansberry
> Priority: Critical
> Attachments: WFCORE-992-HC-Leak.PNG
>
>
> The ManagedServerProxy class in host-controller contains a memory leak. The leak can be reproduced by performing multiple requests to HTTP management API.
> {noformat}
> http://<host>:9990/management/host/host0/server/server0/core-service/platform-mbean/type/memory?include-runtime=true
> {noformat}
> Applying the fix proposed in WFCORE-992 solves the leak.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months
[JBoss JIRA] (WFLY-5875) Some domain tests fail with security manager
by Hynek Švábek (JIRA)
[ https://issues.jboss.org/browse/WFLY-5875?page=com.atlassian.jira.plugin.... ]
Hynek Švábek reassigned WFLY-5875:
----------------------------------
Assignee: Hynek Švábek (was: Ondrej Kotek)
> Some domain tests fail with security manager
> --------------------------------------------
>
> Key: WFLY-5875
> URL: https://issues.jboss.org/browse/WFLY-5875
> Project: WildFly
> Issue Type: Bug
> Components: Domain Management, Test Suite
> Reporter: Ondrej Kotek
> Assignee: Hynek Švábek
>
> *org.jboss.as.test.integration.domain.mixed.eap640.MixedDomainDeployment640TestCase#testJsfWorks*
> {{./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dts.noSmoke -Dtest=MixedDomainDeployment640TestCase#testJsfWorks -Djboss.test.mixed.domain.dir=/home/okotek/test/ -Dsecurity.manager}}
> fails with:
> {noformat}
> SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http-/10.16.95.147:8080-1) Error Rendering View[/home.xhtml]: javax.el.ELException: /home.xhtml: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.lang.reflect.ReflectPermission" "suppressAccessChecks")&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:88)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:207)&#27;[0m
> [Server:server-one] &#27;[31m at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:447)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)&#27;[0m
> [Server:server-one] &#27;[31m at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)&#27;[0m
> [Server:server-one] &#27;[31m at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)&#27;[0m
> [Server:server-one] &#27;[31m at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#27;[0m
> [Server:server-one] &#27;[31m at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&#27;[0m
> [Server:server-one] &#27;[31m at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&#27;[0m
> [Server:server-one] &#27;[31m at java.lang.reflect.Method.invoke(Method.java:497)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:264)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:262)&#27;[0m
> [Server:server-one] &#27;[31m at java.security.AccessController.doPrivileged(Native Method)&#27;[0m
> [Server:server-one] &#27;[31m at javax.security.auth.Subject.doAsPrivileged(Subject.java:549)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:296)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:156)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:288)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:59)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:197)&#27;[0m
> [Server:server-one] &#27;[31m at java.security.AccessController.doPrivileged(Native Method)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)&#27;[0m
> [Server:server-one] &#27;[31m at java.lang.Thread.run(Thread.java:745)&#27;[0m
> [Server:server-one] &#27;[31mCaused by: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.lang.reflect.ReflectPermission" "suppressAccessChecks")&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:65)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.util.reflection.SecureReflections.ensureAccessible(SecureReflections.java:283)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.introspector.jlr.WeldConstructorImpl.newInstance(WeldConstructorImpl.java:206)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:117)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.bean.ManagedBean.createInstance(ManagedBean.java:340)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:204)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:296)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.as.test.integration.domain.mixed.jsf.Bean$Proxy$_$$_WeldClientProxy.getMessage(Bean$Proxy$_$$_WeldClientProxy.java)&#27;[0m
> [Server:server-one] &#27;[31m at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#27;[0m
> [Server:server-one] &#27;[31m at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&#27;[0m
> [Server:server-one] &#27;[31m at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&#27;[0m
> [Server:server-one] &#27;[31m at java.lang.reflect.Method.invoke(Method.java:497)&#27;[0m
> [Server:server-one] &#27;[31m at javax.el.BeanELResolver.getValue(BeanELResolver.java:304)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.el.parser.AstValue.getValue(AstValue.java:166)&#27;[0m
> [Server:server-one] &#27;[31m at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:227)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:150)&#27;[0m
> [Server:server-one] &#27;[31m at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)&#27;[0m
> [Server:server-one] &#27;[31m ... 38 more&#27;[0m
> [Server:server-one] &#27;[31mCaused by: java.security.AccessControlException: access denied ("java.lang.reflect.ReflectPermission" "suppressAccessChecks")&#27;[0m
> [Server:server-one] &#27;[31m at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)&#27;[0m
> [Server:server-one] &#27;[31m at java.security.AccessController.checkPermission(AccessController.java:884)&#27;[0m
> [Server:server-one] &#27;[31m at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)&#27;[0m
> [Server:server-one] &#27;[31m at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:128)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.util.reflection.SecureReflections$14.work(SecureReflections.java:288)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.util.reflection.SecureReflections$14.work(SecureReflections.java:283)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)&#27;[0m
> [Server:server-one] &#27;[31m at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63)&#27;[0m
> {noformat}
> *org.jboss.as.test.integration.domain.suites.ReadEnvironmentVariablesTestCase#testReadEnvironmentVariablesForServers*
> {{./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.domain -Dts.noSmoke -Dtest=org.jboss.as.test.integration.domain.suites.ReadEnvironmentVariablesTestCase#testReadEnvironmentVariablesForServers}}
> fails with:
> {noformat}
> ERROR [io.undertow.request] (default task-43) UT005023: Exception handling request to /env-test/env: java.security.Access
> ControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "getenv.*")" in code source "(vfs:/content/env-test.war/WEB-INF/classes <no signer certificates>)" of "null")
> [Server:main-one] at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> [Server:main-one] at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> [Server:main-one] at java.lang.System.getenv(System.java:944) [rt.jar:1.8.0_60]
> [Server:main-one] at org.jboss.as.test.integration.domain.suites.EnvironmentTestServlet.doGet(EnvironmentTestServlet.java:44) [classes:]
> [Server:main-one] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [jboss-servlet-api_3.1_spec-1.0.0.Final-redhat-1.jar:1.0.0.Final-redhat-1]
> [Server:main-one] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final-redhat-1.jar:1.0.0.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> [Server:main-one] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> [Server:main-one] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.servlet.handlers.ServletInitialHandler$1$1.run(ServletInitialHandler.java:180) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_60]
> [Server:main-one] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:177) [undertow-servlet-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793) [undertow-core-1.3.7.Final-redhat-1.jar:1.3.7.Final-redhat-1]
> [Server:main-one] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
> [Server:main-one] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
> [Server:main-one] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months
[JBoss JIRA] (DROOLS-1047) Bean introspection is not compatible with Java 8 compiler
by Petr Široký (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1047?page=com.atlassian.jira.plugi... ]
Petr Široký updated DROOLS-1047:
--------------------------------
Component/s: core engine
> Bean introspection is not compatible with Java 8 compiler
> ---------------------------------------------------------
>
> Key: DROOLS-1047
> URL: https://issues.jboss.org/browse/DROOLS-1047
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 7.0.0.Final
>
>
> Consider the following 2 interfaces:
> {code}
> public interface Base {
> Object getA();
> }
> public interface Ext extends Base {
> String getA();
> }
> {code}
> In Java 7 if you print the declared methods of the Ext interface:
> System.out.println( Arrays.toString(Ext.class.getDeclaredMethods()) );
> you obtain only one method:
> [public abstract java.lang.String org.drools.compiler.IntrospectionTest$Ext.getA()]
> This is expected because Class.getDeclaredMethods() "Returns an array containing Method objects reflecting all the declared methods of the class or interface represented by this Class object, including public, protected, default (package) access, and private methods, but excluding inherited methods." https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclare...
> Nevertheless if I try exactly the same thing in Java 8 I obtain a totally different result:
> [public abstract java.lang.String org.drools.compiler.IntrospectionTest$Ext1.getA(),
> public default java.lang.Object org.drools.compiler.IntrospectionTest$Ext1.getA()]
> Now it is also returning the method declared on the Base interface as it was a default method. This second method is flagged as a bridge method (see here https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getMethod-... )
> This change between Java 7 and 8 breaks getter/setter introspection of beans in some specific case
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 10 months