Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
19 replies Latest Post - ‏2013-01-21T01:14:34Z by tennenjl
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic WLAPP files not updated after "Build All and Deploy"

‏2012-12-20T15:20:18Z |
I'm trying to deploy to a test Worklight server from an app on my Eclipse Worklight Developer client, but, when I do "Build All and Deploy", either from the main project (under the apps folder) or from the individual application, none of the *.wlapp files are updated. The *.war file is updated.

How can I deploy changes to the server without having these updated?

Using 5.0.5 Worklight, Eclipse Indigo.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: WLAPP files not updated after "Build All and Deploy"

    ‏2012-12-20T15:39:16Z  in response to SystemAdmin
    There are some contradictions in your post... I will need some clarifications...

    I'm trying to deploy to a test Worklight server from an app on my Eclipse Worklight Developer client
    What do you mean deploy *from an app*?
    How can I deploy changes to the server without having these updated?
    If there are no changes, what is there to deploy?

    1. When using the Worklight Developer Edition (which is the Worklight Studio plug-in, running Worklight Server on Jetty built-in), when building and deploying an application, it will be deployed to that instance of the server (each project is essentially a server).

    You cannot deploy via the Eclipse Worklight plug-in to external servers.

    2. Once building your app, a .wlapp file is created. If you build it again w/out making any changes, the .wlapp won't change because no changes were made.

    Generally speaking if you have Worklight running on an application server such as WAS, Liberty or Tomcat, then after setting it up (buying Worklight, following the installation instructions, deploying the .war file, placing the .jar file you get in the package, etc...), you can finally deploy the app's .wlapp files via Worklight Console (of that external Worklight Server)

    Am I understanding you correctly? Otherwise you will need to be more clear in your questions please...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: WLAPP files not updated after "Build All and Deploy"

      ‏2012-12-20T15:56:30Z  in response to IdanAdar
      Your documentation indicates to deploy the *wlapp files from the development client, this is what I'm trying to do. I don't understand the confusion.

      "How can I deploy changes to the server without having these updated?"

      I've made minor changes to the worklight.properties and application-descriptor.xml (just like your doc indicates when deploying remotely), and, I'm trying to deploy to a remote server (i.e. <myremoteserverurl>/console).

      The wlapp files are not being updated (the date/time stamp doesn't change) after doing Run...Build/Deploy.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: WLAPP files not updated after "Build All and Deploy"

    ‏2012-12-20T16:19:55Z  in response to SystemAdmin
    We have a guidelines thread: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=448316&tstart=0
    It helps us gather information so we'll know what is your environment setup, etc; we are not supposed to figure it out on our own, right? :)

    Perhaps the documentation needs to be clearer.
    What you are supposed to do is to copy out the wlapp files from the bin folder and deploy them via Worklight Console - click choose, choose the file, click submit.

    If I still don't understand you, then please be clearer.
    The above was written because I suspect what you mean is that you built an app in your Eclipse and you want to deploy it to some other application server running Worklight Server.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: WLAPP files not updated after "Build All and Deploy"

      ‏2012-12-20T17:02:38Z  in response to IdanAdar
      I built an app using Eclipse, I'm trying to copy the wlapp files (that are generated in the bin folder) and deploy them via Worklight Console. But, after making changes (in Eclipse), and performing the Build, the files aren't updated, they still have the same updated date that they had yesterday (or whenever). They do not have the current changes (I changed the configuration items that are different from my local Worklight environment vs. my remote Worklight environment, such as wl.db.jndi.name, wl.db.type, etc)

      I'm trying to deploy in my remote Worklight server, but, the changes are being seen, obviously, because the *.wlapp files are not updated. I hope this is clearer.
      • IdanAdar
        IdanAdar
        741 Posts
        ACCEPTED ANSWER

        Re: WLAPP files not updated after "Build All and Deploy"

        ‏2012-12-20T17:36:52Z  in response to SystemAdmin
        1. Changes that are done to files in the server folder, are saved in the .war file.
        2. Changes that are done to any of the web resources files or application-descriptor.xml, all under the <appName> folder, go to the .wlapp file.

        Changes done to any file under the server folder, are automatically being saved to the .war file; they do not require a manual build.
        Only changes to the application itself (1 above) require a build.

        Testing this now I have created a project and added an application.
        I did not add any environment; it contains only the Common "environment".

        I changed the worklightServerRootURL in application-descriptor.xml and performed a build - the .wlapp file in the bin folder was updated (date, size)
        I changed some web resources, HTML first >> build, JS second >> build - in both cases the .wlapp's date and size changed accordingly.

        I then followed the same steps, only with an added iPhone environment. Still good.

        Can you confirm that you are working in this manner?

        Idan Adar
        QA Engineer
        IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: WLAPP files not updated after "Build All and Deploy"

      ‏2012-12-20T17:32:57Z  in response to IdanAdar
      Some more information is that if I go back to the original worklight.properties, the files are *.wlapp files are updated.

      When I change the worklight.properties to my remote server, I get one build error:

      2012-12-20 12:26:23 FWLSE4001W: Failed to resolve JNDI name: "jdbc/WorklightDS". Application may fail to access the database in runtime. If building for remote server - ignore this warning.
      2012-12-20 12:26:23 FWLST0011E: ====== Worklight Project GRPMobile-project-customization failed to start: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
      2012-12-20 12:26:23 Activation failed. Bundle didn't start:/Users/davidwelch/Documents/Worklight/workspace1/GRPMobile/bin/GRPMobile-customization.jar

      What "class name" is this looking for? Below are the changes in worklight.properties that I made to deploy in the remote server:

      wl.db.jndi.name=jdbc/WorklightDS
      publicWorkLightHostname=<my server ip address>
      publicWorkLightProtocol=http
      publicWorkLightPort=9080
      publicWorkLightContext=/worklight
      wl.db.type=DB2
      wl.db.url=jdbc:db2:Worklight
      wl.db.username=Worklight
      wl.db.password=<worklight password>
      wl.db.autoddl=true
      reports.exportRawData=truewl.reports.db.jndi.name=jdbc/WorklightReportsDS
      wl.reports.db.type=DB2
      wl.reports.db.username=worklight
      wl.reports.db.password=<worklight password>

      Hope this helps you.
      • IdanAdar
        IdanAdar
        741 Posts
        ACCEPTED ANSWER

        Re: WLAPP files not updated after "Build All and Deploy"

        ‏2012-12-20T17:43:37Z  in response to SystemAdmin
        Did this error also appear when you originally started this thread?
        If that is the case, then the build is never started, thus the .wlapp will never be updated (but the .war file will because it does not require a build to be updated).

        I don't really know what class this is all about, but I do see this:
        reports.exportRawData=truewl.reports.db.jndi.name=jdbc/WorklightReportsDS
        You have two lines there combined into one; maybe that's what causing it?

        Idan Adar
        QA Engineer
        IBM Worklight Mobile Platform
        • SystemAdmin
          SystemAdmin
          2327 Posts
          ACCEPTED ANSWER

          Re: WLAPP files not updated after "Build All and Deploy"

          ‏2012-12-20T17:43:44Z  in response to IdanAdar
          The errors were always there, but, the first one says "if building for a remote server, ignore this warning", but, I'm thinking these are separate errors.

          Here's what I changed worklight.properties (in server/conf):

          wl.db.jndi.name=jdbc/WorklightDS
          publicWorkLightHostname=<my server ip address>
          publicWorkLightProtocol=http
          publicWorkLightPort=9080
          publicWorkLightContext=/worklight
          wl.db.type=DB2
          wl.db.url=jdbc:db2:Worklight
          wl.db.username=Worklight
          wl.db.password=<worklight password>
          wl.db.autoddl=true
          reports.exportRawData=true
          wl.reports.db.jndi.name=jdbc/WorklightReportsDS
          wl.reports.db.type=DB2
          wl.reports.db.username=worklight
          wl.reports.db.password=<worklight password>

          After changing from the original, and doing the build, the error occurs and the *.wlapp files aren't updated (the *.war file is update.

          This error is in the Eclipse Error log:

          FWLST0011E: ====== Worklight Project GRPMobile-project-customization failed to start: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

          This is in the Eclipse Console:

          2012-12-20 12:39:08 FWLSE4001W: Failed to resolve JNDI name: "jdbc/WorklightDS". Application may fail to access the database in runtime. If building for remote server - ignore this warning.
          2012-12-20 12:39:08 FWLST0011E: ====== Worklight Project GRPMobile-project-customization failed to start: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
          2012-12-20 12:39:08 Activation failed. Bundle didn't start:/Users/davidwelch/Documents/Worklight/workspace1/GRPMobile/bin/GRPMobile-customization.jar

          It appears the error is causing the issue, but, not sure what it's looking for. The JNDI name is specified (jdbc/WorklightDS) properly.

          Can you see an issue in the changes to worklight.properties?

          Thanks
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: WLAPP files not updated after "Build All and Deploy"

    ‏2012-12-20T17:52:03Z  in response to SystemAdmin
    If you have changes that you need in the client-side (.wlapp) when wanting to move to a remote server, typically the server URL in application-descriptor.xml, then I would suggest to first do that change and build, and put aside the updated .wlapp, and only then do changes on the server-side, typically worklight.properties, etc) and take the updated .war file. Maybe this flow will work better for now, considering the above error...

    Just to be clear, the .wlapp is not updated because it requires the build, that does not occur because the server fails to start, due to the error.

    As it says, it is something with the DB2 settings, specifically:
    FWLSE4001W: Failed to resolve JNDI name: "jdbc/WorklightDS"

    You say it is the correct name, but perhaps it is not? I am not an expert in that field...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: WLAPP files not updated after "Build All and Deploy"

    ‏2012-12-20T18:15:37Z  in response to SystemAdmin
    Again, not an expert in this field but after googling the error message, then as it suggesta you indeed need to configure something outside of Worklight, which belongs to the DB2 setup, to be able to resolve the JNDI name...
    Perhaps you can review your DB2 installation steps?

    Links I have found:
    http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/cjvclrrt.htm
    http://www.coderanch.com/t/318600/EJB-JEE/java/InitialContext-rest
    http://docs.oracle.com/javase/jndi/tutorial/beyond/env/source.html
    http://stackoverflow.com/questions/1998159/exception-need-to-specify-class-name-in-environment-or-system-property-java-na

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: WLAPP files not updated after "Build All and Deploy"

      ‏2012-12-20T19:15:36Z  in response to IdanAdar
      Ok, I'm fairly sure my settings are correct, I configured the target Worklight server. The JNDI name is correct.

      But, the Worklight "Build" process should at least tell me what it's complaining about...this error message isn't helpful at all. There are a lot of worklight.properties settings.

      This error:
      "Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial"

      Which setting is it complaining about?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: WLAPP files not updated after "Build All and Deploy"

    ‏2012-12-20T19:30:06Z  in response to SystemAdmin
    I do not have that information.
    As I wrote in my previous post, I think this related to the DB2 installation, not to any specific setting in worklight.properties.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: WLAPP files not updated after "Build All and Deploy"

      ‏2012-12-20T21:39:57Z  in response to IdanAdar
      So, can anyone else answer this ?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: WLAPP files not updated after "Build All and Deploy"

    ‏2012-12-23T13:08:34Z  in response to SystemAdmin
    David,
    Have you tried looking at this page? http://www.coderanch.com/t/318600/EJB-JEE/java/InitialContext-rest

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • raanan
      raanan
      50 Posts
      ACCEPTED ANSWER

      Re: WLAPP files not updated after "Build All and Deploy"

      ‏2012-12-23T13:46:16Z  in response to IdanAdar
      Hi David.

      You can read more about jndi.properties file for WebSphere at:
      link:http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftnam_develop_naming.html
      and you might find this helpful:
      linkhttp://pic.dhe.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Frnam_example_prop1.html
      • SystemAdmin
        SystemAdmin
        2327 Posts
        ACCEPTED ANSWER

        Re: WLAPP files not updated after "Build All and Deploy"

        ‏2012-12-24T00:03:12Z  in response to raanan
        I appreciate all the help on how JNDI works, but, that's NOT the issue. It seems that the issue is that you should not define the settings for the target remote server in the worklight.properties (in Eclipse Worklight Developer), especially when the target remote server has different settings (it most likely always will).

        If I remove these settings matching the server JNDI configuration, the WLAPP files are generated, I can deploy the app using these WLAPP files into the target server with no problem. The important settings are publicWorklight*, the others are validated locally, not remotely (how would it know how confirm in your remote server if you have authentication defined in WAS?). Of course, this isn't defined locally, it's using the internal Worklight, and, it fails (jndi error), and the WLAPP files aren't generated.

        So, the answer to my question is, some of the worklight.properties files configuration settings are only relevant to the local development server when using Worklight Developer. There are other posts that I read that seem related to this issue. I don't see this indicated in the doc. but, seems this is causing some confusion. If this is not the case, can someone please clarify?
        • SystemAdmin
          SystemAdmin
          2327 Posts
          ACCEPTED ANSWER

          Re: WLAPP files not updated after "Build All and Deploy"

          ‏2012-12-24T01:39:49Z  in response to SystemAdmin
          Clarifying "If I remove these settings matching the server JNDI configuration", should be "If I remove the settings that relate to local JNDI configuration".
          • tennenjl
            tennenjl
            3 Posts
            ACCEPTED ANSWER

            Re: WLAPP files not updated after "Build All and Deploy"

            ‏2013-01-21T01:12:02Z  in response to SystemAdmin
            Dave/All,

            Did you ever get this resolved. I'm seeing the same behavior. I want to test and deploy my sql adapter using db2, where the database and appserver are on remote servers. I added the jndi name as per the infocenter, but now I'm thinking that I will need to remove that value from the application-descriptor.xml in order to build my app. Thanks for your help.

            Best Regards,
            Jeff
            • tennenjl
              tennenjl
              3 Posts
              ACCEPTED ANSWER

              Re: WLAPP files not updated after "Build All and Deploy"

              ‏2013-01-21T01:14:34Z  in response to tennenjl
              Whoops.. I meant to say I think I need to remove the wl.db.jndi.name property from the worklight.properties file. My apologies for any confusion..

              Jeff