Announcement

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

    Issue w/ VisualBuilder Add New DataSource...

    Setting up a new Workspace from BuiltInDS sample w/ new SGWT Power, and the Visual Builder tool to read *DS.XML files from SQL ("Add" / "New DataSource") is failing.

    If I launch the Smart GWT Console from the Visual Builder page, the following JS error is reported:

    -----------------------------------------------------------------------------------------
    *19:24:15.990:XRP1:WARN:VLayout:isc_VisualBuilder_0_componentAttributeEditorLayout:Adding already drawn widget:isc_VisualBuilder_0_componentAttributeEditorFilter to new parent:isc_VisualBuilder_0_componentAttributeEditorLayout. Child has been cleared so it can be drawn inside the new parent. This may be a result of autoDraw being enabled for the child.
    19:24:49.509:MUP8:WARN:Log:TypeError: Cannot read property 'create' of undefined
    Stack from error.stack:
    VisualBuilder.showDSWizard(<no args: exited>) on [VisualBuilder ID:isc_VisualBuilder_0] @ ISC_VisualBuilder.js:640:704
    click(<no args: exited>) @ ISC_VisualBuilder.js:164:670
    Menu.selectMenuItem(<no args: exited>) on [Menu ID:isc_VisualBuilder_0_dsNewButtonMenu] @ ISC_Grids.js:3562:46
    Menu.rowClick(<no args: exited>) on [Menu ID:isc_VisualBuilder_0_dsNewButtonMenu] @ ISC_Grids.js:3548:286
    _3.eval(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ [no file]:4:115
    GridRenderer._rowClick(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ ISC_Grids.js:609:221
    [c]Class.invokeSuper(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ ISC_Core.js:322:93
    [c]Class.Super(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ ISC_Core.js:314:170
    GridBody._rowClick(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ ISC_Grids.js:680:76
    GridRenderer.click(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ ISC_Grids.js:607:167
    Canvas.handleClick(<no args: exited>) on [GridBody ID:isc_VisualBuilder_0_dsNewButtonMenu_body] @ ISC_Core.js:3903:400
    [c]EventHandler.bubbleEvent(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2440:89
    [c]EventHandler.handleClick(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2272:50
    EventHandler._handleMouseUp(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2254:11
    [c]EventHandler.handleMouseUp(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2245:57
    [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:2535:122
    HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123
    -----------------------------------------------------------------------------------------

    The SQL Browser Tool works without error. I am able to browse tables for the sample HSQLDB and also an Oracle Schema I added.

    And I am able to import a known-good *.DS.XML file from another project, and connect a ListGrid without error in Eclipse. The ListGrid shows the columns and data.

    However, if I compile and deploy to Tomcat 9, the same code fails to retrieve columns/data. A Smart GWT Console launched from the page shows the following:
    -----------------------------------------------------------------------------------------
    *16:34:34.886:INFO:Log:initialized
    *16:34:35.373:INFO:Log:isc.Page is loaded
    16:35:01.505:MUP5:WARN:ListGrid:isc_ListGrid_0:No DataSource or invalid DataSource specified, can't create data model
    Canvas.createDataModel(_1=>Obj, _2=>Obj{ID:auto_fetch}, _3=>Obj) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:4505:148
    Canvas.filterWithCriteria(_1=>Obj, _2=>Obj{ID:auto_fetch}, _3=>Obj) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:4499:216
    [c]Class.invokeSuper(_1=>null, _2=>"filterWithCriteria", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:319:93
    [c]Class.Super(_1=>"filterWithCriteria", _2=>[object Arguments], _3=>undef) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:311:170
    ListGrid.filterWithCriteria(_1=>Obj, _2=>Obj{ID:auto_fetch}, _3=>Obj) on[ListGrid ID:isc_ListGrid_0] @ ISC_DataBinding.js:2161:241
    Canvas._filter(_1=>"fetch", _2=>Obj, _3=>anonymous(), _4=>Obj) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:4498:6
    [c]Class.invokeSuper(<no args: recursion>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:319:93
    [c]Class.Super(<no args: recursion>) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:311:170
    ListGrid._filter(_1=>"fetch", _2=>Obj, _3=>anonymous(), _4=>Obj, _5=>undef) on[ListGrid ID:isc_ListGrid_0] @ ISC_Grids.js:2328:102
    Canvas.fetchData(_1=>Obj, _2=>anonymous(), _3=>undef) on[ListGrid ID:isc_ListGrid_0] @ ISC_Core.js:4457:968
    gI(k=>ListGrid{modalEditing: true,
    minHeight: 300,
    AUTOIDClass: "ListGrid",
    ID: "isc_ListGrid_0",
    members: Array[2],
    position: "absolute",
    className: "listGrid",
    width: 3372,
    height: 300,
    left: 20,
    top: 212,
    vertical: true,
    children: Array[3],
    data: Array[0],
    selection: [Selection ID:isc_ListGrid_0_selection],
    selectionManager: [Selection ID:isc_ListGrid_0_selection],
    selectionType: "multiple",
    wrapHeaderTitles: false,
    wrapHeaderSpanTitles: false,
    currentGroupState: "",
    parentElement: [VLayout ID:isc_VLayout_0],
    topElement: [VLayout ID:isc_VLayout_0],
    fields: Array[0],
    originalFields: Array[0],
    completeFields: Array[0],
    canFreezeFields: true,
    defaultFieldState: "[]",
    header: [Toolbar ID:isc_Toolbar_0],
    sorter: [Button ID:isc_ListGrid_0_sorter],
    headers: Array[1],
    body: [GridBody ID:isc_ListGrid_0_body],
    tabIndex: 1448,
    bodies: Array[1],
    dragScrollTarget: [GridBody ID:isc_ListGrid_0_body],
    ruleScope: "isc_VLayout_0",
    cacheOffsetCoords: true,
    zIndex: 200162,
    innerWidth: 3354,
    memberSizes: Array[2],
    isSVG: false,
    initialCriteria: Obj}, f=>com.smartgwt.client.data.Criteria@4, g=>com.smartgwt.sample.client.AdminButtonsOnly$1$1@5) @ [no file]:1340:95
    q4.r4(a=>An event type) @ [no file]:1516:1319
    ZZ.$Z(a=>com.smartgwt.sample.client.AdminButtonsOnly$1@6) @ [no file]:1515:12286
    Dc(b=>com.google.gwt.event.shared.HandlerManager$Bus@7, c=>An event type) @ [no file]:1433:198
    wc(b=>com.google.gwt.event.shared.HandlerManager@8, c=>An event type) @ [no file]:1364:73
    pq(a=>IButton{title: "Fetch",
    AUTOIDClass: "IButton",
    ID: "isc_IButton_5",
    position: "absolute",
    left: 1656,
    top: 180,
    styleName: null,
    parentElement: [VLayout ID:isc_VLayout_0],
    topElement: [VLayout ID:isc_VLayout_0],
    forceHandleOverflowHidden: true,
    ruleScope: "isc_VLayout_0",
    cacheOffsetCoords: true,
    zIndex: 200126,
    tabIndex: 1384,
    state: "Over",
    hasFocus: true,
    }, b=>An event type) @ [no file]:157:25
    FU.qq(a=>An event type) @ [no file]:1512:18000
    eval(a=>Obj) @ [no file]:1466:83
    Eb(a=>anonymous(), b=>[object Window], c=>[object Arguments]) @ [no file]:353:29
    Hb(b=>anonymous(), c=>[object Window], d=>[object Arguments]) @ [no file]:1341:56
    eval() @ [no file]:801:46
    _3.click() on [IButton ID:isc_IButton_5] @ [no file]:1466:434
    StatefulCanvas.handleActivate(_1=>Obj, _2=>undef) on [IButton ID:isc_IButton_5] @ ISC_Foundation.js:238:108
    StatefulCanvas.handleClick(_1=>Obj, _2=>undef) on [IButton ID:isc_IButton_5] @ ISC_Foundation.js:239:13
    [c]EventHandler.bubbleEvent(_1=>[IButton ID:isc_IButton_5], _2=>"click", _3=>undef, _4=>undef, _5=>undef) on [Class EventHandler] @ ISC_Core.js:2437:89
    [c]EventHandler.handleClick(_1=>[IButton ID:isc_IButton_5], _2=>undef) on [Class EventHandler] @ ISC_Core.js:2269:50
    EventHandler._handleMouseUp(_1=>[object MouseEvent], _2=>undef) on [Class EventHandler] @ ISC_Core.js:2251:11
    [c]EventHandler.handleMouseUp(_1=>[object MouseEvent], _2=>undef) on [Class EventHandler] @ ISC_Core.js:2242:57
    [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:2532:122
    HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123
    -----------------------------------------------------------------------------------------

    Test code is pretty simple:
    Code:
            DataSource dsApprovers = DataSource.get("APPROVERS"); // loaded in HTML DataSourceLoader
    
            ListGrid listGrid = new ListGrid(dsApprovers);
            listGrid.setMinHeight(300);
    
            IButton iButtonFetch = new IButton("Fetch");
    
            iButtonFetch.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
    
                    listGrid.fetchData(new Criteria(), new DSCallback() {
    
                        @Override
                        public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
    
                            String msg = dsResponse.getHttpResponseText();
    
                            SC.say(msg);
    
                        }
                    });
    
                }
            });
    From the Tomcat server, I am able to verify SQL connectivity by independent SQL console.

    SC.openDataSourceConsole(), which works in DEV, throws an error in Tomcat. I'm not sure if that's by design?
    HTTP Status 500 – Internal Server Error



    Type Exception Report

    Message The absolute uri: [http://www.smartclient.com/taglib] cannot be resolved in either web.xml or the jar files deployed with this application

    Description The server encountered an unexpected condition that prevented it from fulfilling the request.

    Exception
    org.apache.jasper.JasperException: The absolute uri: [http://www.smartclient.com/taglib] cannot be resolved in either web.xml or the jar files deployed with this application org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:294) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81) org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251) org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:122) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445) org.apache.jasper.compiler.Parser.parse(Parser.java:144) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244) org.apache.jasper.compiler.ParserController.parse(ParserController.java:105) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:206) org.apache.jasper.compiler.Compiler.compile(Compiler.java:386) org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) org.apache.jasper.compiler.Compiler.compile(Compiler.java:346) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:605) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:400) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    Note The full stack trace of the root cause is available in the server logs.



    Please advise, thanks.

    ------------------- CONFIG -------------------
    GWT 2.8.2
    SmartClient Version: v12.1p_2020-08-01/PowerEdition Deployment (built 2020-08-01)
    SuperDev w/ Jetty
    Chrome Version 84.0.4147.105 (Official Build) (64-bit)
    Microsoft Windows 10 Enterprise Version 10.0.17763 Build 17763
    Eclipse Version: 2019-06 (4.12.0)
    Java JRE 1.8.0_251

    Last edited by CourtIT; 5 Aug 2020, 16:06.

    #2
    We'll see if we can reproduce the error in showDSWizard(). Note that it looks like client-side classes are simply missing, so you should take a look and see if there are any HTTP 404 errors or similar problems as the various framework JS files are loading.

    On the second error, clearly the DataSource did not load. You have a comment saying you have a call to the DataSourceLoader servlet in your HTML, so that's the right place to look next - see what is returned, see what the server logs are, make sure the file is there (instructions for troubleshooting DataSource loading are in the FAQ).

    Finally, the Admin Console (openDataSourceConsole()) will not be present in your deployed application, by design, as it would be a security violation to do so - see the Tools Deployment overview.

    Comment


      #3
      Part of the problem is that the tool skin isn't being loaded. Locate this section in the BuiltInDS module file (BuiltInDS.gwt.xml):
      Code:
      <!-- For some tools, you may need to inherit specific skin resources, such as tool skins.
           The AdminConsole needs Tahoe so it's explicitly added for you below.  VisualBuilder
           also needs the tool skins, so if you want to use it you may need to add/uncomment:
      
           <inherits name="com.smartclientee.toolskin.ToolSkinResources"/>
           <inherits name="com.smartclientee.toolskinnative.ToolSkinNativeResources"/>
        -->
      And move the closing "-->" up above the two inherits lines at the bottom to uncomment them and ensure the tool skin is loaded.
      Last edited by Isomorphic; 11 Aug 2020, 09:42.

      Comment

      Working...
      X