Has class loading errors

When you creating a mod and started doing it and always got a «Mod has class loading errors» so started to delete the files you done and tried starting minecraft again (before created the files it worked so eou thought when delete them it will work again but it doesnt) and got a crash again.

If a class loading error occurs while CaseEventEmitter.war file is running, configure library sharing in the WebSphere® Application Server administration console.

Errors of type java.lang.NoSuchMethodError indicate class loading errors. Such errors are usually caused by the classes of a JAR file inside the emitter conflicting with the classes used by application server, as shown in the following code sample.

First You need to use deobf variant of the mod in dev environments. Depends on the mod, you may have to build a special variant of that mod.

In that not working Check your Forge log, there may be a hint which mod was loaded at the time when the client crashed, just scroll to the end and then try to remove the mod / check the mods issues etc/

If game not working again, try this variant:

  1. Copy conflicting JAR files to a directory.

    For example, copy geronimo-json_1.1_spec-1.0.jar to C:\sharedLib.

  2. Open WebSphere Application Server administration console and select Environment > Shared Libraries.
  3. Define scope for the shared library by selecting the cell and node where your application is deployed.
  4. Click New and enter a name and a class path in the page that displays.

    For example, enter emitterLib as the name and C:\sharedLib as the class path.

    Leave the Use an isolated class loader for this shared library check box cleared.

  5. Open deployed emitter application.
    1. Browse to Applications > Application Types > Websphere Enterprise Applications.
    2. Under References, click Shared Library References.
    3. Select check box for the emitter application and click Reference Shared Libraries.
    4. In page that opens, select the emitterLib class name that you created in step 4.
  6. Restart the application for the changes to take effect.

Is there a recommended solution here on how to handle transient class loading failures? I would prefer the code to get ClassNoDefFoundError once but have a retry next time it is needed.

Last way its two ideas.

  • We could mark class loader as bad as soon it suffers from transient error, phase out its usage and create a fresh one which may reattempt loading this class.
  • (even more partial) We could clear interrupted flag from thread and wait for class to be loaded anyway, then restore interrupted flag on thread.
Алекс Бежбакин
Оцените автора
Добавить комментарий