java Tomcat 7 无法启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16287659/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 22:31:29  来源:igfitidea点击:

Tomcat 7 won't start

tomcattomcat7javapermgen

提问by devdar

I was running a java application and it's a lot of records i am bringing back form the database, i got a java.lang.OutOfMemoryError: PermGen spacein the browser. Now Tomcat 7.0 wont start. The Tomcat logs showed this:

我正在运行一个 Java 应用程序,我从数据库中带回了很多记录,我java.lang.OutOfMemoryError: PermGen space在浏览器中得到了一个记录。现在 Tomcat 7.0 无法启动。Tomcat 日志显示:

Error Log

错误日志

[2013-04-29 16:23:05] [info]  Commons Daemon procrun (1.0.10.0 64-bit) started
[2013-04-29 16:23:05] [info]  Running 'Tomcat7' Service...
[2013-04-29 16:23:05] [info]  Starting service...
[2013-04-29 16:23:05] [error] %1 is not a valid Win32 application.
[2013-04-29 16:23:05] [error] Failed creating java C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll
[2013-04-29 16:23:05] [error] %1 is not a valid Win32 application.
[2013-04-29 16:23:05] [error] ServiceStart returned 1
[2013-04-29 16:23:05] [error] %1 is not a valid Win32 application.
[2013-04-29 16:23:05] [info]  Run service finished.
[2013-04-29 16:23:05] [info]  Commons Daemon procrun finished

Can some one tell me how i can fix this every time i click start on tomcat it tried to start and then fails.

有人能告诉我每次我在 tomcat 上单击开始时如何解决这个问题,它试图启动然后失败。

hs_err_pid4284.log

hs_err_pid4284.log

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006818b51a, pid=4284, tid=4760
#
# JRE version: 7.0_10-b18
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x1ab51a]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x00000000056c1800):  VMThread [stack: 0x00000000061b0000,0x00000000062b0000] [id=4760]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000012cee80

Registers:
RAX=0x00000000012ceeb8, RBX=0x00000000062af320, RCX=0x00000000010f8420, RDX=0x00000000015e237c
RSP=0x00000000062af2a0, RBP=0x00000000010f3330, RSI=0x00000000010f0df0, RDI=0x00000000010f3500
R8 =0x00000000015d0000, R9 =0x0000000000000006, R10=0x00000000062af350, R11=0x00000000015e237c
R12=0x00000000010f3ea0, R13=0x000000000000000a, R14=0x00000000056590d0, R15=0x0000000000000000
RIP=0x000000006818b51a, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x00000000062af2a0)
0x00000000062af2a0:   00000000015d5510 0000000000000000
0x00000000062af2b0:   00000000012ceeb8 00000000012cee40


Instructions: (pc=0x000000006818b51a)
0x000000006818b4fa:   cc cc cc cc cc cc 40 53 48 83 ec 20 48 8b d9 e8
0x000000006818b50a:   32 bf 0b 00 84 c0 0f 84 b7 00 00 00 48 8b 43 20
0x000000006818b51a:   48 8b 48 c8 48 81 f9 ff ff 00 00 77 0e 8b d1 48
0x000000006818b52a:   8b 48 e8 e8 ce af f3 ff 48 8b c8 80 3d 65 3c 4b 


Register to memory mapping:

RAX=0x00000000012ceeb8 is pointing into the stack for thread: 0x000000000095d000
RBX=0x00000000062af320 is an unknown value
RCX=0x00000000010f8420 is an unknown value
RDX=0x00000000015e237c is an Interpreter codelet
method entry point (kind = native)  [0x00000000015e2100, 0x00000000015e2980]  2176 bytes
RSP=0x00000000062af2a0 is an unknown value
RBP=0x00000000010f3330 is an unknown value
RSI=0x00000000010f0df0 is an unknown value
RDI=0x00000000010f3500 is an unknown value
R8 =0x00000000015d0000 is an unknown value
R9 =0x0000000000000006 is an unknown value
R10=0x00000000062af350 is an unknown value
R11=0x00000000015e237c is an Interpreter codelet
method entry point (kind = native)  [0x00000000015e2100, 0x00000000015e2980]  2176 bytes
R12=0x00000000010f3ea0 is an unknown value
R13=0x000000000000000a is an unknown value
R14=0x00000000056590d0 is an unknown value
R15=0x0000000000000000 is an unknown value


Stack: [0x00000000061b0000,0x00000000062b0000],  sp=0x00000000062af2a0,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x1ab51a]

VM_Operation (0x000000000924f3c0): ParallelGCFailedPermanentAllocation, mode: safepoint, requested by thread 0x0000000007ae0800


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000000708a000 JavaThread "http-bio-8084-exec-104" daemon [_thread_blocked, id=3296, stack(0x000000000d930000,0x000000000da30000)]
  0x000000000f286000 JavaThread "http-bio-8084-exec-103" daemon [_thread_blocked, 

Other Threads:
=>0x00000000056c1800 VMThread [stack: 0x00000000061b0000,0x00000000062b0000] [id=4760]
  0x0000000005784800 WatcherThread [stack: 0x00000000069b0000,0x0000000006ab0000] [id=1760]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x000000000095a890] Threads_lock - owner thread: 0x00000000056c1800
[0x000000000095ad90] Heap_lock - owner thread: 0x0000000007ae0800
[0x000000000095b310] MethodData_lock - owner thread: 0x0000000007ae0800

Heap
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)

Card table byte_map: [0x00000000045d0000,0x0000000004680000] byte_map_base: 0x0000000003e79000

Polling page: 0x00000000001f0000

Code Cache  [0x00000000015d0000, 0x0000000001f00000, 0x00000000045d0000)
 total_blobs=1903 nmethods=1504 adapters=348 free_code_cache=40047Kb largest_free_block=40703552

Compilation events (10 events):
Event: 3663.180 Thread 0x0000000005757800 nmethod 1674 0x0000000001d07210 code [0x0000000001d07780, 0x0000000001d0a698]
Event: 3663.322 Thread 0x0000000005757800 1675             java.lang.Class::arrayContentsEq (70 bytes)
Event: 3663.323 Thread 0x0000000005757800 nmethod 1675 0x0000000001def050 code [0x0000000001def180, 0x0000000001def258]
Event: 3663.347 Thread 0x000000000576e000 nmethod 1661 0x0000000001eda810 code [0x0000000001edba60, 0x0000000001eeb478]
Event: 3663.413 Thread 0x0000000005757800 1676             org.apache.log4j.helpers.PatternConverter::format (127 bytes)
Event: 3663.435 Thread 0x0000000005757800 nmethod 1676 0x0000000001d05510 code [0x0000000001d05780, 0x0000000001d063d8]
Event: 3663.442 Thread 0x000000000576e000 1677             org.apache.log4j.helpers.PatternParser$LiteralPatternConverter::format (10 bytes)
Event: 3663.443 Thread 0x000000000576e000 nmethod 1677 0x0000000001d05290 code [0x0000000001d053e0, 0x0000000001d05468]
Event: 3663.464 Thread 0x0000000005757800 1678   !         org.springframework.beans.factory.support.DefaultListableBeanFactory::getBeanNamesForType (509 bytes)
Event: 3664.753 Thread 0x0000000005757800 nmethod 1678 0x0000000001e2eed0 code [0x0000000001e2f380, 0x0000000001e32718]

GC Heap History (10 events):
Event: 4039.689 GC heap after
Heap after GC invocations=1795 (full 850):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
}
Event: 4039.689 GC heap before
{Heap before GC invocations=1796 (full 851):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
Event: 4039.933 GC heap after
Heap after GC invocations=1796 (full 851):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
}
Event: 4039.933 GC heap before
{Heap before GC invocations=1797 (full 851):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
Event: 4039.935 GC heap after
Heap after GC invocations=1797 (full 851):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
  to   space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
}
Event: 4039.935 GC heap before
{Heap before GC invocations=1798 (full 852):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
  to   space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
Event: 4040.227 GC heap after
Heap after GC invocations=1798 (full 852):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
  to   space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
}
Event: 4040.229 GC heap before
{Heap before GC invocations=1799 (full 852):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
  to   space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
Event: 4040.232 GC heap after
Heap after GC invocations=1799 (full 852):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)
}
Event: 4040.232 GC heap before
{Heap before GC invocations=1800 (full 853):
 PSYoungGen      total 87296K, used 0K [0x00000000faab0000, 0x0000000100000000, 0x0000000100000000)
  eden space 87232K, 0% used [0x00000000faab0000,0x00000000faab0000,0x00000000fffe0000)
  from space 64K, 0% used [0x00000000fffe0000,0x00000000fffe0000,0x00000000ffff0000)
  to   space 64K, 0% used [0x00000000ffff0000,0x00000000ffff0000,0x0000000100000000)
 ParOldGen       total 174784K, used 56171K [0x00000000f0000000, 0x00000000faab0000, 0x00000000faab0000)
  object space 174784K, 32% used [0x00000000f0000000,0x00000000f36dac38,0x00000000faab0000)
 PSPermGen       total 83968K, used 83966K [0x00000000eae00000, 0x00000000f0000000, 0x00000000f0000000)
  object space 83968K, 99% used [0x00000000eae00000,0x00000000effffb40,0x00000000f0000000)

Deoptimization events (10 events):
Event: 3250.026 Thread 0x000000000707f800 Uncommon trap -58 fr.pc 0x00000000019ffd28


Internal exceptions (10 events):
Event: 4035.499 Thread 0x0000000007ae0800 Threw 0x00000000eaea6150 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\gc_interface/collectedHeap.inline.hpp:226


Events (10 events):
Event: 4038.120 Executing VM operation: ParallelGCFailedPermanentAllocation done
Event: 4038.120 Executing VM operation: ParallelGCFailedPermanentAllocation
Event: 4038.635 Executing VM operation: ParallelGCFailedPermanentAllocation done
Event: 4038.635 Executing VM operation: ParallelGCFailedPermanentAllocation
Event: 4039.179 Executing VM operation: ParallelGCFailedPermanentAllocation done
Event: 4039.179 Executing VM operation: ParallelGCFailedPermanentAllocation
Event: 4039.686 Executing VM operation: ParallelGCFailedPermanentAllocation done
Event: 4039.687 Executing VM operation: ParallelGCFailedPermanentAllocation
Event: 4040.228 Executing VM operation: ParallelGCFailedPermanentAllocation done
Event: 4040.228 Executing VM operation: ParallelGCFailedPermanentAllocation


Dynamic libraries:
0x0000000140000000 - 0x000000014001e000     C:\Users\Darin\apache-tomcat\bin\Tomcat7.exe
0x0000000077020000 - 0x00000000771cb000     C:\Windows\SYSTEM32\ntdll.dll


VM Arguments:
jvm_args: -Dcatalina.home=C:\Users\Darin\apache-tomcat -Dcatalina.base=C:\Users\Darin\apache-tomcat -Djava.endorsed.dirs=C:\Users\Darin\apache-tomcat\endorsed -Djava.io.tmpdir=C:\Users\Darin\apache-tomcat\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Users\Darin\apache-tomcat\conf\logging.properties -Xmx256m 
java_command: <unknown>
Launcher Type: generic

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_10
PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ant\bin;C:\Program Files\Java\jdk1.7.0_10\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;
USERNAME=DARIN-PC$
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 6, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 7 , 64 bit Build 7600 

CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, tsc

Memory: 4k page, physical 4192320k(1608396k free), swap 8382744k(5403772k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (23.6-b04) for windows-amd64 JRE (1.7.0_10-b18), built on Nov 28 2012 05:00:40 by "java_re" with unknown MS VC++:1600

time: Thu Jan 17 17:09:11 2013
elapsed time: 4040 seconds

采纳答案by devdar

I changed C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll to C:\Program Files (x86)\Java\jre7\bin\server\jvm.dll. I am not sure if this is the correct way to configure this but it worked for me.

我将 C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll 更改为 C:\Program Files (x86)\Java\jre7\bin\server\jvm.dll。我不确定这是否是配置它的正确方法,但它对我有用。

回答by Lucky

Cause:

原因:

Changing from the client to server directory was not the working for me. The problem for me was the Tomcat was installed under C:\Program Files\Apache Software Foundation\Tomcat 7.0and the jvm.dllfile of the JDK was pointing to the C:\Program Files(x86)\Java\jdk1.7.xx\jre\bin\server\jvm.dll.

从客户端更改为服务器目录对我来说不起作用。我的问题是 Tomcat 安装在 Tomcat 下,C:\Program Files\Apache Software Foundation\Tomcat 7.0并且jvm.dllJDK的文件指向C:\Program Files(x86)\Java\jdk1.7.xx\jre\bin\server\jvm.dll.

Notice the C:\Program Filesand the C:\Program Files(x86)in the above paths.

注意上述路径中的C:\Program FilesC:\Program Files(x86)

As the error message says %1 is not a valid Win32 application., it means the current version of your jvm.dllused by tomcat and the installed tomcat versions are different(mix of 32 and 64bit) version. i.e. Tomcat is 32 bit and your JDK is 64 bit and vice-versa.

正如错误消息所说%1 is not a valid Win32 application.,这意味着您jvm.dll使用的tomcat当前版本和安装的tomcat版本不同(32位和64位混合)版本。即 Tomcat 是 32 位,而您的 JDK 是 64 位,反之亦然。

So use the same version for both JDK and Tomcat. (i.e,) Both should be 32 bit or 64-bit binaries. Where in that case you have a 64 bit os you will find the 64 bit apps installed under C:\Program Files\and 32bit apps installed under C:\Program Files(x86)directories accordingly.

所以 JDK 和 Tomcat 使用相同的版本。(即)两者都应该是 32 位或 64 位二进制文​​件。在这种情况下,如果您有 64 位操作系统,您会找到C:\Program Files\安装在C:\Program Files(x86)目录下的 64 位应用程序和相应安装在目录下的32 位应用程序。

Solution:

解决方案:

  • Now open the Tomcat installation folder,
  • Go to bindirectory.
  • Run the Tomcat7w.exeas administrator.
  • Go to the Javatab and point your Java Virtual Machinepath to the JDK version appropriate to you.
  • I used C:\Program Files\Java\jdk1.7.xx\jre\bin\server\jvm.dll
  • And Tomcat's path stays the same as is C:\Program Files\Apache Software Foundation\Tomcat 7.0
  • 现在打开Tomcat安装文件夹,
  • 进入bin目录。
  • Tomcat7w.exe以管理员身份运行。
  • 转到Java选项卡并将您的Java Virtual Machine路径指向适合您的 JDK 版本。
  • 我用了 C:\Program Files\Java\jdk1.7.xx\jre\bin\server\jvm.dll
  • Tomcat的路径保持不变 C:\Program Files\Apache Software Foundation\Tomcat 7.0

As you can notice that the tomcat's and the JDK's path was under the C:\Program Files, I had no problem starting the server. Hope this solves your problem.

正如您所注意到的,tomcat 和 JDK 的路径在 下C:\Program Files,我启动服务器没有问题。希望这能解决您的问题。

回答by Rodrigo Sandrini

I found that a JRE version of Java had been installed which changed the Java path under the tomcat7w.exeoptions.

我发现已经安装了 Java 的 JRE 版本,它更改了tomcat7w.exe选项下的 Java 路径。

I inspected the folder location and noticed it had been modified:

我检查了文件夹位置并注意到它已被修改:

From:

从:

C:\Program Files\Java\jdk1.8.0_51\jre\bin\server
    "(this is the Java version my Casper JSS server requires)"

To:

到:

C:\Program Files\Java\jre1.8.051\bin\server 

Once I fixed that, net start Tomcat7and all worked correctly.

一旦我解决了这个问题,net start Tomcat7一切正常。

回答by TGU

Encountered the same problem with. After installation and attempted to start Apache Tomcat 7 as service, the tomcat server log (logs/commons-daemon.xx.log) gave: Failed creating java C:\Program Files(x86)\java\jre6\bin\client\jvm.dll . In fact there is no jre6 install except in Windows/System32 has version 6 java.

遇到了同样的问题。安装并尝试启动 Apache Tomcat 7 作为服务后,tomcat 服务器日志 (logs/commons-daemon.xx.log) 给出:失败创建 java C:\Program Files(x86)\java\jre6\bin\client\jvm .dll。事实上,除了在 Windows/System32 中有版本 6 java 之外,没有 jre6 安装。

It is fixed by specifying the Jvm and updating the service: tomcat7 //US//Tomcat7 --Install="C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin\tomcat7.exe" --Jvm="C:\Program Files (x86)\Java\jdk1.8\jre\bin\client\jvm.dll"--StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

通过指定Jvm并更新服务来修复:tomcat7 //US//Tomcat7 --Install="C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin\tomcat7.exe" -- Jvm= "C:\Program Files (x86)\Java\jdk1.8\jre\bin\client\jvm.dll"--StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap - -StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

回答by Picrochole

This is not particularly a tomcat problem - same happens on jetty (9.2.2) as well as on tomcat 6.3. As the error says it is rather a memory problem:

这不是一个特别的 tomcat 问题 - 在 jetty (9.2.2) 和 tomcat 6.3 上也会发生同样的情况。正如错误所说,这是一个内存问题:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005d086c50, pid=7536, tid=8524
#
# JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x116c50]

Increasing memory allocation in eclipse.ini (if server is started from eclipse) can help this partually. In my case I was able to see after increasing another stack trace with infinite recursion.

增加 eclipse.ini 中的内存分配(如果服务器是从 eclipse 启动的)可以部分帮助这一点。在我的情况下,我能够在无限递归增加另一个堆栈跟踪后看到。