Comments (38)
I just performed a fresh install of the 1.8.0_05 64-bit JDK on Windows 7 and use the last version of DCEVM available for Java 8 (which is for update 05), and it works for me, so at least there is one DCEVM + Java 8 combination that works.
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Dynamic Code Evolution 64-Bit Server VM (build 25.5-b02-dcevmlight-58, mixed mode)
from dcevm.
As a workaround, works with 1.8_25 as well (a bit better than 1.8_05 I reckon)
from dcevm.
Happens to me too, but with Glassfish.
+1
from dcevm.
Same problem with Tomcat 8.0.9 standalone.
from dcevm.
How do you install DCEVM, side-by-side or you replace the JVM with DCEVM one?
from dcevm.
I replaced the JVM with the DCEVM one.
from dcevm.
I replaced too
from dcevm.
Frankly speaking, I have no idea why could that happen. Are you sure you are installing it on top of the Java 8 update 45?
from dcevm.
Also happens here on jdk1.8.0_45 with tomcat. I've tries DCEVM as an altvm, and as a replacement.
from dcevm.
You have my sympathy trying to work on this stuff, I expect it is hideously complicated.
I am running on JDK 1.8.0_45 so it is the correct version. Tomcat starts up as expected without the DCEVM dll. The only thing I could find about it is here:
Looks a bit like this is an internal issue with the JDK and that it needs a recompile of source with -DPSAPI_VERSION=1) in jdk/make/lib/Lib-jdk.management.gmk
Am I correct in assuming that you can not replicate this issue? I am on Windows 7-64 bit. Should I be running a 32-bit JVM?
Here is the full stack trace:
Using CATALINA_BASE: "D:\gavin\work\mercurial\talkingcouch\server\talkingcouch"
Using CATALINA_HOME: "D:\gavin\work\mercurial\talkingcouch\server\apache-tomcat-8.0.9"
Using CATALINA_TMPDIR: "D:\gavin\work\mercurial\talkingcouch\server\talkingcouch\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_45"
Using CLASSPATH: "D:\gavin\work\mercurial\talkingcouch\server\apache-tomcat-8.0.9\bin\bootstrap.jar;D:\gavin\work\mercurial\talkingcouch\server\apache-tomcat-8.0.9\bin\tomcat-juli.jar"
Listening for transport dt_socket at address: 8888
Exception in thread "AsyncFileHandlerWriter-1330106945" java.lang.NoClassDefFoundError: Could not initialize class sun.management.ManagementFactoryHelper
at java.lang.management.ManagementFactory.getThreadMXBean(ManagementFactory.java:339)
at org.apache.juli.OneLineFormatter.getThreadName(OneLineFormatter.java:188)
at org.apache.juli.OneLineFormatter.format(OneLineFormatter.java:112)
at org.apache.juli.FileHandler.publish(FileHandler.java:196)
at org.apache.juli.AsyncFileHandler.publishInternal(AsyncFileHandler.java:130)
at org.apache.juli.AsyncFileHandler$LogEntry.flush(AsyncFileHandler.java:168)
at org.apache.juli.AsyncFileHandler$LoggerThread.run(AsyncFileHandler.java:145)
07-May-2015 20:21:57.389 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw error
java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jdk1.8.0_45\jre\bin\management.dll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.management.ManagementFactoryHelper$4.run(ManagementFactoryHelper.java:451)
at sun.management.ManagementFactoryHelper$4.run(ManagementFactoryHelper.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at sun.management.ManagementFactoryHelper.(ManagementFactoryHelper.java:448)
at java.lang.management.PlatformComponent$1.getMXBeans(PlatformComponent.java:72)
at java.lang.management.PlatformComponent.getMXBeans(PlatformComponent.java:377)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:472)
at org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443)
at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:580)
at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:77)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalResourcesLifecycleListener.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
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 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jdk1.8.0_45\jre\bin\management.dll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.management.ManagementFactoryHelper$4.run(ManagementFactoryHelper.java:451)
at sun.management.ManagementFactoryHelper$4.run(ManagementFactoryHelper.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at sun.management.ManagementFactoryHelper.(ManagementFactoryHelper.java:448)
at java.lang.management.PlatformComponent$1.getMXBeans(PlatformComponent.java:72)
at java.lang.management.PlatformComponent.getMXBeans(PlatformComponent.java:377)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:472)
at org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443)
at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:580)
at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:77)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalResourcesLifecycleListener.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
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 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
from dcevm.
We have this bug also on Windows 8 64 bit + jdk 1.8.0_45-b14 + Tomcat 7.0.59 + Java Service Wrapper 3.5.24.
from dcevm.
Also having this error with Windows 7 64 bit + jdk 1.8.045 + tomcat 8.0.21.
from dcevm.
Same error, Windows 7 64 bit + JDK 1.8.0_45 + UNDERTOW 1.2.6.Final and -XXaltjvm=dcevm
from dcevm.
I solved this problem by adding -server option.
from dcevm.
@digy123 Doesn't it disable dcevm?
from dcevm.
Same problem happens to me
from dcevm.
I wonder if this problem is not related to the build version. What used to generate the binaries? The description of the DCEVM is to b02, but that has to download on the Oracle site is the b14
C:\Users\andreas.boos>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Dynamic Code Evolution 64-Bit Server VM (build 25.45-b02-dcevmlight-3, mixed mode)
from dcevm.
Same issue for me,
java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b15) Dynamic Code Evolution 64-Bit Server VM (build 25.45-b02-dcevmlight-3, mixed mode)
Windows 8, Jetty 9.2.10.v20150310 & Spring 4.0.1.RELEASE, exception: java.lang.NoClassDefFoundError: Could not initialize class sun.management.ManagementFactoryHelper
from dcevm.
@ronaldtm,not
from dcevm.
This happens on Weblogic too. But it's trivial to produce because it's a class initializer, so a simple main method calling "java.lang.management.ManagementFactory.getRuntimeMXBean" and nothing else will trigger this bug. This error happens on my 1.8.0_45 "25.45-b02-dcevmlight-3" whether installed as altjvm or as replacement, but it works with my 1.7.0_51 full dcevm install "24.51-b03-dcevmfull-3", which appears to be 32-bits version since it won't take -Xmx2048M.
from dcevm.
I did it too. The problem with this version (1.8.0_05) is that it has many bugs (parallel stream). The vm for javascript (nashorn) is slow. But in the context of development meets.
from dcevm.
I rebuilt it with a different version of Hotspot JVM (see https://github.com/dcevm/dcevm/releases/tag/light-jdk8u45%2B4). Give it a try.
from dcevm.
Unfortunatly it does not help. But we found a workaround for this bug.
You have to call
java.lang.management.ManagementFactory.getRuntimeMXBean();
java.lang.management.ManagementFactory.getPlatformMBeanServer();
before actually running tomcat. After that tomcat starts successfully.
We use gradle plugin for tomcat, and added following task which is executed before tomcatRun
task managementDllWorkaround << {
try {
java.lang.management.ManagementFactory.getRuntimeMXBean();
} catch (Error e) { }
try {
java.lang.management.ManagementFactory.getPlatformMBeanServer();
} catch (Error e) { }
}
tomcatRun.dependsOn managementDllWorkaround
from dcevm.
I tried it too and I get the same issues. In my case I used the "replace by DCEVM" method, and in the installer interface I do confirm that I see 25.45-b01-dcevmlight-4. The b01 is interesting because the old version was 25.45-b02-dcevmlight-3. In case it helps, here is what my output is on my vanilla JDK install:
c:\Program Files\Java\jdk1.8.0_45\jre\bin>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
It's interesting that @andreasboos shows b14 of the runtime environment and I have b15. But the HotSpot version is 25.45-b02 which is more similar to the 25.45-b02-dcevmlight-3. Is it possible that we've gotten different versions of Java 8u45 depending on when we downloaded? So, my management.dll is 36928 bytes, and it's a signed DLL as of April 30, 2015, and the "version" inside that DLL is 8.0.45.15.
from dcevm.
Very interesting, from http://www.oracle.com/technetwork/java/javase/8u45-relnotes-2494160.html (emphasis mine):
The full version string for this update release is 1.8.0_45-b14 (where "b" means "build") except for Windows, where the version string is 1.8.0_45-b15. The version number is 8u45.
from dcevm.
Yes, there are two slightly different versions, dcevmlight-3 and dcevmlight-4 (the latter is not published and only available via github releases).
from dcevm.
the problem still persists in glassfish and netbeans. I tried using the solution presented by @f1ztech , but it did not work too.
from dcevm.
@andreasboos may be you run tomcat in new process? The thing is that you have to call
java.lang.management.ManagementFactory.getRuntimeMXBean();
java.lang.management.ManagementFactory.getPlatformMBeanServer();
in the same java process where tomcat lives and before tomcat starts.
from dcevm.
The glassfish I use is the embedded version of netbeans. I looked for a way to interfere in his startup but the closest I could get was using lifecycleListener module. Maybe it was not enough. Then I tried to start it with the startserv.bat and for that I made a class that executes the code:
public class GlassfishStartup {
public static void main(String... args) {
try {
java.lang.management.ManagementFactory.getRuntimeMXBean();
} catch (Error e) {
System.out.println("error 1");
}
try {
java.lang.management.ManagementFactory.getPlatformMBeanServer();
} catch (Error e) {
System.out.println("error 2");
}
com.sun.enterprise.admin.cli.AdminMain.main(args);
}
}
Still no success. Same error.
from dcevm.
@andreasboos May be it fixes problem only for tomcat. What stacktrace do you have?
from dcevm.
Any updates? I'm getting this error on Windows 7 64 bit, 1.8.0_45-b15, Resin 4.0.18.
from dcevm.
Sorry, haven't worked on this one yet.
from dcevm.
Ok, I tracked the issue to the missing JVM_SetVmMemoryPressure function (used by management.dll) which is missing in the OpenJDK sources. It is probably part of the closed-source JVM code.
from dcevm.
Judging by the function name, I can probably stub but. The problem, though, I don't know the parameters it take and on Windows these JVM_ functions use __stdcall convention (which means callee have to remove all arguments from the stack and as such callee is supposed to know what to remove).
from dcevm.
My assembly really sucks nowadays, but here's the disassembly dump for the entry point of that function:
; EXP: JVM_SetVmMemoryPressure (2896)
0x703E1410: 48895C2418 MOV QWORD PTR [RSP+0x18],RBX
0x703E1415: 57 PUSH RDI
0x703E1416: 4881EC80000000 SUB RSP,0x80
0x703E141D: 488B056C877B00 MOV RAX,QWORD PTR [0x70B99B90]; .data:0x32 0xA2 0xDF 0x2D
0x703E1424: 4833C4 XOR RAX,RSP
0x703E1427: 4889442470 MOV QWORD PTR [RSP+0x70],RAX
0x703E142C: 8BF9 MOV EDI,ECX
0x703E142E: 8B0DE4117800 MOV ECX,DWORD PTR [0x70B62618]; .data:0xFF 0xFF 0xFF 0xFF
0x703E1434: FF15B6EF5A00 CALL QWORD PTR [KERNEL32.DLL!TlsGetValue]; (0x709903F0)
from dcevm.
Yeah, I think, I figured its arguments. Trying it now...
from dcevm.
Should be fixed in 8u45 build 13.
from dcevm.
In netbeans and glassfish it worked perfectly now.
Thank you.
from dcevm.
Related Issues (20)
- DCEVM supports AARCH64 planning
- DCEVM for Java 17 HOT 37
- Segfault when redefining classes inside a class transformer HOT 11
- A fatal error has been detected by the Java Runtime Environment
- Running DCEVM-8u181-installer.jar with jdk1.8.0_261 HOT 1
- JBR-17.0.1.12-164.8-dcevm - Fatal error while running HotswapAgent tests HOT 5
- Is it possible to install DCEVM on multiple JDK version HOT 1
- Invalid layout of java.lang.Thread at name
- Build on windows fails because of distro-name.patch
- [Windows10 64] jdk8_u181 decvm Fatal error while runing HotSwapAgent HOT 1
- Questions about Dcevm version And Project start mode
- Hotswap agent not reloading classes
- How to compateble the other openjdk version
- Crashes when retransform classes that are used inside part of the jdk HOT 2
- Does dcevm support C2 compiler HOT 6
- Canot install DCEVM - Linux - Java 17 - NoSuchFileException - no /lib/amd64 directory HOT 1
- Where i can download jdk-8u181? HOT 1
- Open Source Licence HOT 1
- The issue of StackOverflowError caused by conflicts between the dcevm patch and other agents. HOT 3
- Hello! Can you help me provide a JDK 8u345 version?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcevm.