Clarity

Expand all | Collapse all

13.1 database compatibility query - 14.1

  • 1.  13.1 database compatibility query - 14.1

    Posted Jan 21, 2015 07:16 AM

    We are currently on v 13.1 in Production and we have a 14.1 Sandbox.

    If I restore a copy of the Production database to my Sandbox the application will not start due to compatibility issues.

    Is there a way of overcoming this other than rolling back to my 14.1 backup?



  • 2.  Re: 13.1 database compatibility query - 14.1

    Broadcom Employee
    Posted Jan 21, 2015 07:25 AM

    Hi

     

    Your database version is 13.1 and app is 14.1, there would be issues and only way to upgrade both together.

     

    Regards

    Suman Pramanik



  • 3.  Re: 13.1 database compatibility query - 14.1
    Best Answer

    Posted Jan 21, 2015 09:37 AM

    We used* to be able to do this, but you would have to start the NSA first (before attempting to use the app) and that would just spot the mismatch and then "upgrade" the database to the same version as the installed "software".

     

    * - This worked for old versions (v7/8?) but I recall being told that it stopped working (somewhere around v12 I think?) at some point, but I never verified that myself - of course this was only every useful for sandbox environments, always follow the proper upgrade paths for real installations.



  • 4.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 21, 2015 10:01 AM

    Thanks for the info guys.

    I'm just going to roll back changes.



  • 5.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 05:57 AM

    Hi guys,

     

    some more advice needed if possible please!

     

    We experienced some problems rolling back. Long story short -

     

    Our Production environment is 13.1

    Our Sandbox is 14.1

    We tried to restore Sandbox with Production db backup but faced the incompatibility issues mentioned above.

     

    We then tried reverting the application back to v13.1 with a jar file backup.

     

    Due to some network issues however we then had to restore a backup of our db server - meaning that we then had app on v13.1, but our db was 14.1

    So after this I restored the db to 13.1 from a backup I keep.

     

    Sorry if it sounds a bit confusing but basically I am now in a position in my Sandbox where the app and db versions are both 13.1

    I had to edit some settings in the properties.xml file such as server names and IP addresses.

     

    When I try to perform admin general upload-config however I get the errors below which I haven't seen before:

     

     

     

    admin general upload-config

    com.niku.union.config.ConfigurationException: Error unmarshalling config file: p

    roperties.xml

            at com.niku.union.config.ConfigurationManager.fetchConfigFileObject(Conf

    igurationManager.java:4934)

            at com.niku.union.config.ConfigurationManager.fetchConfigObject(Configur

    ationManager.java:4289)

            at com.niku.union.config.ConfigurationManager.getProperties(Configuratio

    nManager.java:689)

            at com.niku.union.config.ConfigurationManager.getRawProperties(Configura

    tionManager.java:667)

            at com.niku.union.config.ConfigurationManager.isSingleTenantMode(Configu

    rationManager.java:823)

            at com.niku.nsa.service.AdminManager.execute(AdminManager.java:170)

            at com.niku.nsa.service.Admin.main(Admin.java:77)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:57)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

    sorImpl.java:43)

            at java.lang.reflect.Method.invoke(Method.java:606)

            at com.werken.forehead.Forehead.run(Forehead.java:551)

            at com.werken.forehead.Forehead.main(Forehead.java:581)

    Caused by: org.xml.sax.SAXException: Illegal Text data found as child of: direct

    oryServer

      value: "

    -

      "

            at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)

            at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)

            at com.niku.union.config.ConfigurationManager.fetchConfigFileObject(Conf

    igurationManager.java:4862)

            ... 12 more

    Internal error. See output above for more info.



  • 6.  Re: 13.1 database compatibility query - 14.1

    Broadcom Employee
    Posted Jan 22, 2015 06:00 AM

    The error suggests the properties.xml is broken somewhere, may be some tags missing, so please delete the properties.xml and it will auto generate the correct one and then make relevant changes like java path, tomcat path, clarity etc and give it a try.

     

    Regards

    Suman Pramanik



  • 7.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 06:23 AM

    OK - now I have updated properties.xml and upload-config worked ok.

     

    When I try to start the application however I see some other errors.

     

    In NSA it still says 14.1 is the version

    nsa1PNG.PNG

     

    nsa2.PNG

     

    In the app log:

     

     

    WARN 2015-01-22 06:03:04,955 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) [CA Clarity][SQLServer JDBC Driver][SQLServer]Login failed for user 'niku'.

    WARN 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Could not verify database connection for Local TenantInstance with id = clarity marking as an invalid configuration.

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) ==================================================================

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) ==================================================================

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) CLARITY

     

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Tenants: TenantInstance: id: clarity

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Tenants: TenantInstance: appId: app

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Tenants: TenantInstance: bgId: bg

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Tenants: TenantInstance: fileDirectory: tenantDirectory

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Tenants: TenantInstance: status: invalid

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: id: clarity

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: serviceId: niku

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: driver: com.ca.clarity.jdbc.sqlserver.SQLServerDriver

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: url: jdbc:clarity:sqlserver://48.137.137.96:1433;DatabaseName=niku;InsensitiveResultSetBufferSize=0;ProgramName=Clarity

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: username: niku

    SYS 2015-01-22 06:03:04,956 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: schemaName: niku

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: serviceName: niku

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: vendor: mssql

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: largeIndex: INDX_LARGE

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: smallIndex: INDX_SMALL

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: largeTables: USERS_LARGE

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Properties/Database: smallTables: USERS_SMALL

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) ==================================================================

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Tenants for this Application with instance id = app :

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) ==================================================================

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Active Tenants:

    SYS 2015-01-22 06:03:04,957 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) ==================================================================

    ERROR 2015-01-22 06:09:27,923 [http-bio-8080-exec-7] filter.RequestTenantIdExtractor (none:none:none:none)

    com.niku.union.config.ConfigurationException: Could not retrieve a valid tenant.

    at com.niku.union.config.TenantConfigurationManager.getValidLocalTenant(TenantConfigurationManager.java:316)

    at com.niku.union.web.filter.RequestTenantIdExtractor.getTenantIdForRequest(RequestTenantIdExtractor.java:211)

    at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:67)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.filters.AddDefaultCharsetFilter.doFilter(AddDefaultCharsetFilter.java:89)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

    at com.niku.union.web.valves.ErrorPageRedirectValve.invoke(ErrorPageRedirectValve.java:70)

    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)

    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)

    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:724)

     

     

    Would I be better off to open a case?



  • 8.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 06:26 AM

    Can you check this ?

    https://communities.ca.com/message/99769175#99769175

     

    "Would I be better off to open a case?" - Would be good if you do not get to a solution in this post

     

    NJ



  • 9.  Re: 13.1 database compatibility query - 14.1

    Broadcom Employee
    Posted Jan 22, 2015 06:27 AM

    can you run a query at cmn_install_history and confirm that you database is 13.1, the app certainly look 14.1, so please download 13.1 ISO, extract and install the csa and point to database and apply any reapply the pathch.

     

    Regards

    Suman Pramanik



  • 10.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 09:40 AM

    The database is definitely 13.1 after running query.

    I managed to find a 13.1 clarity folder which I had backed up previously so I am in the process of over-writing the 14.1 clarity folder. Hopefully this will do the trick.



  • 11.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 09:54 AM

    You should always just be able to reinstall (from the original media) the relevant version of the software and then "just" point that at the database (of the matching version) - this is what Suman is suggesting.

     

    There is a little bit more to it than just the right software files on the server, the application installs services for example and you could easily end up with those in a mess if you are not doing things in the right sequence / starting with a clean-system etc.



  • 12.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 11:06 AM

    Issue resolved. I had some update some settings in the properties.xml file but I now have a functioning 13.1 Sandbox environment again. Thank you for your tips and advice.



  • 13.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 22, 2015 01:36 PM

    In general if you have an evaluation or test system many times it is faster to start from scratch than trying to get to the bottom of what went wrong maybe with support.

    Only if you have some test settings, test data, test results which would take some time to recreate it is justified to put extended effort to recovering a messed up dev environment.

    The benefit of doing upgrade tests in virtual environments is the speed of being able to create working copies of the environment at any stage.



  • 14.  Re: 13.1 database compatibility query - 14.1

    Posted Jan 29, 2015 07:00 AM

    Hi guys, I just thought I'd update you with the system we are using now, with regard to switching between different versions. It might be useful.

     

    Previously we had 2 Sandbox environments, one for v13.1 and one for v14.1

    They were using quite a bit of storage so we decided that we only wanted 1 environment, but also the ability to switch from 1 Clarity version to another in a reasonably straight-forward manner.

     

    So, once we established a stable v13.1 environment again as described in my last post I did the following:

     

    • took a 13.1 database backup and saved it in a '13-1 DB Backup do not delete' folder on my database server.
    • created a backup jar file of the clarity application folder using command: jar cvf clarity-13-1-backup.jar clarity and saved it in a '13-1-clarity-do not delete' folder on my application server.
    • upgraded the Sandbox environment successfully to v14.1
    • took a 14.1 database backup and saved it in a '14-1 DB Backup do not delete' folder on my database server.
    • created a backup jar file of the clarity application folder using command: jar cvf clarity-14-1-backup.jar clarity and saved it in a '14-1-clarity-do not delete' folder on my application server.
    • reverted back to 13-1 db by restoring my 13-1 database backup
    • reverted back to 13-1 app by running command jar -xvf d:\niku\14-1-clarity-do not delete\clarity-14-1-backup.jar
    • ran admin general upload-config
    • restarted services and verified 13-1 version once again.