Cannot Build and Install Html App using Web Works 2.1 on Device - blackberry-10

I'm new in BB Development and I want to test my application on Z3 Device ...
I installed WebWorks 2.1
Then request the bbidtoken.csk file, and I created author.p12 using WebWorks UI.
I enabled Developer Mode on Device.
Also I generated debug token debugtoken.bar using Command line tool.
I deployed debugtoken.bar on my Z3 device.
All files author.p12, barsigner.db, bbidtoken.csk, debugtoken.bar in this path:
"C:\Users\user1\AppData\Local\Research In Motion"
I created Project using WebWorks UI and by default its located in "C:\Users\user1\WebWorks Projects\Project1"
I tried to Build my "Project1" app from WebWorks UI, but this error comes to me:
[INFO] Populating application source
[INFO] Parsing config.xml
[INFO] Generating output files
[INFO] Error: Debug token does not exist or not a file
[INFO] Error: Debug token does not exist or not a file
[ERROR] Native Packager exception occurred
[ERROR] Native Packager exception occurred
An error has occurred
What did I forget to do????!?!

Rename your debugtoken.bar to blackberry10debugtoken.bar and place it inside .cordova folder under %user% and build again. This is one time activity after this you can use BB10 Webworks web interface for direct building and installation of application.Please do not forget to mark it as answer if you got this as your solution :)
I hope it helps!!!

Related

Try to run sbt shell gives me error server failed to start error 5

I was following the tutorial for build an scalable websocket app in Heroku, following the tutorial Writing Scalable WebSocket Applications on Heroku and trying to set up Play Framework to work on Eclipse IDE, downloaded play-samples-play-java-hello-world-tutorial from Play Framework site, added sbt-plugin annotation in plugins.sbt file, git bashed from project folder and tried the command sbt, it gives me, following error and I can't proceed with compile command:
server failed to start on local:sbt-server-cc02d04ca19b451f676c. java.io.IOException: Could
not create lock for \\.\pipe\sbt-server-cc02d04ca19b451f676c_lock, error 5

Maven offline build fails when it encouners google guava url with invalid character

I need to make my Tycho-Maven build work in offline mode, so I can deploy it to environments with no Internet connection and let people run the build from the previously downloaded artifacts for the third party code my app depends on. The product being built is an Eclipse RCP product, using the org.eclipse.tycho:target-platform-configuration plug-in to load the dependencies from an RCP target file.
First I run mvn -Dmaven.repo.local=/some/path/ -DgeneratePom=true clean install to create the artifacts, and that build succeeds. Then when I run mvn -Dmaven.repo.local=/some/path/ -o clean install it fails because it's running in offline mode and there is no local cache available for http://download.eclipse.org/tools/cdt/releases/8.6
So then I run mvn -Dmaven.repo.local=/some/path/ dependency:go-offline to make it download all the artifacts it needs for the build, but it fails with this message:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins
(resolve-plugins) on project : Nested: Could not transfer
artifact com.google.guava:guava:jar:[10.0.1,14.0.1] from/to central
(https://repo.maven.apache.org/maven2): Illegal character in path at
index 60:
https://repo.maven.apache.org/maven2/com/google/guava/guava/[10.0.1,14.0.1]/guava-[10.0.1,14.0.1].jar
Index 60 is the "[" character in the version range specifier for the guava jar. I have no idea where that URL gets created and why it's not URL-encoded. It would be nice to get the dependency:go-offline goal to complete execution, but I don't think it's the source of my problem.
The reason I say that is when I run that goal, I see this in the output
[INFO] Adding repository
http://download.eclipse.org/tools/cdt/releases/8.6 [INFO] Fetching
p2.index from http://download.eclipse.org/tools/cdt/releases/8.6/r/
(0B at 0B/s)
I don't know why it downloads 0 Bytes, but I assume this is why I can't find a cache of the CDT bundles when I try to do an offline build.
If anyone has an idea how to work around this failure, or any other approach to make an offline build work, that would be very helpful.
I created this Maven bug report in the issue tracker.
In the course of creating a stripped down project to demonstrate the problem, I discovered the cause. The presence of org.eclipse.xtend:xtend-maven-plugin in the pom was causing the problem. The plug-in is not used, and was perhaps misconfigured, per a message I saw in the build output.

"dist" command gets "not a valid command" error

I have a working Play Framework 2.1 application generated with typesafe activator that I've developed in Scala. I'm trying to deploy it in CloudBees using the instructions that can be found here: http://wiki.cloudbees.com/bin/view/RUN/Playframework#HDeployingaPlay2application using the method described under "Using Cloudbees SDK."
However, when I load up the play console and try to run the "dist" command, I get the error "Not a valid command: dist."
I've tried two run this three different ways:
In the terminal window (I'm using Mac OS X), I navigated to the project directory, ran the "activator" application (there is no application in that directory called "play", but "activator" seems to be the), then from the prompt that appears I enter the command "dist."
I downloaded the regular (non-activator) Play Framework distirbution file, add the directory to my path using "export PATH=$PATH:/Applications/play-2.2.2", navigated to the project directory, and ran the command "play dist."
Installed play using Homebrew. Navigated to the project directory and ran "play dist".
All three methods give me the same error (see below). Is the method different for my version of play? Am I missing something from the sbt file? How can I get this working?
Full output for "play dist":
Macmini-##########-#:nimrandslibrary.searchfu.esl kpyancey$ play dist
[info] Loading project definition from /Users/kpyancey/Projects/NimrandsLibrary.SearchFu.Esl/project
[info] Set current project to NimrandsLibrary.SearchFu.Esl (in build file:/Users/kpyancey/Projects/NimrandsLibrary.SearchFu.Esl/)
[error] Not a valid command: dist (similar: set, iflast, last)
[error] Not a valid project ID: dist
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: dist (similar: test, ivy-sbt, history)
[error] dist
[error] ^
I think you have misconfigured something in your project.
To double check, generate a new project from Activator or try downloading https://github.com/CloudBees-community/play2-clickstart (which is correctly configured) and run play dist.

GWT Maven : Module 'xxx' may need to be (re)compiled

Problem: Keep getting "module 'xxx' may need to be (re)compiled".
Steps:
Importing a sample GWT-Maven project into eclipse ("MobileWebApp" - from the GWT SDK).
GWT|compile the project.
Running in production mode (without the codesvr parameter, i.e. using "localhost:8888/MobileWebApp.html").
Notes:
I am fairly new to both GWT and Maven.
I read GWT module may need to be (re)compiled REDUX.
Dev mode does work (I am able to debug the application).
Detailed Steps:
Copying the "MobileWebApp" folder from the "samples" folder inside the GWT SDK (version 2.5.1) to my eclipse workspace.
Importing the project: File->Import->Existing Maven Projects (pointing to the "MobileWebApp" folder where the pom.xml exists.
Configuring the project following these steps: https://developers.google.com/eclipse/docs/faq?hl=iw#gwt_with_maven
At this point I am able to run the app as "Web Application" and debug it.
Running GWT|Compile: The nocache.js stuff is being placed in the target folder.
Now, when i try to run the app in production mode I am getting the (re)compile error.
Logs:
"DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
DataNucleus Enhancer completed with success for 0 classes. Timings : input=713 ms, enhance=0 ms,
total=713 ms. Consult the log for full details
DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details"
"Compiling module com.google.gwt.sample.mobilewebapp.MobileWebApp
Validating units:
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Compile of permutations succeeded
Linking into D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\mobilewebapp
Invoking Linker AppCacheLinker
Be sure your landing page's tag declares a manifest:
Link succeeded
Compilation succeeded -- 152.077s"
"Initializing App Engine server
06/07/2013 20:12:33 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
06/07/2013 20:12:33 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/appengine-web.xml
06/07/2013 20:12:33 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/web.xml
06/07/2013 20:12:34 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
06/07/2013 20:12:36 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at localhost:8888/
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at localhost:8888/_ah/admin
Linking modules
Bootstrap link for command-line module 'com.google.gwt.sample.mobilewebapp.MobileWebApp'
Linking module 'mobilewebapp'
Invoking Linker AppCacheLinker
DevMode warning: Clobbering appcache.nocache.manifest to allow debugging. Recompile before deploying your app!
Be sure your landing page's tag declares a manifest:
06/07/2013 20:13:38 com.google.apphosting.utils.jetty.AppEngineAuthentication$AppEngineAuthenticator authenticate
INFO: Got /MobileWebApp.html but no one was logged in, redirecting."
Pom.xml: https://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/
Thanks ahead.
Answering my own question:
1) from command: "mvn gwt:run".
2) Google|GWT compile.
P.S. As much as I am happy figuring that out (after agonizing couple of days) I would still like to know the reasons of why I have to - first lunch the app then compile it. Very strange - in my humble opinion.
offtopic: This sample app was supposed to be "offline executable" (from mobile, at the very least) - so how exactly do I test it? I tried (after running the app once or twice from mobile device, so that it will be cached) to switch to airplane mode and navigating to the app (just like he demonstrated) but, obviously(?), the server is not reachable.. Do I need to enable something specific for it to work? (my mobile device is Google-Nexus-4)
Multiple steps:
Update Project properties -> deployment Assembly using Deploy GWT maven project with eclipse deploys webapp directory instead of target/project directory
mvn clean package
mvn gwt:compile
In eclipse, click on 'GWT Compile Project' -> Advacned -> Remove '-war src/main/webapp' argument and hit compile.
Output should be like this -
Linking into target/project-1.0-SNAPSHOT/ModuleName
Now the deployment should work fine.

GWT Development Mode with Eclipse/Maven

I am just starting with GWT. I use Eclipse and have installed the GWT plugin.
I have followed the directions here Maven GWT 2.0 and Eclipse to set up a GWT project using the gwt-maven-plugin. When I run the Maven goals gwt:compile gwt:run, GWT Development Mode is launched and I can copy the url from it to my browser and view the label.
However, the project has this problem:
Description: The web.xml file does not exist
Resource: WEB-INF
Path: /GWTExample/war
Location: Unknown
Type: Google Web App Problem
If I try to run the project as a Google Web Application, I get this warning:
[WARN] No startup URLs supplied and no plausible ones found -- use -startupUrl
I can get rid of the problem by copying the web.xml to the war directory, but I still get the URL issue when running as a Google Web App.
If I'm using Maven and GWT in Eclipse, should I just ignore the web.xml problem and always run applications in development mode via the Maven goals? Or is there a way to set things so I can run as a Google Web App?
EDIT: Related to the above, is it possible to debug a GWT app running in development mode started by gwt:compile gwt:run? I have added breakpoints to my application but it doesn't stop on them. I'm not sure if it is something I've configured wrong or if it's just not possible.
Update:
In response to Prem's answer...
When I run a compile gwt:run, the web.xml file isn't copied. When I run the install gwt:run, I get this error:
[INFO] --- gwt-maven-plugin:1.2:test (default) # SampleGWT ---
[INFO] using GWT jars from project dependencies : 2.0.4
[INFO] establishing classpath list (scope = test)
[ERROR] java.lang.NoClassDefFoundError: org/codehaus/mojo/gwt/test/MavenTestRunner
[ERROR] Caused by: java.lang.ClassNotFoundException: org.codehaus.mojo.gwt.test.MavenTestRunner
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[ERROR] Could not find the main class: org.codehaus.mojo.gwt.test.MavenTestRunner. Program will exit.
[ERROR] Exception in thread "main"
I’m guessing that bug http://jira.codehaus.org/browse/MGWT-24 is included in version 1.2 of the gwt-maven-plugin. Normally I wouldn’t run install on a project that builds a war file, but I would expect to at least get past the test phase of the build cycle.
Does anybody have any idea why I would get this error on the install but not the compile goals? Also, should I be expecting either goal to copy the web.xml file from src/main/webapp/WEB-INF/web.xml to the /war directory?
Description: The web.xml file does not exist
gwt-maven-plugin creates a project with 'war' packaging format (it's a web app so no surpirse here). Web.xml for this project will be under 'src/main/webapp' folder which will be copied to the 'war' directory (which is set as the output directory) as part of the 'resources' phase in the maven build life-cycle. You should always use
mvn compile gwt:run
or
mvn install gwt:run
so that resources are copied, all java files are compiled and gwt:compile is also invoked (since it is bound to the 'compile' phase automatically)
[WARN] No startup URLs supplied and no plausible ones found -- use -startupUrl
As per the stackoverflow link you used as reference, only your maven build file is setup with startupUrl. In order for it to work in Eclipse, you must edit the Run Configuration of your project and add the '-statupUrl' command line arguments to the existing arguments in the "Arguments" panel.
However, this is just a warning and it should not stop you from running your GWT application from eclipse. If you are facing the same "web.xml" problem here as well, it could be because you did not compile your project in your IDE before invoking "Run as Web Application". I suggest you to disable "Build Automatically" option for this project and always build it manually and invoke "GWT Compile" and then try "Run as web application"
EDIT: Related to the above, is it possible to debug a GWT app running in development mode started by gwt:compile gwt:run?
In general you must use "Remote Application" debug configuration for remote debugging a process. However I am not sure if it will work for GWT projects.
I got me too this warning:
No startup URLs supplied and no plausible ones found
when I have followed this gwt tutorial
In that screenshot there is no checkbox with "Generate sample code" . In my IDE ( sdk 2.5) it is, so I have unchecked...
It wasn't created any of the server and client packages, I have created the client manually, as the tutorial required. The tutorial until that step doesn't say I must have a server package too. That and his configuration is missing from project.
If you right-click on your project and go to Properties -> Google -> Web Application, your WAR directory might be something like either war or src/main/webapp/WEB-INF/classes.
Change that to src/main/webapp.
Also un-check the box next to "Launch and delploy from this directory..."
That's what fixed this problem for me. It also fixed the "can't find gwt-servlet.jar" problem at the same time.