Announcement

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

    Using Multiple Hibernate Configurations

    I'm running into an issue when my data sources load. It looks like SmartGWT is using the wrong Spring bean to try and find the hibernate SessionFactory.

    Here are my 2 data sources:

    Code:
    <DataSource ID="FireRating"
        serverType="hibernate"
        autoDeriveSchema="true"
        schemaBean="com.assaabloy.aaos.shared.entities.aaos.FireRating"
        configBean="aaosSessionFactory">
    </DataSource>
    Code:
    <DataSource ID="AAOSDoorSubType" 
        serverType="hibernate"
        autoDeriveSchema="true"
        schemaBean="com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType"
        configBean="adsSessionFactory">
    </DataSource>
    In the log, both data sources are being loaded from the "aaosSessionFactory" even though the config bean in the second data source specifies a different bean. Here's the log output:

    Code:
    Running CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.8, -bindAddress, 127.0.0.1, -launcherDir, E:\workspace\AAOS_Server\build\web, -logLevel, INFO, -style, DETAILED, com.assaabloy.aaos.gwt.admin.admin]
    Super Dev Mode starting up
       workDir: C:\Users\ausder\AppData\Local\Temp\gwt-codeserver-3615738720949860423.tmp
    12:59:00.223 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @2472ms
       Loading Java files in com.assaabloy.aaos.gwt.admin.admin.
       Module setup completed in 21082 ms
    12:59:19.875 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.2.z-SNAPSHOT
    12:59:19.893 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@116a0d9d{/,null,AVAILABLE}
    12:59:19.907 [main] INFO  org.eclipse.jetty.server.ServerConnector - Started ServerConnector@5ebfe3b3{HTTP/1.1}{127.0.0.1:9876}
    12:59:19.907 [main] INFO  org.eclipse.jetty.server.Server - Started @22164ms
    
    The code server is ready at http://127.0.0.1:9876/
    Code server started in 21.62 s ms
    12:59:19.997 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.2.z-SNAPSHOT
    12:59:23.639 [main] INFO  / - Warning: No org.apache.tomcat.JarScanner set in ServletContext. Falling back to default JarScanner implementation.
    12:59:23.737 [main] INFO  / - No Spring WebApplicationInitializer types detected on classpath
    ISC: Configuring log4j from: file:/E:/workspace/AAOS_Server/build/web/WEB-INF/classes/log4j.isc.config.xml
    === 2017-02-24 12:59:23,864 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
    === 2017-02-24 12:59:23,872 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
    === 2017-02-24 12:59:23,918 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/E:/workspace/AAOS_Server/build/web/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
    === 2017-02-24 12:59:23,919 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
    === 2017-02-24 12:59:23,920 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
    === 2017-02-24 12:59:23,923 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/E:/workspace/AAOS_Server/build/web/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
    === 2017-02-24 12:59:23,924 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
    === 2017-02-24 12:59:23,925 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/E:/workspace/AAOS_Server/build/web/WEB-INF/classes/server.properties
    === 2017-02-24 12:59:23,931 [main] INFO  Logger - Logging system started.
    === 2017-02-24 12:59:23,957 [main] INFO  ISCInit - Auto-detected webRoot - using: E:\workspace\AAOS_Server\build\web
    === 2017-02-24 12:59:23,958 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (v11.0p_2017-02-17/Pro Deployment 2017-02-17) - Initialization Complete
    12:59:30.809 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler - Started c.g.g.d.s.j.WebAppContextWithReload@3dda5a2d{/,file:/E:/workspace/AAOS_Server/build/web/,AVAILABLE}{E:\workspace\AAOS_Server\build\web}
    12:59:30.812 [main] INFO  org.eclipse.jetty.server.ServerConnector - Started ServerConnector@6fe4c2d6{HTTP/1.1}{127.0.0.1:8888}
    12:59:30.813 [main] INFO  org.eclipse.jetty.server.Server - Started @33070ms
    === 2017-02-24 12:59:34,803 [4-48] INFO  RequestContext - URL: '/admin/sc/skins/Enterprise/load_skin.js', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
    === 2017-02-24 12:59:34,803 [4-50] INFO  RequestContext - URL: '/admin/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
    === 2017-02-24 12:59:34,818 [4-48] INFO  Download - done streaming: E:/workspace/AAOS_Server/build/web/admin/sc/skins/Enterprise/load_skin.js
    === 2017-02-24 12:59:34,894 [4-50] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\admin\sc\system\schema\builtinTypes.xml: 7ms
    === 2017-02-24 12:59:34,932 [4-50] INFO  PoolManager - SmartClient pooling started for 'simpleTypes' objects
    === 2017-02-24 12:59:35,025 [4-50] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\FireRating.ds.xml: 3ms
    === 2017-02-24 12:59:35,036 [4-50] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\admin\sc\system\schema\DataSource.ds.xml: 10ms
    === 2017-02-24 12:59:35,132 [4-50] DEBUG HibernateDataSource - Looking up session factory with lookup style 'spring'
    === 2017-02-24 12:59:35,133 [4-50] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
    === 2017-02-24 12:59:35,137 [4-50] DEBUG HibernateDSGenerator - Generating data source 'FireRating' for entity com.assaabloy.aaos.shared.entities.aaos.FireRating
    === 2017-02-24 12:59:35,140 [4-50] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.FireRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.FireRating, entityName=com.assaabloy.aaos.shared.entities.aaos.FireRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=FireRating, dropExtraFields=true, generatedBy=v11.0p_2017-02-17/Pro Deployment 2017-02-17, fields=[{canEdit=true, name=fireRatingPK_locale, length=20, valueXPath=fireRatingPK/locale, type=text, required=true, primaryKey=true}, {canEdit=true, name=fireRatingPK_productName, length=100, valueXPath=fireRatingPK/productName, type=text, required=true, primaryKey=true}, {canEdit=true, name=alternatePicture, length=100, type=text, required=false}, {canEdit=true, name=briefDesc, length=500, type=text, required=false}, {canEdit=true, name=fullDesc, length=100, type=text, required=false}, {canEdit=true, name=hide, length=255, type=boolean, required=false}, {canEdit=true, name=image, length=255, type=any, required=false}, {canEdit=true, name=keyWords, length=2147483647, type=text, required=false}, {canEdit=true, name=sortOrder, length=255, type=integer, required=true}]}
    === 2017-02-24 12:59:35,140 [4-50] DEBUG HibernateDSGenerator - Generating data source 'FireRating' for entity com.assaabloy.aaos.shared.entities.aaos.FireRating
    === 2017-02-24 12:59:35,140 [4-50] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.FireRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.FireRating, entityName=com.assaabloy.aaos.shared.entities.aaos.FireRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=FireRating, dropExtraFields=true, generatedBy=v11.0p_2017-02-17/Pro Deployment 2017-02-17, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=fireRatingPK_locale, length=20, extIsUnique=false, valueXPath=fireRatingPK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fireRatingPK_productName, length=100, extIsUnique=false, valueXPath=fireRatingPK/productName, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=alternatePicture, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=briefDesc, length=500, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fullDesc, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=hide, length=255, extIsUnique=false, type=boolean, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=image, length=255, extIsUnique=false, type=any, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=keyWords, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}]}
    === 2017-02-24 12:59:35,141 [4-50] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'FireRating' via Spring bean 'aaosSessionFactory'.
    === 2017-02-24 12:59:35,141 [4-50] DEBUG HibernateDSGenerator - Generating data source 'FireRating' for entity com.assaabloy.aaos.shared.entities.aaos.FireRating
    === 2017-02-24 12:59:35,141 [4-50] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.FireRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.FireRating, entityName=com.assaabloy.aaos.shared.entities.aaos.FireRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=FireRating, dropExtraFields=true, generatedBy=v11.0p_2017-02-17/Pro Deployment 2017-02-17, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=fireRatingPK_locale, length=20, extIsUnique=false, valueXPath=fireRatingPK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fireRatingPK_productName, length=100, extIsUnique=false, valueXPath=fireRatingPK/productName, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=alternatePicture, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=briefDesc, length=500, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fullDesc, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=hide, length=255, extIsUnique=false, type=boolean, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=image, length=255, extIsUnique=false, type=any, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=keyWords, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}]}
    === 2017-02-24 12:59:35,141 [4-50] DEBUG DataSourceLoader - For DataSource 'FireRating', got instanceId 5
    === 2017-02-24 12:59:35,141 [4-50] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
    === 2017-02-24 12:59:35,154 [4-50] WARN  JSTranslater - disableStringInBrowser = false
    === 2017-02-24 12:59:35,158 [4-50] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\AAOSDoorSubType.ds.xml: 3ms
    === 2017-02-24 12:59:35,160 [4-50] WARN  HibernateDataSource - Declared schemaBean 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType' was not found among existing Hibernate mappings. Falling back to examining the POJO.
    === 2017-02-24 12:59:35,165 [4-50] WARN  BasicDataSource - Can not load related data source '[B' for field 'image'. Treating as simple field.
    === 2017-02-24 12:59:35,166 [4-50] WARN  BasicDataSource - Can not load related data source 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK' for field 'AAOSDoorSubTypePK'. Treating as simple field.
    === 2017-02-24 12:59:35,564 [4-52] INFO  RequestContext - URL: '/admin/sc/skins/Enterprise/skin_styles.css', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
    === 2017-02-24 12:59:35,568 [4-52] INFO  Download - done streaming: E:/workspace/AAOS_Server/build/web/admin/sc/skins/Enterprise/skin_styles.css
    === 2017-02-24 12:59:36,158 [4-50] DEBUG HibernateDSGenerator - Generating data source 'AAOSDoorSubType' for entity com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
    === 2017-02-24 12:59:36,158 [4-50] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK, beanClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, entityName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AAOSDoorSubType, dropExtraFields=true, generatedBy=v11.0p_2017-02-17/Pro Deployment 2017-02-17, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_locale, length=20, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_productName, length=100, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/productName, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=alternatePicture, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=briefDesc, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=ceco, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=curries, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=cutoutLocation, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fullDesc, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=graham, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=hide, length=255, extIsUnique=false, type=boolean, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=image, length=255, extIsUnique=false, type=any, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=keyWords, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=link, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=maiman, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=manufacturer, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=profile, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=submittal, length=300, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visTranslate, length=20, extIsUnique=false, type=text, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visibleGlass, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=webPage, length=400, extIsUnique=false, type=text, extScale=2, required=false}]}
    === 2017-02-24 12:59:36,158 [4-50] WARN  BasicDataSource - Can not load related data source '[B' for field 'image'. Treating as simple field.
    === 2017-02-24 12:59:36,159 [4-50] WARN  BasicDataSource - Can not load related data source 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK' for field 'AAOSDoorSubTypePK'. Treating as simple field.
    === 2017-02-24 12:59:36,159 [4-50] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AAOSDoorSubType' via Spring bean 'adsSessionFactory'.
    === 2017-02-24 12:59:36,159 [4-50] INFO  ServerObject - DMI on Spring bean: &adsSessionFactory
    === 2017-02-24 12:59:36,159 [4-50] DEBUG HibernateDSGenerator - Generating data source 'AAOSDoorSubType' for entity com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
    === 2017-02-24 12:59:36,159 [4-50] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK, beanClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, entityName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AAOSDoorSubType, dropExtraFields=true, generatedBy=v11.0p_2017-02-17/Pro Deployment 2017-02-17, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_locale, length=20, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_productName, length=100, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/productName, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=alternatePicture, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=briefDesc, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=ceco, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=curries, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=cutoutLocation, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fullDesc, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=graham, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=hide, length=255, extIsUnique=false, type=boolean, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=image, length=255, extIsUnique=false, type=any, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=keyWords, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=link, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=maiman, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=manufacturer, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=profile, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=submittal, length=300, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visTranslate, length=20, extIsUnique=false, type=text, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visibleGlass, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=webPage, length=400, extIsUnique=false, type=text, extScale=2, required=false}]}
    === 2017-02-24 12:59:36,160 [4-50] DEBUG DataSourceLoader - For DataSource 'AAOSDoorSubType', got instanceId 8
    === 2017-02-24 12:59:36,162 [4-50] INFO  Compression - /admin/sc/DataSourceLoader: 2917 -> 783 bytes
    GET /recompile/admin
       Job com.assaabloy.aaos.gwt.admin.admin_1_0
          starting job: com.assaabloy.aaos.gwt.admin.admin_1_0
          binding: user.agent=safari
          Compiling module com.assaabloy.aaos.gwt.admin.admin
             Unification traversed 598 fields and methods and 179 types. 0 are considered part of the current module and 5 had all of their fields and methods traversed.
             Compiling 1 permutation
                Compiling permutation 0...
                Linking per-type JS with 0 new/changed types.
                Source Maps Enabled
             Compile of permutations succeeded
             Compilation succeeded -- 2.911s
          Linking into C:\Users\ausder\AppData\Local\Temp\gwt-codeserver-3615738720949860423.tmp\com.assaabloy.aaos.gwt.admin.admin\compile-2\war\admin; Writing extras to C:\Users\ausder\AppData\Local\Temp\gwt-codeserver-3615738720949860423.tmp\com.assaabloy.aaos.gwt.admin.admin\compile-2\extras\admin
             Link succeeded
             Linking succeeded -- 13.827s
          24.862s total -- Compile completed
    When the "AAOSDoorSubType" data source loads it's looking at the wrong session factory bean. The specific error is :
    Code:
    === 2017-02-24 12:59:35,160 [4-50] WARN  HibernateDataSource - Declared schemaBean 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType' was not found among existing Hibernate mappings. Falling back to examining the POJO.
    In my server.xml I've specified both beans. It seems that the server won't come up at all if at least one of these isn't in there:
    Code:
    hibernate.config.lookupStyle: spring
    hibernate.config.bean: adsSessionFactory
    hibernate.config.bean: aaosSessionFactory
    Swapping the order of the hibernate.config.bean's in the server.xml changes which data source fails to load properly. Why is that data source loader not looking at the configBean defined in the data source file?

    #2
    Hello,

    Try to change your data source definitions to following:

    Code:
    <DataSource ID="FireRating"
        serverType="hibernate"
        beanClassName="com.assaabloy.aaos.shared.entities.aaos.FireRating"
        configBean="aaosSessionFactory">
    </DataSource>
    Code:
    <DataSource ID="AAOSDoorSubType"
        serverType="hibernate"
        beanClassName="com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType"
        configBean="adsSessionFactory">
    </DataSource>
    Currently we do not support multiple session factories with autoDeriveSchema - as I've understood: you do not need it.

    There are plans to implement it in the future.

    Regards,
    Alius

    Comment


      #3
      Hello again,

      Just committed changes (pick it with next nightly build 6.1d).

      Now auto-derive functionality use 'configBean' specified in data source definition.
      If fails then uses bean specified in server.xml 'hibernate.config.bean' (single entry).

      Regards,
      Alius
      Last edited by alius; 28 Feb 2017, 21:03.

      Comment


        #4
        Awesome, thank you. Just curious, did this make it in the 2-28-2017 nightly? Or will it be in the 3-1-2017 build? I'm not seeing a difference in 2-28-2017.

        Comment


          #5
          Doesn't work. I am seeing different output in the log, but still getting the DataSource loaded as a pojo instead of a Hibernate entity.

          Here's the relevant log output:
          Code:
          Running CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.8, -bindAddress, 127.0.0.1, -launcherDir, E:\workspace\AAOS_Server\build\web, -logLevel, INFO, -style, DETAILED, com.assaabloy.aaos.gwt.admin.admin]
          Super Dev Mode starting up
             workDir: C:\Users\ausder\AppData\Local\Temp\gwt-codeserver-4952601101249202832.tmp
          10:50:48.112 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @2357ms
             Loading Java files in com.assaabloy.aaos.gwt.admin.admin.
             Module setup completed in 22280 ms
          10:51:09.033 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.2.z-SNAPSHOT
          10:51:09.050 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@3b303e44{/,null,AVAILABLE}
          10:51:09.062 [main] INFO  org.eclipse.jetty.server.ServerConnector - Started ServerConnector@1aa1056e{HTTP/1.1}{127.0.0.1:9876}
          10:51:09.063 [main] INFO  org.eclipse.jetty.server.Server - Started @23314ms
          
          The code server is ready at http://127.0.0.1:9876/
          Code server started in 22.79 s ms
          10:51:09.154 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.2.z-SNAPSHOT
          [WARN] Server class 'org.apache.logging.log4j.web.Log4jServletContainerInitializer' could not be found in the web app, but was found on the system classpath
             [WARN] Adding classpath entry 'file:/E:/workspace/AAOS_Server/web/WEB-INF/lib/log4j-web-2.5.jar' to the web app classpath for this session
             For additional info see: file:/C:/Programs/gwt-2.8.0/doc/helpInfo/webAppClassPath.html
          [WARN] Server class 'org.springframework.web.SpringServletContainerInitializer' could not be found in the web app, but was found on the system classpath
             [WARN] Adding classpath entry 'file:/E:/workspace/AAOS_Server/web/WEB-INF/lib/spring-web-4.3.6.RELEASE.jar' to the web app classpath for this session
             For additional info see: file:/C:/Programs/gwt-2.8.0/doc/helpInfo/webAppClassPath.html
          [WARN] Server class 'jdk.nashorn.api.scripting.NashornScriptEngineFactory' could not be found in the web app, but was found on the system classpath
             [WARN] Adding classpath entry 'file:/C:/Program%20Files/Java/jdk1.8.0_121/jre/lib/ext/nashorn.jar' to the web app classpath for this session
             For additional info see: file:/C:/Programs/gwt-2.8.0/doc/helpInfo/webAppClassPath.html
          10:51:12.216 [main] INFO  / - No Spring WebApplicationInitializer types detected on classpath
          10:51:12.258 [main] INFO  / - Warning: No org.apache.tomcat.JarScanner set in ServletContext. Falling back to default JarScanner implementation.
          ISC: Configuring log4j from: file:/E:/workspace/AAOS_Server/build/web/WEB-INF/classes/log4j.isc.config.xml
          log4j:WARN No such property [encoding] in com.isomorphic.log.RevolvingMemoryAppender.
          === 2017-03-01 10:51:12,459 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
          === 2017-03-01 10:51:12,465 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
          === 2017-03-01 10:51:12,587 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/E:/workspace/AAOS_Server/build/web/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
          === 2017-03-01 10:51:12,588 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
          === 2017-03-01 10:51:12,588 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
          === 2017-03-01 10:51:12,590 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/E:/workspace/AAOS_Server/build/web/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
          === 2017-03-01 10:51:12,590 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
          === 2017-03-01 10:51:12,599 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/E:/workspace/AAOS_Server/build/web/WEB-INF/classes/server.properties
          === 2017-03-01 10:51:12,601 [main] INFO  Logger - Logging system started.
          === 2017-03-01 10:51:12,604 [main] INFO  ISCInit - Auto-detected webRoot - using: E:\workspace\AAOS_Server\build\web
          === 2017-03-01 10:51:12,604 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28) - Initialization Complete
          10:51:12.616 [main] INFO  / - Initializing Spring root WebApplicationContext
          log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
          log4j:WARN Please initialize the log4j system properly.
          log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
          SLF4J: Class path contains multiple SLF4J bindings.
          SLF4J: Found binding in [jar:file:/E:/workspace/AAOS_Server/build/web/WEB-INF/lib/log4j-slf4j-impl-2.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
          SLF4J: Found binding in [jar:file:/E:/workspace/AAOS_Server/web/WEB-INF/lib/log4j-slf4j-impl-2.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
          SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
          SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
          [WARN] Server class 'com.assaabloy.aaos.shared.rpc.RPCInterface' could not be found in the web app, but was found on the system classpath
             [WARN] Adding classpath entry 'file:/E:/workspace/AAOS_Shared/build/classes/' to the web app classpath for this session
             For additional info see: file:/C:/Programs/gwt-2.8.0/doc/helpInfo/webAppClassPath.html
          10:51:13.128 [main] INFO  com.assaabloy.aaos.server.Globals - Database Host: localhost
          10:51:13.128 [main] INFO  com.assaabloy.aaos.server.Globals - AAOS DB: AAOS
          10:51:13.128 [main] INFO  com.assaabloy.aaos.server.Globals - ADS DB: ADS
          10:51:13.128 [main] INFO  com.assaabloy.aaos.server.Globals - ADS DB: ADSArchive
          10:51:13.199 [main] INFO  com.zaxxer.hikari.HikariDataSource - AAOS_POOL - Started.
          10:51:14.271 [main] INFO  com.zaxxer.hikari.pool.PoolBase - AAOS_POOL - Driver does not support get/set network timeout for connections. (This operation is not supported.)
          10:51:14.309 [main] INFO  com.zaxxer.hikari.HikariDataSource - ADS_POOL - Started.
          10:51:14.319 [main] INFO  com.zaxxer.hikari.pool.PoolBase - ADS_POOL - Driver does not support get/set network timeout for connections. (This operation is not supported.)
          [WARN] Server class 'com.google.gwt.user.client.rpc.RemoteService' could not be found in the web app, but was found on the system classpath
             [WARN] Adding classpath entry 'file:/C:/Programs/gwt-2.8.0/gwt-user.jar' to the web app classpath for this session
             For additional info see: file:/C:/Programs/gwt-2.8.0/doc/helpInfo/webAppClassPath.html
          10:51:17.419 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler - Started c.g.g.d.s.j.WebAppContextWithReload@41c0215f{/,file:/E:/workspace/AAOS_Server/build/web/,AVAILABLE}{E:\workspace\AAOS_Server\build\web}
          10:51:17.428 [main] INFO  org.eclipse.jetty.server.ServerConnector - Started ServerConnector@62b1abb9{HTTP/1.1}{127.0.0.1:8888}
          10:51:17.428 [main] INFO  org.eclipse.jetty.server.Server - Started @31679ms
          Linking modules
             Bootstrap link for command-line module 'com.assaabloy.aaos.gwt.admin.admin'
                Linking module 'admin'
                   Invoking Linker Cross-Site-Iframe
                      Ignoring the following script tags in the gwt.xml file
          sc/skins/Enterprise/load_skin.js
          
             Invoking Linker SmartGwtScriptInjector
                Creating loadScriptTagFiles.js to manually load the following script tags:
          sc/skins/Enterprise/load_skin.js
          === 2017-03-01 10:51:23,432 [9-48] INFO  RequestContext - URL: '/admin/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
          === 2017-03-01 10:51:23,432 [9-53] INFO  RequestContext - URL: '/admin/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
          === 2017-03-01 10:51:23,432 [9-56] INFO  RequestContext - URL: '/admin/sc/skins/Enterprise/load_skin.js', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
          === 2017-03-01 10:51:23,447 [9-56] INFO  Download - done streaming: E:/workspace/AAOS_Server/build/web/admin/sc/skins/Enterprise/load_skin.js
          === 2017-03-01 10:51:23,499 [9-48] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\admin\sc\system\schema\builtinTypes.xml: 4ms
          === 2017-03-01 10:51:23,519 [9-48] INFO  PoolManager - SmartClient pooling started for 'simpleTypes' objects
          === 2017-03-01 10:51:23,595 [9-48] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\AcousticRating.ds.xml: 3ms
          === 2017-03-01 10:51:23,600 [9-48] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\admin\sc\system\schema\DataSource.ds.xml: 4ms
          === 2017-03-01 10:51:23,707 [9-48] DEBUG HibernateDataSource - Looking up session factory with lookup style 'spring'
          === 2017-03-01 10:51:23,708 [9-48] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
          === 2017-03-01 10:51:23,712 [9-48] DEBUG HibernateDSGenerator - Generating data source 'AcousticRating' for entity com.assaabloy.aaos.shared.entities.aaos.AcousticRating
          === 2017-03-01 10:51:23,714 [9-48] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, entityName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AcousticRating, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28, fields=[{canEdit=true, name=acousticRatingPK_locale, length=20, valueXPath=acousticRatingPK/locale, type=text, required=true, primaryKey=true}, {canEdit=true, name=acousticRatingPK_rating, length=50, valueXPath=acousticRatingPK/rating, type=text, required=true, primaryKey=true}, {canEdit=true, name=sortOrder, length=255, type=integer, required=true}]}
          === 2017-03-01 10:51:23,714 [9-48] DEBUG HibernateDSGenerator - Generating data source 'AcousticRating' for entity com.assaabloy.aaos.shared.entities.aaos.AcousticRating
          === 2017-03-01 10:51:23,715 [9-48] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, entityName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AcousticRating, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_locale, length=20, extIsUnique=false, valueXPath=acousticRatingPK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_rating, length=50, extIsUnique=false, valueXPath=acousticRatingPK/rating, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}]}
          === 2017-03-01 10:51:23,715 [9-48] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AcousticRating' via Spring bean 'aaosSessionFactory'.
          === 2017-03-01 10:51:23,715 [9-48] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
          === 2017-03-01 10:51:23,715 [9-48] DEBUG HibernateDSGenerator - Generating data source 'AcousticRating' for entity com.assaabloy.aaos.shared.entities.aaos.AcousticRating
          === 2017-03-01 10:51:23,715 [9-48] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, entityName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AcousticRating, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_locale, length=20, extIsUnique=false, valueXPath=acousticRatingPK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_rating, length=50, extIsUnique=false, valueXPath=acousticRatingPK/rating, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}]}
          === 2017-03-01 10:51:23,716 [9-48] DEBUG DataSourceLoader - For DataSource 'AcousticRating', got instanceId 5
          === 2017-03-01 10:51:23,720 [9-53] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\AAOSDoorSubType.ds.xml: 3ms
          === 2017-03-01 10:51:23,727 [9-53] WARN  HibernateDataSource - Declared schemaBean 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType' was not found among existing Hibernate mappings. Falling back to examining the POJO.
          === 2017-03-01 10:51:23,734 [9-48] DEBUG JSTranslater - disableStringInBrowser = false
          === 2017-03-01 10:51:23,735 [9-53] WARN  BasicDataSource - Can not load related data source '[B' for field 'image'. Treating as simple field.
          === 2017-03-01 10:51:23,735 [9-53] WARN  BasicDataSource - Can not load related data source 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK' for field 'AAOSDoorSubTypePK'. Treating as simple field.
          === 2017-03-01 10:51:24,080 [9-46] INFO  RequestContext - URL: '/admin/sc/skins/Enterprise/skin_styles.css', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36': Safari with Accept-Encoding header
          === 2017-03-01 10:51:24,083 [9-46] INFO  Download - done streaming: E:/workspace/AAOS_Server/build/web/admin/sc/skins/Enterprise/skin_styles.css
          === 2017-03-01 10:51:24,638 [9-53] DEBUG HibernateDSGenerator - Generating data source 'AAOSDoorSubType' for entity com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
          === 2017-03-01 10:51:24,638 [9-53] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK, beanClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, entityName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AAOSDoorSubType, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_locale, length=20, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_productName, length=100, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/productName, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=alternatePicture, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=briefDesc, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=ceco, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=curries, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=cutoutLocation, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fullDesc, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=graham, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=hide, length=255, extIsUnique=false, type=boolean, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=image, length=255, extIsUnique=false, type=any, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=keyWords, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=link, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=maiman, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=manufacturer, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=profile, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=submittal, length=300, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visTranslate, length=20, extIsUnique=false, type=text, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visibleGlass, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=webPage, length=400, extIsUnique=false, type=text, extScale=2, required=false}]}
          === 2017-03-01 10:51:24,641 [9-53] WARN  BasicDataSource - Can not load related data source '[B' for field 'image'. Treating as simple field.
          === 2017-03-01 10:51:24,642 [9-53] WARN  BasicDataSource - Can not load related data source 'com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK' for field 'AAOSDoorSubTypePK'. Treating as simple field.
          === 2017-03-01 10:51:24,642 [9-53] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AAOSDoorSubType' via Spring bean 'adsSessionFactory'.
          === 2017-03-01 10:51:24,642 [9-53] INFO  ServerObject - DMI on Spring bean: &adsSessionFactory
          === 2017-03-01 10:51:24,643 [9-53] DEBUG HibernateDSGenerator - Generating data source 'AAOSDoorSubType' for entity com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
          === 2017-03-01 10:51:24,644 [9-53] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK, beanClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, entityName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AAOSDoorSubType, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_locale, length=20, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=aAOSDoorSubTypePK_productName, length=100, extIsUnique=false, valueXPath=aAOSDoorSubTypePK/productName, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=alternatePicture, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=briefDesc, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=ceco, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=curries, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=cutoutLocation, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=fullDesc, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=graham, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=hide, length=255, extIsUnique=false, type=boolean, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=image, length=255, extIsUnique=false, type=any, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=keyWords, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=link, length=400, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=maiman, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=manufacturer, length=100, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=profile, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=submittal, length=300, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visTranslate, length=20, extIsUnique=false, type=text, extScale=2, required=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=visibleGlass, length=2147483647, extIsUnique=false, type=text, extScale=2, required=false}, {extPrecision=19, extIsLazy=false, canEdit=true, name=webPage, length=400, extIsUnique=false, type=text, extScale=2, required=false}]}
          === 2017-03-01 10:51:24,644 [9-53] DEBUG DataSourceLoader - For DataSource 'AAOSDoorSubType', got instanceId 8
          I can provide the entire log file if necessary, but it's just a repeat of different data sources with the same issue.

          Comment


            #6
            Hi,

            Can you test it with build from 2017-03-01 ?
            Your code shows that you are still using build 2017-02-28:
            Code:
            generatedBy=SNAPSHOT_v11.1d_2017-02-28/Pro Deployment 2017-02-28
            Alius
            Last edited by alius; 1 Mar 2017, 14:30.

            Comment


              #7
              Doesn't work yet. Looks like it's reading from the correct Spring Bean, but now it's throwing a null pointer exception.

              Code:
              === 2017-03-02 11:12:55,035 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (SNAPSHOT_v11.1d_2017-03-02/PowerEdition Deployment 2017-03-02) - Initialization Complete
              === 2017-03-02 11:13:47,992 [7-47] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\AAOSDoorSubType.ds.xml: 5ms
              === 2017-03-02 11:13:47,994 [7-47] DEBUG HibernateDSGenerator - Obtaining local Hibernate config for DataSource 'AAOSDoorSubType' via Spring bean 'adsSessionFactory'.
              === 2017-03-02 11:13:47,994 [7-47] INFO  ServerObject - DMI on Spring bean: &adsSessionFactory
              === 2017-03-02 11:13:47,995 [7-47] DEBUG HibernateDSGenerator - Generating data source 'AAOSDoorSubType' for entity com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
              === 2017-03-02 11:13:47,995 [7-47] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK, beanClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, entityName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AAOSDoorSubType, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-03-02/PowerEdition Deployment 2017-03-02, fields=[{canEdit=true, name=aAOSDoorSubTypePK_locale, length=20, valueXPath=aAOSDoorSubTypePK/locale, type=text, required=true, primaryKey=true}, {canEdit=true, name=aAOSDoorSubTypePK_productName, length=100, valueXPath=aAOSDoorSubTypePK/productName, type=text, required=true, primaryKey=true}, {canEdit=true, name=alternatePicture, length=100, type=text, required=false}, {canEdit=true, name=briefDesc, length=400, type=text, required=false}, {canEdit=true, name=ceco, length=2147483647, type=text, required=false}, {canEdit=true, name=curries, length=2147483647, type=text, required=false}, {canEdit=true, name=cutoutLocation, length=100, type=text, required=false}, {canEdit=true, name=fullDesc, length=2147483647, type=text, required=false}, {canEdit=true, name=graham, length=2147483647, type=text, required=false}, {canEdit=true, name=hide, length=255, type=boolean, required=false}, {canEdit=true, name=image, length=255, type=any, required=false}, {canEdit=true, name=keyWords, length=2147483647, type=text, required=false}, {canEdit=true, name=link, length=400, type=text, required=false}, {canEdit=true, name=maiman, length=2147483647, type=text, required=false}, {canEdit=true, name=manufacturer, length=100, type=text, required=false}, {canEdit=true, name=profile, length=2147483647, type=text, required=false}, {canEdit=true, name=sortOrder, length=255, type=integer, required=true}, {canEdit=true, name=submittal, length=300, type=text, required=false}, {canEdit=true, name=visTranslate, length=20, type=text, required=true}, {canEdit=true, name=visibleGlass, length=2147483647, type=text, required=false}, {canEdit=true, name=webPage, length=400, type=text, required=false}]}
              === 2017-03-02 11:13:47,996 [7-47] ERROR DataSourceLoader - Exception while attempting to load a DataSource
              java.lang.NullPointerException
                  at org.hibernate.cfg.Configuration.addClass(Configuration.java:786)
                  at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:498)
                  at com.isomorphic.datasource.DataSource.initialize(DataSource.java:918)
                  at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:217)
                  at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:903)
                  at com.isomorphic.hibernate.HibernateDSGenerator.fromMapping(HibernateDSGenerator.java:148)
                  at com.isomorphic.hibernate.HibernateDataSource.init(HibernateDataSource.java:288)
                  at com.isomorphic.datasource.DataSource.initialize(DataSource.java:918)
                  at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:217)
                  at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:903)
                  at com.isomorphic.datasource.DataSource.loadDS(DataSource.java:531)
                  at com.isomorphic.datasource.DataSource.forName(DataSource.java:459)
                  at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:134)
                  at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:153)
                  at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
                  at com.isomorphic.pool.ISCKeyedObjectPool.borrowObject(ISCKeyedObjectPool.java:106)
                  at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:92)
                  at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:157)
                  at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:107)
                  at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:180)
                  at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:107)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
                  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at com.assaabloy.aaos.server.AAOSFilter.doFilter(AAOSFilter.java:57)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
                  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
                  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
                  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
                  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
                  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                  at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                  at org.eclipse.jetty.server.Server.handle(Server.java:499)
                  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
                  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
                  at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
                  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
                  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
                  at java.lang.Thread.run(Thread.java:745)
              === 2017-03-02 11:13:47,999 [7-47] ERROR DataSourceLoader - BaseServlet Global Exception
              javax.servlet.ServletException: DataSource 'AAOSDoorSubType' failed to load due to an exception on the server:
              null
              See the server-side log for additional details.
                  at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:283)
                  at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:107)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
                  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at com.assaabloy.aaos.server.AAOSFilter.doFilter(AAOSFilter.java:57)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
                  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
                  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
                  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
                  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
                  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
                  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
                  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                  at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
                  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                  at org.eclipse.jetty.server.Server.handle(Server.java:499)
                  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
                  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
                  at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
                  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
                  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
                  at java.lang.Thread.run(Thread.java:745)

              Comment


                #8
                Hi,

                I've found a problem and just committed a fix.
                Please test it with next nightly build (2017-03-03).

                Regards,
                Alius

                Comment


                  #9
                  Still not quite working correctly. The data source loader no longer throws errors, but the data source still looks like it's loading differently:
                  Code:
                  === 2017-03-03 12:29:13,222 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (SNAPSHOT_v11.1d_2017-03-03/PowerEdition Deployment 2017-03-03) - Initialization Complete
                  Something still wrong (see the one reference to the "aaosSessionFactory", that's wrong, maybe it's looking for the primary key using the wrong bean?):
                  Code:
                  === 2017-03-03 12:29:20,976 [3-56] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\AAOSDoorSubType.ds.xml: 4ms
                  === 2017-03-03 12:29:20,981 [3-56] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\admin\sc\system\schema\DataSource.ds.xml: 5ms
                  === 2017-03-03 12:29:21,098 [3-56] DEBUG HibernateDSGenerator - Obtaining local Hibernate config for DataSource 'AAOSDoorSubType' via Spring bean 'adsSessionFactory'.
                  === 2017-03-03 12:29:21,099 [3-56] INFO  ServerObject - DMI on Spring bean: &adsSessionFactory
                  === 2017-03-03 12:29:21,104 [3-56] DEBUG HibernateDSGenerator - Generating data source 'AAOSDoorSubType' for entity com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
                  === 2017-03-03 12:29:21,106 [3-56] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK, beanClassName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, entityName=com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AAOSDoorSubType, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-03-03/PowerEdition Deployment 2017-03-03, fields=[{canEdit=true, name=aAOSDoorSubTypePK_locale, length=20, valueXPath=aAOSDoorSubTypePK/locale, type=text, required=true, primaryKey=true}, {canEdit=true, name=aAOSDoorSubTypePK_productName, length=100, valueXPath=aAOSDoorSubTypePK/productName, type=text, required=true, primaryKey=true}, {canEdit=true, name=alternatePicture, length=100, type=text, required=false}, {canEdit=true, name=briefDesc, length=400, type=text, required=false}, {canEdit=true, name=ceco, length=2147483647, type=text, required=false}, {canEdit=true, name=curries, length=2147483647, type=text, required=false}, {canEdit=true, name=cutoutLocation, length=100, type=text, required=false}, {canEdit=true, name=fullDesc, length=2147483647, type=text, required=false}, {canEdit=true, name=graham, length=2147483647, type=text, required=false}, {canEdit=true, name=hide, length=255, type=boolean, required=false}, {canEdit=true, name=image, length=255, type=any, required=false}, {canEdit=true, name=keyWords, length=2147483647, type=text, required=false}, {canEdit=true, name=link, length=400, type=text, required=false}, {canEdit=true, name=maiman, length=2147483647, type=text, required=false}, {canEdit=true, name=manufacturer, length=100, type=text, required=false}, {canEdit=true, name=profile, length=2147483647, type=text, required=false}, {canEdit=true, name=sortOrder, length=255, type=integer, required=true}, {canEdit=true, name=submittal, length=300, type=text, required=false}, {canEdit=true, name=visTranslate, length=20, type=text, required=true}, {canEdit=true, name=visibleGlass, length=2147483647, type=text, required=false}, {canEdit=true, name=webPage, length=400, type=text, required=false}]}
                  === 2017-03-03 12:29:21,107 [3-56] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AAOSDoorSubType' via Spring bean 'adsSessionFactory'.
                  === 2017-03-03 12:29:21,107 [3-56] INFO  ServerObject - DMI on Spring bean: &adsSessionFactory
                  === 2017-03-03 12:29:21,107 [3-56] DEBUG HibernateDataSource - Looking up session factory with lookup style 'spring'
                  === 2017-03-03 12:29:21,107 [3-56] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
                  === 2017-03-03 12:29:21,108 [3-56] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AAOSDoorSubType' via Spring bean 'adsSessionFactory'.
                  === 2017-03-03 12:29:21,108 [3-56] INFO  ServerObject - DMI on Spring bean: &adsSessionFactory
                  === 2017-03-03 12:29:21,109 [3-56] DEBUG DataSourceLoader - For DataSource 'AAOSDoorSubType', got instanceId 5
                  === 2017-03-03 12:29:21,120 [3-56] DEBUG JSTranslater - disableStringInBrowser = false

                  This one works correctly:
                  Code:
                  === 2017-03-03 12:29:21,124 [3-56] DEBUG XML - Parsed XML from E:\workspace\AAOS_Server\build\web\ds\AcousticRating.ds.xml: 2ms
                  === 2017-03-03 12:29:21,126 [3-56] DEBUG HibernateDSGenerator - Obtaining local Hibernate config for DataSource 'AcousticRating' via Spring bean 'aaosSessionFactory'.
                  === 2017-03-03 12:29:21,126 [3-56] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
                  === 2017-03-03 12:29:21,126 [3-56] DEBUG HibernateDSGenerator - Generating data source 'AcousticRating' for entity com.assaabloy.aaos.shared.entities.aaos.AcousticRating
                  === 2017-03-03 12:29:21,126 [3-56] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, entityName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AcousticRating, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-03-03/PowerEdition Deployment 2017-03-03, fields=[{canEdit=true, name=acousticRatingPK_locale, length=20, valueXPath=acousticRatingPK/locale, type=text, required=true, primaryKey=true}, {canEdit=true, name=acousticRatingPK_rating, length=50, valueXPath=acousticRatingPK/rating, type=text, required=true, primaryKey=true}, {canEdit=true, name=sortOrder, length=255, type=integer, required=true}]}
                  === 2017-03-03 12:29:21,126 [3-56] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AcousticRating' via Spring bean 'aaosSessionFactory'.
                  === 2017-03-03 12:29:21,126 [3-56] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
                  === 2017-03-03 12:29:21,127 [3-56] DEBUG HibernateDSGenerator - Generating data source 'AcousticRating' for entity com.assaabloy.aaos.shared.entities.aaos.AcousticRating
                  === 2017-03-03 12:29:21,127 [3-56] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, entityName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AcousticRating, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-03-03/PowerEdition Deployment 2017-03-03, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_locale, length=20, extIsUnique=false, valueXPath=acousticRatingPK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_rating, length=50, extIsUnique=false, valueXPath=acousticRatingPK/rating, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}]}
                  === 2017-03-03 12:29:21,127 [3-56] DEBUG HibernateDataSource - Obtaining local Hibernate config for DataSource 'AcousticRating' via Spring bean 'aaosSessionFactory'.
                  === 2017-03-03 12:29:21,127 [3-56] INFO  ServerObject - DMI on Spring bean: &aaosSessionFactory
                  === 2017-03-03 12:29:21,127 [3-56] DEBUG HibernateDSGenerator - Generating data source 'AcousticRating' for entity com.assaabloy.aaos.shared.entities.aaos.AcousticRating
                  === 2017-03-03 12:29:21,127 [3-56] DEBUG HibernateDSGenerator - Generated data source configuration: {idClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRatingPK, beanClassName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, entityName=com.assaabloy.aaos.shared.entities.aaos.AcousticRating, serverType=hibernate, extIsEmbeddedId=true, allowAdvancedCriteria=true, ID=AcousticRating, dropExtraFields=true, generatedBy=SNAPSHOT_v11.1d_2017-03-03/PowerEdition Deployment 2017-03-03, fields=[{extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_locale, length=20, extIsUnique=false, valueXPath=acousticRatingPK/locale, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=acousticRatingPK_rating, length=50, extIsUnique=false, valueXPath=acousticRatingPK/rating, type=text, extScale=2, required=true, primaryKey=true}, {extPrecision=19, extIsLazy=false, canEdit=true, name=sortOrder, length=255, extIsUnique=false, type=integer, extScale=2, required=true}]}
                  === 2017-03-03 12:29:21,127 [3-56] DEBUG DataSourceLoader - For DataSource 'AcousticRating', got instanceId 8

                  Also, when data is actually loaded in a grid, I get the following (once for each record retured):
                  Code:
                  === 2017-03-03 14:02:35,585 [3-94] WARN  DataSource - Couldn't get value at valueXPath: aAOSDoorSubTypePK/productName for datasource: AAOSDoorSubType - ignoring.  Actual error: org.apache.commons.jxpath.JXPathNotFoundException: No pointer for xpath: //aAOSDoorSubTypePK
                  === 2017-03-03 14:02:35,585 [3-94] WARN  DataSource - Couldn't get value at valueXPath: aAOSDoorSubTypePK/locale for datasource: AAOSDoorSubType - ignoring.  Actual error: org.apache.commons.jxpath.JXPathNotFoundException: No pointer for xpath: //aAOSDoorSubTypePK

                  Most of my data sources have composite primary keys (not something I can change). I'm using the autoDeriveSchema because I believe there's another issue with composite keys which I've documented here:
                  http://forums.smartclient.com/forum/...te-primary-key

                  Comment


                    #10
                    Hello,

                    Can you post sources of classes:
                    com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType
                    com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK

                    Alius

                    Comment


                      #11
                      My initial guess is: you do not have a public getter/setter for composite PK property 'aAOSDoorSubTypePK' in your AAOSDoorSubType class.

                      Alius

                      Comment


                        #12
                        I know there's nothing wrong with the classes. I auto-generated them with Netbeans and they work with the other SessionFactory. Here's the source:

                        AAOSDoorSubType.java
                        Code:
                        package com.assaabloy.aaos.shared.entities.ads;
                        
                        import java.io.Serializable;
                        
                        import javax.persistence.Basic;
                        import javax.persistence.Column;
                        import javax.persistence.EmbeddedId;
                        import javax.persistence.Entity;
                        import javax.persistence.Lob;
                        import javax.persistence.NamedQueries;
                        import javax.persistence.NamedQuery;
                        import javax.xml.bind.annotation.XmlRootElement;
                        
                        /**
                         * ADS.dbo.AAOSDoorSubType table.
                         */
                        @Entity
                        @XmlRootElement
                        @NamedQueries({ @NamedQuery(name = "AAOSDoorSubType.findAll", query = "SELECT a FROM AAOSDoorSubType a"),
                                @NamedQuery(name = "AAOSDoorSubType.findBySortOrder", query = "SELECT a FROM AAOSDoorSubType a WHERE a.sortOrder = :sortOrder"),
                                @NamedQuery(name = "AAOSDoorSubType.findByProductName", query = "SELECT a FROM AAOSDoorSubType a WHERE a.aAOSDoorSubTypePK.productName = :productName"),
                                @NamedQuery(name = "AAOSDoorSubType.findByAlternatePicture", query = "SELECT a FROM AAOSDoorSubType a WHERE a.alternatePicture = :alternatePicture"),
                                @NamedQuery(name = "AAOSDoorSubType.findByBriefDesc", query = "SELECT a FROM AAOSDoorSubType a WHERE a.briefDesc = :briefDesc"),
                                @NamedQuery(name = "AAOSDoorSubType.findByFullDesc", query = "SELECT a FROM AAOSDoorSubType a WHERE a.fullDesc = :fullDesc"),
                                @NamedQuery(name = "AAOSDoorSubType.findByKeyWords", query = "SELECT a FROM AAOSDoorSubType a WHERE a.keyWords = :keyWords"),
                                @NamedQuery(name = "AAOSDoorSubType.findByProfile", query = "SELECT a FROM AAOSDoorSubType a WHERE a.profile = :profile"),
                                @NamedQuery(name = "AAOSDoorSubType.findByLink", query = "SELECT a FROM AAOSDoorSubType a WHERE a.link = :link"),
                                @NamedQuery(name = "AAOSDoorSubType.findByManufacturer", query = "SELECT a FROM AAOSDoorSubType a WHERE a.manufacturer = :manufacturer"),
                                @NamedQuery(name = "AAOSDoorSubType.findBySubmittal", query = "SELECT a FROM AAOSDoorSubType a WHERE a.submittal = :submittal"),
                                @NamedQuery(name = "AAOSDoorSubType.findByWebPage", query = "SELECT a FROM AAOSDoorSubType a WHERE a.webPage = :webPage"),
                                @NamedQuery(name = "AAOSDoorSubType.findByVisibleGlass", query = "SELECT a FROM AAOSDoorSubType a WHERE a.visibleGlass = :visibleGlass"),
                                @NamedQuery(name = "AAOSDoorSubType.findByCutoutLocation", query = "SELECT a FROM AAOSDoorSubType a WHERE a.cutoutLocation = :cutoutLocation"),
                                @NamedQuery(name = "AAOSDoorSubType.findByCurries", query = "SELECT a FROM AAOSDoorSubType a WHERE a.curries = :curries"),
                                @NamedQuery(name = "AAOSDoorSubType.findByCeco", query = "SELECT a FROM AAOSDoorSubType a WHERE a.ceco = :ceco"),
                                @NamedQuery(name = "AAOSDoorSubType.findByGraham", query = "SELECT a FROM AAOSDoorSubType a WHERE a.graham = :graham"),
                                @NamedQuery(name = "AAOSDoorSubType.findByMaiman", query = "SELECT a FROM AAOSDoorSubType a WHERE a.maiman = :maiman"),
                                @NamedQuery(name = "AAOSDoorSubType.findByHide", query = "SELECT a FROM AAOSDoorSubType a WHERE a.hide = :hide"),
                                @NamedQuery(name = "AAOSDoorSubType.findByLocale", query = "SELECT a FROM AAOSDoorSubType a WHERE a.aAOSDoorSubTypePK.locale = :locale"),
                                @NamedQuery(name = "AAOSDoorSubType.findByVisTranslate", query = "SELECT a FROM AAOSDoorSubType a WHERE a.visTranslate = :visTranslate") })
                        public class AAOSDoorSubType implements Serializable {
                        
                            private static final long   serialVersionUID = 1L;
                            @EmbeddedId
                            protected AAOSDoorSubTypePK aAOSDoorSubTypePK;
                            @Basic(optional = false)
                            @Column(nullable = false)
                            private int                 sortOrder;
                            @Column(length = 100)
                            private String              alternatePicture;
                            @Column(length = 400)
                            private String              briefDesc;
                            @Column(length = 2147483647)
                            private String              fullDesc;
                            @Lob
                            private byte[]              image;
                            @Column(length = 2147483647)
                            private String              keyWords;
                            @Column(length = 2147483647)
                            private String              profile;
                            @Column(length = 400)
                            private String              link;
                            @Column(length = 100)
                            private String              manufacturer;
                            @Column(length = 300)
                            private String              submittal;
                            @Column(length = 400)
                            private String              webPage;
                            @Column(length = 2147483647)
                            private String              visibleGlass;
                            @Column(length = 100)
                            private String              cutoutLocation;
                            @Column(length = 2147483647)
                            private String              curries;
                            @Column(length = 2147483647)
                            private String              ceco;
                            @Column(length = 2147483647)
                            private String              graham;
                            @Column(length = 2147483647)
                            private String              maiman;
                            private Boolean             hide;
                            @Basic(optional = false)
                            @Column(nullable = false, length = 20)
                            private String              visTranslate;
                        
                            public AAOSDoorSubType() {
                            }
                        
                            public AAOSDoorSubType(final AAOSDoorSubTypePK aAOSDoorSubTypePK) {
                                this.aAOSDoorSubTypePK = aAOSDoorSubTypePK;
                            }
                        
                            public AAOSDoorSubType(final AAOSDoorSubTypePK aAOSDoorSubTypePK, final int sortOrder, final String visTranslate) {
                                this.aAOSDoorSubTypePK = aAOSDoorSubTypePK;
                                this.sortOrder = sortOrder;
                                this.visTranslate = visTranslate;
                            }
                        
                            public AAOSDoorSubType(final String productName, final String locale) {
                                aAOSDoorSubTypePK = new AAOSDoorSubTypePK(productName, locale);
                            }
                        
                            public AAOSDoorSubTypePK getAAOSDoorSubTypePK() {
                                return aAOSDoorSubTypePK;
                            }
                        
                            public void setAAOSDoorSubTypePK(final AAOSDoorSubTypePK aAOSDoorSubTypePK) {
                                this.aAOSDoorSubTypePK = aAOSDoorSubTypePK;
                            }
                        
                            public int getSortOrder() {
                                return sortOrder;
                            }
                        
                            public void setSortOrder(final int sortOrder) {
                                this.sortOrder = sortOrder;
                            }
                        
                            public String getAlternatePicture() {
                                return alternatePicture;
                            }
                        
                            public void setAlternatePicture(final String alternatePicture) {
                                this.alternatePicture = alternatePicture;
                            }
                        
                            public String getBriefDesc() {
                                return briefDesc;
                            }
                        
                            public void setBriefDesc(final String briefDesc) {
                                this.briefDesc = briefDesc;
                            }
                        
                            public String getFullDesc() {
                                return fullDesc;
                            }
                        
                            public void setFullDesc(final String fullDesc) {
                                this.fullDesc = fullDesc;
                            }
                        
                            public byte[] getImage() {
                                return image;
                            }
                        
                            public void setImage(final byte[] image) {
                                this.image = image;
                            }
                        
                            public String getKeyWords() {
                                return keyWords;
                            }
                        
                            public void setKeyWords(final String keyWords) {
                                this.keyWords = keyWords;
                            }
                        
                            public String getProfile() {
                                return profile;
                            }
                        
                            public void setProfile(final String profile) {
                                this.profile = profile;
                            }
                        
                            public String getLink() {
                                return link;
                            }
                        
                            public void setLink(final String link) {
                                this.link = link;
                            }
                        
                            public String getManufacturer() {
                                return manufacturer;
                            }
                        
                            public void setManufacturer(final String manufacturer) {
                                this.manufacturer = manufacturer;
                            }
                        
                            public String getSubmittal() {
                                return submittal;
                            }
                        
                            public void setSubmittal(final String submittal) {
                                this.submittal = submittal;
                            }
                        
                            public String getWebPage() {
                                return webPage;
                            }
                        
                            public void setWebPage(final String webPage) {
                                this.webPage = webPage;
                            }
                        
                            public String getVisibleGlass() {
                                return visibleGlass;
                            }
                        
                            public void setVisibleGlass(final String visibleGlass) {
                                this.visibleGlass = visibleGlass;
                            }
                        
                            public String getCutoutLocation() {
                                return cutoutLocation;
                            }
                        
                            public void setCutoutLocation(final String cutoutLocation) {
                                this.cutoutLocation = cutoutLocation;
                            }
                        
                            public String getCurries() {
                                return curries;
                            }
                        
                            public void setCurries(final String curries) {
                                this.curries = curries;
                            }
                        
                            public String getCeco() {
                                return ceco;
                            }
                        
                            public void setCeco(final String ceco) {
                                this.ceco = ceco;
                            }
                        
                            public String getGraham() {
                                return graham;
                            }
                        
                            public void setGraham(final String graham) {
                                this.graham = graham;
                            }
                        
                            public String getMaiman() {
                                return maiman;
                            }
                        
                            public void setMaiman(final String maiman) {
                                this.maiman = maiman;
                            }
                        
                            public Boolean getHide() {
                                return hide;
                            }
                        
                            public void setHide(final Boolean hide) {
                                this.hide = hide;
                            }
                        
                            public String getVisTranslate() {
                                return visTranslate;
                            }
                        
                            public void setVisTranslate(final String visTranslate) {
                                this.visTranslate = visTranslate;
                            }
                        
                            @Override
                            public int hashCode() {
                                int hash = 0;
                                hash += aAOSDoorSubTypePK != null ? aAOSDoorSubTypePK.hashCode() : 0;
                                return hash;
                            }
                        
                            @Override
                            public boolean equals(final Object object) {
                                // TODO: Warning - this method won't work in the case the id fields are
                                // not set
                                if (!(object instanceof AAOSDoorSubType)) {
                                    return false;
                                }
                                final AAOSDoorSubType other = (AAOSDoorSubType) object;
                                if (aAOSDoorSubTypePK == null && other.aAOSDoorSubTypePK != null || aAOSDoorSubTypePK != null && !aAOSDoorSubTypePK.equals(other.aAOSDoorSubTypePK)) {
                                    return false;
                                }
                                return true;
                            }
                        
                            @Override
                            public String toString() {
                                return "com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubType[ aAOSDoorSubTypePK=" + aAOSDoorSubTypePK + " ]";
                            }
                        
                        }
                        AAOSDoorSubTypePK,java
                        Code:
                        package com.assaabloy.aaos.shared.entities.ads;
                        
                        import java.io.Serializable;
                        
                        import javax.persistence.Basic;
                        import javax.persistence.Column;
                        import javax.persistence.Embeddable;
                        
                        /**
                         * ADS.dbo.AAOSDoorSubType composite primary key.
                         */
                        @Embeddable
                        public class AAOSDoorSubTypePK implements Serializable {
                        
                            @Basic(optional = false)
                            @Column(nullable = false, length = 100)
                            private String productName;
                            @Basic(optional = false)
                            @Column(nullable = false, length = 20)
                            private String locale;
                        
                            public AAOSDoorSubTypePK() {
                            }
                        
                            public AAOSDoorSubTypePK(final String productName, final String locale) {
                                this.productName = productName;
                                this.locale = locale;
                            }
                        
                            public String getProductName() {
                                return productName;
                            }
                        
                            public void setProductName(final String productName) {
                                this.productName = productName;
                            }
                        
                            public String getLocale() {
                                return locale;
                            }
                        
                            public void setLocale(final String locale) {
                                this.locale = locale;
                            }
                        
                            @Override
                            public int hashCode() {
                                int hash = 0;
                                hash += productName != null ? productName.hashCode() : 0;
                                hash += locale != null ? locale.hashCode() : 0;
                                return hash;
                            }
                        
                            @Override
                            public boolean equals(final Object object) {
                                // TODO: Warning - this method won't work in the case the id fields are
                                // not set
                                if (!(object instanceof AAOSDoorSubTypePK)) {
                                    return false;
                                }
                                final AAOSDoorSubTypePK other = (AAOSDoorSubTypePK) object;
                                if (productName == null && other.productName != null || productName != null && !productName.equals(other.productName)) {
                                    return false;
                                }
                                if (locale == null && other.locale != null || locale != null && !locale.equals(other.locale)) {
                                    return false;
                                }
                                return true;
                            }
                        
                            @Override
                            public String toString() {
                                return "com.assaabloy.aaos.shared.entities.ads.AAOSDoorSubTypePK[ productName=" + productName + ", locale=" + locale + " ]";
                            }
                        
                        }

                        Comment


                          #13
                          It is strange: only one way you can get exception JXPathNotFoundException if there is no PropertyDescriptor for specified property.
                          Actual code:
                          Code:
                          if (beanInfo.getPropertyDescriptor(name.getName()) == null)
                                  throw new JXPathNotFoundException("No pointer for xpath: " + toString() + "/" + name);
                          I can reproduce this exception on my test environment only when PK property does not have public getters/setters.

                          I will continue looking into this problem.

                          Regards,
                          Alius

                          Comment


                            #14
                            Can you provide complete logs (zip it if you must) ?

                            Comment


                              #15
                              Here you go. The attached file is a .zip, just change the file extension from a .txt to .zip.
                              Attached Files

                              Comment

                              Working...
                              X