Topic
12 replies Latest Post - ‏2013-02-08T00:11:40Z by SystemAdmin
Freakenstien
Freakenstien
19 Posts
ACCEPTED ANSWER

Pinned topic Having probelms deploying Worklight Console on WebSphere

‏2013-02-01T13:11:31Z |
While I am trying to deploy my Worklight Console on WebSphere to act as a Test/Production Server, I am getting an unusual error.

1/31/13 19:36:09:277 PKT 00000057 SystemOut O 19:36:09,277 ERROR WorklightDataSource ERROR: Could not connect to database. Cannot create PoolableConnectionFactory (The database is already in use by another process: org.hsqldb.persist.NIOLockFile@c4754e3cfile =F:\IBM\WebSphere8\wp_profile\worklightHome\hsqldb\WorklightDB.lck, exists=true, locked=false, valid=false, fl =null: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file. : F:\IBM\WebSphere8\wp_profile\worklightHome\hsqldb\WorklightDB.lck)

I have followed everything as written in administrative guide but somehow I can't resolve this error.

My Environment is as below
Worklight: 5.0
WebSphere_Portal: 8
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Having probelms deploying Worklight Console on WebSphere

    ‏2013-02-01T15:06:31Z  in response to Freakenstien
    I do believe that when moving from the development environment - Eclipse with the Worklight Studio plug-in, you must also change your database settings. HSQL is the filesystem-based database used when developing in Eclipse (configurable), and as can be seen in the error message, it is already in use by another instance, I am guessing that would be Eclipse.

    Prior to deploying the .war file, you need to change your database settings in your-project\server\conf\worklight.properties.
    After saving the changes, the .war file (located in the bin folder of your project) is automatically updated with the changes.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • Freakenstien
      Freakenstien
      19 Posts
      ACCEPTED ANSWER

      Re: Having probelms deploying Worklight Console on WebSphere

      ‏2013-02-02T18:32:48Z  in response to IdanAdar
      That make sense, but I wasn't using any databases in my application. Also prior to deployment I did change my settings to point to MYSQL so why would it complain about it ?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Having probelms deploying Worklight Console on WebSphere

    ‏2013-02-02T18:43:49Z  in response to Freakenstien
    You are not using a database in your application, but in order for the application to function at all (unless you run it in "offline mode" (connectOnStartup=fasel in common\js\initOptions.js)), the Worklight Server does need to recognize the app upon initialization, and for this to occur you must deploy the application to the server - database.

    After deploying the .war file and starting the server you would need to also deploy the .wlapp files (after buliding it). This will ensure the app is in the database.

    As for why it would complain about HSQL if you say you have moved to MySQL, could it be that you did not deploy the updated .war file, after changing worklight.properties?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • Freakenstien
      Freakenstien
      19 Posts
      ACCEPTED ANSWER

      Re: Having probelms deploying Worklight Console on WebSphere

      ‏2013-02-02T18:49:48Z  in response to IdanAdar
      That would be a silly mistake not to deploy it but No, I did redeploy it and even tried to reinstall it. The error comes when I try to start WorklightServer on Websphere and after that accessing console keeps giving 'Null pointer exception'.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Having probelms deploying Worklight Console on WebSphere

    ‏2013-02-03T05:46:15Z  in response to Freakenstien
    Could it be that you have several .war files and not only 1 already-deployed on your WAS installation?
    I really can't see any other reason for this unless the database settings are not up-to-date prior to deployment...

    Would you like to attach your Worklight project so that I will review the configuration files?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • Freakenstien
      Freakenstien
      19 Posts
      ACCEPTED ANSWER

      Re: Having probelms deploying Worklight Console on WebSphere

      ‏2013-02-03T19:29:07Z  in response to IdanAdar
      Attached is the war file that I created using Worklight studio 5.0.3.1

      I don't think it has to do with previously deployed war files as the server was new, however I upgrade the studio and tried deploying the war. This time it gives out a different error

      Caused by: java.lang.ClassNotFoundException: com.worklight.common.log.WorklightServerLogger

      I am assuming since I update my worklight studio to 5.0.3.1, I need to get the latest worklight-jee-library.jar file as well, since I think it changed the package for logger in newer jar ?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Having probelms deploying Worklight Console on WebSphere

    ‏2013-02-03T19:49:39Z  in response to Freakenstien
    I guess you mean 5.0.5.1? That would be the latest version, and yes, you would need to also update the .jar file on the server to the newer one.
    The .war file seems OK, hmm...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • Freakenstien
      Freakenstien
      19 Posts
      ACCEPTED ANSWER

      Re: Having probelms deploying Worklight Console on WebSphere

      ‏2013-02-03T19:46:45Z  in response to IdanAdar
      yeah 5.0.5.1 I meant.
      anyhow having troubles updating to the latest version of the server hence posted the another question on forum
      here:
      http://www.ibm.com/developerworks/forums/thread.jspa?threadID=470019&tstart=0

      guess we are done with this topic for now, unless I find some other problems.
      • Freakenstien
        Freakenstien
        19 Posts
        ACCEPTED ANSWER

        Re: Having probelms deploying Worklight Console on WebSphere

        ‏2013-02-04T09:21:37Z  in response to Freakenstien
        So I was finally able to upgrade my studio and my server to 5.0.5.1. Though sadly I still unable to start my worklight server.

        I dropped my database from mysql and uninstall any instances of worklight server from my WebSphere Portal 8. After successful installation, I notice that installation actually put two new applications on my WebSphere Server as follows.
        IBM_Application_Center
        IBM_Worklight_Console

        But somehow I am still unable to open worklight server console. Assuming now that the installation already installed the Worklight console, I don't need to deploy any of my own.
        I have attached the logs which doesn't really make much sense to me, so I need someone to point out what is wrong here.

        Obviously when there are issues while starting the Worklight Console on WAS, though it says the application is started on IBM console. On accessing the worklight console, I see the following error
        Error 500: javax.servlet.ServletException: Worklight Project not initialized
        • Freakenstien
          Freakenstien
          19 Posts
          ACCEPTED ANSWER

          Re: Having probelms deploying Worklight Console on WebSphere

          ‏2013-02-07T14:10:49Z  in response to Freakenstien
          Just wondering if someone has a resolve to this.
          • ozair
            ozair
            15 Posts
            ACCEPTED ANSWER

            Re: Having probelms deploying Worklight Console on WebSphere

            ‏2013-02-07T14:27:51Z  in response to Freakenstien
            I saw the following line, which is causing the problem:

            org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'identityAssociationCleanupTask' defined in URL : Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.xml.sax.SAXException: wsjar:file:/F:/IBM/WebSphere8/PortalServer/wcm/prereq.wcm/wcm/shared/app/ilwwcm-eventlog-jpa.jar!/META-INF/orm.xml Location: Line: 2, C: 252: org.xml.sax.SAXParseException: cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.; nested exception is <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: org.xml.sax.SAXException: wsjar:file:/F:/IBM/WebSphere8/PortalServer/wcm/prereq.wcm/wcm/shared/app/ilwwcm-eventlog-jpa.jar!/META-INF/orm.xml Location: Line: 2, C: 252: org.xml.sax.SAXParseException: cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.

            Can you search for a file orm.xml and manually change the attribute version from 2.0 to 1.0 and restart the server?
            • SystemAdmin
              SystemAdmin
              2327 Posts
              ACCEPTED ANSWER

              Re: Having probelms deploying Worklight Console on WebSphere

              ‏2013-02-08T00:11:40Z  in response to ozair
              Note: IBM forums are in the process of migrating to a new format. During migration the forums will be frozen and in read-only mode. If you wish to continue this thread discussion please post it on stackoverflow, where the Worklight team and others can respond.

              See the Forum Migration announce post for more details. Thank you.

              Barbara Hampson, Manager, IBM Worklight