R-Java error using XLConnect - java

I have trouble with using XLConnect library. I am getting an error for the below code:
library(XLConnect)
wb<-loadWorkbook("name.xlsx", create = NULL)
And the related error is:
Error: IllegalArgumentException (Java):
I cant solve this problem. I searched a lot of topics. However, I couldn't manage to solve.
I use RStudio as gui. The version are as below:
R : [64-bit] C:\Program Files\R\R-3.2.5
RStudio : Version 1.0.136
Java : Version 8 Update 121 (build 1.8.0_121-b13)
Windows : Microsoft Windows 10 Pro
I will be very glad for any help or suggestion.
Thanks a lot.

Related

Unsupported class file major version 61 error with jobrunr

I am trying to use jobrunr with java 17. However, I am getting Unsupported class file major version 61 error while doing the same with the line
JobId jobId = BackgroundJob.schedule(runAt, () -> helper.excuteTaskAction();
Does jobrunr not support java 17? If it does can anyone help me figure out why a conflict is arising here? I am using the package jobrunr-spring-boot-starter:5.3.1.
I tried downgrading to java 8, which scheduled jobs without errors. However, I would very much like to keep working with java 17. Can somebody please help me with this?

h2o code in R is not working - strange error message

I cannot seem to get the h2o code to load in R. I tried to start up h2o using the following codes:
h2o.no_progress()
h2o.init(max_mem_size = "5g")
This did not work so I tried the code below and got the following error message.
h2o.init()
'''H2O is not running yet, starting it now...
<simpleError in system2(command, "-version", stdout = TRUE, stderr = TRUE): '""' not found>
Error in value[3L] :
You have a 32-bit version of Java. H2O works best with 64-bit Java.
Please download the latest Java SE JDK from the following URL:
https://www.oracle.com/technetwork/java/javase/downloads/index.html'''
I tried downloading the Java update, but the link does not work. I am not sure how to fix the error. I am trying to do PCA on my dataset.
That is the correct link: https://www.oracle.com/java/technologies/javase-downloads.html Are the double quotes at the end of the link part of the error message? Or did that get added when you formatted your question here? If you remove the quotes at the end, the link works.
Please download Java 11 because Java 14 (the latest) was just released and we don't officially support it yet. H2O system requirements (Java 8-13) are listed here.

"JAVA Parse Exception" error in Qualimap after MacOSX upgrade

I recently upgraded my MacOSX system to Catalina and several files were placed automatically into "Relocated items" folder on my Desktop. I recently tried to run the following code which had previously worked:
qualimap bamqc -bam Sample1_sorted.bam -c -outdir QualiMap/Sample1_sorted
and received the following error:
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Error: Unable to initialize main class org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
I have seen many other posts related to this error but am unsure how to even go about trying some of the suggested solutions. I do not work directly with some of the applications/files mentioned in these forums, such as JAVA, Maven, AppAssembler, and the pom.xml file (I could not even find that file). As a result, I wished to ask about this error from the perspective of a biologist using qualimap.
How can I fix this error (with little knowledge of the above applications/files)? I can certainly work with these applications/files, but I would probably need more detailed/basic/low-level advice on how to access and modify them. Thank you!
It seems what qualimap is a java application someone else wrote. I would raise a ticket with whomever wrote this app.

Using eclipse with processing, cannot get java application to run

so i am just trying eclipse with processing and are having a problem with getting the java application to run.
I am basically following this tutorial: https://processing.org/tutorials/eclipse/
I have followed the steps but when i get to this part:
import processing.core.PApplet;
public class UsingProcessing extends PApplet{
public static void main(String[] args) {
PApplet.main("UsingProcessing");
}
}
No errors or nothing but when i press run (run as java application), a java program opens (no window, i can just see the program in the bottom part of the screen). Then it closes after a couple of seconds.
I also get the following errors:
java.lang.NoClassDefFoundError: com/apple/eawt/QuitHandler
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3119)
at java.base/java.lang.Class.getMethodsRecursive(Class.java:3260)
at java.base/java.lang.Class.getMethod0(Class.java:3246)
at java.base/java.lang.Class.getMethod(Class.java:2065)
at processing.core.PApplet.runSketch(PApplet.java:10707)
at processing.core.PApplet.main(PApplet.java:10504)
at processing.core.PApplet.main(PApplet.java:10486)
at UsingProcessing.main(UsingProcessing.java:6)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.QuitHandler
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 9 more
That part of code should at least give me an empty sketch but i get nothing..
This guy got it to work but i cant.. https://www.youtube.com/watch?v=0cqSjyvA8EY
I can assure you that i have imported the processing library correct, so that is not where the problem lays. I believe that it is some problem with my java? I am using a macbook pro and the following java:
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Thankful for all the help and I am kind of new to this so please be gentle if anything is wrong!
EDIT:
I have also tried with IntelliJ without luck, the same thing, java opens for a brief moment and then closes. This video was my guide: https://www.youtube.com/watch?v=_h2GZgnPcnM
I can assure you that i have imported the processing library correct, so that is not where the problem lays.
You need more than just the core.jar library. In your case you need whatever .jar file contains the com/apple/eawt/QuitHandler class.
This answer says that the .jar you're looking for comes with the Mac JDK. Try adding that .jar file to your classpath.
So i believe the problem is sort of solved. The problem was (i think) with the java that apple uses(?). So i downgraded to the Processing 2 core.jar and everything worked fine.
Found here: https://github.com/processing/processing/issues/5371
and a link that i did not fully understand : https://github.com/processing/processing/wiki/Supported-Platforms#java-9
The guy there suggests that you should downgrade your jdk(?), but I think that it was processing 2 that was discussed (when i did that it did not work). So for now, everything in eclipse done with processing has to be done with processing 2.
This is strange because the tutorial on processings website made it work with processing 3
EDIT: the previous answer was asked more than five years ago..

QC Connection from Java using Com4

I am trying to connect to QC using code below :
ITDConnection2 QCconn= ClassFactory.createTDConnection();
QCconn.initConnectionEx(Parameters.QC_URL);
QCconn.login(Parameters.QC_USERNAME, Parameters.QC_PASSWORD);
QCconn.connect(Parameters.QC_DOMAIN, Parameters.QC_PROJECT);
But i am getting exception at line
ITDConnection2 QCconn= ClassFactory.createTDConnection();
Exception:
com4j.ComException: 80004002 QueryInterface failed : No such interface supported : .\com4j.cpp:163
I have QC install on my PC. I am gettign same error on other PCs as well.
Which Version of Quality Center your are trying to connect ?
The otaclient.jar file should be compatible with OTACLIENT.dll.
You should also include com4j.jar in the build path.
We got the same problem, we got com4j.jar in the build path
We try to connect to QC 11 but our windows also has QC 10 installed.
So there was a problem in the version of the QC. We installed TDConnect from QC 11 to get the code running.
If you run QC 10 it rolls back OTAClient.dll 11 to 10 again.
You have also add otaclient.dll to java.library.path in the VM arguments.
We resolved this issue by reinstalling Quality center 11.52 and run the IE in admin mode and it added the TDConnect plugin to QC , then java program connected to the QC.

Categories