I'm trying to install an application on Linux which requires ACTIVEMQ.
I tried installing activeMQ and re running the application still facing this error
Cannot instantiate class:
org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception
is java.lang.ClassNotFoundException:
org.apache.activemq.jndi.ActiveMQInitialContextFactory]
Also in the set up of application the jar for activemq is already present
Linux version Linux 2.6.32
I was trying to run activemq directly from bin where as i was suppose to go in 64 bit and then do that :)
Related
I am trying to connect a java program to a database SQL Anywhere 17 using JDBC connection SQL Anywhere 17 installed in Windows machine. I have built a JAR to run the connection. The JAR is working in another Windows machine. I have jconn4.jar and dbjdbc17.dll files in the same directory as the JAR and running the JAR command java -classpath connect.jar;jconn4.jar com.Main.
When I moved the same JAR directory to a Linux machine, I'm getting this:
exception.java.lang.UnsatisfiedLinkError: no dbjdbc17 in java.library.path.
Can we connect SQL Anywhere 17 installed in Windows from Linux machine? Can someone suggest me the correct way to run this JAR in Linux which is working in Windows?
We recently migrated from java 8 to openJdk11. Now I am trying to test my application on windows and ubuntu with using openJdk installed on both OS. I'm able to run it on ubuntu. But same is not executing in windows10 with java11.Error_Message:
java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Unknown Source)
It is possible that JDK, which you have installed on your Windows system, doesn't include JavaFX and you should install it externally.
Read more here:
Where can I get pre-built JavaFX libraries for OpenJDK (Windows)
or
https://stackoverflow.com/a/19529820
or
Javafx: No toolkit found exception
.
I am not sure how the differnences between Linux and Windows come into place, but in general com.sun.javafx.tk.Toolkitis not accesible anymore since Java 9. So the behaviour on Windows throwing an exception is correct, and you need to find another solution for whatever you are using theToolkit-class for.
I have a Java applet which allows me to access local storage in remote server. It works fine under Windows(IE 7.0.5730.13, Java SE 1.6.0.05). According to Java Console it downloads the native library for Java Native Interface:
ClientInterface::downloadLib: downloaded C:\Documents and Settings\user\IBM\10.10.10.65\remotedrive3d.dll in 1 attempts.
Initializing RemoteDisk v2.2
..and I'm able to access local storage devices:
Under Linux using OpenJDK 1.8.0_121 and IcedTea-Web 1.6.2 it also downloads the native library:
ClientInterface::downloadLib: downloaded /root/IBM/10.10.10.65/libibmxrdisk.so.1.0.3 in 1 attempts.
However, it fails to run with an UnsatisfiedLinkError error-message:
Initializing RemoteDisk v2.2
OpenJDK 64-Bit Server VM warning: You have loaded library /root/IBM/10.10.10.65/libibmxrdisk.so.1.0.3 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.UnsatisfiedLinkError: VirtualDrive.PassThroughCommand.GetSupportedDevices()LVirtualDrive/SupportedDevices;
at VirtualDrive.PassThroughCommand.GetSupportedDevices(Native Method)
at com.ibm.asm.remotedisk.RemoteDisk.buildDriveList(Unknown Source)
at com.ibm.asm.remotedisk.RemoteDisk.start(Unknown Source)
at sun.applet.AppletPanel.run(AppletPanel.java:476)
at sun.applet.AppletViewerPanelAccess.run(AppletViewerPanelAccess.java:84)
at java.lang.Thread.run(Thread.java:745)
..and I'm not able to access local storage devices:
When I start the Firefox using strace -f, then I can clearly see that libibmxrdisk.so.1.0.3 file is accessed. For example:
[pid 6741] open("/root/IBM/10.10.10.65/libibmxrdisk.so.1.0.3", O_RDONLY|O_NONBLOCK) = 48
[pid 6741] read(48, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\334S\0\0004\0\0\0"..., 52) = 52
[pid 6741] close(48)
This /root/IBM/10.10.10.65/libibmxrdisk.so.1.0.3 seems to contain strings like GetSupportedDevices:
root#s:~/IBM/10.10.10.65# strings libibmxrdisk.so.1.0.3 | grep -i GetSupportedDevices
Java_VirtualDrive_PassThroughCommand_GetSupportedDevices
GetSupportedDevices
Java_VirtualDrive_PassThroughCommand_GetSupportedDevices
root#s:~/IBM/10.10.10.65#
Is the proprietary native library libibmxrdisk.so.1.0.3 for Linux operating system probably broken? Is it possible that it is not compatible with OpenJDK? How to debug this further?
This is issue for http://icedtea.classpath.org/bugzilla/enter_bug.cgi?product=IcedTea-Web not stack overflow. As ITW developer, I will need to help with debugging a bit.
From the trace is clear architecture mishmash. I would bet your windows are 32b, but linux is (for sure) 64b machine. For some reason, ITW is downloading 32b version of your RemoteDrive library. 32b library should work on 64b system, but you need also 32b depndencies (and most likely also 32b java). Do you have them all?
If above is completly true, then it is bug i ITW, or jdk itslef. But I'm betting for above.
So: try 32 jdk, try various 32b depndencies, if not working, then please submit bug to ITW
HtH
J.
I can't run cassandra as daemon. I set variable JAVA_HOME, CASSANDRA_HOME,PATH for cassandra. To running I use Apache Commons and tutorial link
but when i try started I see in console Error: Could not find or load main class org.apache.cassandra.service.CassandraDaemon
Tested on JDK 8 and 7
I do not know what's going on
I found error bug on CASSANDRA-7477
I have installed java and tomcat appache server on linux.
When i am going to start tomcat using ./startup.sh command on linux server,
it gives output as
Using CATALINA_BASE: /usr/src/apache-tomcat-5.5.28
Using CATALINA_HOME: /usr/src/apache-tomcat-5.5.28
Using CATALINA_TMPDIR: /usr/src/apache-tomcat-5.5.28/temp
Using JRE_HOME: /usr/src/jdk1.6.0_16
Using CLASSPATH: /usr/src/apache-tomcat-5.5.28/bin/bootstrap.jar
but server is not started.
after that when i am firing javac command ,it generates following error
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
i am not getting the right reason for that.
I am new with linux.
Please help me.
Thanks in advance
Could not reserve enough space for object heap.
Looks like there is not enough memory given for the initialisation.
Check the given memory...and reconfigure your memory size for the JVM.