Two different configuration files share the same UUID. In configuration - eiffel

Don't understand this message and neither how to fix it under estudio 19.12
Warning code: VD80
Configuration warning
Two different configuration files share the same UUID. In configuration:
/home/pg/data/solarity/sit-dev/eiffel/sit-platform/sit_platform_lib.ecf
the following reference:
/opt/Eiffel_19.12/contrib/library/gobo/library/kernel/library.ecf
has the same UUID as the configuration file:
/home/pg/data/solarity/sit-dev/eiffel/lib/thirdparty/gobo/library/kernel/src/library.ecf
referenced from:
/home/pg/data/solarity/sit-dev/eiffel/lib/thirdparty/gobo/library/time/src/library.ecf.

It turns out the project sit_platform_lib.ecf (indirectly) references two different versions of Gobo kernel library:
/opt/Eiffel_19.12/contrib/library/gobo/
/home/pg/data/solarity/sit-dev/eiffel/lib/thirdparty/gobo
Whereas both could be identical copies, you need to select which one to use and update project settings to use only one version.

Related

Problems compiling Traffic library

I attempted to install the Traffic library for the book "A Touch of Class" but was not able to compile the examples. EiffelStudio complained about a base2.ecf file.
Error code: VD00
General configuration parsing error.
What to do: fix the configuration file.
Could not open file: \base2.ecf
$EIFFELBASE2\base2.ecf
base2.ecf is found in where Windows installed Eiffel: C:\Program Files\Eiffel Software\EiffelStudio 18.11 GPL\unstable\library\base2.ecf The offending line of code seems to be this in the Traffic configuration files:
I have attempted to change this configuration file pointing directly to where the file is, using the actual path, to no avail.
Setting the variable EIFFELBASE2 might help:
set "EIFFELBASE2=C:\Program Files\Eiffel Software\EiffelStudio 18.11 GPL\unstable\library"
Then, EiffelStudio should be started from the environment where the variable is set.
(However, I wonder if this is the library to be used with the examples, or if there is another one that comes together with the examples.)

Integrate Saxon-PE in Camel using camel-saxon

I use Camel 2.22.1 with springboot 2.0.4.RELEASE. The camel component camel-saxon use default Saxon-HE. I have some Xquery files, which call Java method, so I want to replace Saxon-HE with Saxon-PE. I requested one test license for Saxon-PE and tried different ways and didn't get it work. The Saxon-PE jar file saxon9pe.jar is already loaded, however, it is still working as Saxon HE edition. I guess, the license is not correctly loaded by Saxon-PE.
I tried following ways, none of them has worked.
put license file saxon-license.lic and saxon9pe.jar in the same folder
define an environment variable SAXON_HOME, and put saxon-license.lic and saxonpe.jar in SAXON_HOME\bin
modify org.apache.camel.component.xquery.XQueryBuilder.configuration in class XqueryBuild.java in package org.apache.camel.component.xquery to set LICENSE_FILE_LOCATION ( I got Error: Unknown configuration property http://saxon.sf.net/feature/licenseFileLocation)
The Saxon Documentation mentioned to create an XML configuration file, but I don't know where should I put this XML configuration file.
When running an Xquery with Java call I got the error:
Caused by: net.sf.saxon.trans.XPathException: Cannot find a 0-argument function named Q{java:java.lang.Double}MAX_VALUE(). Reflexive calls to Java methods are not available under Saxon-HE at net.sf.saxon.query.UnboundFunctionLibrary.bindUnboundFunctionReferences(UnboundFunctionLibrary.java:166) ~[saxon9pe.jar!/:na]
at net.sf.saxon.query.QueryModule.bindUnboundFunctionCalls(QueryModule.java:1172) ~[saxon9pe.jar!/:na]
at net.sf.saxon.expr.instruct.Executable.fixupQueryModules(Executable.java:462) ~[saxon9pe.jar!/:na]
at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:176) ~[saxon9pe.jar!/:na]
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:597) ~[saxon9pe.jar!/:na]
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:658) ~[saxon9pe.jar!/:na]
at org.apache.camel.component.xquery.XQueryBuilder$3.createQueryExpression(XQueryBuilder.java:276) ~[classes!/:2.23.1]
at org.apache.camel.component.xquery.XQueryBuilder.initialize(XQueryBuilder.java:745) ~[classes!/:2.23.1]
at org.apache.camel.component.xquery.XQueryBuilder.evaluateAsDOM(XQueryBuilder.java:190) ~[classes!/:2.23.1]
at org.apache.camel.component.xquery.XQueryBuilder.evaluate(XQueryBuilder.java:151) ~[classes!/:2.23.1]
... 40 common frames omitted
Can some share some experience with setting up Saxon-PE with camel to get calling Java working within Xquery?
Thanks!
From the extra information supplied, it looks as if you're picking up the Saxon JAR file but not the license file.
Putting the license file in the same folder as the JAR file is often enough, but it only works with some classloaders.
In general you either need to ensure that the directory containing the JAR file is on the classpath, or you need to (somehow) set Saxon's configuration property LICENSE_FILE_LOCATION.
According to https://github.com/apache/camel/blob/master/components/camel-saxon/src/main/docs/xquery-component.adoc, you can set Saxon configuration properties using configuration and configurationProperties, but I don't see any further explanation of how this works. I'll have a dig around.

How do I compile/build against Ocamlodbc

I've installed Ocamlodbc using opam install odbc, but I can't work out how to build an app that uses it with ocamlbuild. The examples that come with the source don't build either.
If I put
#require "odbc";;
into my .ocamlinit, I can open Odbc_unixodbc;; in utop, but any reference to functions in that module result in a "Reference to undefined global 'Odbc_unixodbc'" error.
The following snippet also fails with an error about no implementation for "Odbc_unixodbc"
open Odbc_unixodbc
let () = ignore (Odbc_unixodbc.connect "DSN" "UID" "PWD")
Trying
open Odbc
fails with "Unbound module Odbc"
I'm building the code with
ocamlbuild -pkg odbc test.native
The generated documentation for the package seem to suggest I should be opening the "Ocamlodbc" module, but that also results in an "Unbound module" error.
TL;DR
ocamlbuild -use-ocamlfind -pkg odbc test.native
Description
-use-ocamlfind tells ocamlbuild to use ocamlfind system to find libraries on your system. Otherwise, without this flag, you need to provide flags with concrete locations and also take care of the package dependencies. So, it is a good idea to always use ocamlfind.
If this command still doesn't work for you, then make sure, that you chose the right package name. You can use ocamlfind list to look at the set of all packages available on your system.
Further reading
While the above is ok for small programs, I would suggest to use OASIS system to handle all the flags for you.
You can start from this example, adapting dependency list to your neeeds.

Android Studio 0.4.2 Generate Client Libraries failing because of wrong folder name in path

In 0.4.0 and 0.4.2 (1/9/14 build) Generate Client Libraries gives an alert that the endpoints tree cannot be found. Although the libraries are in fact generated they don't get copied into app-endpoints as they should.
This is a bug and can be tracked at :
https://code.google.com/p/android/issues/detail?can=4&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=64537
What is the workaround?
To work around the failure of the automatic copy look for the generated code in app-AppEngine/google_generated like so...
After Generate Client Libraries, the code in
app-AppEngine/google_generated/endpoint/lib-expanded-source//endpoint/
{there are three .java files; endpoint.java, endpointRequest.java, and endpointRequestInitializer.java,
additionally there is a "model" folder with .java and CollectionResponse.java
}
are in fact the client libraries. copy them into
app-endpoints/src/endpoint-src/java/
good to go.

How do I require and provide clojure files?

I have a set of functions saved in a clojure file.
How do I Provide selected set of functions and then import these functions in my other file?
You have a few options.
If it’s just a file (not in a package) then in your files, you can just use load. If your file was named “fun.clj”, you would just use the name of the file without the extension:
(load "fun")
(provided fun.clj was on your classpath). Or
(load "files/fun")
if it wasn’t on your classpath but in the files directory.
Or you could use load-file and pass it the location of your file:
(load-file "./files/fun.clj")
If you wanted to namespace them (put them in a package), then you’d put the ns macro at the beginning of your file, again put it on your classpath. Then you could load it via use or require.
Here are the docs for the functions I’ve described:
load
load-file
ns
use
require
Besides "load"ing source files, you can also use the leiningen "checkout dependencies" feature. If you have two leiningen projects, say, project A requires B (provider). In the root directory of project A, create a directory called "checkouts". Inside "/checkouts" make a symbolic link to the root directory of project B.
- project A
- project.clj
- checkouts
- symlink to project B
- src
- test
in project A's project.clj, declare project B as a dependency in the :dependencies section as if it were a project in clojars.org. E.g.
(defproject project-a
:dependencies [[org.clojure/clojure "1.5.1"]
[project-b "0.1.0"]])
The thing though is, you have to go into project B and type:
lein install
That will compile project B's files into a jar file, which will appear in your ~/.m2 directory, which is kind of like your local clojars.org cache.
Once you set all this up, in your *.clj src file(s) of project A, you can "require" project B files in the normal way, as if it were from clojars.org:
(ns project-a.core
(:require [project-b.core :as pb])
This way, you can refer to functions in your project-b.core the usual way like this:
pb/myfunction1
In my opinion, this is a pretty good way to share libraries and data between Leiningen projects while trying keep each Leiningen project as independent, self-contained, and minimal as possible.
This one solved my problem and I have looked through countless other issues here so I would like to clarify.
The easiest way in emacs (on linux) is to do something like this:
java -cp "lib/*":. clojure.main -e "(do (require 'swank.swank) (swank.swank/start-repl))"
(note the "lib/*":. given to -cp
Then you can use M-x slime-connect to connect with this instance.
Don't know if it's required, but I have read that it's a good idea to use the same version of clojure, clojure-contrib and swank-clojure on both sides.
You can also setup the path inside emacs by consing the "." to swank-clojure-classpath.

Resources