Modded mc server not booting up, Reason unknown - java

So Im having an issue booting up a modded mc server installation using forge 1.12.2.
The reason is unknown but I've had this issue before. All I've heard was to reinstall Java, even though I have done that multiple times.
Here is what my directory looks like:
This is stored inside c:desktop/server. Here is the server boot code: java -Xmx1024M -jar forge-universal.jar nogui.
Here is the error, I cannot understand what any of it means, and there is no offical minecraft crash log:
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:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
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

You seems to be on Java 16. You can check with java -version.
Forge 1.12 can't be runned with this version of Java. So, I suggest you to :
Install older version such as Java 8.
Change boot code to C:\Dir\To\Jre\java.exe -Xmx1024M -jar forge-universal.jar nogui
OR change JAVA_PATH variable to the Java 8 JRE instead of Java 16's one.

Related

Solving groovy module version conflict

How to solve groovy module (groovy-xml) version conflict?
The version 2.4.12 is what my currently project depends on, however, groovysh somehow preload a higher version:
$ groovysh
java.lang.reflect.InvocationTargetException
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:498)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:111)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:129)
Caused by: java.lang.ExceptionInInitializerError
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:88)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:82)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
at org.apache.groovy.groovysh.Main.main(Main.groovy:74)
... 6 more
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 3.0.7 and you are trying to load version 2.4.12
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:510)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:81)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModulesFrom(ExtensionModuleScanner.java:63)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:55)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:125)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:86)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:37)
... 12 more
More info, this is Mac, and groovy is installed by brew install groovy, and there is no GROOVY related environment variables created:
$ env | grep GROOVY | wc
0 0 0
I suggest to use skdman to manage your Groovy installations, this will create the GROVY_HOME env variable for you, the other way is to find the location of your groovy installation and create a GROVY_HOME env pointing to bin location inside Groovy folder.
Pay attention to the fact that when you install groovy, the installer creates an environment variable called "GROOVY_HOME". To resolve your conflict you should remove the 3.0.7 as the default version in your environment.
EDIT ( see OP comment )
In case the above solution doesn't work for you, here is another way:
Edit the project's build.gradle to force gradle load your suitable version of groovy :
configurations.all { resolutionStrategy { force 'org.codehaus.groovy:groovy-all: 2.4.12' } }

How to run old school Java programs with latest Java LTS 11?

I want to run Siemens LOGO Soft Comfort.
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort
Unrecognized option: -Xincgc
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$
This is Siemens LOGO soft comfort 6.1 and I have a license for that. But I have an issue.
Unrecognized option: -Xincgc
So how can I do so latest Java LTS 11 can work with Java from 2008? I assume that is Java SE 6 or J2SE 5.0.
With LOGO software, it comes with two folders bin and lib
Update:
I removed the -Xincgc in LOGOComfort.lax file and now I got this
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
Stack Trace:
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at DE.siemens.ad.logo.app.Application.<clinit>(Application.java:141)
at Start.startApplication(Start.java:570)
at Start.main(Start.java:553)
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 com.zerog.lax.LAX.launch(DashoA8113)
at com.zerog.lax.LAX.main(DashoA8113)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 18 more
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$
Update:
Solution:
Remove -Xincgc
Use Java 8 instead. It requries Swing. Java 11 does not use Swing
open the file 'LOGOComfort', as it is likely a shell script. Find the -Xincgc option and remove it.
If it's gobbledygook, install a java6, which does have the now removed -Xincgc option.
If that's not an option, make a fake java: Make a script that rests at the 'real' java location, and all it does is scan for all command line args, strip -Xincgc from it, and pass the rest through unmolested to the real java. This is a crazy hack and is likely to break other things, but it will probably 'fix' this. I strongly recommend you go with one of the first 2 options first.
There is no way to tell java 11+: Can you 'support' the -Xincgc option.
The error message is saying that it can't find the look and feel profile associated with Windows.
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
Clearly, this app was intended for Windows in the past. Maybe the script changes the look and feel profile, but I couldn't tell you without looking at it.
Best bet is try this on a Windows machine and see if it goes any further. If not then you'll have to try it with an older JRE that supports that, such as JRE 6.
I know this is a old question, but I still have a solution that may work (it worked for me). You need to make the application java executable by
chmod a+x $PATH_TO_LOGO/Application_64/jre/bin/java

HIVE: Exception: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader using JDK8 on Mac

I have installed jdk8 and while running hive, I got the following information
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Hive Session ID = f9b039ac-ca16-4fe1-ba61-aecb31e0462e
Exception in thread "main" 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 org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:413)
at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:389)
at org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:60)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
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:567)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
I have tried the solutions in similar_question and similar_question , but I still got the same problem.
I have already set my jdk version to be jdk8:
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
I installed hadoop and hive using brew, and the corresponding versions are:
Hadoop 3.2.1
and
Hive 3.1.2
Git git://HW13934/Users/gates/tmp/hive-branch-3.1/hive -r 8190d2be7b7165effa62bd21b7d60ef81fb0e4af
Compiled by gates on Thu Aug 22 15:01:18 PDT 2019
From source with checksum 0492c08f784b188c349f6afb1d8d9847
How can I solve this problem?
I really have the same feeling as you. But if you don't give up, you will get it in the end. Good luck!
You can definitely find something helpful in this article
Hive : Exception.. class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader
it told us to set the correct configuration.
You have to make sure that you start your hadoop cluster before running hive and
also guarantee that all the services are running normally.
cd /usr/local/Cellar/hadoop/3.2.1/sbin/
./start-all.sh
above is the terminal shell code for you to start the hadoop
[important]
To make sure all the nodes are started well.
also you have to configure hadoop in Pseudo-distributed mode rather than
standalone mode.
If you can read chinese, below is also an useful article which helps me a lot.
https://www.jianshu.com/p/af8a50f5a653

Installing Ortus Commandbox on Mac OSX Sierra, running box results in errors and exceptions

I tried installing Commandbox from Ortus by downloading the zip file that also contains the JRE. This landed in the Downloads folder on my Mac running OSX Sierra. I unzipped it and tried running box. It first initialized stuff, then ran fine.
The installation tip here: https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html
suggests placing the box binary in /usr/bin. I tried but couldn't. I even tried using sudo to mv it but it said I was not permitted.
SO then I decided to use the Homebrew method of installation. I installed Homebrew. When installation was complete, I then ran "brew install commandbox". It completed ok. I then typed "which box" to see which one it would find, the one in my Downloads dir or another. It showed it was in /usr/local/bin/box. Seems to be ok.
I then ran box. It crashes and burns!
$ box
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:564)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:205)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:705)
Caused by: java.lang.NoClassDefFoundError: sun/misc/VM
at lucee.commons.collection.Hashing.randomHashSeed(Hashing.java:263)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:195)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:236)
at lucee.commons.collection.LinkedHashMapPro.<init>(LinkedHashMapPro.java:70)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:82)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:68)
at lucee.runtime.type.scope.ScopeSupport.<init>(ScopeSupport.java:85)
at lucee.runtime.type.scope.ArgumentImpl.<init>(ArgumentImpl.java:67)
at lucee.runtime.PageContextImpl.<init>(PageContextImpl.java:263)
at lucee.runtime.CFMLFactoryImpl.getPageContextImpl(CFMLFactoryImpl.java:154)
at lucee.runtime.CFMLFactoryImpl.getLuceePageContext(CFMLFactoryImpl.java:140)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:435)
at lucee.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:760)
at lucee.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:267)
at luceecli.CLIMain.run(CLIMain.java:223)
... 6 more
Caused by: java.lang.ClassNotFoundException: sun.misc.VM
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:173)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:138)
... 21 more
Cause:
java.lang.NoClassDefFoundError: sun/misc/VM
at lucee.commons.collection.Hashing.randomHashSeed(Hashing.java:263)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:195)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:236)
at lucee.commons.collection.LinkedHashMapPro.<init>(LinkedHashMapPro.java:70)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:82)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:68)
at lucee.runtime.type.scope.ScopeSupport.<init>(ScopeSupport.java:85)
at lucee.runtime.type.scope.ArgumentImpl.<init>(ArgumentImpl.java:67)
at lucee.runtime.PageContextImpl.<init>(PageContextImpl.java:263)
at lucee.runtime.CFMLFactoryImpl.getPageContextImpl(CFMLFactoryImpl.java:154)
at lucee.runtime.CFMLFactoryImpl.getLuceePageContext(CFMLFactoryImpl.java:140)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:435)
at lucee.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:760)
at lucee.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:267)
at luceecli.CLIMain.run(CLIMain.java:223)
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:564)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:205)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:705)
Caused by: java.lang.ClassNotFoundException: sun.misc.VM
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:173)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:138)
... 21 more
I have no idea what to do now to fix this.
I suspect it may have fouled up things when I ran box from the Downloads folder, not realizing it would initialize stuff. I deleted the Downloads version containing both the box binary and the JRE folder and emptied the Trash.
Any suggestions on how to get Commandbox up and running now?
I just did some local testing and confirmed that you're on Java 9 which isn't supported right now by CommandBox. The fix is easy and you can leave Java 9 installed as the main JVM for your PC. What you need to do is take the JRE folder that you downloaded before, or just download a server version of Java 8 and rename the folder to JRE. Then place that folder in the same directory as the box binary.
When CommandBox first starts, it checks to see if there is a folder called JRE in the same folder, and if so it uses it. If it doesn't find the folder, then it will fall back to the general version of Java your operating system has installed.
Since Java 9 is popping up more in the wild, I'll see about getting a check for it put into CommandBox to alert people with a more useful message. We already have a similar check in place, but it only looks for Java versions less then 7.

leiningen cannot run because of java class not found exception

I recently--as in, today--became interested in learning to program with clojure. Now after having installed the latest version of java's jdk and downloading the leiningen script, I followed the installation instructions for the latter, specifically those given at: http:/www.lispcast.com/clojure-ubuntu.
Now, after the running lein version and downloading the relevant jar file, the program exits with an error about a class not being found. The error in question reads as follows:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)>
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core__init.load(Unknown Source)
at clojure.core__init.(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.lang.RT.doInit(RT.java:461)
at clojure.lang.RT.(RT.java:331)
at clojure.main.(main.java:20)
Caused by: java.lang.ClassNotFoundException: java/sql/Timestamp
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForNameNonLoading(RT.java:2181)
at clojure.instant$loading__5569__auto____6869.invoke(instant.clj:9)
at clojure.instant__init.load(Unknown Source)
at clojure.instant__init.(Unknown Source)
... 23 more
My java 9 jdk is installed in /usr/lib/jvm/java-9-oracle/bin/java, with my JAVA_HOME variable set to /usr/lib/jvm/java-9-oracle but I tried /usr/lib/jvm/java-9-oracle/bin as well, just in case. I am running xubuntu 16.04.3, if this is of any importance. I did try setting the default java jdk back to the openjdk which is bundled with xubuntu but this also was to no avail.
As an aside, the entire problem originated because I tried running the REPL
in intellij after installing the cursive plugin, which didn't work. I then surmised that it might be because I had not installed leiningen beforehand (I thought that the IDE and cursive would have this bundled along). However, the actual information on what intellij and clojure require to run successfully has eluded me, since much of the information is rather 'scattered' and I'm not sure whether I missed something along the way.
In any case, I am having quite a hard time of getting everything to work--probably because I'm not yet that savvy when it comes to these kinds of issues, having only been on a linux distro for a short while as well as being completely unfamiliar with clojure. If I'm missing something obvious, I apologize, but it stands to reason that something can only be obvious once it is shown to be so.
Any and all suggestions will be greatly appreciated.
That looks like a problem caused by Java 9's new concept of "modules": Clojure expects to be able to access java.sql.Timestamp, but it can't. I haven't kept up with Java development or Clojure development, so I can't say for sure that's your problem, but it looks that way to me. Try with an earlier JDK.
If you cant downgrade your JAVA version, run lein upgrade 2.8.1 or the latest Leiningen would do. Leiningen has been updated to include support for Java 9.

Categories