Announcement

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

    Admin Console

    Hello, I am using SmartGWT EE and its version is SmartClient Version: v8.3p_2013-04-04/Enterprise Deployment (built 2013-04-04).
    Used browser is FireFox 20.0.

    I used Admin Console to create server.properties file and used Batch DataSource Generator to create datasource like attached file AmkorCIMUser.ds.xml. The reason why I did it is to retrieve some records from MS SQL server.
    I used below code to open Admin Console & Batch DataSource Generator.

    Code:
    SCEE.openDataSourceConsole();
    SCEE.openDataSourceGenerator();
    But, it showed alarm message that "Data fetch failed. Note that this is normal and expected for non-SQL, non-Hibernate DataSources if you have not yet done the server-side work to connect to your data provider" as attached screen when I click refresh button in import DataSources tab of Admin Console.
    I'd been read Quick Start Guide serveral times but I was unable to find root cause.

    Please, refer to below and kindly advise me.

    server.properties
    Code:
    # The webRoot directory:
    # the directory that the servlet engine regards as the place where applications 
    # that use the servlet engine should be installed.  Generally, it is safe to leave
    # this at the default setting of __AUTODETECT__.  When the SmartClient server is
    # started, it logs a message to stdout telling you the autodetected path to your
    # webRoot.  If this path is not your actual webRoot, then you'll want to override
    # this config parameter here.
    #
    # Valid values: 
    #
    # 1. Absolute path to the webRoot directory
    #
    # 2. Special token:  __AUTODETECT__
    #    When this token is used, SmartClient attempts to auto-detect the webRoot using
    #    standard servlet APIs.  This may or may not work - depending on your
    #    container type and deployment type.  For example, WAR/EAR deployments
    #    on some containers never make it to disk, and so the container refuses
    #    to provide the webRoot path.
    #  
    #    If SmartClient cannnot detect the webRoot, it sets the webRoot to
    #    __USE_CONTAINER__ (see below).
    #
    # 3.  Special token: __USE_CONTAINER__
    #     When this token is used, SmartClient uses standard servet APIs for accessing
    #     filesystem resources.  This is slower than direct file access and, since
    #     the servlet APIs provide no mechanism for writing to disk, means that some
    #     development tools like the FileAssembler will not work.
    #
    webRoot: __AUTODETECT__
    RPCManager.enabledBuiltinMethods=RPCManager.enabledBuiltinMethods
    
    # Set this to the GWT module name.
    gwtModuleName: amkorcimweb
    
    # if you've moved the isomorphic directory from its default location in webRoot,
    # set the root-relative path to it here
    #
    # For example, if in your deployment the 'isomorphic' dir is in /foo/bar, then set
    # then you'll need to set this to foo/bar/isomorphic
    isomorphicPathRootRelative: $gwtModuleName/sc
    
    
    
    # -------------- PICK DATABASE TO USE --------------------
    #
    # The SmartClient SDK ships with examples that use a database as the persistence
    # layer.  By default, the SDK uses a built-in version of HSQLDB, but you can
    # specify a different database to use here.
    
    # which database do you want to use?  HSQLDB is enabled by default.
    #sql.defaultDatabase: HSQLDB
    
    # If you want to use Mysql instead, uncomment the following line
    # and comment all other sql.defaultDatabase definitions
    #sql.defaultDatabase: Mysql
    
    # If you want to use Oracle instead, uncomment the following line
    # and comment all other sql.defaultDatabase definitions
    #sql.defaultDatabase: Oracle
    
    # If you want to use Postgres instead, uncomment the following line
    # and comment all other sql.defaultDatabase definitions
    #sql.defaultDatabase: PostgreSQL
    
    # If you want to use DB2 instead, uncomment the following line
    # and comment all other sql.defaultDatabase definitions
    #sql.defaultDatabase: DB2
    
    # -------------- SETTINGS FOR HSQLDB --------------------
    
    #sql.HSQLDB.database.type: hsqldb
    #sql.HSQLDB.interface.type: driverManager
    
    #sql.HSQLDB.driver: org.hsqldb.jdbcDriver
    #sql.HSQLDB.driver.url: jdbc:hsqldb:hsql://localhost/isomorphic
    
    
    # SQLServer
    #----------
    #sql.SQLServer.database.type: sqlserver
    #sql.SQLServer.interface.type: driverManager
    
    #sql.SQLServer.driver: com.microsoft.jdbc.sqlserver.SQLServerDriver
    #sql.SQLServer.driver.url: jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=Northwind;User=sa;Password=
    
    # DB2
    #----
    #sql.DB2.database.type: db2
    #sql.DB2.interface.type: dataSource
    
    # DataSource
    #sql.DB2.driver: COM.ibm.db2.jdbc.DB2DataSource
    #sql.DB2.driver.serverName: localhost
    #sql.DB2.driver.databaseName: SAMPLE
    #sql.DB2.driver.portNumber: 6789
    #sql.DB2.driver.user: db2admin
    #sql.DB2.driver.password: db2admin
    
    # -------------- SETTINGS FOR MYSQL --------------------
    
    # These are the settings for use with the Mysql database.  If you have
    # just done a fresh install of MySQL on the same machine where you are
    # running your servlet engine, the values provided below will probably
    # just work on most platforms.
    
    # Configuration for Mysql Connector/J
    #sql.Mysql.database.type: mysql
    #sql.Mysql.database.ansiMode: false
    #sql.Mysql.interface.type: dataSource
    #sql.Mysql.driver: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
    # name of the database to use
    #sql.Mysql.driver.databaseName: isomorphic
    # hostname and port where the database server is installed
    #sql.Mysql.driver.serverName: localhost
    #sql.Mysql.driver.portNumber: 3306
    # username and password that can create and modify tables in that database
    # this user must have the following privileges for the system to function
    # properly: create/alter/drop table; insert/update/replace/delete rows.
    #sql.Mysql.driver.user: root
    #sql.Mysql.driver.password:
    
    
    # -------------- SETTINGS FOR ORACLE --------------------
    
    # These are the settings for use with the Oracle database.
    
    # hostname and port where the database server is installed
    #sql.Oracle.driver.serverName: localhost
    #sql.Oracle.driver.portNumber: 1521
    
    # SID of Oracle Database
    #sql.Oracle.driver.databaseName: isomorphic
    
    # username and password that can create and modify tables in that database
    # this user must have the following privileges for the system to function
    # properly: create/alter/drop table; create/drop sequences;
    # insert/update/replace/delete rows.
    #sql.Oracle.driver.user: system
    #sql.Oracle.driver.password: manager
    
    # -------------- SETTINGS FOR PostgreSQL --------------------
    
    # These are the settings for use with the PostgreSQL database.
    
    # hostname and port where the database server is installed
    #sql.PostgreSQL.driver.serverName: localhost
    #sql.PostgreSQL.driver.portNumber: 5432
    
    # name of the database to use
    #sql.PostgreSQL.driver.databaseName: isomorphic
    
    # username and password that can create and modify tables in that database
    # this user must have the following privileges for the system to function
    # properly: create/alter/drop table; create/drop sequences;
    # insert/update/replace/delete rows.
    #sql.PostgreSQL.driver.user: postgres
    #sql.PostgreSQL.driver.password: test
    
    # -------------- SETTINGS FOR Informix --------------------
    
    # These are example settings for use with the Informix database
    
    # hostname and port where the database server is installed
    #sql.Informix.driver.serverName: localhost
    #sql.Informix.driver.portNumber: 1526
    
    # name of the database to use.  Note that Informix requires the 
    # databaseName property to be specified so as to include the serverName, 
    # like so:
    #   {databaseName}:INFORMIXSERVER={serverName}
    #sql.Informix.driver.databaseName: isomorphic:INFORMIXSERVER=isomorphic
    
    # name of the JDBC driver class to use 
    #sql.Informix.driver: com.informix.jdbc.IfxDriver
    
    #sql.Informix.interface.type: driverManager
    #sql.Informix.database.type: informix
    #sql.Informix.driver.driverName: informix
    
    # username and password that can create and modify tables in that database
    # this user must have the following privileges for the system to function
    # properly: create/alter/drop table; create/drop sequences;
    #sql.Informix.driver.user: informix
    #sql.Informix.interface.credentialsInURL: true
    #sql.Informix.driver.password: password
    
    
    
    # -------------- LOADING APP AND DATASOURCE DEFINITIONS --------------------
    
    # Where the system looks for DataSource definition files ([dataSourceId].ds.xml or
    # [dataSourceID].ds.js).  It's useful to put all your DataSources in one 
    # directory since DataSources are frequently shared between applications.  
    # "project.datasources" is also where the DataSource Importer tool looks 
    # for available DataSources.
    project.datasources: $webRoot/ds, $webRoot/shared/ds
    project.ui: $webRoot/shared/ui
    project.apps: $webRoot/shared/app
    
    # -------------- Other settings --------------------
    # The setting RPCManager.enabledBuiltinMethods enables or disables the BuiltInRPCs - RPC calls
    # that are built into the SmartClient Server.  The setting below reflects the framework default
    # of enabling only those RPCs that are typically needed in an application.
    # 
    # See the JavaDoc for com.isomorphic.rpc.BuiltinRPC and com.isomorphic.tools.BuiltinRPC for all
    # available builtinRPCs and their behavior.
    # 
    # Note that many of the BuiltinRPCs are designed for use by tools such as Visual Builder, and
    # provide services such as direct access to the file system (for load and save of screens) that
    # would be unsafe to expose to untrusted users.
    #
    RPCManager.enabledBuiltinMethods: getPdfObject, xmlToJS, uploadProgressCheck, exportClientData, downloadClientExport, setAttributes, getLogNames, getLogThresholds, setLogThreshold
    
    #===============================================================================
    # JPA subsystem
    #===============================================================================
    # According to JPA specifications only simple class name can be used in queries.
    # Some providers follows these specs strictly (for example EclipseLink).
    # Some providers allows using fully-qualified class name usage (for example Hibernate, Datanucleus).
    # Setting defaluts to false - simple class name usage.
    # To resolve class name collisions this setting can be set to true
    # (should be used with provider supporting fully-qualified class name usage).
    #jpa.useQualifiedClassName: true
    
    # Default EMF provider implementation (implements EMFProviderInterface).
    # Fully qualified class name.
    # Existing implementations:
    # com.isomorphic.jpa.EMFProviderLMT - for Locally Managed Transactions (LMT)
    # com.isomorphic.jpa.EMFProviderNoTransactions - no transactions support
    # com.isomorphic.jpa.EMFProviderBMT - for Bean Managed Transactions (BMT)
    # com.isomorphic.jpa.EMFProviderCMT - for Container Managed Transactions (CMT)
    # com.isomorphic.jpa.EMFProviderSpring - for Spring Framework Managed Transactions (CMT)
    jpa.emfProvider: com.isomorphic.jpa.EMFProviderLMT
    
    # Settings for LMT type
    # Name of the datasource
    jpa.persistenceUnitName: ds
    
    # Resource references for BMT type
    # EntityManager resource reference name declared in /WEB-INF/web.xml.
    # Example declaration:
    # <persistence-context-ref>
    #     <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
    #     <persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
    # </persistence-context-ref>
    # EntityManagerFactory resource reference name declared in /WEB-INF/web.xml.
    # Example declaration:
    # <persistence-unit-ref>
    #     <persistence-unit-ref-name>persistence/emf</persistence-unit-ref-name>
    #     <persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
    # </persistence-unit-ref>
    #jpa.entityManager: persistence/em
    #jpa.entityManagerFactory: persistence/emf
    
    # Resource references for CMT type
    # EntityManager and EntityManagerFactory resource references names declared in /META-INF/ejb-jar.xml.
    # Example declaration:
    # <?xml version="1.0" encoding="UTF-8"?>
    # <ejb-jar
    #      version = "3.0"
    #      xmlns = "http://java.sun.com/xml/ns/javaee"
    #      xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    #      xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    #      <enterprise-beans>
    #          <session>
    #              <ejb-name>TestEJB</ejb-name>
    #              <persistence-context-ref>
    #                  <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
    #                  <persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
    #              </persistence-context-ref>
    #              <persistence-unit-ref>
    #                  <persistence-unit-ref-name>persistence/emf</persistence-unit-ref-name>
    #                  <persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
    #              </persistence-unit-ref>
    #         </session>
    #     </enterprise-beans>
    # </ejb-jar>
    #jpa.entityManager: persistence/em
    #jpa.entityManagerFactory: persistence/emf
    
    # Resource references for Spring type
    # EntityManagerFactory and transaction manager beans declared in Spring Application Context.
    # Example declaration:
    # <!-- SpringApplicationContextProvider bean definition required to get access to application context. -->
    # <bean id="springApplicationContextProvider" class="com.isomorphic.spring.SpringApplicationContextProvider" />
    #
    # <!-- Connection to data base -->
    # <bean id="dataSource"
    #       class="org.springframework.jdbc.datasource.DriverManagerDataSource"
    #       p:driverClassName="DRIVER_CLASS"
    #       p:url="CONNECTION_URL"
    #       p:username="DB_USER_NAME"
    #       p:password="DB_USER_PASSWORD" />
    #
    # <!-- Reference to JPA EntityManagerFactory -->
    # <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    #     <property name="dataSource" ref="dataSource" />
    #     <property name="jpaVendorAdapter">
    #         <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
    #             <property name="database" value="DB_TYPE" />
    #         </bean>
    #     </property>
    #     <property name="persistenceUnitName" value="PERSISTENCE_UNIT_NAME" />
    # </bean>
    #
    # <!-- Reference to JpaTransactionManager -->
    # <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    #     <property name="entityManagerFactory" ref="entityManagerFactory" />
    # </bean>
    #jpa.entityManagerFactory: entityManagerFactory
    #jpa.transaction: transactionManager
    
    
    # Note: modulesDir is only used with the loadISC and loadModules JSP tags; if
    # you intend to use those tags, do not change this setting
    modulesDir: modules/
    sql.SQLServer.driver.networkProtocol: tcp
    sql.SQLServer.driver.url: jdbc:sqlserver://XX.XXX.X.XX:1433;databaseName=CIM;User=K1STSQSVC;Password=9uaJmsGz;
    sql.SQLServer.driver.serverName: 
    sql.SQLServer.interface.credentialsInURL: true
    sql.SQLServer.driver.context: 
    sql.SQLServer.interface.type: driverManager
    sql.SQLServer.autoJoinTransactions: true
    sql.SQLServer.driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    sql.SQLServer.database.type: sqlserver
    sql.defaultDatabase: SQLServer
    RPCManager.enabledBuiltinMethods: *
    sql.SQLServer.driver.portNumber: 1433
    sql.SQLServer.driver.driverName: sqlserver
    AmkorCIMUser.ds.xml
    Code:
    <!-- Auto-generated from database table AmkorCIMUser -->
    
    <DataSource 
    	schema="dbo"
    	dbName="SQLServer"
    	tableName="AmkorCIMUser"
    	ID="AmkorCIMUser"
    	dataSourceVersion="1"
    	generatedBy="v8.3p_2013-04-04/Enterprise Deployment 2013-04-04"
    	serverType="sqlserver"
    >
    	<fields>
    		<field sqlType="char" sqlLength="10" name="FactoryID" length="10" type="text"></field>
    		<field sqlType="varchar" primaryKey="true" sqlLength="50" name="UserID" length="50" type="text"></field>
    		<field sqlType="bit" sqlLength="1" name="IsActive" type="integer"></field>
    		<field sqlType="bit" sqlLength="1" name="ATK_eCIM" type="integer"></field>
    		<field sqlType="varchar" sqlLength="50" name="ATK_eCIM_Plant" length="50" type="text"></field>
    		<field sqlType="bit" sqlLength="1" name="ATP_eCIM" type="integer"></field>
    		<field sqlType="varchar" sqlLength="50" name="ATP_eCIM_Plant" length="50" type="text"></field>
    		<field sqlType="bit" sqlLength="1" name="ATC_eCIM" type="integer"></field>
    		<field sqlType="varchar" sqlLength="50" name="ATC_eCIM_Plant" length="50" type="text"></field>
    		<field sqlType="bit" sqlLength="1" name="ATT_eCIM" type="integer"></field>
    		<field sqlType="varchar" sqlLength="50" name="ATT_eCIM_Plant" length="50" type="text"></field>
    		<field sqlType="longvarchar" sqlLength="2147483647" name="eCIM_Report_Menu" length="2147483647" type="text"></field>
    		<field sqlType="bit" sqlLength="1" name="IsCIMitarUser" type="integer"></field>
    		<field sqlType="timestamp" sqlLength="23" name="CreatedTimestamp" type="datetime"></field>
    		<field sqlType="timestamp" sqlLength="23" name="ModifiedTimestamp" type="datetime"></field>
    		<field sqlType="timestamp" sqlLength="23" name="LastLogInTimestamp" type="datetime"></field>
    		<field sqlType="varchar" sqlLength="50" name="UserEMail" length="50" type="text"></field>
    	</fields>
    
    </DataSource>
    Attached Files

    #2
    Looks like you hand-edited the output to say serverType="sqlserver", which is incorrect - the correct value is just "sql". See the documentation for DataSource.serverType for details.

    Comment


      #3
      Hi, Isomorphic,

      Thanks for the reply. It's working well after changed the servertype.
      The reason why I chaged servertype in DataSource is that I noticed below in server.properties.

      sql.SQLServer.database.type: sqlserver

      Comment


        #4
        See the Admin Console overview to understand this (totally unrelated) setting.

        Comment

        Working...
        X