Minecraft 1.12.2 modded server: "problem occured" - minecraft

I have a minecraft modded server on 1.12.2, and it works for the most part, but it gives me an error.
The minecraft server is
forge-1.12.2-14.23.5.2846-universal.jar, and I'm on lubuntu, using openJDK 10.
I have these mods:
GalacticraftCore-4.0.2.236, GalacticraftPlanets-4.0.2.236, MicdoodleCore-4.0.2.236, and hopperducts 1.5
My system is:
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
I tried reinstalling it, and it worked to get mission libraries(some) and then this came up.
My code to run is:
java -Xmx1G -Xms1G -jar forge-1.12.2-14.23.5.2846-universal.jar
where "forge-1.12.2-14.23.5.2846-universal.jar" is the run file(yes, spelled correctly).
I just expected it to run, but it gave me this error:
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 6 more

For posterity's sake, the issue is openjdk-10. The server .jar file uses something or other that isn't supported by versions of java after 8, and throws this same error you saw, that I spent a while chasing down. There's another relevant thread here. Solution: remove openjdk-10 (or whatever version you're using that isn't 8) with
sudo apt-get remove openjdk-10
and make sure version 8 is installed with
sudo apt-get install openjdk-8.

I found this on GitHub. Basically, the issue may be something with the vannilla Minecraft server.jar. Try re-downloading it, and manually renaming it. If that doesn't fix, there was a comment in there about Linux. Check that out.
Sorry I'm not more help. I'm not a Java developer, and I have just barely used Linux. I used CentOS a bit on my Raspberry Pi, and I used Ubuntu in a virtual machine, but besides that I'm a Windows user.

Related

Got 'Failed to initialize graphics environment' when launching idea/pycharm/goland using WSL2 - WSLg

What doesn't work
I'm trying to setup WSL2 GUI environment under the latest version Windows Insider Preview. Gedit and Thunar worked fine but when I tried to run GoLand it gave me the following error
Start Failed
Failed to initialize graphics environment
java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:102)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:101)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:83)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:233)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:588)
at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:583)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:582)
at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1499)
at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1318)
at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$9(StartupUtil.java:347)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:829)
-----
Your JRE: 11.0.11+9-b1341.57 amd64 (JetBrains s.r.o.)
/home/ubuntu/executables/GoLand-2021.1.3/jbr
I'm using WSL2 - Ubuntu-20.04, Windows 11 build 22000.100
What works
start VcXSrv in Windows
$DISPLAY is set to $WINDOWS_IPADDR:0, startxfce4 in wsl2
start GoLand in VcXSrv window
Everything works fine
p.s. I defined a environment variable WINDOWS_IPADDR=$(cat /etc/resolv.conf | grep nameserver | cut -d ' ' -f 2).
What I have tried
I've tried Pycharm and Idea and both of them displayed the same error.
export DISPLAY=localhost:0 && goland.sh gives the same error.
export DISPLAY=0:0 && goland.sh gives the same error.
export DISPLAY=$WINDOWS_IPADDR:0 && goland.sh will not show this error, but nothing happened.
I tried to install a new openjdk-11 which might be different from openjdk-11-jdk-headless but it didn't change the JRE path used by IntelliJ-idea/GoLand/PyCharm, which is always IDE_INSTALL_PATH/jbr, e.g. goland alwayws use jre in /home/ubuntu/executables/GoLand-2021.1.3/jbr
I'm not familiar with X11 or X-Server so I tried searching for similar issues but few is related. I'm think it might be some kind of compatibility issue with WSLg.
Does anyone know how to fix this error? Any and all help/direction is appreciated.
UPDATE:
I install a new distro and everything just magically work now. However, I mistakenly deleted the original distro so I cannot test it anymore. I guess WSLg cannot work very well with gnome & xfce4 as I've installed both desktop environments in WSL. Think twice before you want to install multiple desktops!

IntelliJ Startup Error "Cannot Lock System Folders"

I installed IntelliJ IDEA 15.0.1 Community Edition but when I run the application, it displays me the following error message:
Internal error. Please report to http://jb.gg/ide/critical-startup-errors
java.lang.IllegalStateException: failed to create a child event loop
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:81)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:58)
at org.jetbrains.io.BuiltInServer.start(BuiltInServer.java:78)
at com.intellij.idea.SocketLock$2.call(SocketLock.java:131)
at com.intellij.idea.SocketLock$2.call(SocketLock.java:112)
at com.intellij.idea.SocketLock.underLocks(SocketLock.java:155)
at com.intellij.idea.SocketLock.lock(SocketLock.java:112)
at com.intellij.idea.StartupUtil.lockSystemFolders(StartupUtil.java:263)
at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:101)
at com.intellij.idea.MainImpl.start(MainImpl.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:90)
at java.lang.Thread.run(Thread.java:745)
Caused by: io.netty.channel.ChannelException: failed to open a new selector
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:127)
at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:119)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:97)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:31)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:77)
... 17 more
Caused by: java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:101)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:68)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:170)
at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
at java.nio.channels.Pipe.open(Pipe.java:155)
at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:125)
... 21 more
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:139)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:83)
... 29 more
The IDE doesn't boot up afterwards. It always worked flawlessly before but recently I have been getting this same error when trying to compile a Java project with IDEA version 14.5. After a clean installation of 15.0.1 it still doesn't work. It becomes quite obvious that the problem must be due to something I installed in the meantime but what could affect IntelliJ IDEA in such a way? I'm on Windows 10 and using AVAST!. I tried disabling my Antivirus and Firewall but it didn't help. I also submitted a bug report. Eclipse still runs and compiles Java code just fine.
It does seem to be AVAST! related. Maybe try to reinstall or deinstall it?
https://youtrack.jetbrains.com/issue/IDEA-146929
https://bugs.mojang.com/browse/MC-34749
I was having the same issue. Disable your firewall or check your security settings.
your firewall and antivirus program is blocking the android studio so remove antivirus program or add android studio.exe in allowed list this helped me
The solution is really easy. You just need to delete all .androidstudio* folders from appdata folder on your PC. Note that i don't know if this folder contains anything important.
Yeah it is a problem with Avast security! I was using studio fine until one day my computer kept slowing down. I read that having 2 anti virus softwares can slow down your pc so i tried installing avast and just stick with Windows Defender. Avast cannot properly uninstall now the software is corrupted or something cause it wont start up. If you can get rid of Avast you will be good to go.
Restarting Windows works for me. But I think it is related to the firewall.
It happened after I closed a Windows Firewall dialogue asking me if another app (Everything.exe) can access the network (workplace, private or public) without response. After I restarted Windows, IntelliJ could launch normally.

Jenkins CLI with HTTPS

My Jenkins server was switched to now using HTTPS. However, now when trying to run jenkins-cli.jar, I get the following error:
Exception in thread "main" java.io.IOException: Failed to connect to https://ncs-jenkins.cisco.com/
at hudson.cli.CLI.getCliTcpPort(CLI.java:266)
at hudson.cli.CLI.<init>(CLI.java:126)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:466)
at hudson.cli.CLI.main(CLI.java:382)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at hudson.cli.CLI.getCliTcpPort(CLI.java:264)
... 4 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 11 more
Is there any way to use Jenkins CLI over HTTPS?
This happens, for example when I try to run even just the help command:
java -jar jenkins-cli.jar -noCertificateCheck -s https://ncs-jenkins.cisco.com:8443/ -i /home/auto/.ssh/id_rsa help
This works for me:
java -jar jenkins-cli.jar -noCertificateCheck -auth #jenkins_creds.txt -s https://jenkins.example.com help
(If I omit -auth then I get an expected error about the need to authenticate to the Jenkins instance, but that doesn't seem relevant to you error.)
java-version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
Jenkins version: 2.138.3
I am wondering whether you have some other piece of equipment between your cli and your Jenkins server that cuts the connection if HTTPS cert verification fails.
I encountered the same problem on one of my jenkins slaves.
Since the slaves were supposed to be identical, I started investigating the slightest differences between the machines.
As it turns out, the java version was slightly different:
java-1.7.0-openjdk-1.7.0.75.x86_64 - On the working machine
java-1.7.0-openjdk-1.7.0.85.x86_64 - On the failing one.
I reverted back to the earlier openjdk version and the problem was fixed.
Since you asked the question only a few days ago, I suspect we've encountered the same problem.
To check your version:
java -showversion -verbose 2>&1 | head -1
To install the previous openjdk version (on centos):
yum install java-1.7.0-openjdk-devel-1:1.7.0.75-2.5.4.0.el6_6.x86_64
If you are using a valid SSL cert.
Checkout the jenkins-cli commands returning connect timed out
PS: This is not a solution but may be a workaround until a solution is found.

Getting Error while starting glassfish server

when I am starting glass fish server through command prompt I am getting an
error. I am using jdk 1.5 and jdk1.6 also. Due to java version am I getting that error or any other reason.
I am using two tomcat server also that port no is 8080 and 8081.
For glass fish-domain purpose I am using 4545 port number.
Error starting domain mydomain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
FATAL ERROR in native method: processing of -javaagent failed
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:133)
Exception in thread "main"
This is the important bit.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
It means that the class loader does not understand the version number of one of the ".class" files that it is trying to load.
The most likely explanation is that you are trying to load classes that have been compiled on a Java 7 development platform on an earlier (e.g. Java 5 or Java 6) JRE / JVM installation. You either need to upgrade your execution platform to Java 7 (best option), or downgrade your development platform to Java 5 or Java 6 (or whatever you are using).
Note that both Java 5 and Java 6 have reached "end of life", and there will not be any more patch releases available ... unless you take out an Oracle Java support contract.

"Could not find the main class: com.cloudbees.sdk.boot.Launcher" after installing Cloudbees SDK

I have installed the Cloudbees SDK on my Ubuntu 12.04 system following this doc. When I run bees help I get the following message :
Exception in thread "main" java.lang.NoClassDefFoundError:
com/cloudbees/sdk/boot/Launcher Caused by:
java.lang.ClassNotFoundException: com.cloudbees.sdk.boot.Launcher at
java.net.URLClassLoader$1.run(URLClassLoader.java:217) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:205) at
java.lang.ClassLoader.loadClass(ClassLoader.java:321) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at
java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find
the main class: com.cloudbees.sdk.boot.Launcher. Program will exit.
It's maybe useful to note that I alredy installed an older version of the Cloudbees SDK and I started by uninstalling it by removing the installation folder and the .bees folder in my home directory.
It sounds like your bees command may be trying to launch with jars from an incorrect location. Make sure that your BEES_HOME environment variable is pointing at the same directory where there bees command/script you are running comes from.