Why does my ATG build fail when using runAssembler? - macos

I recently installed ATG 10.2 on my Mac using the instructions found here.
After successfully installing ATG I then tried to compile my ATG code using the runAssembler script provided, however I encountered the following error:
[ERROR] ./bin/dynamoEnv.sh: line 355: -Djava.security.policy=lib/java.policy: No such file or directory
Why does my ATG build fail?

In the spirit of SO I am answering my own question:
It turns out I encountered a known bug with the ATG installers which fail to update the <DYNAMO_HOME>/home/localconfig/dasEnv.sh with the correct values (dasEnv.bat for Windows). The values which you need to add to this file are:
# Note: I am using WebLogic (change if you are using jBoss or WebSpere)
export ATGJRE=<YOUR_PATH_TO_JAVA>
# e.g. export ATGJRE=/usr/bin/java
export WL_HOME=<WLS_HOME>
# e.g. export WL_HOME=/Users/my_user/Applications/weblogic/wlserver10_3
export WL_VERSION=10.3.6
# self explanatory ...
Please note that this bug affects Windows installs too. More information can be found here.

Related

Starting a payara 5 has encountered

I have build a very simple project of hello world in
Payara 5 (5.181)
JSF 2.3
JDK 1.8
CDI 2.0
Maven
and encountered a problem
Unable to start server due following issues: Launch process failed with exit code 1
in console it throws an error of :
Error: Could not find or load main class server\payara5\glassfish.lib.grizzly-npn-bootstrap.jar
[PIC] Payara 5 Error
It seems that the Payara Tools for Eclipse suffer by several bugs that may cause this. In my case, the following workarounds helped:
The Payara installation path should not contain spaces (e.g. Program Files\Payara)
It seems that only Java 8 is supported at the time
Open the domain.xml configuration file for the domain you are trying to start (typically payara_install_path/glassfish/domains/domain1/config/domain1.xml) and search for "Xbootclasspath". You should find a couple of lines like
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
<jvm-options>[1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
Depending of your installed Java version (try running java --version) and choose the appropriate line (most likely the last one). Remove the remaining lines and remove the [...] part at the beginning of the chosen line so you will get something like
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
After this, the tools seem to start normally.
The Problem is with Java version. The grizzly-npn-bootstrap-1.8.1.jar Jar is placed in bootclasspath, thats why it requires proper java version to start payara server. So remove unnecessary bootstrap jar from domain.xml.
In Windows:
1) Go To ---C:\Users\xxxx\payara5\glassfish\domains\domain1\config\domain.xml
2) According to my java verson(java version "1.8.0_191") I deleted the following lines from domain.xml. So delete according to your java version.
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
3) Remove this [1.8.0u191|1.8.0u500] part from jvm-options & Edit the line in your domain.xml(w.r.t java -version) as shown below
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
4) restart your server.
As Radkovo said, "The Payara installation path should not contain spaces (e.g. Program Files\Payara)", so I moved the Payara to the Documents folder.
Problem solved!

Caffe for Windows on VS 2013 failing with leveldbutil error

I am trying to compile and run cafee with the directions found here:
https://initialneil.wordpress.com/2015/07/15/caffe-vs2013-opencv-in-windows-tutorial-i/
But when I run it, for example on the MNIST example:
"bin\caffe.exe" train --solver=examples\mnist\lenet_solver.prototxt
I get the output:
Usage: leveldbutil command...
dump files... -- dump contents of specified files
What do I do to fix this?
Pulling from https://github.com/BVLC/caffe/tree/windows solved the problem.
Check the users group in case you need help:
https://groups.google.com/forum/#!forum/caffe-users
Check the issue tracker in case you need help:
https://github.com/BVLC/caffe/issues

Verpatch.exe error

I am trying to add new version resource string to .exe file using verpatch.
I need to add new sting to version resource as I am creating test connector to Qlikview. For QlikView and Qlik Sense to be able to recognize an .exe file as a connector, the file version information resource must include the property “QlikView Connector”.
I am developing my connector with Visual Studio and this command is run as a post build command and build ends with error. I also tried to run it from command line with same result:
C:\verpatch>verpatch.exe C:\QV_temp\QVTestConnector.exe /s "QlikView Connector" "Qv Test Connector"
Exception in ParseBinaryVersionResource
Error in ParseBinaryVersionResource
error parsing version info from the file
Some of actions failed, exiting
I have also tried different versions on verpatch.exe. Any ideas?
The example that Qlik gives on their documentation does not seem to work with the version of verpatch.exe that ships with QVX SDK 2.1.
I resolved this error by updating to a newer version from CodePlex.
Edit:
verpatch seems to have moved to https://github.com/pavel-a/ddverpatch/releases
Please see documentation. After /s should go "description".
If it has problem reading existing version resource, try to rewrite it completely with /va. So, do something like:
verpatch your.exe 1.0.0.0 /va /s desc "QlikView Connector" /s product "Qv Test Connector"
If you can share the problematic exe with the author of verpatch (on Codeplex), he may provide a fix.
I couldn't set properties on my executable with any version of verpatch - because I had a different codepage in the resource strings.
I would recommend rather using the Python package pe-tools (PyPI), which has a nicely documented command peresed that does this (docs).
You can also set specific version-info fields or set resource entries to the contents of a file:
peresed filename.exe -V "QlikView Connector=Qv Test Connector"
I have run this command successfully, but not verified whether the properties were set - but other properties like FileDescription are set correctly.

Unable to compile Firefox OS

Sorry about the vagueness of the question title, but I've been having problems compiling Firefox OS and am unsure where to turn (I know there's Bugzilla but I'm not sure if what I'm experiencing is a bug or not)
Basically, I've been trying to compile the latest Firefox OS from source using the official instructions. I'm trying to build a system that supports the languages en-GB, en-US and tr (with en-GB as the default). My .userconfig is as follows:
export MAKE=
export CC=gcc-4.6
export CXX=g++-4.6
VARIANT=user
# GAIA l10n
export GAIA_DEFAULT_LOCALE="en-GB"
export LOCALE_BASEDIR="$PWD/locales"
export LOCALES_FILE="$PWD/locales/languages_some.json"
export GAIA_KEYBOARD_LAYOUTS="en,tr"
# Gecko l10n
export L10NBASEDIR=$PWD/gecko-locales
export MOZ_CHROME_MULTILOCALE="en-GB tr"
export PATH="$PATH:$PWD/compare-locales/scripts"
export PYTHONPATH="$PWD/compare-locales/lib"
The contents of languages_some.json is as follows:
{
"en-GB" : "English (GB)",
"en-US" : "English (US)",
"tr" : "Türkçe"
}
compare_locales contains an unmodified clone of this repo, and gecko-locales contains clones of en-GB and tr locales from the official repository (there is no 'en' or 'en-US' repository).
Now, I'm not 100% sure where the error is. I have tried searching Google for any suspect lines, but nothing has come up.
I have posted full output as a GitHub Gist. Suspect lines as far as I can tell (this is my first time compiling either Firefox or a mobile phone OS) are:
2015-03-16 16:43:12: stackwalker.cc:125: INFO: Couldn't load symbols for: |
2015-03-16 16:43:12: basic_code_modules.cc:88: INFO: No module at 0x2ab95ac94aa0
(then followed by a lot of 'No module at ...' errors)
also
System JS : ERROR file:///opt/src/B2G/gaia/b2g_sdk/34.0a1-2014-08-12-04-02-01/b2g/components/nsHandlerService.js:120 - NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]
This error is repeated a fair few times throughout the code, but I can't tell if it's harmless or if it's stopping the build.
There's also a bunch of lines about missing translations, but I imagine they're just harmless. I have tried to cut them down as much as possible (by adding the missing translations) but the problem persists.
Oh yes, and in case someone asks, I have been running with my phone plugged in, and it is visible on adb devices. I have also tried removing the out and backup-inari directories.
System specs, PC:
Debian Sid, mostly up-to-date, but running with an old version of make (build refuses to run on any version newer than 3.8)
GCC 4.6 and 4.9. export CC=gcc-4.6 set in .userconfig
G++ 4.6 and 4.9. export CXX=g++-4.6 set in .userconfig
Phone:
Original ZTE Open. This originally came with FFOS 1.0, but I have since upgraded to 1.1 by flashing the official ROM.

Resurrecting old PLT-Scheme project (pre-1999)

I'm trying to resurrect an old (1999 or earlier) project written in Scheme (PLT-Scheme, using the mzscheme interpreter (?) commandline tool). To make the matters worse, I don't know Scheme, or Lisp (in fact, I want to learn, but that's another story).
I have the source code of the project at:
github.com/akavel/sherman
Now, when running the code, it bails out with an error message like below:
Sherman runtime version 0.5
Hosted on MzScheme version 52, Copyright (c) 1995-98 PLT (Matthew Flatt)
reference to undefined identifier: list->block
(I've tried PLT-Scheme versions 52, 53, 103, 103p1. Earlier versions don't allow mzscheme -L option, which is referenced in the sherman.bat script used in the project. Later versions also have some more serious problems with the code or options.)
The difficulty is, that from what I see, list->block actually is defined - see: collects/sherman/BLOCK.SS line 48. So, what is wrong?
To run the code, I perform the following steps:
Download PLT-Scheme v. 103p1 (from the old versions download page - first closing the "PLT Scheme is now Racket" banner) - for Windows, use: mz-103p1-bin-i386-win32.zip.
Unzip (e.g. to directory c:\PLT).
Copy c:\sherman\collects\sherman directory with contents to: c:\PLT\collects\sherman (where c:\sherman contains the contents of the github repository).
Run cmd.exe, then cd c:\sherman.
set PATH=c:\PLT;%PATH%
sherman.bat run trivial.s
this command is in fact, from what I understand, equivalent to:
(require-library "runtime.ss" "sherman")
(parameterize ((current-namespace sherman-namespace)) (load "trivial.s"))
(current-namespace sherman-namespace)
After that, I get the error as described above (MzScheme version would be reported as 103p1 or whatever).
Could you help me solve the problem?
EDIT 2: SOLVED!
To whom it may concern, I've added a fully fledged "How to use this project" instruction on the project page, detailing the solution to the problem thanks to soegaard's help.
In short:
copy trivial.s trivial.rs
rem (the above is workaround for problems with 'r2s.exe < trivial.r > trivial.rs')
sherman.bat compile trivial.rs
sherman.bat run trivial.zo
rem (or: sherman.bat run trivial.ss)
Not an answer, but a few notes too big for a comment.
1. Sanity Check
The error message says list->block is undefined.
Make sure that the code in block.ss is run, by
inserting (display "block.ss is loaded!") in block.ss
just to make sure, the code is run.
2. Random Thoughts
The file blocks.ss begins with:
(require-library "functios.ss")
(require-library "synrule.ss")
(require-library "stream.ss" "sherman")
The file "sherman/stream.ss" is in the repository,
but where is "synrule.ss" and "functios.ss" ?
Ah... This code is old! Here is a description of
how require-library worked. It lists functios.ss
and synrule.ss as part of MzLib.
http://www.informatik.uni-kiel.de/~scheme/doc/mzscheme/node158.htm
Let's check out how require-library worked:
When require-library is used to load a file, the library name and the
resulting value(s) are recored in a table associated with the current
namespace. If require-library is evaluated for a library that is
already registered in the current namespace's load table, then the
library is not loaded again; the result(s) recorded in the load table
is returned, instead.
So when the code in block.ss is run, the names are stored in a namespace. If the current namespace is the wrong one, when the code in block.ss is evaluated, it would explain you error message of list->block being undefined.

Resources