NavidK0 / Carbon

Carbon is a Spigot plugin which turns a spigot protocol hacked server (on 1.7.10) into a 1.8 server.
GNU Lesser General Public License v3.0
35 stars 19 forks source link

java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the schema #157

Closed pr4xt3roy closed 10 years ago

pr4xt3roy commented 10 years ago

Hello,

I am trying to install Carbon for the first time.

When I start the server I get two Exceptions as warnings and then the server stops.

The two Exceptions I get is:

2014-10-29 12:37:43 [INFO] [Carbon] Transforming net/minecraft/server/v1_7_R4/EntityTrackerEntry
2014-10-29 12:37:43 [WARN] java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the schema (add/remove fields)
2014-10-29 12:37:43 [WARN]      at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
2014-10-29 12:37:43 [WARN]      at sun.instrument.InstrumentationImpl.redefineClasses(Unknown Source)
2014-10-29 12:37:43 [WARN]      at com.lastabyss.carbon.instrumentation.CarbonTransformAgent.agentmain(CarbonTransformAgent.java:48)
2014-10-29 12:37:43 [WARN]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-10-29 12:37:43 [WARN]      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-10-29 12:37:43 [WARN]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-10-29 12:37:43 [WARN]      at java.lang.reflect.Method.invoke(Unknown Source)
2014-10-29 12:37:43 [WARN]      at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
2014-10-29 12:37:43 [WARN]      at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(Unknown Source)
2014-10-29 12:37:43 [INFO] [Carbon] Material SLIME with ID 165 was injected into CraftBukkit.
2014-10-29 12:37:44 [INFO] [Carbon] Transforming net/minecraft/server/v1_7_R4/EntityTrackerEntry
2014-10-29 12:37:44 [WARN] java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the schema (add/remove fields)
2014-10-29 12:37:44 [WARN]      at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
2014-10-29 12:37:44 [WARN]      at sun.instrument.InstrumentationImpl.redefineClasses(Unknown Source)
2014-10-29 12:37:44 [WARN]      at com.lastabyss.carbon.instrumentation.CarbonTransformAgent.agentmain(CarbonTransformAgent.java:48)
2014-10-29 12:37:44 [WARN]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-10-29 12:37:44 [WARN]      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-10-29 12:37:44 [WARN]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-10-29 12:37:44 [WARN]      at java.lang.reflect.Method.invoke(Unknown Source)
2014-10-29 12:37:44 [WARN]      at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
2014-10-29 12:37:44 [WARN]      at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(Unknown Source)
2014-10-29 12:37:44 [INFO] Carbon has finished injecting all 1.8 functionalities.

And then I get:

2014-10-29 12:37:56 [INFO] Done (12.225s)! For help, type "help" or "?"
2014-10-29 12:37:56 [INFO] Starting GS4 status listener
2014-10-29 12:37:56 [INFO] Query running on 0.0.0.0:25567
2014-10-29 12:37:56 [INFO] Stopping server

Java: Oracle Sun 1.7.0_71-b14 Spigot: git-Spigot-1.7.9-R0.2-207-g03373bb (MC: 1.7.10) (Patched with spigot-20141001a.bps) ProtocolLib: v3.6.0-SNAPSHOT (Spigot special version) Carbon: 1.7 OS: Suse SLES 11

List of plugins: WorldBorder v1.7.8, GroupManager v2.0 (Phoenix), WorldEdit v5.6.2, SimpleSignEdit v2.1, Vault v1.4.1-b436, TreeAssist v5.1, WorldGuard v5.9, SimpleTitles v0.2, TakeaNumber v0.7, CoreProtect v2.0.9, CommandHelper v3.3.1, RedstoneClockDetector v0.2.5, ProtocolLib v3.6.0-SNAPSHOT, GriefPrevention v8.6, IcePvPControl v3.1.1, Herochat v5.6.6-b214, Essentials vPre2.14.1.3, HyperConomy v0.974.3, Trade v0.5.5b, CommandSigns v1.9.3.1, NoCheatPlus v3.11.2-SNAPSHOT-sMD5NET-b747, VanishNoPacket v3.19.1, MCBans v4.21

I even tried without any other plugins except ProtocolLib and Carbon and I still get those same errors and a shutdown. Full logs of that attempt available at http://pastie.org/9683070

When I remove Carbon, the server starts and stay running.

Any help would be greatly appreciated.

Thank you.

NavidK0 commented 10 years ago

This issue has happened before when someone uses a custom logger, are you doing that?

Jikoo commented 10 years ago

@NavidK0 Maybe to help with situations like this Carbon could print a line containing JVM startup parameters when it catches an exception injecting?

pr4xt3roy commented 10 years ago

Yes, I was using a custom logger. Here's my config:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="net.minecraft,com.mojang">
    <Appenders>
        <Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console>
        <Queue name="TerminalConsole">
            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
        </Queue>
        <RandomAccessFile name="File" fileName="server.log">
            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
        </RandomAccessFile>
    </Appenders>
    <Loggers>
        <Root level="info">
            <filters>
                <MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
            </filters>
            <AppenderRef ref="WINDOWS_COMPAT"/>
            <AppenderRef ref="File"/>
            <AppenderRef ref="TerminalConsole"/>
        </Root>
    </Loggers>
</Configuration>

I turned that off and now its working fine. Thank you :)