[JBoss JIRA] (DROOLS-2166) NPE in KieModuleMetaDataImpl in projects with invalid pom.xml
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2166?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-2166:
--------------------------------
Sprint: 2017 Week 49-50
> NPE in KieModuleMetaDataImpl in projects with invalid pom.xml
> -------------------------------------------------------------
>
> Key: DROOLS-2166
> URL: https://issues.jboss.org/browse/DROOLS-2166
> Project: Drools
> Issue Type: Bug
> Reporter: Jan Hrcek
> Assignee: Mario Fusco
>
> When indexing assets in projects which have some problems with pom.xml (e.g. the parent of that pom can't be resolved), there's the following exception in server.log
> {code:java}
> 14:34:46,627 ERROR [stderr] (Thread-144) java.lang.NullPointerException
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.scanner.KieModuleMetaDataImpl.init(KieModuleMetaDataImpl.java:167)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.scanner.KieModuleMetaDataImpl.<init>(KieModuleMetaDataImpl.java:86)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.scanner.KieModuleMetaData$Factory.newKieModuleMetaData(KieModuleMetaData.java:60)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.backend.builder.core.Builder.getKieModuleMetaDataIgnoringErrors(Builder.java:593)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.backend.builder.service.BuildInfoImpl.getKieModuleMetaDataIgnoringErrors(BuildInfoImpl.java:46)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.ProjectDataModelOracleBuilderProvider.newBuilder(ProjectDataModelOracleBuilderProvider.java:62)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUProjectDataModelOracleCache.makeProjectOracle(LRUProjectDataModelOracleCache.java:80)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUProjectDataModelOracleCache.assertProjectDataModelOracle(LRUProjectDataModelOracleCache.java:72)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUProjectDataModelOracleCache$Proxy$_$$_WeldClientProxy.assertProjectDataModelOracle(Unknown Source)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.DataModelServiceImpl.getProjectDataModel(DataModelServiceImpl.java:91)
> {code}
> The root cause is that kieModule.getPomModel() [here|https://github.com/kiegroup/drools/blob/master/kie-ci/src/main/java/...] returns null, because pom model is [not created in this case|https://github.com/kiegroup/drools/blob/master/drools-compiler/src/m...] because it can't be parsed or can't be validated.
> In this case we should at least avoid many NPEs being shown in server.log by doing null check and doing nothing if getPomModel() returns null
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (DROOLS-2166) NPE in KieModuleMetaDataImpl in projects with invalid pom.xml
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2166?page=com.atlassian.jira.plugi... ]
Mario Fusco resolved DROOLS-2166.
---------------------------------
Resolution: Done
Fixed by https://github.com/kiegroup/drools/commit/a5c753ea0
> NPE in KieModuleMetaDataImpl in projects with invalid pom.xml
> -------------------------------------------------------------
>
> Key: DROOLS-2166
> URL: https://issues.jboss.org/browse/DROOLS-2166
> Project: Drools
> Issue Type: Bug
> Reporter: Jan Hrcek
> Assignee: Mario Fusco
>
> When indexing assets in projects which have some problems with pom.xml (e.g. the parent of that pom can't be resolved), there's the following exception in server.log
> {code:java}
> 14:34:46,627 ERROR [stderr] (Thread-144) java.lang.NullPointerException
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.scanner.KieModuleMetaDataImpl.init(KieModuleMetaDataImpl.java:167)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.scanner.KieModuleMetaDataImpl.<init>(KieModuleMetaDataImpl.java:86)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.scanner.KieModuleMetaData$Factory.newKieModuleMetaData(KieModuleMetaData.java:60)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.backend.builder.core.Builder.getKieModuleMetaDataIgnoringErrors(Builder.java:593)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.backend.builder.service.BuildInfoImpl.getKieModuleMetaDataIgnoringErrors(BuildInfoImpl.java:46)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.ProjectDataModelOracleBuilderProvider.newBuilder(ProjectDataModelOracleBuilderProvider.java:62)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUProjectDataModelOracleCache.makeProjectOracle(LRUProjectDataModelOracleCache.java:80)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUProjectDataModelOracleCache.assertProjectDataModelOracle(LRUProjectDataModelOracleCache.java:72)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.cache.LRUProjectDataModelOracleCache$Proxy$_$$_WeldClientProxy.assertProjectDataModelOracle(Unknown Source)
> 14:34:46,627 ERROR [stderr] (Thread-144) at org.kie.workbench.common.services.datamodel.backend.server.DataModelServiceImpl.getProjectDataModel(DataModelServiceImpl.java:91)
> {code}
> The root cause is that kieModule.getPomModel() [here|https://github.com/kiegroup/drools/blob/master/kie-ci/src/main/java/...] returns null, because pom model is [not created in this case|https://github.com/kiegroup/drools/blob/master/drools-compiler/src/m...] because it can't be parsed or can't be validated.
> In this case we should at least avoid many NPEs being shown in server.log by doing null check and doing nothing if getPomModel() returns null
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (WFLY-8656) Bean discovery in deployment dependencies (modules) is always interpreted as "all"
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-8656?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-8656:
-----------------------------------
Fix Version/s: 12.0.0.Alpha1
> Bean discovery in deployment dependencies (modules) is always interpreted as "all"
> ----------------------------------------------------------------------------------
>
> Key: WFLY-8656
> URL: https://issues.jboss.org/browse/WFLY-8656
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final, 11.0.0.Beta1
> Reporter: Yoann Rodière
> Assignee: Martin Kouba
> Fix For: 12.0.0.Alpha1
>
>
> The CDI spec specifies that the {{beans.xml}} file may set the "bean discovery mode" for a given bean archive: https://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#bean_archive
> Possible values include "all" (all classes should be considered as CDI beans) and "annotated" (only classes with class-level CDI annotations should b considered as CDI beans).
> In Wildfly, this bean discovery mode is taken into account correctly for deployments, but not for the modules they depend on. For those modules, provided there is a {{beans.xml}}, and irrespective of the bean discovery mode set inside this file, every single class is considered as a bean and added to the CDI context.
> ----
> This behavior is not related to the bean discovery mode defined in the "beans.xml" of the deployment. Actually, the code responsible for handling bean discovery in deployments and in their dependency is clearly separated. It seems that {{ExternalBeanArchiveProcessor}} is responsible for bean discovery in dependencies, and this class completely ignores the bean discovery mode defined in the {{bean.xml}} and always populate the archive with every single discovered class:
> {code}
> final BeansXml beansXml = parseBeansXml(url, parser, deploymentUnit);
> final UrlScanner urlScanner = new UrlScanner();
> final List<String> discoveredClasses = new ArrayList<String>();
> if (!urlScanner.handleBeansXml(url, discoveredClasses)) {
> continue;
> }
> discoveredClasses.removeAll(componentClassNames);
> /*
> * Below, the archive is populated with every discovered class,
> * irrespective of beansXML.getBeanDiscoveryMode()
> */
> final BeanDeploymentArchiveImpl bda = new BeanDeploymentArchiveImpl(new HashSet<String>(discoveredClasses), beansXml, dependency, beanArchiveIdPrefix + url.toExternalForm(), BeanArchiveType.EXTERNAL);
> {code}
> There seems to be hard-coded exceptions for {{jsf-impl-2.2}} and {{resteasy-cdi}}, so I suspect this problem has been noticed before, but I couldn't find any open ticket.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (ELY-1455) DB query seen for each request using FORM mechanism.
by Alberto Gori (JIRA)
[ https://issues.jboss.org/browse/ELY-1455?page=com.atlassian.jira.plugin.s... ]
Alberto Gori commented on ELY-1455:
-----------------------------------
Also, in another test (let me know if you want to see the sources again), I have removed Richfaces and Prettyfaces and issue is still there.
> DB query seen for each request using FORM mechanism.
> -----------------------------------------------------
>
> Key: ELY-1455
> URL: https://issues.jboss.org/browse/ELY-1455
> Project: WildFly Elytron
> Issue Type: Bug
> Components: Authentication Mechanisms
> Affects Versions: 1.2.0.Beta10
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Fix For: 1.2.0.Beta11
>
> Attachments: elytron-bug-src.zip, server.log, standalone-full-ha.xml, wmt-elytron.war
>
>
> User is complaining, that DB is accessed on each request.
> Jdbc-realm + FORM authentication
> {noformat}
> <jdbc-realm name="myappRealm">
> <principal-query sql="SELECT r.role, u.password FROM user u join user_role_auth r on r.email = u.email where u.email=?" data-source="myds">
> <attribute-mapping>
> <attribute to="Roles" index="1"/>
> </attribute-mapping>
> <simple-digest-mapper password-index="2"/>
> </principal-query>
> </jdbc-realm>
> {noformat}
> {noformat}
> 2017-11-30 09:31:04,049 TRACE [org.wildfly.security] (default task-124) Principal assigning: [alberto(a)myapp.com], pre-realm rewritten: [alberto(a)myapp.com], realm name: [wmtRealm], post-realm rewritten: [alberto(a)myapp.com], realm rewritten: [alberto(a)myapp.com]
> 2017-11-30 09:31:04,049 TRACE [org.wildfly.security] (default task-124) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:04,051 TRACE [org.wildfly.security] (default task-124) Executing principalQuery select role, 'Roles' from user_role_auth where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:04,052 TRACE [org.wildfly.security] (default task-124) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Authorizing principal alberto(a)myapp.com.
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Authorizing against the following attributes: [roles] => [Administrator]
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Permission mapping: identity [alberto(a)myapp.com] with roles [Administrator] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = true
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Authorization succeed
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> 2017-11-30 09:31:07,017 TRACE [org.wildfly.security] (default task-125) Principal assigning: [alberto(a)myapp.com], pre-realm rewritten: [alberto(a)myapp.com], realm name: [wmtRealm], post-realm rewritten: [alberto(a)myapp.com], realm rewritten: [alberto(a)myapp.com]
> 2017-11-30 09:31:07,018 TRACE [org.wildfly.security] (default task-125) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:07,019 TRACE [org.wildfly.security] (default task-125) Executing principalQuery select role, 'Roles' from user_role_auth where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:07,021 TRACE [org.wildfly.security] (default task-125) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:07,022 TRACE [org.wildfly.security] (default task-125) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> 2017-11-30 09:31:07,022 TRACE [org.wildfly.security] (default task-125) Authorizing principal alberto(a)myapp.com.
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Authorizing against the following attributes: [roles] => [Administrator]
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Permission mapping: identity [alberto(a)myapp.com] with roles [Administrator] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = true
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Authorization succeed
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (ELY-1455) DB query seen for each request using FORM mechanism.
by Alberto Gori (JIRA)
[ https://issues.jboss.org/browse/ELY-1455?page=com.atlassian.jira.plugin.s... ]
Alberto Gori commented on ELY-1455:
-----------------------------------
Sure:
{code:sql}
CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime NOT NULL,
`display_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`first_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`last_login` datetime DEFAULT NULL,
`last_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`modified_at` datetime NOT NULL,
`password` char(32) COLLATE utf8_unicode_ci NOT NULL,
`state` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`user_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`time_zone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`features` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`avatarpath` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `display_name` (`display_name`),
KEY `state` (`state`),
KEY `user_type` (`user_type`)
) ENGINE=InnoDB AUTO_INCREMENT=10919 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `user_user_group` (
`user_id` int(10) unsigned NOT NULL,
`user_group_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`user_id`,`user_group_id`),
KEY `name` (`user_group_id`),
CONSTRAINT `user_user_group_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
CONSTRAINT `user_user_group_ibfk_2` FOREIGN KEY (`user_group_id`) REFERENCES `user_group` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=561 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
{code}
> DB query seen for each request using FORM mechanism.
> -----------------------------------------------------
>
> Key: ELY-1455
> URL: https://issues.jboss.org/browse/ELY-1455
> Project: WildFly Elytron
> Issue Type: Bug
> Components: Authentication Mechanisms
> Affects Versions: 1.2.0.Beta10
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Fix For: 1.2.0.Beta11
>
> Attachments: elytron-bug-src.zip, server.log, standalone-full-ha.xml, wmt-elytron.war
>
>
> User is complaining, that DB is accessed on each request.
> Jdbc-realm + FORM authentication
> {noformat}
> <jdbc-realm name="myappRealm">
> <principal-query sql="SELECT r.role, u.password FROM user u join user_role_auth r on r.email = u.email where u.email=?" data-source="myds">
> <attribute-mapping>
> <attribute to="Roles" index="1"/>
> </attribute-mapping>
> <simple-digest-mapper password-index="2"/>
> </principal-query>
> </jdbc-realm>
> {noformat}
> {noformat}
> 2017-11-30 09:31:04,049 TRACE [org.wildfly.security] (default task-124) Principal assigning: [alberto(a)myapp.com], pre-realm rewritten: [alberto(a)myapp.com], realm name: [wmtRealm], post-realm rewritten: [alberto(a)myapp.com], realm rewritten: [alberto(a)myapp.com]
> 2017-11-30 09:31:04,049 TRACE [org.wildfly.security] (default task-124) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:04,051 TRACE [org.wildfly.security] (default task-124) Executing principalQuery select role, 'Roles' from user_role_auth where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:04,052 TRACE [org.wildfly.security] (default task-124) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Authorizing principal alberto(a)myapp.com.
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Authorizing against the following attributes: [roles] => [Administrator]
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Permission mapping: identity [alberto(a)myapp.com] with roles [Administrator] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = true
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Authorization succeed
> 2017-11-30 09:31:04,053 TRACE [org.wildfly.security] (default task-124) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> 2017-11-30 09:31:07,017 TRACE [org.wildfly.security] (default task-125) Principal assigning: [alberto(a)myapp.com], pre-realm rewritten: [alberto(a)myapp.com], realm name: [wmtRealm], post-realm rewritten: [alberto(a)myapp.com], realm rewritten: [alberto(a)myapp.com]
> 2017-11-30 09:31:07,018 TRACE [org.wildfly.security] (default task-125) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:07,019 TRACE [org.wildfly.security] (default task-125) Executing principalQuery select role, 'Roles' from user_role_auth where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:07,021 TRACE [org.wildfly.security] (default task-125) Executing principalQuery select password from user where email = ? with value alberto(a)myapp.com
> 2017-11-30 09:31:07,022 TRACE [org.wildfly.security] (default task-125) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> 2017-11-30 09:31:07,022 TRACE [org.wildfly.security] (default task-125) Authorizing principal alberto(a)myapp.com.
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Authorizing against the following attributes: [roles] => [Administrator]
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Permission mapping: identity [alberto(a)myapp.com] with roles [Administrator] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = true
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Authorization succeed
> 2017-11-30 09:31:07,023 TRACE [org.wildfly.security] (default task-125) Role mapping: principal [alberto(a)myapp.com] -> decoded roles [Administrator] -> realm mapped roles [Administrator] -> domain mapped roles [Administrator]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (WFLY-5263) MBeanServer returns MBean names that do not match filter
by Kabir Khan (JIRA)
[ https://issues.jboss.org/browse/WFLY-5263?page=com.atlassian.jira.plugin.... ]
Kabir Khan closed WFLY-5263.
----------------------------
> MBeanServer returns MBean names that do not match filter
> --------------------------------------------------------
>
> Key: WFLY-5263
> URL: https://issues.jboss.org/browse/WFLY-5263
> Project: WildFly
> Issue Type: Bug
> Components: JMX
> Affects Versions: 10.0.0.Beta2
> Reporter: Thomas Diesler
> Assignee: Kabir Khan
> Fix For: 10.0.0.CR1
>
>
> This code
> {code}
> MBeanServer server = ManagementFactory.getPlatformMBeanServer();
> for (ObjectName oname : server.queryNames(new ObjectName("*:type=context,*"), null)) {
> System.out.println(oname);
> }
> {code}
> gives
> {code}
> 16:51:25,842 INFO [stdout] (pool-3-thread-1) org.apache.camel:context=swagger-test,type=context,name="swagger-test"
> 16:51:25,842 INFO [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=J2EEServer,name=default
> 16:51:25,843 INFO [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=JVM,name=default,J2EEServer=default
> 16:51:25,843 INFO [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=J2EEDomain,name=jboss.jsr77
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month
[JBoss JIRA] (WFLY-4455) JSP function lookup is broken if EL expression contains map or set literal
by Kabir Khan (JIRA)
[ https://issues.jboss.org/browse/WFLY-4455?page=com.atlassian.jira.plugin.... ]
Kabir Khan closed WFLY-4455.
----------------------------
> JSP function lookup is broken if EL expression contains map or set literal
> --------------------------------------------------------------------------
>
> Key: WFLY-4455
> URL: https://issues.jboss.org/browse/WFLY-4455
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 8.2.0.Final
> Reporter: Paul Pogonyshev
> Assignee: Tomaz Cerar
> Labels: el, jsp, taglib
> Fix For: 10.0.0.Alpha3
>
> Attachments: jsp-bug.war, jsp-bug.war
>
>
> The attached trivial applications consists of 'test.jsp' and 'WEB-INF/bug.tld' files. The latter includes only one function mapped from the standard Java library. It is not relevant what it does, only that it is mapped. File 'test.jsp' contains this expession:
> ${{}; bug:dummy()}
> Please note that without '{};' (if it is removed or e.g. replaced with '1;) it works correctly, printing something like 'java.lang.Runtime@...'. (In my real application this is 'my:function1 ({ x: y }) && my:function2 (...)'. Lookup of the first function succeeds, but lookup of the second one fails. If I replace map literal with something else, expression is compiled just fine.)
> However, if expression contains set (or map) literal, JSP compiler fails with this exception:
> {noformat}
> 15:05:24,317 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /jsp-bug/test.jsp: org.apache.jasper.JasperException: JBWEB004038: An exception occurred processing JSP page /test.jsp at line 7
> 4: </head>
> 5:
> 6: <body>
> 7: ${{}; bug:dummy()}
> 8: </body>
> 9: </html>
> Stacktrace:
> at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:494) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
> Caused by: java.lang.NullPointerException
> at org.apache.jasper.el.FunctionMapperImpl.resolveFunction(FunctionMapperImpl.java:32) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at com.sun.el.lang.FunctionMapperFactory.resolveFunction(FunctionMapperFactory.java:71) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:272) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:172) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:175) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:227) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:238) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:295) [javax.el-3.0.1-b05.jar:]
> at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:112) [javax.el-3.0.1-b05.jar:]
> at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:897) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jsp.test_jsp._jspService(test_jsp.java:61)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366) [jastow-1.0.0.Final.jar:1.0.0.Final]
> ... 29 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 1 month