Unrecognized VM option 'CMSClassUnloadingEnabledn-J-Xmx2Gn' - scala

I have installed scala, sbt on Mac. When I try to run sbt it gives an error Unrecognized VM option 'CMSClassUnloadingEnabledn-J-Xmx2Gn'. I think there is an issue with JVM but could not find any help for this error.
More error info:
Did you mean '(+/-)CMSClassUnloadingEnabled'?
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I faced the same issue after I ran the command I ran this command: echo '-J-XX:+CMSClassUnloadingEnabled\n-J-Xmx2G\n' >> /usr/local/etc/sbtopts.
It seems the file /usr/local/etc/sbtopts contained both options in same line, separated by \n, i.e. the actual contents of the file were -J-XX:+CMSClassUnloadingEnabled\n-J-Xmx2G\n
The solution was to remove \n by editing this file, and pressing enter key instead, so that the contents of file /usr/local/etc/sbtopts look the way David mentioned in his response.

My guess is that the sbt configuration is confused with regards to line breaks and
mangles something like
-J-XX:+CMSClassUnloadingEnabled
-J-Xmx2G
into one line

On Windows machines, check next settings :
System properties / Advanced / Environment Variables
System variables
2.1. e.g. Maven settings for Java 8 may have this setting which does not work on Java 17, as "CMSClassUnloadingEnabled" is disabled :

Related

I'm able to run the smlnj repl in a Powershell window but when I try to run it with a file or "use" a file inside the REPL, it fails

This is the error I get with I start it, in Windows 10 Powershell, with a file name: sml first.sml
or try to: use "first.sml"
"uncaught exception SysErr [SysErr: access: cannot get file attributes] raised at: Basis/Implementation/Win32/os-filesys.sml:32.30-32.74"
When I run it inside emacs with the sml package, the "use" function works just fine.
If I use OS.FileSys.getDir() it shows that it's pointing to my working directory.
I'm using the latest version 10.98.1 (version 10.98.0 also had this issue).
Okay, nevermind. It appears that the error I'm getting is just indicating that it can't find the file?! I was trying to access files that were in a subdirectory and so, of course, it couldn't find them.
Dave

Apache kafka Setup on windows getting error #

When I start the server with below command its showing below error, java path and all are good still showing like this please help with this issue.
D:\Softwares\kafka\kafka-0.10.0.0-src>.\bin\windows\kafka-server-start.bat
.\config\server.properties '#' is not recognized as an internal or
external command, operable program or batch file. Error: Could not
find or load main class kafka.Kafka
Taking a leap here, but you directory ends in src. Mine does not. Any chance you downloaded the source distribution instead of the binary ?
for more recent version, juts define the CLASSPATH in
./bin.windows/kafka-run-class.bat:
line 17 for example
set CLASSPATH=/confluent-5.3.1.TAR\share\java\kafka*

New Delimited File Preview error

I am trying to use Talend Open Studio v5.4.1.
When I want to create a new delimited file metadata, I get the following message error:
Failed to generate code.
Preview error. Some settings must be changed.
Note: Preview errors are generally due to a wrong encoding setting.
org.talend.designer.runprocess.shadow.ShadowFilePreview.preview(ShadowFilePreview.java:90)
org.talend.repository.ui.utils.ShadowProcessHelper.getCsvArray(ShadowProcessHelper.java:383)
org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileStep2Form$PreviewProcessor.nonUIProcessInThread(DelimitedFileStep2Form.java:1249)
org.talend.commons.ui.swt.thread.SWTUIThreadProcessor$1.run(SWTUIThreadProcessor.java:74)
And I know the problem is not coming from my file setting because I did the same on Talend OS v6 and it worked!
But I have to use the v5.4.1
I tried running it as an administrator but it didn't change anything.
I finally resolved it. The problem is that the v.5.4.1 doesn't support the Java 1.8.
So the solution is to install the JDK/JRE 1.7 and specify the path into Talend.
In my case it was incorrect setting in Preferences/Java/Installed JRes that was the cause of the same error.
I set JRE home to C:\Program Files\Java\jdk1.8.0_121\bin (wrong) instead of C:\Program Files\Java\jdk1.8.0_121 (right)

JVM terminates with exit code 14 when trying to launch Eclipse

I've just connected to a machine I never worked on, and tried to run Eclipse there. Unfortunately, I got the error:
Eclipse:
JVM terminated. Exit code=14
(my configuration details here)
I guess there's either a problem with my configuration or with that machine's setup, but Exit code=14 does not give me a lot of information to go on. What does that mean? Where should I start?
I intentionally omitted my configuration details because I'm looking for a general explanation of that exit code, not a specific fix for my configuration.
It could be related to bug 9027: Workbench should check JDK version on startup
You could have an incompatible (ie too old) JVM: the code 14 has been referenced in this comment as:
The main launcher detects the JVM terminates with exit code 14. Is the
following message sufficient?
Please use a newer VM. Eclipse requires at least 1.3.1.
It can also be related with an incompatibility between what is installed on the system and what Eclipse needs when launching: see for instance this example.
Just to add to #VonC's answer, the Eclipse source code has this to say:
// Check to see if we are running with a compatible VM.
// If not, then return exit code "14" which will be recognized
// by the executable and an appropriate message will be displayed
// to the user.
if (!isCompatible())
System.exit(14);
(Source: http://svn.netlabs.org/repos/swt/trunk/src/plugins/org.eclipse.platform/src/org/eclipse/core/launcher/Main.java)
So I suggest checking whether you have a compatible JVM.

TLBIMP.EXE - Error TI0000 - *.dll is not a valid type library

While building our project on the Build Server, the compilation fails with the error message:
TlbImp: error TI0000 : The input file 'C:\*.dll' is not a valid type library.
We tried to manually invoke the TlbImp command thru the VS2005 Command Prompt and the same error message appeared.
To investigate, we tried to create a clean build environment in a Virtual Machine (Vbox), then we run the build there. It went fine.
We also tried to invoke the same TlbImp command thru the VS2005 Command Prompt and it succeeded.
With that, we are assuming that there is nothing wrong with the DLL. Do you have any idea what scenario(s) can cause this problem?
EDIT:
Found the problem, see my answer. ;)
If it is working on one machine and not on the other, then most probably some dependency of this DLL is missing in your machine. Inspect the dll through DependencyWalker and you will get to know that which dependency hasn't been built properly.
After closer inspection, we found out that the environment variables on the official build server is FUBAR.
The official build server was installed with both VS2003 and VS2005. Our project is VS2005. The build script is using components from VS2003 instead of VS2005 because the VS2003 paths (Path, LIB, LIBPATH and INCLUDE) were first declared before the VS2005 paths.
A simple SET command to override the environment variables with the "correct ones" fixed the build!
Thanks!