iTMSTransporter: "Could not find or load main class" when launched - java

I'm trying to notarize a DMG via "xcrun altool" in Terminal but it fails with the output below.
In fact it even running iTMSTransporter directly it crashes:
/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin/iTMSTransporter
Error: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
Caused by: java.lang.ClassNotFoundException: 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
What I have done to troublehshoot:
Updated to Xcode 12.3
Updated and installed latest commandline tools for Xcode
Tried two different SDK/JDK/JRE versions of Java, currently using java 15.0.1 2020-10-20
Java(TM) SE Runtime Environment (build 15.0.1+9-18)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)
Tried declaring JAVA_HOME
Looked for iTMSTransporter cache file or folder (in case sensitive and lowercase) in /, ~/ and /Library and ~/Library ~/.itmstransporter in order ot delete it, there is none.
I'm on macOS Big Sur 11.1
I have never had two name versions of Xcode, so I have not had a different name for the app. I tried renaming it for troubleshooting and reverting back to original Xcode name but this also did not help.
Tried reinstalling iTMSTransporter
Error output below:
2020-12-24 10:39:03.442 altool[10776:511525] Sending request to iTunesTransporter…
2020-12-24 10:39:03.442 altool[10776:511525] Command: /usr/local/itms/bin/iTMSTransporter
2020-12-24 10:39:03.442 altool[10776:511525] Arguments: -m upload -u 'XXX' -vp json -DTxHeaders=XXX= -sessionid #env:XXX -sharedsecret #env:XXX -itc_provider '-f' -f '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/XXX-72174C6DE294/com.XXX.XXX.itmsp' -indicator true -v eXtreme -Dtransporter.client='altool' -Dtransporter.client.version='4.029 (1194)'
2020-12-24 10:39:04.331 altool[10776:511518] Error: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
2020-12-24 10:39:04.331 altool[10776:511518] Caused by: java.lang.ClassNotFoundException: 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
2020-12-24 10:39:04.336 altool[10776:511525] Error:
Error: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
Caused by: java.lang.ClassNotFoundException: 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
2020-12-24 10:39:04.336 altool[10776:511525] Out:
2020-12-24 10:39:04.337 altool[10776:511525] Errors: (
"Error Domain=ITunesTransporterErrorDomain Code=-18000 \"Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.\" UserInfo={NSLocalizedRecoverySuggestion=Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:., NSLocalizedDescription=Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:., NSLocalizedFailureReason=Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.}"
)
2020-12-24 10:39:04.378 altool[10776:511518] *** Error: Unable to notarize app.
2020-12-24 10:39:04.378 altool[10776:511518] *** Error: code -18000 (Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.)

Issue was fixed after commenting out the line starting with:
JVM_LIB_PATH
in:
/usr/local/itms/bin/iTMSTransporter
It seems the way this line was setting the java related paths to iTMSTransporter was causing it to look in wrong places.
After commenting out this line iTMSTransporter reconfigured itself during launch and notarization submission was successful.

Related

Java command working on VSCode terminal, but no external terminal on mac

When I go to the folder with a single java file on Mac and run javac HelloWorld.java, the class compiles correctly, but when running it with the java command, I get the following error:
Error: Could not find or load main class main
Caused by: java.lang.ClassNotFoundException: main
However, in the VSCode terminal, the identical commands work and run the program. What am I doing wrong?
java version: "14.0.1", 2020-04-14
It's impossible. As you described, your java file named 'HelloWorld.java', and you compiled it through command 'javac HelloWorld.java'. But the error message shows:
Error: Could not find or load main class main
Caused by: java.lang.ClassNotFoundException: main
This means the java interpreter is looking for a class named 'main', not the 'HelloWorld'. So what's the command you had token? If you take command 'java HelloWorld' and the java interpreter can't find 'HelloWorld' class, you should get this error message:
Error: Could not find or load main class HelloWorld
Caused by: java.lang.ClassNotFoundException: HelloWorld

Compilation failed: Subprocess failed

brew install leiningen
I got
Compiling joy.gui.DynaFrame
Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
Exception in thread "main" java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath: , compiling:(/private/var/folders/zm/swyymlvn4l7__d1rln_n391r0000gn/T/form-init7580966196782799989.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$compile$fn__5071.invoke(core.clj:5652)
at clojure.core$compile.invoke(core.clj:5651)
at user$eval20$fn__29.invoke(form-init7580966196782799989.clj:1)
at user$eval20.invoke(form-init7580966196782799989.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Compilation failed: Subprocess failed
I tried to reinstall but the issue does not solved.
When I type,
lein version
I got this:
Leiningen 2.9.1 on Java 12 Java HotSpot(TM) 64-Bit Server VM
I installed Java correctly but not sure where to start to fix this problem.
I looked around and it seems you are trying to run an old example from The Joy of Clojure, right?
The example needed a minor touch-up for me to be able to run it.
I created a new Leiningen project first with lein new app dynademo.
Inside the new project folder, I created the directories for the namespace: mkdir -p src/joy/gui
Created the file src/joy/gui/DynaFrame.clj
The Leiningen project that we just created with lein new ... uses Clojure 1.10, which doesn't seem to like one thing:
Replace the line with :prefix df- with :prefix "df-" (eg. wrap the value df- in quotes)
Save the file, and now you can launch the window from the REPL, like this:
$ lein repl
nREPL server started on port 44037 on host 127.0.0.1 - nrepl://127.0.0.1:44037
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
dynaframe.core=> (compile 'joy.gui.DynaFrame)
joy.gui.DynaFrame
dynaframe.core=> (def hello-frame (joy.gui.DynaFrame. "Hello"))
#'dynaframe.core/hello-frame
dynaframe.core=> (.show hello-frame)
nil
It looks like this:
(you will need to move/resize the window a bit, but you get the idea). Note: I'm using Java 8 (JDK 1.8.0_191) but it should work the same in JDK 12.

LoadLibrary failure RJava

I've been trying to load the qdap package, searching on here and troubleshooting, - realised Java couldn't be found. Uninstalled and downloaded Java - assuming I've done the correct 64 bit version as I am assuming I have RStudio 64 by checking
> R.Version()
$platform
[1] "x86_64-w64-mingw32"
I'm using "R version 3.4.3 (2017-11-30)" and Windows 10
Followed the advice here and set the following
Sys.setenv(JAVA_HOME='C:\\Program Files(x86)\\Java\\jre1.8.0_181')
ran this
find.java <- function() {
for (root in c("HLM", "HCU")) for (key in c("Software\\JavaSoft\\Java
Runtime Environment",
"Software\\JavaSoft\\Java
Development Kit")) {
hive <- try(utils::readRegistry(key, root, 2),
silent = TRUE)
if (!inherits(hive, "try-error"))
return(hive)
}
hive
}
Got this
find.java()
> find.java()
$`Security Baseline`
$`Security Baseline`$`1.4.2`
[1] "1.4.2_99"
$`Security Baseline`$`1.5.0`
[1] "1.5.0_99"
$`Security Baseline`$`1.6.0`
[1] "1.6.0_201"
$`Security Baseline`$`1.7.0`
[1] "1.7.0_191"
$`Security Baseline`$`1.8.0`
[1] "1.8.0_181"
Assumed this means Java can now be found. Also did this to check.
> system("java -version")
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Client VM (build 25.181-b13, mixed mode, sharing)
So try to load rJava again.
> library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object
'C:/Users/grant/OneDrive/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified module could not be found.
In addition: Warning message:package ‘rJava’ was built under R version 3.4.4
I've tried to follow the advice given in here and as shown above I know I have Java and a Java Run Time Environment and I have followed some of the suggested fixes already. I haven't done the PATH fixes as I'm not sure what exactly my PATH is, if it's wrong and how to change the PATH or put server in path. I've got as far as this but not sure how to decipher it.
> Sys.getenv("Path")[1] "C:\\Rtools\\bin;C:\\Program Files\\R\\R-3.4.3\\bin\\x64;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\grant\\AppData\\Local\\Microsoft\\WindowsApps;"
I've also tried downloading and using Dependency Walker and didn't understand it.
Have I made an error in my assumptions? Is there an issue with my Path and if so how does Path get changed? Or is there anything else I can try?

Error: package ‘XLConnectJars’ could not be loaded in mac os

I got a problem when I called 'XLConnect' library in R.
Loading required package: XLConnectJars JavaVM: requested Java version
((null)) not available. Using Java at "" instead. JavaVM: Failed to
load JVM: /bundle/Libraries/libserver.dylib JavaVM FATAL: Failed to
load the jvm library. Error : .onLoad failed in loadNamespace() for
'XLConnectJars', details: call: .jinit() error:
JNI_GetCreatedJavaVMs returned -1
Error: package ‘XLConnectJars’ could not be loaded
This error happened after I installed XLConnect and wrote library(XLconnect).
I googled this problem but there are no proper solution in my case.
I have already installed Java 8 and checked java location in terminal.
I run R in mac OS X (10.10.5)
Thank you for your help.
I solve the problem thanks to http://www.r-bloggers.com/getting-r-and-java-1-8-to-work-together-on-osx/

HBase not starting in standalone mode on Windows

I downloaded HBase 1.0.1 on my Windows machine and wasn't able to get it to start.
I got the following error message:
C:\Users\admin\Downloads\hbase-1.0.1>bin\start-hbase.cmd
Error: Could not find or load main class " "
ERROR: Could not determine the startup mode.
What's the problem here?
There's a problem in how it is forming the java arguments, specific to the memory options.
Work-around: Find the following line in hbase.cmd and REMOVE %HEAP_SETTINGS%.
set java_arguments=%HBASE_OPTS% -classpath "%CLASSPATH%" %CLASS% %hbase-command-arguments%

Categories