DAML Sand box error: Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required - daml

Getting below error when I start sandbox. I think we need use jdk8 as per the DAML doc.
daml sandbox --scenario Main:setup .daml/dist/quickstart-0.0.1.dar
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
daml-helper: Received ExitFailure 2 when running
Raw command: java -jar "C:\Users\santh\AppData\Roaming\daml\sdk\0.13.21\sandbox/sandbox.jar" --scenario Main:setup .daml/dist/quickstart-0.0.1.dar

During my initial setup, I have faced the similar issue. It may be because of an existing Java installation in your machine.
You can try the below options to fix this issue.
Option 1:
1. Check if you have more than one version of JAVA in machine.
2. If yes, uninstall everything and do the clean installation. Make sure your Environment Path variable(s) are got set properly.
or
Option 2:
1) Download the latest JDK in Zip format "jdk-12.0.2_windows-x64_bin.zip"
2) Extract it manually in your local drive.
3) Manually update your Environment Path variables (ref. https://javatutorial.net/set-java-home-windows-10).
I hope it will help you to fix your problem.
Cheers,
Augustine

Related

While running oracle Goldengate for mysql version 19.1 getting warning--> !!! WARNING !!! --> libssl-2.17.0-stub.so

I am using oracle goldengate for mysql version 19.1. While login to mysql DB from ggsci I am getting below warning. I have checked file libssl-2.17.0-stub.so, this file is not
present in LD_LIBRARY_PATH also not present in my linux machine. Due to this warning login not happening hence extract is not starting. Also did set up environment variables like-
MYSQL_UNIX_PORT
MYSQL_HOME
OGG_MYSQL_OPT_SSL_CA
OGG_MYSQL_OPT_SSL_CERT
OGG_MYSQL_OPT_SSL_KEY
GGSCI > dblogin SOURCEDB DB#host:3306, USERID XXX PASSWORD XXXX
Getting below error-
!!! WARNING !!! --> libssl-2.17.0-stub.so
This is a stub library which can be used for linking only. It must not
be used as a runtime library. Please make sure this library is not found
in LD_LIBRARY_PATH.
Can someone please help me with this.
Can you follow the steps from this doc link, and install OpenSSL and set the PATH as needed:
Check out this topic:
6.4 Other Programs and Settings for MySQL
Doc link: https://docs.oracle.com/en/middleware/goldengate/core/19.1/installing/installing-mysql1.html#GUID-14BA87AB-194B-483C-AECF-151A31F4AFC1
Let us know if that resolves it.

Dropped rows in Spark when modifying database in MySQL

I've been following the 5 min how to for setting up an htap databse with tidb_tispark and everything works until I get to the section Launch TiSpark. My first issue occurs when executing the line:
docker-compose exec tispark-master /opt/spark-2.1.1-bin-hadoop2.7/bin/spark-shell
But I got around that by modifying the spark version to the version I found inside the container:
docker-compose exec tispark-master /opt/spark-2.3.3-bin-hadoop2.7/bin/spark-shell
My second issue occurs when executing the three line block:
import org.apache.spark.sql.TiContext
val ti = new TiContext(spark)
ti.tidbMapDatabase("TPCH_001")
When I run the last statement I get the following output
scala> ti.tidbMapDatabase("TPCH_001")
2019-07-11 16:14:32 WARN General:96 - Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/opt/spark/jars/datanucleus-core-3.2.10.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/opt/spark-2.3.3-bin-hadoop2.7/jars/datanucleus-core-3.2.10.jar."
2019-07-11 16:14:32 WARN General:96 - Plugin (Bundle) "org.datanucleus.api.jdo" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/opt/spark/jars/datanucleus-api-jdo-3.2.6.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/opt/spark-2.3.3-bin-hadoop2.7/jars/datanucleus-api-jdo-3.2.6.jar."
2019-07-11 16:14:32 WARN General:96 - Plugin (Bundle) "org.datanucleus.store.rdbms" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/opt/spark/jars/datanucleus-rdbms-3.2.9.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/opt/spark-2.3.3-bin-hadoop2.7/jars/datanucleus-rdbms-3.2.9.jar."
2019-07-11 16:14:36 WARN ObjectStore:568 - Failed to get database global_temp, returning NoSuchObjectException
This doesn't prevent me from running the query:
spark.sql("select * from nation").show(30);
But when I follow the further steps of the tutorial to modify the db from MySQL, the changes are not reflected immediately in Spark. Furthermore, at some point in the future (I believe > 5 minutes later), the row that was modified stops showing up in Spark SQL queries.
I'm rather new to this kind of setup and don't really know how to debug this issue. Searches for the warnings I received weren't illuminating.
I don't know if it's helpful but when I connect MySQL this is the server version I get:
Server version: 5.7.25-TiDB-v3.0.0-rc.1-309-g8c20289c7 MySQL Community Server (Apache License 2.0)
I'm one of the main dev of TiSpark. Sorry for your bad experience with it.
Due to my docker problem, I cannot directly reproduce your issue but it seems you hit one of the bug fixed recently.
https://github.com/pingcap/tispark/pull/862/files
The tutorial document is not quite up-to-date and points to an older version. That's why it didn't work with spark 2.1.1 as in tutorial. We will update it ASAP.
Newer version of TiSpark doesn't use tidbMapDatabase anymore but hooks with catalog directly instead. Method tidbMapDatabase remains for backward compatibility. Unfortunately, the tidbMapDatabase had a bug(when we ported it from older version) that it retrieves timestamp for query only once you call the function. That causes TiSpark always uses old timestamp to do snapshot reading and newer data would never be seen by it.
In newer version of TiSpark (TiSpark 2.0+ with Spark 2.3+), databases and tables are directly hooked into catalog services and you can directly call
spark.sql("use TPCH_001").show
spark.sql("select * from nation").show
This should give you fresh data.
So try restart your Spark driver, just try the two lines of code above and see if it works.
Let me know if this fix your problem. On the other hand, we will check our docker image to make sure if it contains the fix already.
If things still get wrong, would you please help to run below code and let us know the version of TiSpark.
spark.sql("select ti_version()").show
Again, sorry for causing you trouble and thanks for trying.
EDIT
To address your comment:
The warning is due to spark itself will try to locate the database in its native catalog first and this will cause a Failed to get warning. But the failover process will delegate the search to tispark and then behave correctly. So this warning can be ignored. It's recommended that add below lines to your log4j.properties in conf folder of your spark.
log4j.logger.org.apache.hadoop.hive.metastore.ObjectStore=ERROR
We will polish the docker tutorial image soon. Thank you so much for trying.

Winexe installation in Linux

I am trying to compile and build winexe. I have downloaded the samba source and ran the following command to compile the winexe.
./waf configure --samba-dir=../../samba --samba-inc-dirs=../../samba/ --samba-lib-dirs=../../samba/
I am getting the following error. Please suggest me to resolve the error.
[3326/3810] Compiling default/source/smb_static/smb_static.objlist.empty.c
Waf: Leaving directory `/root/samba/bin'
Build failed: could not find 'source/smb_static/smb_static.objlist.empty.c' for
{task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
Checking for library smb_static : not found
Build of static winexe : disabled
Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
(complete log in /root/winexe/source/build/config.log)
execfile is deprecated,
edit the file "smb_static/wscript",
remove the line with execfile and use exec(open("wscript").read()) instead

error installing octcdf-1.1.5

I Have in my Mac:
Octave-3.4.0
Gnuplot 4.2 - that I had to install because I had problems plotting - it wouldn't plot at all.
I need to load a netcdf file, the error that came was:
nc = netcdf('/users/matheuscortezi/Desktop/Pcse005/ocean_avg.nc', 'r')
error: `netcdf' undefined near line 9 column 6
So I think I don't have the netcdf comand installed, and tried installing by typing this on octave:
pkg install -global -forge octcdf
The error message that I receive from that is:
configure: error: in `/var/tmp/oct-t8XcYD/octcdf/src':
configure: error: C compiler cannot create executables
See `config.log' for more details.
the configure script returned the following error: checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
error: called from `pkg>configure_make' in file /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/pkg/pkg.m near line 1325, column 9
error: called from:
error: /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/pkg/pkg.m at line 783, column 5
error: /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/pkg/pkg.m at line 354, column 9
I haven't the faintest idea about what I should do. How can I solve this problem with either:
fixing this error, or
installing a netcdf "comand pack" (i don't know the name for that) so I can use netcdf() as in the example given.
Hope I was clear enough.
It seems to me that you installed Octave from the Mac OSX App bundle. That is not recommended at all. You should install from one of the package managers as explained on Octave's wiki. As far as I know, there are 3 options for Mac (see previous link). Just search for one that also has the netcdf package.
Anyway, if you really don't want to install it through a package manager (but seems to me you really should), seems that your problem lies on gcc (the GNU C compiler). do you have it installed at all? Some packages have code in C++ or C and are also dependent on some external libraries.
EDIT using a package manager would have also solved your problem about plotting since it would install gnuplot at same time

How do I determine which assembly is missing in Mono 2.10.2?

I have a web server with MONO 2.10.2 (fast-cgi) on a CentOS 6 box. Running a plain-vanilla MVC 3 site works great. However, when I add MySql.Data, it gives me a not-so-helpful error:
System.IO.FileLoadException: The assembly name is invalid.
My DLLs are in the right place. They're referenced properly. Everything has been done correctly, but Mono still complains that it can't find an assembly without telling me which one. The problem occurs after simply adding a reference to MySql.Data and without changing any code. I've looked through the MySql.Data source solution and the references that it needs seem to exist on the web server.
I understand other people have the same problem. I am happy to debug it myself, but I'm new to Mono and I can't figure out how to get a more-detailed error messages. I've checked Mono's site for instructions to enable more detailed logging, but their docs assume a certain base knowledge about Mono that I do not have.
Is there a way to get more detailed information when Mono fails to load an assembly?
I'm not sure if these details matter, but just in case...
- Mono: 2.10.2 (served via fastcgi-mono-server4)
- MySql: Connector.Net 6.4.4.0 (from the v4 set in the .Net & Mono download)
- Webserver: NGINX 1.0.11
- OS: CentOS 6
If you can get a "test case" that compiles to an application, try:
MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" mono my_app.exe
Or just temporarily edit your CGI script so that it sets those two variables. Check the logs - you should see what is not loaded propely.