No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Cannot set relative webRoot path

    I'm trying to use some SmartClient classes in my tests, and to do that I'm setting webRoot relative to my project's directory, but this fails:

    package test;
    import com.isomorphic.base.ISCInit;
    import org.junit.jupiter.api.Test;
    import static org.junit.jupiter.api.Assertions.assertNotNull;
    public class IscInitTest {
        void test() {
            System.setProperty("isc_config:webRoot", "src/main/webapp");
    0:21:41.083 INFO com.isomorphic.base.ISCInit - Using Configured webRoot: src/main/webapp
    00:21:41.083 INFO com.isomorphic.base.ISCInit - Isomorphic SmartClient/SmartGWT Framework (v13.0p_2023-07-29/PowerEdition Deployment 2023-07-29) - Initialization Complete
    00:21:41.083 WARN com.isomorphic.base.ISCInit - Potentially insecure settings: Domain synching is enabled and not restricted to any baseDomains. See the "XSS and CSRF Security" overview in the client reference for details to disable this warning
    Problem loading builtinTypes.xml
    Exception when loading from src/main/webapp/isomorphic/system/schema/builtinTypes.xml: src\main\webapp\src\main\webapp\isomorphic\system\schema\builtinTypes.xml (System nie może odnaleźć określonej ścieżki)
        at java.base/ Method)
        at java.base/
        at java.base/<init>(
        at com.isomorphic.xml.XML$DocumentCache.loadObjectFromFile(
        at com.isomorphic.xml.XML.getXMLDocument(
        at com.isomorphic.xml.XML.toDSRecords(
        at com.isomorphic.xml.XML.toDSRecords(
        at com.isomorphic.xml.XML.toDSRecords(
        at com.isomorphic.datasource.DataSource.<clinit>(
        at test.IscInitTest.test(
    The file mentioned in logs, "src/main/webapp/isomorphic/system/schema/builtinTypes.xml", does exist, but ISCNativeFile is trying to load an incorrect file "src/main/webapp/src/main/webapp/isomorphic/system/schema/builtinTypes.xml" (note the repeated webRoot location). When i run it under a debugger I saw that this change happens within the chain of XML.toDSRecords calls.
    Last edited by Crack; 16 Aug 2023, 15:33.

    Relative webRoot path is not allowed, but since it is an existing path we did not report that at startup. To fix this immediately you should use an absolute path.

    That said we are going to change this so that if webRoot is set to a relative path, but it is an existing path and it is a directory, we will detect its absolute path and use as webRoot. This change will be in nightly builds since Aug 25 (tomorrow).