Failed to compile JSP files during Glass QuickStart for Java - google-app-engine

enter code hereI am attempting to use the Mirror API. I am an explorer with Glass. My Mirror API is turned on in the API console.
The instructions I am following are here:
https://developers.google.com/glass/quickstart/java
I get to step 2 of Deploying. I am on a Windows machine and cd into app engine sdk bin folder and run the command specified but I modify the last parameter to be fully qualified.
It looks like this:
C:\Users\mscheel\Documents\Work\Glass\appengine-java-sdk-1.7.6\bin>appcfg.sh --o
auth2 update C:\Users\mscheel\Documents\Work\Glass\mirror-quickstart
-java-master\web
The very first time I ran this I got a web popup with an oauth dialog and got a success code that I pasted into the running app and then got an error, like this one I am pasting in from a subsequent run:
Welcome to Git (version 1.7.9-preview20120201)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
********************************************************
There is a new version of the SDK available.
-----------
Latest SDK:
Release: 1.8.0
Timestamp: Wed May 01 12:01:15 MDT 2013
API versions: [1.0]
-----------
Your SDK:
Release: 1.7.6
Timestamp: Fri Mar 15 19:18:56 MDT 2013
API versions: [1.0]
-----------
Please visit https://developers.google.com/appengine/downloads for the latest SD
K.
********************************************************
Reading application configuration data...
May 27, 2013 11:29:15 AM com.google.apphosting.utils.config.AppEngineWebXmlReade
r readAppEngineWebXml
INFO: Successfully processed C:/Users/mscheel/Documents/Work/Glass/mirror-quicks
tart-java-master/web\WEB-INF/appengine-web.xml
May 27, 2013 11:29:15 AM com.google.apphosting.utils.config.AbstractConfigXmlRea
der readConfigXml
INFO: Successfully processed C:/Users/mscheel/Documents/Work/Glass/mirror-quicks
tart-java-master/web\WEB-INF/web.xml
Beginning server interaction for bitcoinupdate...
0% Created staging directory at: 'C:\Users\mscheel\AppData\Local\Temp\appcfg8499
594854129199289.tmp'
5% Using java7 runtime: false
8% Scanning for jsp files.
11% Compiling jsp files.
Error Details:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:238)
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:214)
at org.apache.jasper.JspC.processFile(JspC.java:1181)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:
40)
Caused by: java.lang.NullPointerException
at com.google.appengine.tools.development.LocalJspC$LocalCompiler.<clini
t>(LocalJspC.java:53)
... 7 more
Error while executing: C:\Program Files (x86)\Java\jre6\bin\java.exe -classpath
/C:/Users/mscheel/Documents/Work/Glass/appengine-java-sdk-1.7.6/lib/impl/appengi
ne-api-labs.jar;/C:/Users/mscheel/Documents/Work/Glass/appengine-java-sdk-1.7.6/
lib/impl/appengine-api-stubs.jar;/C:/Users/mscheel/Documents/Work/Glass/appengin
e-java-sdk-1.7.6/lib/impl/appengine-api.jar;/C:/Users/mscheel/Documents/Work/Gla
ss/appengine-java-sdk-1.7.6/lib/impl/appengine-local-runtime.jar;/C:/Users/msche
el/Documents/Work/Glass/appengine-java-sdk-1.7.6/lib/impl/google_sql.jar;C:\User
s\mscheel\Documents\Work\Glass\appengine-java-sdk-1.7.6\lib\shared\appengine-loc
al-runtime-shared.jar;C:\Users\mscheel\Documents\Work\Glass\appengine-java-sdk-1
.7.6\lib\shared\el-api.jar;C:\Users\mscheel\Documents\Work\Glass\appengine-java-
sdk-1.7.6\lib\shared\jsp\repackaged-appengine-ant-1.7.1.jar;C:\Users\mscheel\Doc
uments\Work\Glass\appengine-java-sdk-1.7.6\lib\shared\jsp\repackaged-appengine-a
nt-launcher-1.7.1.jar;C:\Users\mscheel\Documents\Work\Glass\appengine-java-sdk-1
.7.6\lib\shared\jsp\repackaged-appengine-jasper-6.0.29.jar;C:\Users\mscheel\Docu
ments\Work\Glass\appengine-java-sdk-1.7.6\lib\shared\jsp\repackaged-appengine-ja
sper-el-6.0.29.jar;C:\Users\mscheel\Documents\Work\Glass\appengine-java-sdk-1.7.
6\lib\shared\jsp\repackaged-appengine-tomcat-juli-6.0.29.jar;C:\Users\mscheel\Do
cuments\Work\Glass\appengine-java-sdk-1.7.6\lib\shared\jsp-api.jar;C:\Users\msch
eel\Documents\Work\Glass\appengine-java-sdk-1.7.6\lib\shared\servlet-api.jar;C:\
Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\classes;C
:\Users\mscheel\AppData\Local\Temp\1369675757138-0;C:\Users\mscheel\AppData\Loca
l\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\appengine-api-1.0-sdk-1.7.6.jar
;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\a
ppengine-api-labs-1.7.6.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854
129199289.tmp\WEB-INF\lib\commons-codec-1.7.jar;C:\Users\mscheel\AppData\Local\T
emp\appcfg8499594854129199289.tmp\WEB-INF\lib\commons-logging-1.1.2.jar;C:\Users
\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\google-api
-client-1.14.1-beta.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg84995948541291
99289.tmp\WEB-INF\lib\google-api-client-appengine-1.14.1-beta.jar;C:\Users\msche
el\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\google-api-clien
t-servlet-1.14.1-beta.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg849959485412
9199289.tmp\WEB-INF\lib\google-api-services-mirror-v1-rev2-1.14.1-beta.jar;C:\Us
ers\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\google-
http-client-1.14.1-beta.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854
129199289.tmp\WEB-INF\lib\google-http-client-appengine-1.14.1-beta.jar;C:\Users\
mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\google-http
-client-jackson-1.14.1-beta.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg849959
4854129199289.tmp\WEB-INF\lib\google-oauth-client-1.14.1-beta.jar;C:\Users\msche
el\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\google-oauth-cli
ent-appengine-1.14.1-beta.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg84995948
54129199289.tmp\WEB-INF\lib\google-oauth-client-servlet-1.14.1-beta.jar;C:\Users
\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\guava-14.0
.1.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF
\lib\httpclient-4.0.1.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg849959485412
9199289.tmp\WEB-INF\lib\httpcore-4.0.1.jar;C:\Users\mscheel\AppData\Local\Temp\a
ppcfg8499594854129199289.tmp\WEB-INF\lib\jackson-core-asl-1.9.11.jar;C:\Users\ms
cheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\jackson-mappe
r-asl-1.9.11.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.t
mp\WEB-INF\lib\jdo2-api-2.3-eb.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg849
9594854129199289.tmp\WEB-INF\lib\jsr305-1.3.9.jar;C:\Users\mscheel\AppData\Local
\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\repackaged-appengine-ant-1.7.1.j
ar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib
\repackaged-appengine-ant-launcher-1.7.1.jar;C:\Users\mscheel\AppData\Local\Temp
\appcfg8499594854129199289.tmp\WEB-INF\lib\repackaged-appengine-jakarta-jstl-1.1
.2.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF
\lib\repackaged-appengine-jakarta-standard-1.1.2.jar;C:\Users\mscheel\AppData\Lo
cal\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\repackaged-appengine-jasper-6
.0.29.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-
INF\lib\repackaged-appengine-jasper-el-6.0.29.jar;C:\Users\mscheel\AppData\Local
\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\repackaged-appengine-jasper-jdt-
6.0.29.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB
-INF\lib\repackaged-appengine-tomcat-juli-6.0.29.jar;C:\Users\mscheel\AppData\Lo
cal\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\servlet-api-2.5.jar;C:\Users\
mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\lib\transaction
-api-1.1.jar;C:\Users\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\W
EB-INF\lib\xpp3-1.1.4c.jar; -Dcom.google.apphosting.runtime.use_java7=false com.
google.appengine.tools.development.LocalJspC -uriroot C:\Users\mscheel\AppData\L
ocal\Temp\appcfg8499594854129199289.tmp -p org.apache.jsp -l -v -webinc C:\Users
\mscheel\AppData\Local\Temp\appcfg8499594854129199289.tmp\WEB-INF\generated_web.
xml -d C:\Users\mscheel\AppData\Local\Temp\1369675757138-0 -javaEncoding UTF-8
com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp
files.
Unable to update app: Failed to compile jsp files.
Please see the logs [C:\Users\mscheel\AppData\Local\Temp\appcfg49961834510221726
1.log] for further information.
I am using Eclipse and to get the project to build I had to a) use the 1.7.6 App Engine SDK, b) change my JRE from jre7 to jdk1.6.0_25 (otherwise I would get a JSP problem) c) wipe out old maven and start fresh with a new install and blow away old settings
Regarding b:
Any ideas mirror-api team? Anybody else out there get this to work on Windows with Eclipse?
After a comment from Jenny Murphy am sharing the output of maven compile which succeeds with warnings:
C:\Users\mscheel\Documents\Work\Glass\mirror-quickstart-java-master>mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
com.google:glass-java-starter:jar:0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
unique: javax.servlet:servlet-api:jar -> duplicate declaration of version 2.5 #
line 73, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building glass-java-starter 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:copy-dependencies (default) # glass-java-
starter ---
[INFO] google-api-client-1.14.1-beta.jar already exists in destination.
[INFO] google-api-client-appengine-1.14.1-beta.jar already exists in destination
.
[INFO] google-api-client-servlet-1.14.1-beta.jar already exists in destination.
[INFO] google-api-services-mirror-v1-rev2-1.14.1-beta.jar already exists in dest
ination.
[INFO] appengine-api-1.0-sdk-1.7.6.jar already exists in destination.
[INFO] appengine-api-labs-1.7.6.jar already exists in destination.
[INFO] jsr305-1.3.9.jar already exists in destination.
[INFO] guava-14.0.1.jar already exists in destination.
[INFO] google-http-client-1.14.1-beta.jar already exists in destination.
[INFO] google-http-client-appengine-1.14.1-beta.jar already exists in destinatio
n.
[INFO] google-http-client-jackson-1.14.1-beta.jar already exists in destination.
[INFO] google-oauth-client-1.14.1-beta.jar already exists in destination.
[INFO] google-oauth-client-appengine-1.14.1-beta.jar already exists in destinati
on.
[INFO] google-oauth-client-servlet-1.14.1-beta.jar already exists in destination
.
[INFO] commons-codec-1.7.jar already exists in destination.
[INFO] commons-logging-1.1.2.jar already exists in destination.
[INFO] jdo2-api-2.3-eb.jar already exists in destination.
[INFO] servlet-api-2.5.jar already exists in destination.
[INFO] transaction-api-1.1.jar already exists in destination.
[INFO] httpclient-4.0.1.jar already exists in destination.
[INFO] httpcore-4.0.1.jar already exists in destination.
[INFO] jackson-core-asl-1.9.11.jar already exists in destination.
[INFO] jackson-mapper-asl-1.9.11.jar already exists in destination.
[INFO] xpp3-1.1.4c.jar already exists in destination.
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # glass-java
-starter ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\mscheel\Documents\Work\Glass
\mirror-quickstart-java-master\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # glass-java-star
ter ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.817s
[INFO] Finished at: Wed May 29 20:54:23 MDT 2013
[INFO] Final Memory: 8M/243M
[INFO] ------------------------------------------------------------------------

I finally got this to work on my Windows 7 box:
C:\Users\mscheel\Documents\Work\Glass\appengine-java-sdk-1.7.6\bin>appcfg.sh --o
auth2 update C:\Users\mscheel\Documents\Work\Glass\mirror-quickstart-java-master
\web
Welcome to Git (version 1.7.9-preview20120201)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Reading application configuration data...
Jun 01, 2013 12:04:33 PM com.google.apphosting.utils.config.AppEngineWebXmlReade
r readAppEngineWebXml
INFO: Successfully processed C:/Users/mscheel/Documents/Work/Glass/mirror-quicks
tart-java-master/web\WEB-INF/appengine-web.xml
Jun 01, 2013 12:04:33 PM com.google.apphosting.utils.config.AbstractConfigXmlRea
der readConfigXml
INFO: Successfully processed C:/Users/mscheel/Documents/Work/Glass/mirror-quicks
tart-java-master/web\WEB-INF/web.xml
Beginning server interaction for bitcoinupdate...
0% Created staging directory at: 'C:\Users\mscheel\AppData\Local\Temp\appcfg3034
149135282611799.tmp'
5% Using java7 runtime: true
8% Scanning for jsp files.
11% Compiling jsp files.
warning: Supported source version 'RELEASE_6' from annotation processor 'com.goo
gle.appengine.tools.compilation.DatastoreCallbacksProcessor' less than -source '
1.7'
1 warning
Jun 01, 2013 12:04:36 PM com.google.apphosting.utils.config.AbstractConfigXmlRea
der readConfigXml
INFO: Successfully processed C:\Users\mscheel\AppData\Local\Temp\appcfg303414913
5282611799.tmp\WEB-INF/web.xml
20% Scanning files on local disk.
25% Initiating update.
28% Cloning 14 static files.
31% Cloning 73 application files.
40% Uploading 3 files.
52% Uploaded 1 files.
61% Uploaded 2 files.
68% Uploaded 3 files.
73% Initializing precompilation...
77% Sending batch containing 2 file(s) totaling 2KB.
80% Sending batch containing 1 blob(s) totaling 0KB.
90% Deploying new version.
95% Closing update: new version is ready to start serving.
98% Uploading index definitions.
Update completed successfully.
Success.
Cleaning up temporary files...
This took a lot of effort, unfortunately, but the final solution was fairly simple. But first the problem. If you look in my original post at the execution you can see this line:
Error while executing: C:\Program Files (x86)\Java\jre6\bin\java.exe -classpath
In the top code snippet.
That JRE is bad. I want to be using a JDK. I discovered this eventually by running through Eclipse (trying to deploy to app engine) and saw a better error message there.
The solution for Eclipse was to modify my Eclipse.ini as instructed here:
http://wiki.eclipse.org/Eclipse.ini
This forces eclipse to use the JDK instead of the JRE to allow deploy to app engine through eclipse (gets you past the jsp compilation failure).
My exact ini file snippet is:
...
-vm
C:\Program Files\Java\jdk1.7.0_21\bin\javaw.exe
...
But this did not fix things through the command line via appcfg. This page had the solution:
https://code.google.com/p/googleappengine/issues/detail?id=1226
Which appears to be windows specific, and will be a problem for anyone that previously installed JRE 6 at least. You have to uninstall all old JRE's. See comment #6 on that page. I did this through the uninstall applications GUI in Windows.
Once I did both these things I no longer have a failure compiling JSP's related to the mirror api.

Related

Flutter Hive - Dead Lock ! code needs an Adapter class to run. but that Adapter class will be creatd after i run the code succesfully, in terminal

im new to programming, and english is my 2nd language, so please bypass any mistakes.
The instructor ran the build command in Terminal of IDE:
flutter packages pub run build_runner build
or if in above fails, he usually runs below command:
flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs web
but when i do the same error messages are generated.
error message:
This builder requires Dart inputs without syntax errors.
A function body must be provided.
Error Message in Terminal
E:\android\meter_switch>flutter packages pub run build_runner build
[INFO] Generating build script...
[INFO] Generating build script completed, took 711ms
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 124ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 1.1s
[INFO] Running build...
[SEVERE] hive_generator:hive_generator on lib/bank_account.dart:
This builder requires Dart inputs without syntax errors.
However, package:meter_switch/bank_account.dart (or an existing part) contains the following errors.
bank_account.dart:8:3: A function body must be provided.
Try fixing the errors and re-running the build.
[INFO] Running build completed, took 1.4s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 91ms
[SEVERE] Failed after 1.5s
pub finished with exit code 1
1. before terminal command image1
2. my code - after terminal - RUN section showed this error
3. my code - after terminal command image2
Ok issue solved.
its same issue as : A function body must be provided. Try adding a function body
the issue was "A function body must be provided."
I just had to put a semi-collan at the end, after writing out the constructor of a class.
the base of whole issue was that I was just Too sure that the issue would not be in that specific file. And the surity that i would never forget a semicolan meade me fall into this abyss of ignorance.
I had looked at the stackOverflow page (link given above), but i never tried it out.

zookeeper 3.6.2 c client compile failed

I downloaded the 3.6.2 source tarball (apache-zookeeper-3.6.2.tar.gz, sha512sum: 16994067d460a1b6af6a71f3458c64ee32629e876a1ff6646d57be62f1a5adab57462af84074ecaded4186dd3fde035ee24cd9d578b8e5044073eb05f4ab9c3e) from apache zookeeper website. Tried to compile its C client in a debian 10 OS.
In dir zookeeper-client/zookeeper-client-c, I ran "autoreconf -if" and "./configure --enable-debug". configure complained about "configure: error: jute files are missing! Please run "ant compile_jute" while in the zookeeper top level directory."
But then tried to run "ant compile_jute" at the top dir. complained about "Buildfile: build.xml does not exist!". Did some search and tried "mvn -pl zookeeper-jute compile" at the top dir. But still have some error. Can anyone know how to solve the issue? Thanks,
xing#debian10-dev ~/d/apache-zookeeper-3.6.2> mvn -pl zookeeper-jute compile
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< org.apache.zookeeper:zookeeper-jute >-----------------
[INFO] Building Apache ZooKeeper - Jute 3.6.2
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) # zookeeper-jute ---
[INFO]
[INFO] --- mavanagaiata:0.9.4:commit (find-current-git-revision) # zookeeper-jute ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.299 s
[INFO] Finished at: 2021-03-20T23:07:23-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.koraktor:mavanagaiata:0.9.4:commit (find-current-git-revision) on project zookeeper-jute: Unable to read Git commit information: Commit "24e9d01f1321d22f1eef2a3fc0f1b3d68f68d12c" could not be loaded. Short read of block. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Updated on 3/21:
The instructions coming with README (run "ant compile_jute" at top level dir and then "autoreconf -if; ./configure --enable-debug" in dir zookeeper-client/zookeeper-client-c) seem to work for version 3.5.9. I have switched to use that version while waiting for them to update the README for 3.6.2.

node-RED-dashboard: How do I download a csv file created with a file output node?

My aim is to display links to csv files so an end user can download them.
So I created a csv file and saved it using a file output node but I can't find a way to allow the end user to click a link/button to download it. I tried the following flow, but it points to http://localhost:1880/ui/~/TEST.CSV:
[{"id":"3aff08aa.8731d8","type":"inject","z":"a24aefdf.d606e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":100,"wires":[["1541e37c.3072dd"]]},{"id":"1541e37c.3072dd","type":"function","z":"a24aefdf.d606e","name":"","func":"msg.payload = {};\nmsg.payload = {\"col1\": 1, \"col2\": 2};\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":100,"wires":[["2d045a05.efbef6"]]},{"id":"12ba838c.dcd18c","type":"file","z":"a24aefdf.d606e","name":"TEST.CSV","filename":"~/TEST.CSV","appendNewline":true,"createDir":true,"overwriteFile":"true","x":570,"y":100,"wires":[]},{"id":"2d045a05.efbef6","type":"csv","z":"a24aefdf.d606e","name":"","sep":",","hdrin":true,"hdrout":true,"multi":"one","ret":"\\n","temp":"col1, col2","x":410,"y":100,"wires":[["12ba838c.dcd18c"]]},{"id":"5a9db6ab.f35b28","type":"http in","z":"a24aefdf.d606e","name":"downloads","url":"/downloads","method":"get","upload":false,"swaggerDoc":"","x":120,"y":160,"wires":[["7291d925.cfc9b8","ccef1ce3.900b8"]]},{"id":"7291d925.cfc9b8","type":"debug","z":"a24aefdf.d606e","name":"","active":true,"console":"false","complete":"false","x":140,"y":240,"wires":[]},{"id":"1916b0d1.3c55ff","type":"http response","z":"a24aefdf.d606e","name":"response","statusCode":"200","headers":{"content-type":"text/plain"},"x":560,"y":160,"wires":[]},{"id":"ccef1ce3.900b8","type":"ui_template","z":"a24aefdf.d606e","group":"a1588fc.a8dc47","name":"","order":0,"width":0,"height":0,"format":"<div ng-bind-html=\"msg.payload\"></div>\nDownload TEST.CSV","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":420,"y":160,"wires":[["1916b0d1.3c55ff"]]},{"id":"a1588fc.a8dc47","type":"ui_group","z":"","name":"Data Export","tab":"ea941605.788c18","disp":true,"width":"12"},{"id":"ea941605.788c18","type":"ui_tab","z":"","name":"Dashboard","icon":"dashboard","order":1}]
I expect this is something to do with absolute paths, but I don't know where the node-red web server's root is in the file system...
Any help would be gratefully received.
Cheers,
Simon
There is a section in your settings.js file, which by default reads:
// When httpAdminRoot is used to move the UI to a different root path, the
// following property can be used to identify a directory of static content
// that should be served at http://localhost:1880/.
//httpStatic: '/home/nol/node-red-dashboard/',
If you have not already done so, uncomment the httpStatic line and set a directory path to some absolute location that your node-red server can write to. Then restart node-red, and modify your flow to output the CSV file to this directory. Any files/folders you create under this location can now be served by the node-red express server.
When your node-red server starts, it will print out the absolute path used for serving static files -- for instance, in my project it shows:
13 Jan 12:06:45 - [info] Settings file : C:\NODE\node_red_ui\settings.js
13 Jan 12:06:45 - [info] HTTP Static : C:\NODE\node_red_ui\public
13 Jan 12:06:45 - [info] User directory : C:\NODE\node_red_ui
13 Jan 12:06:45 - [info] Flows file : C:\NODE\node_red_ui\flows_ENTLAPTOP18.json
13 Jan 12:06:45 - [info] Dashboard using development folder
13 Jan 12:06:45 - [info] Server now running at http://localhost:1880/admin/
13 Jan 12:06:45 - [info] Starting flows
So if I create the file C:\NODE\node_red_ui\public\downloads\test.csv,
then it can downloaded through the url =>
http://localhost:1880/downloads/test.csv

Generated assets not found play / scala framework

I'm new to scala. I'm trying to get this really interesting example from Matthias Nehlsen to work - github source.
I confirmed that I'm getting twitter data correctly (activator run). However, I'm not getting the generated public assets:
http://hostname:9000/angular/
Gives me this 404:
http://hostname:9000/assets/build/angular/birdwatch.js
http://hostname:9000/#
Gives me a 404 for this:
http://hostname:9000/assets/build/react-js/birdwatch.js
I am running using typesafe-activator 1.2.3 using: "activator run"
BirdWatch% activator run
[info] Loading project definition from ~/git/BirdWatch/project
[info] Set current project to BirdWatch (in build file:~/git/BirdWatch/)
--- (Running the application from SBT, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[info] application - Starting new client
On start (forgot to add, after a clean):
Compiling 13 Scala sources and 1 Java source to ~/git/BirdWatch/target/scala-2.10/classes...
[warn] /Users/NathanDunn/git/BirdWatch/conf/routes:6: unreachable code
[warn] GET /cljs-dev/ controllers.BirdWatch.indexCljs
[warn] /Users/NathanDunn/git/BirdWatch/conf/routes:9: unreachable code
[warn] GET /cljs/ controllers.BirdWatch.indexCljsOpt
[warn] two warnings found
I think that this is just indicating that the previous pattern subsumes the latter.
You Need to build the Clients.
Quoting the author :
The different clients are located in the clients/ folder, each of them needs to be built in order to work. Client build artifacts are no longer checked into the git repository in order to avoid bloating the repository size.
Have a look at their read me files:
You need Node.js, Grunt and Bower to build the angular client.
https://github.com/matthiasn/BirdWatch/tree/master/clients/angular
https://github.com/matthiasn/BirdWatch/blob/master/clients/react-js

m2eclipse - Mystery Build Failure on Package

I am using Eclipse 3.6 (Helios64) and m2eclipse 0.12.1.20110112-1712. I have a new project that only contains two classes that builds a jar. When I right click the project and select "Run As -> Maven package", I get the following error:
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # switch-provisioning-rest-client --- [INFO] Compiling 2 source files to C:\Devel\EclipseProjects\MyProject\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: invalid flag: -s
...
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
When I set up a run configuration with the Goals "package -X", the project builds without error. If I run a configuration with the goal set to compile, it builds without error and I can then run "Maven package" successfully.
This is the only project I'm having issues with. All my other projects build sucessfully when doing a "Maven package".
There's nothing exceptional about the project pom.xml. It refers to the same parent pom as the other projects and contains its project specific dependencies.
Has anybody got any ideas what could be different about this project?
TIA!
This issue was answered on the m2eclipse mailing list:
http://dev.eclipse.org/mhonarc/lists/m2e-users/msg01818.html
Although my pom had 1.6 as the version, the project configuration hadn't been updated.
From: Benjamin Bentmann
This issue is not really specific to m2e but applies to mvn in general, as such the Maven user list might provide a better audience for help.
IIRC, the specific error means you trying to use a JDK 1.5 while you need JDK 1.6+ where the javac option in question was added. Assuming your project should actually compile against JDK 1.5, downgrading the maven-compiler-plugin version might also do, I would expect it started to use the -s option when the annotation processing support was added.

Resources