Announcement

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

    Exception while loading data source

    Hi

    i am trying to load the data source which i have kept under the folder \examples\shared\ds as specified in examples in feature explorer and my data xml under the folder \examples\shared\ds\test_data...

    My JSP is under the folder \smartclientSDK\JSP

    i have included the tag <isomorphic:loadDS ID="targetDS"/>

    But i am getting an exception

    Please help me...

    Code:
    javax.servlet.jsp.JspException: Unable to load DataSource for ID: targetDS
            at com.isomorphic.taglib.LoadDSTag.doStartTag(LoadDSTag.java:60)
            at org.apache.jsp.JSP.BaseBusinessPlan_jsp._jspx_meth_isomorphic_005floadDS_005f0(BaseBusinessPlan_jsp.java:527)
            at org.apache.jsp.JSP.BaseBusinessPlan_jsp._jspService(BaseBusinessPlan_jsp.java:75)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
            at com.isomorphic.js.JSSyntaxScannerFilter.doFilter(JSSyntaxScannerFilter.java:251)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
            at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:248)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
            at java.lang.Thread.run(Thread.java:595)

    #2
    Earlier i had the datasource defined in the .jsp file itself....

    may be because of that i was getting the following problem: when I enter a value inside a cell and when I tab out the data entered vanishes. Under what circumstances it happens?

    Thanks in advance
    Strive

    Comment


      #3
      Hi Strive,

      Your application DataSources should be placed in shared/ds, not examples/shared/ds. The DataSources in examples/shared/ds are example DataSources.

      Be sure the filename for the DataSource is name dataSourceID.ds.xml, in this case "targetDS.ds.xml" and the DataSource itself has the right ID (<DataSource ID="targetDS" ...).

      Comment


        #4
        Hi Isomorphic,

        I placed my datasource in /shared/ds.
        Even then i am getting the same exception.

        my datasource(newData.ds.xml) code is:
        Code:
        <DataSource
            ID="targetDS"
            serverType="sql"    
            recordName="content"
            testFileName="/shared/ds/test_data/targetData.data.xml"
        >
            <fields>
                <field name="header" title: " " width:100/>
                <field name="target" type="text" title="Target" width:100/>
                <field name="current"  type="text" title="Current" width:100/>
                <field name="subheader" type="text" title="Sub Header" width:100/>
                <field name="amount" type="boolean" title=" " width:100/>
            </fields>
        </DataSource>
        my jsp code is:
        Code:
        isc.ListGrid.create({
            	ID: "Target",
            	top: 450,
            	left:10,
            	width:"50%", height:140, showAllRecords:true,
            	dataSource: targetDS,
            	autoFetchData: true,
        	editEvent: "click",
        	editByCell: true,
        	wrapCells: true,
        	fixedRecordHeights: false,
        	showRollOver: false,
        	leaveScrollbarGap: false,
        	canResizeFields: false,
            	bodyOverflow: "hidden",
            	headerHeight: 30,
            	baseStyle: "myBoxedGridCell",
            	selectionType: "none",
            	canReorderFields: false,
            	selectOnEdit:false,
            	fields:[
        	    	{name: "header", title: " ", canEdit:false, canSort:false, width:100},
        	    	{name: "target", title: "Target", canEdit:false, canSort:false, width:100, type:"imageFile"},
        	    	{name: "current", title: "Current", canEdit:false, canSort:false, width:100},
        	    	{name: "subheader", title: "Sub Header", canEdit:false, canSort:false, width:100},
        	    	{name: "amount", title: " ", canSort:false, width:100, canEdit:true}
        ]
        });
        i do not know where i am going wrong...

        Comment


          #5
          I change my dataSource to

          Code:
          <DataSource
              ID="targetDS"
              dataFormat="xml"        
              dataURL="/shared/ds/test_data/targetData.data.xml"
              recordXPath="//content"
          >
              <fields>
                  <field name="header" title: " " width:100/>
                  <field name="target" type="text" title="Target" width:100/>
                  <field name="current"  type="text" title="Current" width:100/>
                  <field name="subheader" type="text" title="Sub Header" width:100/>
                  <field name="amount" type="boolean" title=" " width:100/>
              </fields>
          </DataSource>
          even then it is not working :(

          Comment


            #6
            Hi Strive
            What exactly is happening in this second case?
            This really shouldn't be failing if the target xml file is present at the dataURL - are you seeing any errors on the server?
            If you enable debug level logging for the RPCManager / RPCManagerResponse / DataSource categories in the developer console, and reload the page what do the logs look like?
            What does the contents of the xml file look like?

            Also, just to be sure we're on the same page, how is your data going to be served in your final applicatoin? Are you going to be using the SmartClient Java Server to retrieve records from a sql database, or are you going to be performing a client side integration (or some other strategy)?

            Thanks
            Isomorphic Software

            Comment

            Working...
            X