modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Thu, 26 Mar 2020 12:25:43 +0100
changeset 37227 0ef412c29220
parent 37223 b31620115262
permissions -rw-r--r--
fixed BUG-43532: jrxml translate build step fails if using jasperreport.dtd

Translate makes use of a custom EntityResolver to handle jasperreport.dtd
resolving it locally instead of getting it from Internet. This local
resolution is implemented making use of Class.getResourceAsStream
method. The class the method was invoked from was java.lang.System.

Starting from JDK 9, getResourceAsStream invoked in classes within named
Modules looks for the resources only in those modules rather than in the
whole classpath [1]:

> If this class is in a named Module then this method will attempt to find
> the resource in the module. This is done by delegating to the module's class
> loader findResource(String,String) method, invoking it with the module name
> and the absolute name of the resource. Resources in named modules are subject
> to the rules for encapsulation specified in the Module getResourceAsStream
> method and so this method returns null when the resource is a non-".class"
> resource in a package that is not open to the caller's module.
>
> Otherwise, if this class is not in a named module then the rules for searching
> resources associated with a given class are implemented by the defining class
> loader of the class. This method delegates to this object's class loader. If
> this object was loaded by the bootstrap class loader, the method delegates to
> ClassLoader.getSystemResourceAsStream(java.lang.String).

As java.lang.System is in a named Module, dtd's resource was tried to be found within
it and not found.

Fixed by invoking getResourceAsStream on LocalEntityResolver.class which
is not in a named module.

[1] https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getResourceAsStream(java.lang.String)
harpreet@9076
     1
<?xml version='1.0' encoding='UTF-8'?>
harpreet@9076
     2
<data>
harpreet@9076
     3
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4--><AD_MODULE>
harpreet@9076
     4
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
harpreet@9076
     5
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
harpreet@9076
     6
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
harpreet@9076
     7
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
harpreet@9076
     8
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <NAME><![CDATA[JSON Datasource]]></NAME>
staff@37223
     9
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.37211]]></VERSION>
harpreet@9076
    10
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <DESCRIPTION><![CDATA[Provides data source CRUD functionality using JSON as the data format]]></DESCRIPTION>
harpreet@9076
    11
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HELP><![CDATA[This module implements the datasource concept. Datasources play a central role in Smartclient applications. The datasource module automatically creates a datasource for each Openbravo entity. In addition custom data source implementations can be defined.]]></HELP>
harpreet@9076
    12
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <URL><![CDATA[http://forge.openbravo.com/projects/datasourceservice]]></URL>
harpreet@9076
    13
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <TYPE><![CDATA[M]]></TYPE>
harpreet@9076
    14
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License version 1.1.
harpreet@9076
    15
You may obtain a copy of the License at http://www.openbravo.com/legal/license.html or in the legal folder of the Openbravo ERP core distribution.]]></LICENSE>
harpreet@9076
    16
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <JAVAPACKAGE><![CDATA[org.openbravo.service.datasource]]></JAVAPACKAGE>
harpreet@9076
    17
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <LICENSETYPE><![CDATA[OBPL]]></LICENSETYPE>
harpreet@9076
    18
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AUTHOR><![CDATA[Openbravo S.L.U.]]></AUTHOR>
harpreet@9076
    19
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRANSLATIONREQUIRED><![CDATA[Y]]></ISTRANSLATIONREQUIRED>
harpreet@9076
    20
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_LANGUAGE><![CDATA[en_US]]></AD_LANGUAGE>
harpreet@9076
    21
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
harpreet@9076
    22
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
harpreet@9076
    23
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
juanpablo@9701
    24
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
staff@36883
    25
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
harpreet@9076
    26
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
augusto@16914
    27
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
harpreet@9076
    28
<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4--></AD_MODULE>
harpreet@9076
    29
harpreet@9076
    30
</data>