Previous Entry Share Next Entry
Avansert hot code swap uten JRebel
neu242
JRebel er noen bøller, så hvorfor ikke bruke DCEVM isteden?
git clone https://github.com/Guidewire/DCEVM.git
cd DCEVM/hotswap
git checkout full-jdk7u45
gradle -Pkind=product compileDCEVM

export JAVALIBS=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib

# backup old libraries
sudo cp $JAVALIBS/libsaproc.dylib{,.backup}
sudo cp $JAVALIBS/libjsig.dylib{,.backup}
sudo cp $JAVALIBS/server/libjsig.dylib{,.backup}
sudo cp $JAVALIBS/server/libjvm.dylib{,.backup}

# install new libraries
cd ../build/bsd/bsd_amd64_compiler2/product
sudo cp libsaproc.dylib libjsig.dylib $JAVALIBS/
sudo cp libjsig.dylib libjvm.dylib $JAVALIBS/server/

Takk til
- https://github.com/Guidewire/DCEVM/tree/full-jdk7u45
- http://stackoverflow.com/questions/7998669/redeploy-alternatives-to-jrebel
- http://ssw.jku.at/dcevm/

  • 1
on executing the gradle command got the following error:

C:\DCEVM\hotswap>gradle --stacktrace -Pkind=product compileDCEVM

FAILURE: Build failed with an exception.

* What went wrong:
Could not generate a proxy class for class org.gradle.invocation.DefaultGradle.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.GradleException: Could not generate a proxy class for class org.gradle.invocation.DefaultGradle.
at org.gradle.api.internal.AbstractClassGenerator.generateUnderLock(AbstractClassGenerator.java:213)
at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:49)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.initialization.DefaultGradleLauncherFactory.doNewInstance(DefaultGradleLauncherFactory.java:120)
at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:90)
at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:45)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.getLauncher(InProcessBuildActionExecuter.java:58)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:46)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:37)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: java.lang.IncompatibleClassChangeError: Found interface org.objectweb.asm.MethodVisitor, but class was expected
at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.addGetter(AsmBackedClassGenerator.java:508)
at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.addGetter(AsmBackedClassGenerator.java:502)
at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.mixInDynamicAware(AsmBackedClassGenerator.java:259)
at org.gradle.api.internal.AbstractClassGenerator.generateUnderLock(AbstractClassGenerator.java:90)
... 25 more

Anybody know how to fix this? Any help is appreciated.

Thanks,
Pribin

I don't know if it's supposed to work on windows. The readme only mentions Linux and OSX: https://github.com/Guidewire/DCEVM/blob/full-jdk7u45/README.md

What Gradle & JDK version do you use? Are you on MSYS or cygwin?

Edited at 2014-01-10 06:49 am (UTC)

Thanks for the quick response. I am using gradle-1.10.

I tried the same thing from another machine and got a different error.

$ gradle --stacktrace -Pkind=product compileDCEVM
:compileDCEVM

C:\DCEVM>set WINDOWS_SDK=c:\Program Files\Microsoft SDKs\Windows\v7.1

C:\DCEVM>call "c:\Program Files\Microsoft SDKs\Windows\v7.1\bin\setenv.cmd" /x64

ERROR: The system was unable to find the specified registry key or value.
?Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.
1\.
Targeting Windows 7 x64 Debug

Please help me, Thanks in advance,
Pribin

I'm not all too familiar with window builds. You should raise an issue in the DCEVM github issue tracker.

  • 1
?

Log in