Announcement

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

    Tour won't load

    SmartClient Version: v13.0p_2022-02-22/EVAL Deployment

    I’ve been testing the new tour feature in my project. But anytime I try to load a tour I get a NullPointerException.

    === 2022-02-28 16:14:42,025 [7-86] INFO RequestContext - URL: '/builtinds/sc/screenLoader', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36': Safari with Accept-Encoding header
    === 2022-02-28 16:14:42,033 [7-86] WARN DataStructCache - File vbScreens.ds not found at explicitly specified location C:/Users/Jan/eclipse-workspace/built-in-dsee/war/builtinds/sc/../tools/visualBuilder, checking project-wide area
    === 2022-02-28 16:14:42,034 [7-86] ERROR DataSource - Failed to load screen "xyz". Skipping.
    java.lang.NullPointerException

    While the client returns these errors:

    WARN:Log:Unable to load process(es): xyz. These should be defined in *.proc.xml files at the search path specified by "project.processes".
    WARN:Log:Uncaught exception escaped: com.google.gwt.core.client.JavaScriptException (TypeError) : Cannot read properties of undefined (reading 'ID') at TypeError: Cannot read properties of undefined(Unknown@-1) at getAttribute_6_g$(builtinds-0.js@27:153132) at internalSetID_0_g$(builtinds-0.js@13:65117) at setJavaScriptObject_12_g$(builtinds-0.js@8:157998) at new Process_2_g$(builtinds-0.js@8:157762) at <anonymous>(builtinds-0.js@82:158207) at apply_0_g$(builtinds-0.js@28:11775) at entry0_0_g$(builtinds-0.js@16:11831) at <anonymous>(builtinds-0.js@14:11811) at $wnd.isc.RPCManager.fireReplyCallback(builtinds-0.js@19:61969)
    I inherited the tour module in the gwt.xml file and I have a .proc.xml file, which I refer to with project.processes in server.properties.

    This is my .proc.xml file:

    Code:
    <Tour ID="xyz"showProgress="true">
        <steps>
            <TourStep title="Welcome">
                <instructions>Welcome to the SmartClient [U]Showcase[/U]! We'll show you how to use it</instructions>
            </TourStep>
        </steps>
    </Tour>
    And this is how I load the tour:

    Code:
    Tour.loadTour("xyz", new ProcessCallback() {
    
    @Override
                public void execute(Process process) {
                    process.start();
    
                }
            });
    Any help would be appreciated.

    #2
    We noticed that you need a space in your Tour XML before the showProgress attribute, but that issue doesn't lead to the problem you reported so we'll assume that was a typo copying it into the post. We also agree the client shouldn't crash in this situation, where the file cannot be found on the server.

    However, we're not able to reproduce the problem once the initial XML spacing typo is fixed - we see the callback fire and the tour launch. This is with xyz.proc.xml placed in
    Code:
    samples/built-in-ds/war/processes/
    .
    Where did you place the .proc.xml?

    Comment


      #3
      That is the exact same path I placed my .proc.xml file in and I tried specifying the path in server.properties like this:

      Code:
      project.processes: $webRoot/processes
      And when I print the path like this:

      Code:
      final Config conf = Config.getGlobal(true);
      System.out.println(conf.get("project.processes"));
      I get the correct path.
      Last edited by helloman; 1 Mar 2022, 04:13.

      Comment


        #4
        The definition of project.processes should already be present in framework.properties inside isomorphic_core_rpc.jar, so you shouldn't need to add it. As we stated, we're not able to reproduce the error you reported, even using the exact download you mention. Are you making any modifications/config changes to the downloaded package, other than creating the proc.xml file and modifying the sample Java code?

        This is how we verified the feature is working:
        • Downloaded the package https://smartclient.com/builds/Smart...eval-13.0p.zip
        • Expanded package, created the directory samples/built-in-ds/war/processes under the package, and copied your proc.xml file into it (after fixing the syntax error)
        • Modified the BuiltInDS.java sample code to run the Java code you included above that launches the tour when a button is clicked.
        This works fine, with no error, both in a command-line build with ant, and via Eclipse.
        -

        Comment

        Working...
        X