i use oracle 10g for my database.
servers.properties:
and
and ds.xml file:
and NewsXmlDS.java
then the error:
so where does appear " mysql",is there something wrong with my setting?
thanks a lot!
servers.properties:
Code:
webRoot: __AUTODETECT__ isomorphicPathRootRelative: test/sc # administration app apps.adminConsole.location: $webRoot/test/tools ui.adminConsole.location: $webRoot/test/tools sql.defaultDatabase: oracle project.datasources: $webRoot/ds project.ui: $webRoot/shared/ui project.apps: $webRoot/shared/app #for development #RPCManager.enabledBuiltinMethods: * RPCManager.enabledBuiltinMethods: xmlToJS, uploadProgressCheck FilesystemDataSource.enabled: true sql.oracle.interface.credentialsInURL: true sql.oracle.database.type: oracle sql.oracle.driver.serverName: localhost sql.oracle.driver.portNumber: 1521 sql.oracle.driver.user: hsman sql.oracle.driver.password: XXX sql.oracle.driver.databaseName: XXX sql.oracle.driver: oracle.jdbc.driver.OracleDriver sql.Oracle.driver.url: jdbc:oracle:thin:@localhost:XXX sql.oracle.interface.type: dataSource sql.oracle.pool.enabled: true sql.oracle.driver.networkProtocol: tcp sql.oracle.driver.driverType: thin sql.oracle.driver.context: _container_
Code:
ListGrid newsGrid = new ListGrid(); newsGrid.setWidth100(); newsGrid.setHeight100(); newsGrid.setAutoFetchData(true); newsGrid.setDataSource(NewsXmlDS.getInstance()); newsGrid.setDataSource(DataSource.getDataSource("news")); newsGrid.setUseAllDataSourceFields(true); tTab4.setPane(newsGrid); tabSet.addTab(tTab4);
Code:
<?xml version="1.0" encoding="UTF-8"?> <DataSource tableName="collectgroup" ID="news" serverType="sql"> <fields> <field title="GROUP" type="sequence" name="GROUP_ID"></field> <field title="DCC" type="text" length="256" name="DCC_NAME"></field> <field title="IP" type="text" length="256" name="IP_ADDRESS"></field> <field title="REMARK" type="text" length="256" name="REMARK"></field> </fields> </DataSource>
Code:
public class NewsXmlDS extends DataSource{ private static NewsXmlDS instance = null; public static NewsXmlDS getInstance() { if (instance == null) { instance = new NewsXmlDS("news"); } return instance; } public NewsXmlDS(String id) { setID(id); setRecordXPath("/DataSource/fields"); setDataURL("ds/news.ds.xml"); DataSourceIntegerField newsIdField = new DataSourceIntegerField("GROUP"); newsIdField.setRequired(true); DataSourceTextField newsTitleField = new DataSourceTextField("DCC"); newsTitleField.setRequired(true); DataSourceTextField newsContentField = new DataSourceTextField("IP"); newsContentField.setRequired(true); DataSourceTextField newAutorField = new DataSourceTextField("REMARK"); newAutorField.setRequired(true); setFields(newsIdField, newsTitleField, newsContentField,newAutorField ); } }
Code:
=== 2012-03-05 21:34:48,678 [l0-4] INFO RequestContext - URL: '/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; BOIE9;ZHCN)': MSIE with Accept-Encoding header, ready for compressed JS === 2012-03-05 21:34:48,680 [l0-4] DEBUG ProcessedFileCache - STALE object for file 'D:\workspaces 3.6\test\war\ds\news.ds.xml', reloading (file timestamp 1330954473069, cache timestamp 1330954435801) === 2012-03-05 21:34:48,683 [l0-4] DEBUG XML - Parsed XML from D:\workspaces 3.6\testMySQL\war\ds\news.ds.xml: 2ms === 2012-03-05 21:34:48,717 [l0-4] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'mysql' from system config - using DataSource: null === 2012-03-05 21:34:48,717 [l0-4] ERROR SQLConnectionManager - Caught exception
thanks a lot!
Comment