Announcement

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

    What is wrong with data source name "operator"?

    It appears that data source named "operator" has the black magic power to crash Smart GWT server with stack overflow upon load. The problem gets fixed if name is changed - e.g. to "operator_". Why is this and are there other "reserved" names?

    Here is the offending data source :
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <DataSource
        ID="operator"
        tableName="OPERATOR"
        servertype="sql">
        <fields>
            <field
                name="ID"
                type="sequence"
                sequenceName="HIBERNATE_SEQUENCE"
                primaryKey="true"
                hidden="true"/>
            <field
                name="VERSION"
                type="integer"
                hidden="true"/>
            <field
                name="NAME"
                type="text"
                title="Name">
                <validators>  
                    <validator type="isUnique"/>  
                </validators>
            </field>
        </fields>
        <operationBindings>
            <operationBinding
                operationType="fetch">
                <tableClause>OPERATOR</tableClause>
                <whereClause>$defaultWhereClause</whereClause>
                <orderClause>NAME</orderClause>
            </operationBinding>
        </operationBindings>
    </DataSource>
    The stack trace is as long as one can expect upon stack overflow but here is a part of it which hopefully captures the cycle:

    Code:
    === 2010-11-05 11:56:59,300 [80-3] ERROR DataSourceLoader - Exception while attempting to load a DataSource
    java.lang.StackOverflowError
    	at sun.nio.cs.UTF_8.updatePositions(UTF_8.java:58)
    	at sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:392)
    	at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:447)
    	at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
    	at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:240)
    	at java.lang.StringCoding.encode(StringCoding.java:272)
    	at java.lang.String.getBytes(String.java:946)
    	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
    	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
    	at java.io.File.exists(File.java:733)
    	at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:999)
    	at sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:966)
    	at sun.misc.URLClassPath.findResource(URLClassPath.java:146)
    	at java.net.URLClassLoader$2.run(URLClassLoader.java:385)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findResource(URLClassLoader.java:382)
    	at java.lang.ClassLoader.getResource(ClassLoader.java:1003)
    	at java.lang.ClassLoader.getResource(ClassLoader.java:998)
    	at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1193)
    	at org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1205)
    	at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89)
    	at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250)
    	at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)
    	at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    	at com.isomorphic.xml.XML.parseXML(XML.java:116)
    	at com.isomorphic.xml.XML.parseXML(XML.java:97)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:262)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:254)
    	at com.isomorphic.xml.XML$RecordsFromXMLCache.loadObjectFromFile(XML.java:347)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:129)
    	at com.isomorphic.xml.XML.loadCacheableDSRecords(XML.java:358)
    	at com.isomorphic.store.DataStructCache.loadInstance(DataStructCache.java:178)
    	at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:65)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:147)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:144)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:141)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:89)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:96)
    	at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:76)
    	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:56)
    	at com.isomorphic.datasource.ValidationContext.getType(ValidationContext.java:252)
    	at com.isomorphic.datasource.BasicDataSource.findDataSource(BasicDataSource.java:1473)
    	at com.isomorphic.datasource.BasicDataSource.getType(BasicDataSource.java:1369)
    	at com.isomorphic.datasource.BasicDataSource.getFieldType(BasicDataSource.java:1155)
    	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:898)
    	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:882)
    	at com.isomorphic.datasource.BasicDataSource.elementAsRecord(BasicDataSource.java:786)
    	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:513)
    	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:498)
    	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:461)
    	at com.isomorphic.datasource.DataSource.create(DataSource.java:625)
    	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:935)
    	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:882)
    	at com.isomorphic.datasource.BasicDataSource.elementAsRecord(BasicDataSource.java:786)
    	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:513)
    	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:475)
    	at com.isomorphic.datasource.DataSource.recordsFromXML(DataSource.java:583)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:271)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:262)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:254)
    	at com.isomorphic.xml.XML$RecordsFromXMLCache.loadObjectFromFile(XML.java:347)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:129)
    	at com.isomorphic.xml.XML.loadCacheableDSRecords(XML.java:358)
    	at com.isomorphic.store.DataStructCache.loadInstance(DataStructCache.java:178)
    	at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:65)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:147)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:144)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:141)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:89)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:96)
    	at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:76)
    	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:56)
    	at com.isomorphic.datasource.ValidationContext.getType(ValidationContext.java:252)
    	at com.isomorphic.datasource.BasicDataSource.findDataSource(BasicDataSource.java:1473)
    	at com.isomorphic.datasource.BasicDataSource.getType(BasicDataSource.java:1369)
    	at com.isomorphic.datasource.BasicDataSource.findElementType(BasicDataSource.java:1119)
    	at com.isomorphic.datasource.BasicDataSource.elementAsRecord(BasicDataSource.java:601)
    	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:513)
    	at com.isomorphic.datasource.BasicDataSource.handleExtraElementValue(BasicDataSource.java:861)
    	at com.isomorphic.datasource.BasicDataSource.elementAsRecord(BasicDataSource.java:835)
    	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:513)
    	at com.isomorphic.datasource.BasicDataSource.handleExtraElementValue(BasicDataSource.java:861)
    	at com.isomorphic.datasource.BasicDataSource.elementAsRecord(BasicDataSource.java:835)
    	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:513)
    	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:475)
    	at com.isomorphic.datasource.DataSource.recordsFromXML(DataSource.java:583)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:271)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:262)
    	at com.isomorphic.xml.XML.toDSRecords(XML.java:254)

    #2
    See the docs on Component XML and Component Schema - DataSources can also be used to extend the set of components recognized by Visual Builder and that can be created from XML. For this reason, use an organization-specific prefix or a standard suffix like "DS".

    Comment

    Working...
    X