Worklight Console does not show new changes to project -- seems to use original code - ibm-mobilefirst

I am running Eclipse Luna 4.4.1 with Worklight Studio 6.2...
I have made changes to my Worklight project. For some reason, I cannot get these changes to be seen/previewed when opening in the Worklight Console...
I have made simple changes such as adding print (console.log) statements to see if these changes are making it out to the console... I have even removed design elements to see if I can get this preview to error out...
Here is what I do:
Highlight the app folder (the folder under the "apps" folder) and right-click
Select Run As > 2 Build All Environments
Once that is complete, I highlight the project folder (the topmost folder in the project) and right-click, selecting Open Worklight Console, which opens the console in Firefox
Click the Preview as Common Resources link in the Console
The "old" code/project runs -- no changes appear
I have tried Cleaning the project, closing and re-opening Eclipse, rebooting my machine, etc. but nothing seems to shake this up. Worklight seems to use the "old" code no matter what I do in Eclipse...
Is there a setting on Worklight I may be missing?

Starting Worklight 6.2 you do not need to either build or deploy your application in order to see changes made to web resources.
The following should suffice:
Create a Project and application
Run As > Run on Worklight Development Environment
Open console, view the application (keep this tab open)
In Eclipse, change some resource (image, CSS, HTML, JavaScript)
Return to the previously opened tab and refresh it
The change should be visible to you.
Something to try:
Close Eclipse
Open your TMPDIR and delete the wlBuildResources folder
Open Eclipse, try again
You can also try adding a mobile environment to your application; there are some reports this some times, show how, helps 'refreshing' the web resources used while previewing applications
You can also make sure you are using the very latest 6.2.0.01 iFix; there were preview-related fixes in the past. You can get it from IBM Fix Central website (assuming you are an IBM customer/business partner; for evaluation purposes you should download the latest available version, from the Eclipse Marketplace - v6.3)
Note that Run As > Build all environment does not actually deploy your modified web resources to the server, it only generates the .wlapp for later consumption elsewhere, so I suggest to follow my steps at the very top of this answer, by using Run As > Run on Worklight Development Server, and later on simply save (ctrl/cmd-s) and then go to the console to verify the changes are there.

Related

Error running Google App Engine Standard via IntelliJ - can't find appengine-web.xml

I'm trying to locally run/debug a Google App Engine Standard app written in Kotlin. Here's the basic stack:
IntelliJ IDEA Ultimate
Google App Engine Standard
Gradle
Kotlin
I followed these directions: https://cloud.google.com/code/docs/intellij/deploy-local#running_your_application_locally
So far so good.
But when I go to run it (via IntelliJ Run menu), I get the following error:
NoSuchFileException during local run: Error occurred during local run. Please first confirm that there is a properly placed appengine-web.xml file. If missing, either use the Cloud Code shortcut action under: 'Tools > Cloud Code > Add App Engine Support > Google App Engine Standard' Or manually generate an appengine-web.xml file in the WEB-INF directory of your module's web resource directory, (show balloon)
Error running '(my run config)': Encountered an error starting the App Engine local development server process.
AFAIK, the file is in the correct place (I even tried deleting it and having Google's plugin regenerate it for me - it put it in the same place/same name).
Any ideas how to fix this error? I've spent 2 days just debugging various tool issues with this stack, but can't get past this one.
UPDATE:
Here's the run configuration I'm using.
If you right-click on the project, then click on Open Module Settings.
Under Project Settings click on Artifacts.
Choose your war exploded file.
You should notice that on the Output Layout tab under Available Elements you will need to add your JPA descriptors by double-clicking that.
This resolved the issue for me with on this exact error.

ibm mobile first development server .. run as options missing sometimes.. unable to start application

Build and deploy settings are missing from ibm mobile first development server hybrid project.
After clicking on Run as(as in attachment) even from a newly created project..not finding any options. Unable to start application.
Please let me know why it is happening, if any have faced this error before. The image below shows that there's nothing in "Run As...".
Something is wrong with your installation.
Try again in a new Eclipse workspace.
If it fails as well, re-install the Studio plug-in in a fresh Eclipse instance.

ConnectionKit app not opening on other Computers

I created a Mac app that uses ConnectionKit to connect to a server using FTP. Today I went to export the file and use it on another computer only to find that the app does not open entirely on a different computer.
On the development computer, the app functions completely, but on another computer, it opens, the icon stops bouncing in the dock, and the name of the app is shown in the menu bar, but the first view controller and window are never opened.
The menu is also not visible. It just shows the app title and nothing else.
I assume that this has to do with ConnectionKit, but I checked the package contents of the exported bundle and ConnectionKit is in there under Frameworks.
Here are the steps I took to include it.
I downloaded ConnectionKit using git clone
I downloaded each git submodule using git submodule update --recursive --init
I dragged the ConnectionKit.xcodeproj file to my Frameworks directory in the project explorer
I added ConnectionKit from the workspace into the "Link Binary with Libraries" section
I added a new "Copy Files" build phase.
I changed the destination to "Frameworks"
I added the ConnectionKit.framework from the Products of the ConnectionKit.xcodeproj to the copy files phase.
The build phases tab looks like this:
This doesn't seem to work. The application just sits there and doesn't launch the app on any computer other than the development computer.
What am I doing wrong here?
You need to run the app in Xcode under the debugger on one of these other computers. It sounds very likely that you are getting a raise at launch. Seeing the raise in the debugger would doubtless shed light on the cause, which might or might not even have anything to do with ConnectionKit. :-> You could also look at the console logs generated by your app, in Console.app (in Applications/Utilities/), but actually getting the raise in the debugger is generally more useful unless the problem is something very obvious.

Worklight Console can not be opened because the Worklight Server is not running

I'm just getting started with some of the samples at the Getting Started site, working with the Developers Edition. Whenever I Open Worklight Console, the eclipse environment abends. I'm sure I missed a set up item, but all seemed to install well. I appreciate any help / direction. Thanks.
I tried to post an image of the error, but stackoverflow indicates I need 10 reputations to post an image. Go figure.
The first line is Java was started but returned exit code=8096
There are some hits on this indicating that the license may not be compatible with the Rational license installed. Not sure what to do with that.
There's another post indicating Environment Variable corruption, but I don't have the corrupt Temp environment variables indicated.
StackOverflow has a FAQ explaining what one can and cannot do and when. It makes sense. Read it.
Did you at least create a new Worklight project and application?
If you do that and run the application by right-clicking on the application in the project tree and choose Run As > Run on Worklight Development Server this will: start the server + build the app + deploy the app.
Then you can right-click on the project icon and choose Open Worklight Console and you will see the console...
So unless you have some errors preventing the server from loading, the above should work.
Host the image elsewhere, like imgur.com
Explain what you have installed in your Eclipse. Which Eclipse is it? Did you install only Worklight Studio, or another plug-in in addition? Which?
What are those "hits" you mention? Elaborate.
Searching for the exit code in Google, I see the following IBM tech notes:
http://www-01.ibm.com/support/docview.wss?uid=swg21303648
http://www-01.ibm.com/support/docview.wss?uid=swg21567836
http://www-01.ibm.com/support/docview.wss?uid=swg21627887
Perhaps one of them is relevant for you as well.
If you have followed Idan's advice to Run on Worklight Development Server and it is still not started, try this:
Switch to the Servers view (on the bottom pane of Eclipse by default).
Check your Worklight Development Server status
Right-click and select Clean...
Select OK when prompted to discard all publish start.
Redeploy your app using Run As > Run on Worklight Development Server
I am not sure if this would clean up your environment variable error message as I have not seen that one, but it has helped with several other errors that have caused my server to not start or run properly. (The most common one I get is an Out of Memory in the server.)

IBM Worklight 6.0 - Dojo library uses localhost after deploy

I have a Worklight 6.0 project that uses the new Dojo 1.9 libs, I created an external dojo project, like the documentation suggested, then, in the main project properties, under "Dojo toolkit", it references this dojo19 project.
The project works on the local server, then I did "Run As" | "Build for Remote Server...", and entered the correct domain:port and context path, clicked Build, the *.wlapp files were updated. (I've also updated the settings for publicWorkLightHostname / publicWorkLightPort / publicWorkLightProtocol in the "Environment Entries for Web Modules" in the installed war to match the remote server names/port/protocol.)
But, after deploying both war and -all.wlapp file, accessing the app I get JS errors when it tries to refer to the dojo19 library:
The page at
https://<myIP>:9443/<myproject>/apps/services/www/ /mobilewebapp/default/IODMobile.html
ran insecure content from http://localhost:64441/dojo19/<myproject>/IODMobile/mobilewebapp/dojo/nls/core-web-layer_en-us.js.
The dojo19 is the project name in my Worklight developer workspace that I referred to above.
Why is it trying localhost? Seems there's a missing step here in deploying the dojo library project into Worklight.
Where are you trying to preview the application when you get the error message?
See the changes in Dojo in Worklight 6.0
If launching the application in emulator/simulator/device, see Billy Rowe's answer in this question
Partial copy/paste:
Step 1: Verify your application works in the Mobile Browser Simulator
with Provide Library Resources checked. If the Console log is showing
resources being served from the server, then these have to be copied
to your application before deploying to AVD or a device
Step 2: After you think you have all Dojo/resources within your
project, uncheck Provide Library Resources and test it again in MBS.
If it fails in MBS, then something is missing in your application that
is in the library/server. You can check Provide Library Resources and
retest to see if it shows you what that is. Not all resources are
shown, e.g. if there's a missing CSS file.
Also I would suggest to do all of this in the Development environment (that is, in Eclipse) before starting to deploy the .war file and .wlapp file etc... (which, BTW, I hope you're doing based on the new instructions for Worklight 6.0)
In the information center, it will show you how to uncheck the Provide Library Resources in the Console Log.
I think what you're running into is:
1) Something is being served from the Dojo Library/Server
2) A bug in 6.0 that used "localhost" instead of the IP of the host (your machine running eclipse). This is fixed in the 6.0 iFix. With this fix, you can run your app external to Studio and still use the Dojo Library/Server. Without this fix, you must have everything you need within your app.
Can you install the iFix and let us know if that fixed the problem?