Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

does inheritsFrom work?

$
0
0
Be sure your post includes:

1. the *complete* SmartGWT or SmartClient version from the lower left-hand corner of the Developer Console

SmartClient Version: v9.0p_2013-11-10/EVAL Deployment (expires 2014.01.09_11.53.31)

I used a copy of built-in-ds as my starting project.

2. browser(s) and version(s) involved

firefox 25.0.1

3. for a server-side problem, the *complete* logs generated during processing of the failing request

[Server@433af793]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@433af793]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@433af793]: Startup sequence initiated from main() method
[Server@433af793]: Could not load properties from file
[Server@433af793]: Using cli/default properties only
[Server@433af793]: Initiating startup sequence...
[Server@433af793]: Server socket opened successfully in 2 ms.
0 [HSQLDB Server @433af793] INFO hsqldb.db.HSQLDB426C0428E8.ENGINE - checkpointClose start
59 [HSQLDB Server @433af793] INFO hsqldb.db.HSQLDB426C0428E8.ENGINE - checkpointClose end
[Server@433af793]: Database [index=0, id=0, db=file:D:\Workspaces\apenkooi\SmartGWT\reservatio ns-data\war\WEB-INF\db\hsqldb\isomorphic, alias=isomorphic] opened sucessfully in 362 ms.
[Server@433af793]: Startup sequence completed in 365 ms.
[Server@433af793]: 2013-11-18 17:30:50.503 HSQLDB server 2.2.9 is online on port 9001
[Server@433af793]: To close normally, connect and execute SHUTDOWN SQL
[Server@433af793]: From command line, use [Ctrl]+[C] to abort abruptly
ISC: Configuring log4j from: file:/D:/Workspaces/apenkooi/SmartGWT/reservations-data/war/WEB-INF/classes/log4j.isc.config.xml
=== 2013-11-18 17:30:50,572 [main] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
=== 2013-11-18 17:30:50,578 [main] INFO ConfigLoader - Attempting to load framework.properties from CLASSPATH
=== 2013-11-18 17:30:50,664 [main] INFO ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/D:/Workspaces/apenkooi/SmartGWT/reservations-data/war/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
=== 2013-11-18 17:30:50,664 [main] INFO ConfigLoader - Attempting to load project.properties from CLASSPATH
=== 2013-11-18 17:30:50,665 [main] INFO ConfigLoader - Unable to locate project.properties in CLASSPATH
=== 2013-11-18 17:30:50,669 [main] INFO ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/D:/Workspaces/apenkooi/SmartGWT/reservations-data/war/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
=== 2013-11-18 17:30:50,669 [main] INFO ConfigLoader - Attempting to load server.properties from CLASSPATH
=== 2013-11-18 17:30:50,671 [main] INFO ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/D:/Workspaces/apenkooi/SmartGWT/reservations-data/war/WEB-INF/classes/server.properties
=== 2013-11-18 17:30:50,676 [main] INFO Logger - Logging system started.
=== 2013-11-18 17:30:50,678 [main] INFO ISCInit - Auto-detected webRoot - using: D:\Workspaces\apenkooi\SmartGWT\reservations-data\war
=== 2013-11-18 17:30:50,679 [main] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-11-10/EVAL Deployment 2013-11-10) - Initialization Complete
325 [main] DEBUG org.apache.jasper.compiler.JspRuntimeContext - Parent class loader is: ContextLoader@null
325 [main] DEBUG org.apache.jasper.servlet.JspServlet - Scratch dir for the JSP engine is: C:\Users\FloydS\AppData\Local\Temp\Jetty_127_0_0_1 _8888_war____-g0qk00\jsp
325 [main] DEBUG org.apache.jasper.servlet.JspServlet - IMPORTANT: Do not modify the generated servlets
=== 2013-11-18 17:30:57,365 [l0-0] INFO Compression - /reservationsdata/reservationsdata.nocache.js: 7449 -> 2861 bytes
=== 2013-11-18 17:30:57,365 [l0-0] DEBUG ServletTools - setting cookie 'isc_cState' to: 'ready'
=== 2013-11-18 17:30:57,368 [l0-0] INFO RequestContext - URL: '/reservationsdata/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0': Moz (Gecko) with Accept-Encoding header
=== 2013-11-18 17:30:57,432 [l0-2] INFO Compression - /reservationsdata/sc/modules/ISC_Core.js: 838152 -> 219307 bytes
=== 2013-11-18 17:30:57,435 [l0-4] INFO Download - Returning 304: Not modified on conditional get of: D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\skins\Enterprise\load _skin.js
=== 2013-11-18 17:30:57,474 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\builtin Types.xml: 4ms
=== 2013-11-18 17:30:57,490 [l0-0] INFO PoolManager - SmartClient pooling started for 'simpleTypes' objects
=== 2013-11-18 17:30:57,541 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\ds\objects.ds.xml: 3ms
=== 2013-11-18 17:30:57,547 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\DataSou rce.ds.xml: 6ms
=== 2013-11-18 17:30:57,602 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\DataSou rceField.ds.xml: 6ms
=== 2013-11-18 17:30:57,632 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\ValueMa p.ds.xml: 2ms
=== 2013-11-18 17:30:57,673 [l0-0] DEBUG DataSourceLoader - For DataSource 'objects', got instanceId 8
=== 2013-11-18 17:30:57,686 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\ds\persons.ds.xml: 1ms
=== 2013-11-18 17:30:57,693 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\ServerO bject.ds.xml: 1ms
=== 2013-11-18 17:30:57,700 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\Operati onBinding.ds.xml: 3ms
=== 2013-11-18 17:30:57,713 [l0-0] DEBUG DataSourceLoader - For DataSource 'persons', got instanceId 17
=== 2013-11-18 17:30:57,718 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\ds\users.ds.xml: 1ms
=== 2013-11-18 17:30:57,724 [l0-0] DEBUG XML - Parsed XML from D:\Workspaces\apenkooi\SmartGWT\reservations-data\war\reservationsdata\sc\system\schema\Validat or.ds.xml: 2ms
=== 2013-11-18 17:30:57,740 [l0-0] ERROR DataSourceLoader - Exception while attempting to load a DataSource
java.lang.NullPointerException
at com.isomorphic.sql.SQLDataSource.buildSQLTable(SQL DataSource.java:311)
at com.isomorphic.sql.SQLDataSource.init(SQLDataSourc e.java:272)
at com.isomorphic.datasource.DataSource.initialize(Da taSource.java:455)
at com.isomorphic.datasource.BasicDataSource.fromConf ig(BasicDataSource.java:166)
at com.isomorphic.datasource.DataSource.fromConfig(Da taSource.java:440)
at com.isomorphic.datasource.FileSystemDSRepo.loadDS( FileSystemDSRepo.java:110)
at com.isomorphic.datasource.DataSource.forName(DataS ource.java:228)
at com.isomorphic.datasource.DataSource.forName(DataS ource.java:220)
at com.isomorphic.datasource.DataSource.forName(DataS ource.java:209)
at com.isomorphic.datasource.PoolableDataSourceFactor y.makeUnpooledObject(PoolableDataSourceFactory.jav a:130)
at com.isomorphic.datasource.PoolableDataSourceFactor y.makeObject(PoolableDataSourceFactory.java:138)
at org.apache.commons.pool.impl.GenericKeyedObjectPoo l.borrowObject(GenericKeyedObjectPool.java:964)
at com.isomorphic.pool.PoolManager.borrowObject(PoolM anager.java:84)
at com.isomorphic.datasource.DataSourceManager.getDat aSource(DataSourceManager.java:95)
at com.isomorphic.datasource.DataSourceManager.getDat aSource(DataSourceManager.java:86)
at com.isomorphic.servlet.DataSourceLoader.processReq uest(DataSourceLoader.java:132)
at com.isomorphic.servlet.DataSourceLoader.doGet(Data SourceLoader.java:96)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
at com.isomorphic.servlet.BaseServlet.service(BaseSer vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1097)
at com.isomorphic.servlet.CompressionFilter.doFilter( CompressionFilter.java:260)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1088)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle (RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run (QueuedThreadPool.java:488)
=== 2013-11-18 17:30:57,741 [l0-0] ERROR DataSourceLoader - Top-level servlet error:
javax.servlet.ServletException: DataSource 'users' failed to load due to an exception on the server:
null
See the server-side log for additional details.
at com.isomorphic.servlet.DataSourceLoader.processReq uest(DataSourceLoader.java:223)
at com.isomorphic.servlet.DataSourceLoader.doGet(Data SourceLoader.java:96)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
at com.isomorphic.servlet.BaseServlet.service(BaseSer vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1097)
at com.isomorphic.servlet.CompressionFilter.doFilter( CompressionFilter.java:260)
at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1088)
at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle (RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run (QueuedThreadPool.java:488)
=== 2013-11-18 17:30:57,743 [l0-0] INFO Compression - /reservationsdata/sc/DataSourceLoader: 5416 -> 1528 bytes
=== 2013-11-18 17:30:57,744 [l0-0] DEBUG ServletTools - setting cookie 'isc_cState' to: 'ready'
=== 2013-11-18 17:31:09,092 [l0-0] INFO RequestContext - URL: '/favicon.ico', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0': Moz (Gecko) with Accept-Encoding header



4. for any problem processing a server response, the actual response as shown in the RPC tab in the Developer Console

n/a

5. if there is a JavaScript error, the stack trace logged in the Developer Console (see FAQ)

n/a

6. sample code if applicable

This works:

boostrap.html
...

<!--load the datasources-->
<script src="reservationsdata/sc/DataSourceLoader?dataSource=persons,users"></script>
...

<DataSource
ID="users"
serverType="sql"
tableName="users"
recordName="user"
testFileName="users.data.xml"
>

<fields>

<field name="Id" title="Id" type="sequence" hidden="true" primaryKey="true" />
<field name="Name" title="Name" type="text" length="128" required="true" />
<field name="DateCreated" title="Date Created" type="date" hidden="true" />
<field name="DateModified" title="Date Last Modified" type="date" hidden="true" />
<field name="CreatedById" title="Created By Id" foreignKey="users.Id" hidden="true"/>
<field name="ModifiedById" title="Last Modified By Id" foreignKey="users.Id" hidden="true"/>
<field name="LifeCycleStatus" title="Life Cycle Status" type="enum" hidden="true" length="1">
<valueMap>
<value id="1">active</value>
<value id="2">archived</value>
</valueMap>
</field>

<field name="Password" title="Password" type="text" length="32">
<validators>
<validator type="lengthRange" min="8" max="32" errorMessage="Passwords must contain a minimum of 8 and a maximum of 32 characters."/>
</validators>
</field>
<field name="PersonId" title="Person" foreignKey="persons.Id" displayField="PersonName"/>
<field name="PersonName" includeFrom="persons.Name" hidden="true"/>

</fields>

</DataSource>

<List>
<user>
<Id>1</Id>
<CreatedById>1</CreatedById>
<DateCreated>01-11-2013</DateCreated>
<LifeCycleStatus>1</LifeCycleStatus>
<Name>C.Madigen</Name>

<Password>12345678</Password>
<PersonId>1</PersonId>
</user>
</List>


<DataSource
ID="persons"
serverType="sql"
tableName="persons"
recordName="person"
testFileName="persons.data.xml"
>

<fields>

<field name="Id" title="Id" type="sequence" hidden="true" primaryKey="true" />
<field name="Name" title="Name" type="text" length="128" required="true" />
<field name="DateCreated" title="Date Created" type="date" hidden="true" />
<field name="DateModified" title="Date Last Modified" type="date" hidden="true" />
<field name="CreatedById" title="Created By Id" foreignKey="users.Id" hidden="true"/>
<field name="ModifiedById" title="Last Modified By Id" foreignKey="users.Id" hidden="true"/>
<field name="LifeCycleStatus" title="Life Cycle Status" type="enum" hidden="true" length="1">
<valueMap>
<value id="1">active</value>
<value id="2">archived</value>
</valueMap>
</field>

<field name="Address" title="Address" type="text" length="256"/>
<field name="Phone" title="Phone" type="text" length="24"/>
<field name="Email" title="Email" type="text" length="128"/>
<field name="BirthDate" title="Birth Date" type="date"/>
<field name="Gender" title="Gender" type="enum" length="1">
<valueMap>
<value id="m">male</value>
<value id="f">female</value>
</valueMap>
</field>

</fields>

</DataSource>

<List>
<person>
<Id>1</Id>
<CreatedById>1</CreatedById>
<DateCreated>01-11-2013</DateCreated>
<LifeCycleStatus>1</LifeCycleStatus>
<Name>Charles Madigen</Name>

<Address>Tubby Dubby 123, 1234 AB Delft, Netherlands</Address>
<Phone>+31.6.12.34.56.78</Phone>
<Email>CharlesM@TOPdesk.com</Email>
<Gender>m</Gender>
</person>
</List>


When I try to combine common fields into an "objects" parent, it doesn't work:

boostrap.html
...

<!--load the datasources-->
<script src="reservationsdata/sc/DataSourceLoader?dataSource=objects,persons,users" ></script>
...

<DataSource
ID="objects"
serverType="sql"
requires="false"
tableName="objects"
recordName="object"
titleField="Name">

<fields>
<field name="Id" title="Id" type="sequence" hidden="true" primaryKey="true" />
<field name="Name" title="Name" type="text" length="128" required="true" />
<field name="DateCreated" title="Date Created" type="date" hidden="true" />
<field name="DateModified" title="Date Last Modified" type="date" hidden="true" />
<field name="CreatedById" title="Created By Id" foreignKey="users.Id" hidden="true"/>
<field name="ModifiedById" title="Last Modified By Id" foreignKey="users.Id" hidden="true"/>
<field name="LifeCycleStatus" title="Life Cycle Status" type="enum" hidden="true" length="1">
<valueMap>
<value id="1">active</value>
<value id="2">archived</value>
</valueMap>
</field>
</fields>

</DataSource>

<DataSource
ID="users"
inheritsFrom="objects"
serverType="sql"
tableName="users"
recordName="user"
testFileName="users.data.xml"
>

<fields>

<field name="Password" title="Password" type="text" length="32">
<validators>
<validator type="lengthRange" min="8" max="32" errorMessage="Passwords must contain a minimum of 8 and a maximum of 32 characters."/>
</validators>
</field>
<field name="PersonId" title="Person" foreignKey="persons.Id" displayField="PersonName"/>
<field name="PersonName" includeFrom="persons.Name" hidden="true"/>

</fields>

</DataSource>

<DataSource
ID="persons"
inheritsFrom="objects"
serverType="sql"
tableName="persons"
recordName="person"
testFileName="persons.data.xml"
>

<fields>

<field name="Address" title="Address" type="text" length="256"/>
<field name="Phone" title="Phone" type="text" length="24"/>
<field name="Email" title="Email" type="text" length="128"/>
<field name="BirthDate" title="Birth Date" type="date"/>
<field name="Gender" title="Gender" type="enum" length="1">
<valueMap>
<value id="m">male</value>
<value id="f">female</value>
</valueMap>
</field>

</fields>

</DataSource>

Viewing all articles
Browse latest Browse all 4756

Trending Articles