| @ -1,331 +0,0 @@ | |||
| # | |||
| # There is insufficient memory for the Java Runtime Environment to continue. | |||
| # Native memory allocation (malloc) failed to allocate 874896 bytes for Chunk::new | |||
| # Possible reasons: | |||
| # The system is out of physical RAM or swap space | |||
| # In 32 bit mode, the process size limit was hit | |||
| # Possible solutions: | |||
| # Reduce memory load on the system | |||
| # Increase physical memory or swap space | |||
| # Check if swap backing store is full | |||
| # Use 64 bit Java on a 64 bit OS | |||
| # Decrease Java heap size (-Xmx/-Xms) | |||
| # Decrease number of Java threads | |||
| # Decrease Java thread stack sizes (-Xss) | |||
| # Set larger code cache with -XX:ReservedCodeCacheSize= | |||
| # This output file may be truncated or incomplete. | |||
| # | |||
| # Out of Memory Error (allocation.cpp:390), pid=23324, tid=0x0000000000002980 | |||
| # | |||
| # JRE version: Java(TM) SE Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12) | |||
| # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode windows-amd64 compressed oops) | |||
| # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows | |||
| # | |||
| --------------- T H R E A D --------------- | |||
| Current thread (0x0000000028375000): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=10624, stack(0x0000000028b40000,0x0000000028c40000)] | |||
| Stack: [0x0000000028b40000,0x0000000028c40000] | |||
| [error occurred during error reporting (printing stack bounds), id 0xc0000005] | |||
| Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) | |||
| Current CompileTask: | |||
| C2: 11601 4172 ! 4 org.springframework.util.ClassUtils::getMostSpecificMethod (72 bytes) | |||
| --------------- P R O C E S S --------------- | |||
| Java Threads: ( => current thread ) | |||
| 0x0000000029a11800 JavaThread "DefaultSipTimerThread" [_thread_blocked, id=27708, stack(0x000000002c720000,0x000000002c820000)] | |||
| 0x000000002e512800 JavaThread "EventScannerThread" [_thread_blocked, id=47768, stack(0x000000002c200000,0x000000002c300000)] | |||
| 0x000000002a23e800 JavaThread "logback-2" daemon [_thread_blocked, id=27284, stack(0x000000002bf00000,0x000000002c000000)] | |||
| 0x00000000295fa800 JavaThread "surefire-forkedjvm-command-thread" daemon [_thread_in_native, id=52020, stack(0x000000002a910000,0x000000002aa10000)] | |||
| 0x0000000029863800 JavaThread "surefire-forkedjvm-stream-flusher" daemon [_thread_blocked, id=54208, stack(0x000000002a810000,0x000000002a910000)] | |||
| 0x000000002840b000 JavaThread "Service Thread" daemon [_thread_blocked, id=22148, stack(0x0000000028e40000,0x0000000028f40000)] | |||
| 0x000000002838a000 JavaThread "C1 CompilerThread3" daemon [_thread_in_native, id=47696, stack(0x0000000028d40000,0x0000000028e40000)] | |||
| 0x0000000028382000 JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=49116, stack(0x0000000028c40000,0x0000000028d40000)] | |||
| =>0x0000000028375000 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=10624, stack(0x0000000028b40000,0x0000000028c40000)] | |||
| 0x0000000028372000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=27448, stack(0x0000000028a40000,0x0000000028b40000)] | |||
| 0x0000000028370000 JavaThread "Attach Listener" daemon [_thread_blocked, id=37208, stack(0x0000000028940000,0x0000000028a40000)] | |||
| 0x000000002831d000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=55748, stack(0x0000000028840000,0x0000000028940000)] | |||
| 0x0000000026413000 JavaThread "Finalizer" daemon [_thread_blocked, id=44136, stack(0x00000000286e0000,0x00000000287e0000)] | |||
| 0x0000000003478000 JavaThread "Reference Handler" daemon [_thread_blocked, id=54276, stack(0x00000000281e0000,0x00000000282e0000)] | |||
| 0x0000000003383000 JavaThread "main" [_thread_in_vm, id=49520, stack(0x0000000003280000,0x0000000003380000)] | |||
| Other Threads: | |||
| 0x0000000026407000 VMThread [stack: 0x00000000280e0000,0x00000000281e0000] [id=49352] | |||
| 0x0000000028487000 WatcherThread [stack: 0x0000000028f40000,0x0000000029040000] [id=2304] | |||
| VM state:not at safepoint (normal execution) | |||
| VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) | |||
| [0x000000000327d720] CodeCache_lock - owner thread: 0x0000000000000000 | |||
| Heap: | |||
| PSYoungGen total 235520K, used 91575K [0x0000000716300000, 0x0000000725e00000, 0x00000007c0000000) | |||
| eden space 214016K, 34% used [0x0000000716300000,0x000000071abba658,0x0000000723400000) | |||
| from space 21504K, 79% used [0x0000000723400000,0x00000007244b3840,0x0000000724900000) | |||
| to space 14336K, 0% used [0x0000000725000000,0x0000000725000000,0x0000000725e00000) | |||
| ParOldGen total 240128K, used 15574K [0x00000005c2800000, 0x00000005d1280000, 0x0000000716300000) | |||
| object space 240128K, 6% used [0x00000005c2800000,0x00000005c3735b50,0x00000005d1280000) | |||
| Metaspace used 47829K, capacity 50844K, committed 51112K, reserved 1093632K | |||
| class space used 6153K, capacity 6710K, committed 6832K, reserved 1048576K | |||
| Card table byte_map: [0x0000000012840000,0x0000000013830000] byte_map_base: 0x000000000fa2c000 | |||
| Marking Bits: (ParMarkBitMap*) 0x0000000058dfd850 | |||
| Begin Bits: [0x0000000014ad0000, 0x000000001ca30000) | |||
| End Bits: [0x000000001ca30000, 0x0000000024990000) | |||
| Polling page: 0x00000000031f0000 | |||
| CodeCache: size=245760Kb used=15852Kb max_used=15852Kb free=229907Kb | |||
| bounds [0x0000000003480000, 0x0000000004410000, 0x0000000012480000] | |||
| total_blobs=4845 nmethods=4307 adapters=449 | |||
| compilation: enabled | |||
| Compilation events (10 events): | |||
| Event: 11.539 Thread 0x000000002838a000 4339 3 java.util.regex.Pattern$Dollar::match (209 bytes) | |||
| Event: 11.540 Thread 0x000000002838a000 nmethod 4339 0x00000000043f8a90 code [0x00000000043f8ca0, 0x00000000043f9998] | |||
| Event: 11.541 Thread 0x000000002838a000 4340 3 java.beans.PropertyDescriptor::<init> (112 bytes) | |||
| Event: 11.541 Thread 0x000000002838a000 nmethod 4340 0x00000000043f9cd0 code [0x00000000043f9ea0, 0x00000000043fa668] | |||
| Event: 11.541 Thread 0x000000002838a000 4342 3 org.springframework.util.StringUtils::changeFirstCharacterCase (64 bytes) | |||
| Event: 11.542 Thread 0x000000002838a000 nmethod 4342 0x00000000043fa950 code [0x00000000043fab80, 0x00000000043fb868] | |||
| Event: 11.542 Thread 0x000000002838a000 4341 ! 3 java.beans.PropertyDescriptor::updateGenericsFor (37 bytes) | |||
| Event: 11.544 Thread 0x000000002838a000 nmethod 4341 0x00000000043fbf10 code [0x00000000043fc180, 0x00000000043fd318] | |||
| Event: 11.575 Thread 0x000000002838a000 4344 3 org.springframework.aop.framework.AbstractAdvisingBeanPostProcessor::isEligible (61 bytes) | |||
| Event: 11.576 Thread 0x000000002838a000 nmethod 4344 0x00000000043fdb90 code [0x00000000043fdd40, 0x00000000043fe468] | |||
| GC Heap History (10 events): | |||
| Event: 3.061 GC heap before | |||
| {Heap before GC invocations=3 (full 1): | |||
| PSYoungGen total 152576K, used 6591K [0x0000000716300000, 0x0000000720d00000, 0x00000007c0000000) | |||
| eden space 131072K, 0% used [0x0000000716300000,0x0000000716300000,0x000000071e300000) | |||
| from space 21504K, 30% used [0x000000071f800000,0x000000071fe6fec0,0x0000000720d00000) | |||
| to space 21504K, 0% used [0x000000071e300000,0x000000071e300000,0x000000071f800000) | |||
| ParOldGen total 348160K, used 96K [0x00000005c2800000, 0x00000005d7c00000, 0x0000000716300000) | |||
| object space 348160K, 0% used [0x00000005c2800000,0x00000005c2818010,0x00000005d7c00000) | |||
| Metaspace used 19956K, capacity 21274K, committed 21296K, reserved 1067008K | |||
| class space used 2583K, capacity 2859K, committed 2864K, reserved 1048576K | |||
| Event: 3.109 GC heap after | |||
| Heap after GC invocations=3 (full 1): | |||
| PSYoungGen total 152576K, used 0K [0x0000000716300000, 0x0000000720d00000, 0x00000007c0000000) | |||
| eden space 131072K, 0% used [0x0000000716300000,0x0000000716300000,0x000000071e300000) | |||
| from space 21504K, 0% used [0x000000071f800000,0x000000071f800000,0x0000000720d00000) | |||
| to space 21504K, 0% used [0x000000071e300000,0x000000071e300000,0x000000071f800000) | |||
| ParOldGen total 170496K, used 6434K [0x00000005c2800000, 0x00000005cce80000, 0x0000000716300000) | |||
| object space 170496K, 3% used [0x00000005c2800000,0x00000005c2e48910,0x00000005cce80000) | |||
| Metaspace used 19956K, capacity 21274K, committed 21296K, reserved 1067008K | |||
| class space used 2583K, capacity 2859K, committed 2864K, reserved 1048576K | |||
| } | |||
| Event: 4.481 GC heap before | |||
| {Heap before GC invocations=4 (full 1): | |||
| PSYoungGen total 152576K, used 131072K [0x0000000716300000, 0x0000000720d00000, 0x00000007c0000000) | |||
| eden space 131072K, 100% used [0x0000000716300000,0x000000071e300000,0x000000071e300000) | |||
| from space 21504K, 0% used [0x000000071f800000,0x000000071f800000,0x0000000720d00000) | |||
| to space 21504K, 0% used [0x000000071e300000,0x000000071e300000,0x000000071f800000) | |||
| ParOldGen total 170496K, used 6434K [0x00000005c2800000, 0x00000005cce80000, 0x0000000716300000) | |||
| object space 170496K, 3% used [0x00000005c2800000,0x00000005c2e48910,0x00000005cce80000) | |||
| Metaspace used 27429K, capacity 29068K, committed 29232K, reserved 1075200K | |||
| class space used 3509K, capacity 3826K, committed 3888K, reserved 1048576K | |||
| Event: 4.493 GC heap after | |||
| Heap after GC invocations=4 (full 1): | |||
| PSYoungGen total 152576K, used 10255K [0x0000000716300000, 0x0000000726500000, 0x00000007c0000000) | |||
| eden space 131072K, 0% used [0x0000000716300000,0x0000000716300000,0x000000071e300000) | |||
| from space 21504K, 47% used [0x000000071e300000,0x000000071ed03ca8,0x000000071f800000) | |||
| to space 21504K, 0% used [0x0000000725000000,0x0000000725000000,0x0000000726500000) | |||
| ParOldGen total 170496K, used 6442K [0x00000005c2800000, 0x00000005cce80000, 0x0000000716300000) | |||
| object space 170496K, 3% used [0x00000005c2800000,0x00000005c2e4a910,0x00000005cce80000) | |||
| Metaspace used 27429K, capacity 29068K, committed 29232K, reserved 1075200K | |||
| class space used 3509K, capacity 3826K, committed 3888K, reserved 1048576K | |||
| } | |||
| Event: 6.643 GC heap before | |||
| {Heap before GC invocations=5 (full 1): | |||
| PSYoungGen total 152576K, used 108217K [0x0000000716300000, 0x0000000726500000, 0x00000007c0000000) | |||
| eden space 131072K, 74% used [0x0000000716300000,0x000000071c2aa7c8,0x000000071e300000) | |||
| from space 21504K, 47% used [0x000000071e300000,0x000000071ed03ca8,0x000000071f800000) | |||
| to space 21504K, 0% used [0x0000000725000000,0x0000000725000000,0x0000000726500000) | |||
| ParOldGen total 170496K, used 6442K [0x00000005c2800000, 0x00000005cce80000, 0x0000000716300000) | |||
| object space 170496K, 3% used [0x00000005c2800000,0x00000005c2e4a910,0x00000005cce80000) | |||
| Metaspace used 33569K, capacity 35468K, committed 35496K, reserved 1079296K | |||
| class space used 4387K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| Event: 6.653 GC heap after | |||
| Heap after GC invocations=5 (full 1): | |||
| PSYoungGen total 228352K, used 10607K [0x0000000716300000, 0x0000000725e00000, 0x00000007c0000000) | |||
| eden space 214016K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723400000) | |||
| from space 14336K, 73% used [0x0000000725000000,0x0000000725a5bd10,0x0000000725e00000) | |||
| to space 21504K, 0% used [0x0000000723400000,0x0000000723400000,0x0000000724900000) | |||
| ParOldGen total 170496K, used 6450K [0x00000005c2800000, 0x00000005cce80000, 0x0000000716300000) | |||
| object space 170496K, 3% used [0x00000005c2800000,0x00000005c2e4c910,0x00000005cce80000) | |||
| Metaspace used 33569K, capacity 35468K, committed 35496K, reserved 1079296K | |||
| class space used 4387K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| } | |||
| Event: 6.653 GC heap before | |||
| {Heap before GC invocations=6 (full 2): | |||
| PSYoungGen total 228352K, used 10607K [0x0000000716300000, 0x0000000725e00000, 0x00000007c0000000) | |||
| eden space 214016K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723400000) | |||
| from space 14336K, 73% used [0x0000000725000000,0x0000000725a5bd10,0x0000000725e00000) | |||
| to space 21504K, 0% used [0x0000000723400000,0x0000000723400000,0x0000000724900000) | |||
| ParOldGen total 170496K, used 6450K [0x00000005c2800000, 0x00000005cce80000, 0x0000000716300000) | |||
| object space 170496K, 3% used [0x00000005c2800000,0x00000005c2e4c910,0x00000005cce80000) | |||
| Metaspace used 33569K, capacity 35468K, committed 35496K, reserved 1079296K | |||
| class space used 4387K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| Event: 6.705 GC heap after | |||
| Heap after GC invocations=6 (full 2): | |||
| PSYoungGen total 228352K, used 0K [0x0000000716300000, 0x0000000725e00000, 0x00000007c0000000) | |||
| eden space 214016K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723400000) | |||
| from space 14336K, 0% used [0x0000000725000000,0x0000000725000000,0x0000000725e00000) | |||
| to space 21504K, 0% used [0x0000000723400000,0x0000000723400000,0x0000000724900000) | |||
| ParOldGen total 240128K, used 15566K [0x00000005c2800000, 0x00000005d1280000, 0x0000000716300000) | |||
| object space 240128K, 6% used [0x00000005c2800000,0x00000005c3733b50,0x00000005d1280000) | |||
| Metaspace used 33569K, capacity 35468K, committed 35496K, reserved 1079296K | |||
| class space used 4387K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| } | |||
| Event: 10.679 GC heap before | |||
| {Heap before GC invocations=7 (full 2): | |||
| PSYoungGen total 228352K, used 214016K [0x0000000716300000, 0x0000000725e00000, 0x00000007c0000000) | |||
| eden space 214016K, 100% used [0x0000000716300000,0x0000000723400000,0x0000000723400000) | |||
| from space 14336K, 0% used [0x0000000725000000,0x0000000725000000,0x0000000725e00000) | |||
| to space 21504K, 0% used [0x0000000723400000,0x0000000723400000,0x0000000724900000) | |||
| ParOldGen total 240128K, used 15566K [0x00000005c2800000, 0x00000005d1280000, 0x0000000716300000) | |||
| object space 240128K, 6% used [0x00000005c2800000,0x00000005c3733b50,0x00000005d1280000) | |||
| Metaspace used 46147K, capacity 49000K, committed 49320K, reserved 1091584K | |||
| class space used 5914K, capacity 6458K, committed 6576K, reserved 1048576K | |||
| Event: 10.702 GC heap after | |||
| Heap after GC invocations=7 (full 2): | |||
| PSYoungGen total 235520K, used 17102K [0x0000000716300000, 0x0000000725e00000, 0x00000007c0000000) | |||
| eden space 214016K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723400000) | |||
| from space 21504K, 79% used [0x0000000723400000,0x00000007244b3840,0x0000000724900000) | |||
| to space 14336K, 0% used [0x0000000725000000,0x0000000725000000,0x0000000725e00000) | |||
| ParOldGen total 240128K, used 15574K [0x00000005c2800000, 0x00000005d1280000, 0x0000000716300000) | |||
| object space 240128K, 6% used [0x00000005c2800000,0x00000005c3735b50,0x00000005d1280000) | |||
| Metaspace used 46147K, capacity 49000K, committed 49320K, reserved 1091584K | |||
| class space used 5914K, capacity 6458K, committed 6576K, reserved 1048576K | |||
| } | |||
| Deoptimization events (10 events): | |||
| Event: 10.234 Thread 0x0000000003383000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000410c454 method=org.springframework.core.annotation.TypeMappedAnnotations$IsPresent.doWithAnnotations(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/annotation/Annotation;)Ljava/lang/Bool | |||
| Event: 10.443 Thread 0x0000000003383000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000040e0708 method=sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; @ 9 | |||
| Event: 10.466 Thread 0x0000000003383000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000431c78c method=org.springframework.core.ResolvableType.resolveType()Lorg/springframework/core/ResolvableType; @ 37 | |||
| Event: 10.493 Thread 0x0000000003383000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000004335d08 method=org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(Ljava/lang/String;Lorg/springframework/core/ResolvableType;Z)Z @ 559 | |||
| Event: 11.248 Thread 0x0000000003383000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000041f9338 method=org.springframework.core.annotation.TypeMappedAnnotations$IsPresent.doWithAnnotations(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/annotation/Annotation;)Ljava/lang/Bool | |||
| Event: 11.273 Thread 0x0000000003383000 Uncommon trap: reason=predicate action=maybe_recompile pc=0x0000000003d04da8 method=org.springframework.util.AntPathMatcher.skipSegment(Ljava/lang/String;ILjava/lang/String;)I @ 15 | |||
| Event: 11.289 Thread 0x0000000003383000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000042a3208 method=org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Z @ 21 | |||
| Event: 11.289 Thread 0x0000000003383000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000042a3208 method=org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Z @ 21 | |||
| Event: 11.289 Thread 0x0000000003383000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000042a3208 method=org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Z @ 21 | |||
| Event: 11.289 Thread 0x0000000003383000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000042a3208 method=org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Z @ 21 | |||
| Internal exceptions (10 events): | |||
| Event: 11.572 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x000000071a63a058) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.579 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': java/lang/ObjectCustomizer> (0x000000071a6758a8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.581 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/filter/GenericFilterBeanCustomizer> (0x000000071a6a37a0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, | |||
| Event: 11.583 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/filter/OncePerRequestFilterCustomizer> (0x000000071a6d8438) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cp | |||
| Event: 11.584 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/filter/RequestContextFilterCustomizer> (0x000000071a707a28) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cp | |||
| Event: 11.585 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/boot/web/servlet/filter/OrderedRequestContextFilterCustomizer> (0x000000071a740b80) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile | |||
| Event: 11.586 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/boot/web/servlet/filter/OrderedFilterCustomizer> (0x000000071a77ae90) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDiction | |||
| Event: 11.587 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': javax/servlet/FilterCustomizer> (0x000000071a798008) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.588 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/core/OrderedCustomizer> (0x000000071a7bbc50) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.588 Thread 0x0000000003383000 Exception <a 'java/lang/ClassNotFoundException': javax/servlet/FilterCustomizer> (0x000000071a7d96e0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Events (10 events): | |||
| Event: 11.588 loading class javax/servlet/FilterCustomizer | |||
| Event: 11.588 loading class javax/servlet/FilterCustomizer done | |||
| Event: 11.588 loading class javax/servlet/FilterCustomizer | |||
| Event: 11.588 loading class javax/servlet/FilterCustomizer done | |||
| Event: 11.588 loading class javax/servlet/FilterCustomizer | |||
| Event: 11.588 loading class javax/servlet/FilterCustomizer done | |||
| Event: 11.588 loading class org/springframework/beans/factory/BeanNameAwareCustomizer | |||
| Event: 11.588 loading class org/springframework/beans/factory/BeanNameAwareCustomizer done | |||
| Event: 11.589 loading class org/springframework/beans/factory/BeanNameAwareCustomizer | |||
| Event: 11.589 loading class org/springframework/beans/factory/BeanNameAwareCustomizer done | |||
| Dynamic libraries: | |||
| 0x00007ff7d0830000 - 0x00007ff7d0867000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\java.exe | |||
| 0x00007ffc75130000 - 0x00007ffc75328000 C:\WINDOWS\SYSTEM32\ntdll.dll | |||
| 0x00007ffc73470000 - 0x00007ffc7352d000 C:\WINDOWS\System32\KERNEL32.DLL | |||
| 0x00007ffc72b10000 - 0x00007ffc72e06000 C:\WINDOWS\System32\KERNELBASE.dll | |||
| 0x00007ffc74f90000 - 0x00007ffc7503e000 C:\WINDOWS\System32\ADVAPI32.dll | |||
| 0x00007ffc747a0000 - 0x00007ffc7483e000 C:\WINDOWS\System32\msvcrt.dll | |||
| 0x00007ffc73530000 - 0x00007ffc735cc000 C:\WINDOWS\System32\sechost.dll | |||
| 0x00007ffc74e60000 - 0x00007ffc74f86000 C:\WINDOWS\System32\RPCRT4.dll | |||
| 0x00007ffc73e90000 - 0x00007ffc7402e000 C:\WINDOWS\System32\USER32.dll | |||
| 0x00007ffc72810000 - 0x00007ffc72832000 C:\WINDOWS\System32\win32u.dll | |||
| 0x00007ffc745a0000 - 0x00007ffc745cc000 C:\WINDOWS\System32\GDI32.dll | |||
| 0x00007ffc72fd0000 - 0x00007ffc730ea000 C:\WINDOWS\System32\gdi32full.dll | |||
| 0x00007ffc730f0000 - 0x00007ffc7318d000 C:\WINDOWS\System32\msvcp_win.dll | |||
| 0x00007ffc72a10000 - 0x00007ffc72b10000 C:\WINDOWS\System32\ucrtbase.dll | |||
| 0x00007ffc55b30000 - 0x00007ffc55dca000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll | |||
| 0x00007ffc746f0000 - 0x00007ffc74720000 C:\WINDOWS\System32\IMM32.DLL | |||
| 0x000000005a100000 - 0x000000005a1d2000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\msvcr100.dll | |||
| 0x00000000585e0000 - 0x0000000058e7d000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\server\jvm.dll | |||
| 0x00007ffc73d20000 - 0x00007ffc73d28000 C:\WINDOWS\System32\PSAPI.DLL | |||
| 0x00007ffc5c130000 - 0x00007ffc5c157000 C:\WINDOWS\SYSTEM32\WINMM.dll | |||
| 0x00007ffc696c0000 - 0x00007ffc696ca000 C:\WINDOWS\SYSTEM32\VERSION.dll | |||
| 0x00007ffc53f30000 - 0x00007ffc53f39000 C:\WINDOWS\SYSTEM32\WSOCK32.dll | |||
| 0x00007ffc74730000 - 0x00007ffc7479b000 C:\WINDOWS\System32\WS2_32.dll | |||
| 0x000000005ae40000 - 0x000000005ae4f000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\verify.dll | |||
| 0x000000005a0d0000 - 0x000000005a0f9000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\java.dll | |||
| 0x000000005a080000 - 0x000000005a096000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\zip.dll | |||
| 0x00007ffc735d0000 - 0x00007ffc73d15000 C:\WINDOWS\System32\SHELL32.dll | |||
| 0x00007ffc70880000 - 0x00007ffc7101b000 C:\WINDOWS\SYSTEM32\windows.storage.dll | |||
| 0x00007ffc74160000 - 0x00007ffc744b4000 C:\WINDOWS\System32\combase.dll | |||
| 0x00007ffc72250000 - 0x00007ffc7227e000 C:\WINDOWS\SYSTEM32\Wldp.dll | |||
| 0x00007ffc745e0000 - 0x00007ffc7468d000 C:\WINDOWS\System32\SHCORE.dll | |||
| 0x00007ffc732d0000 - 0x00007ffc73325000 C:\WINDOWS\System32\shlwapi.dll | |||
| 0x00007ffc72740000 - 0x00007ffc72765000 C:\WINDOWS\SYSTEM32\profapi.dll | |||
| 0x000000005a030000 - 0x000000005a03d000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\management.dll | |||
| 0x000000005a060000 - 0x000000005a07a000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\net.dll | |||
| 0x00007ffc71fb0000 - 0x00007ffc7201a000 C:\WINDOWS\system32\mswsock.dll | |||
| 0x000000005a040000 - 0x000000005a051000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\nio.dll | |||
| 0x00007ffc43500000 - 0x00007ffc43517000 C:\WINDOWS\system32\napinsp.dll | |||
| 0x00007ffc434e0000 - 0x00007ffc434fb000 C:\WINDOWS\system32\pnrpnsp.dll | |||
| 0x00007ffc6ce00000 - 0x00007ffc6ce15000 C:\WINDOWS\system32\wshbth.dll | |||
| 0x00007ffc6dc80000 - 0x00007ffc6dc9d000 C:\WINDOWS\system32\NLAapi.dll | |||
| 0x00007ffc71c50000 - 0x00007ffc71c8b000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL | |||
| 0x00007ffc71ca0000 - 0x00007ffc71d6a000 C:\WINDOWS\SYSTEM32\DNSAPI.dll | |||
| 0x00007ffc74720000 - 0x00007ffc74728000 C:\WINDOWS\System32\NSI.dll | |||
| 0x00007ffc433c0000 - 0x00007ffc433d2000 C:\WINDOWS\System32\winrnr.dll | |||
| 0x00007ffc69690000 - 0x00007ffc6969a000 C:\Windows\System32\rasadhlp.dll | |||
| 0x00007ffc5ee90000 - 0x00007ffc5ef12000 C:\WINDOWS\System32\fwpuclnt.dll | |||
| 0x00007ffc72e60000 - 0x00007ffc72e87000 C:\WINDOWS\System32\bcrypt.dll | |||
| 0x00007ffc721a0000 - 0x00007ffc721b8000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll | |||
| 0x00007ffc71850000 - 0x00007ffc71884000 C:\WINDOWS\system32\rsaenh.dll | |||
| 0x00007ffc72700000 - 0x00007ffc7272e000 C:\WINDOWS\SYSTEM32\USERENV.dll | |||
| 0x00007ffc72f40000 - 0x00007ffc72fc2000 C:\WINDOWS\System32\bcryptprimitives.dll | |||
| 0x00007ffc721c0000 - 0x00007ffc721cc000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll | |||
| 0x00007ffc6acc0000 - 0x00007ffc6acd7000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL | |||
| 0x00007ffc6a3e0000 - 0x00007ffc6a3fd000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL | |||
| 0x000000005a000000 - 0x000000005a024000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\sunec.dll | |||
| 0x0000000059ff0000 - 0x0000000059ffb000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\sunmscapi.dll | |||
| 0x00007ffc72840000 - 0x00007ffc7299e000 C:\WINDOWS\System32\CRYPT32.dll | |||
| VM Arguments: | |||
| java_command: C:\Users\gabri\AppData\Local\Temp\surefire1519680393763583179\surefirebooter-20250901203912518_3.jar C:\Users\gabri\AppData\Local\Temp\surefire1519680393763583179 2025-09-01T20-39-11_629-jvmRun1 surefire-20250901203912518_1tmp surefire_0-20250901203912518_2tmp | |||
| java_class_path (initial): C:\Users\gabri\AppData\Local\Temp\surefire1519680393763583179\surefirebooter-20250901203912518_3.jar | |||
| Launcher Type: SUN_STANDARD | |||
| Environment Variables: | |||
| JAVA_HOME=C:\Program Files\Java\jdk1.8.0_151 | |||
| USERNAME=gabri | |||
| OS=Windows_NT | |||
| PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 12, GenuineIntel | |||
| --------------- S Y S T E M --------------- | |||
| OS: Windows 10.0 , 64 bit Build 19041 (10.0.19041.3393) | |||
| CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 12, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx | |||
| Memory: 4k page, physical 33388072k(11602516k free), swap 97777920k(4732k free) | |||
| vm_info: Java HotSpot(TM) 64-Bit Server VM (25.151-b12) for windows-amd64 JRE (1.8.0_151-b12), built on Sep 5 2017 19:33:46 by "java_re" with MS VC++ 10.0 (VS2010) | |||
| time: Mon Sep 01 20:39:24 2025 | |||
| elapsed time: 11 seconds (0d 0h 0m 11s) | |||
| @ -1,330 +0,0 @@ | |||
| # | |||
| # There is insufficient memory for the Java Runtime Environment to continue. | |||
| # Native memory allocation (malloc) failed to allocate 1822816 bytes for Chunk::new | |||
| # Possible reasons: | |||
| # The system is out of physical RAM or swap space | |||
| # In 32 bit mode, the process size limit was hit | |||
| # Possible solutions: | |||
| # Reduce memory load on the system | |||
| # Increase physical memory or swap space | |||
| # Check if swap backing store is full | |||
| # Use 64 bit Java on a 64 bit OS | |||
| # Decrease Java heap size (-Xmx/-Xms) | |||
| # Decrease number of Java threads | |||
| # Decrease Java thread stack sizes (-Xss) | |||
| # Set larger code cache with -XX:ReservedCodeCacheSize= | |||
| # This output file may be truncated or incomplete. | |||
| # | |||
| # Out of Memory Error (allocation.cpp:390), pid=53516, tid=0x0000000000004254 | |||
| # | |||
| # JRE version: Java(TM) SE Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12) | |||
| # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode windows-amd64 compressed oops) | |||
| # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows | |||
| # | |||
| --------------- T H R E A D --------------- | |||
| Current thread (0x000000002627b000): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=16980, stack(0x0000000028990000,0x0000000028a90000)] | |||
| Stack: [0x0000000028990000,0x0000000028a90000] | |||
| [error occurred during error reporting (printing stack bounds), id 0xc0000005] | |||
| Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) | |||
| Current CompileTask: | |||
| C2: 11665 4173 4 org.springframework.core.annotation.TypeMappedAnnotations::get (52 bytes) | |||
| --------------- P R O C E S S --------------- | |||
| Java Threads: ( => current thread ) | |||
| 0x000000002f0c7000 JavaThread "DefaultSipTimerThread" [_thread_blocked, id=43516, stack(0x000000002c550000,0x000000002c650000)] | |||
| 0x000000002ed14000 JavaThread "EventScannerThread" [_thread_blocked, id=54732, stack(0x000000002c040000,0x000000002c140000)] | |||
| 0x000000002a027000 JavaThread "logback-2" daemon [_thread_blocked, id=57964, stack(0x000000002ad70000,0x000000002ae70000)] | |||
| 0x0000000029565000 JavaThread "surefire-forkedjvm-command-thread" daemon [_thread_in_native, id=55436, stack(0x000000002a760000,0x000000002a860000)] | |||
| 0x0000000029689000 JavaThread "surefire-forkedjvm-stream-flusher" daemon [_thread_blocked, id=56520, stack(0x000000002a660000,0x000000002a760000)] | |||
| 0x00000000281e5800 JavaThread "Service Thread" daemon [_thread_blocked, id=55744, stack(0x0000000028c90000,0x0000000028d90000)] | |||
| 0x00000000281da000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=30932, stack(0x0000000028b90000,0x0000000028c90000)] | |||
| 0x000000002627d000 JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=23548, stack(0x0000000028a90000,0x0000000028b90000)] | |||
| =>0x000000002627b000 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=16980, stack(0x0000000028990000,0x0000000028a90000)] | |||
| 0x00000000281c7800 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=2316, stack(0x0000000028890000,0x0000000028990000)] | |||
| 0x00000000281c6000 JavaThread "Attach Listener" daemon [_thread_blocked, id=53716, stack(0x0000000028790000,0x0000000028890000)] | |||
| 0x00000000281c5000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=22688, stack(0x0000000028690000,0x0000000028790000)] | |||
| 0x0000000028150800 JavaThread "Finalizer" daemon [_thread_blocked, id=44620, stack(0x0000000028530000,0x0000000028630000)] | |||
| 0x00000000032d8000 JavaThread "Reference Handler" daemon [_thread_blocked, id=56940, stack(0x0000000028030000,0x0000000028130000)] | |||
| 0x00000000031e3000 JavaThread "main" [_thread_in_vm, id=58208, stack(0x00000000030e0000,0x00000000031e0000)] | |||
| Other Threads: | |||
| 0x0000000026267800 VMThread [stack: 0x0000000027f30000,0x0000000028030000] [id=49952] | |||
| 0x00000000281ec000 WatcherThread [stack: 0x0000000028d90000,0x0000000028e90000] [id=58300] | |||
| VM state:not at safepoint (normal execution) | |||
| VM Mutex/Monitor currently owned by a thread: None | |||
| Heap: | |||
| PSYoungGen total 241152K, used 50932K [0x0000000716300000, 0x000000072de80000, 0x00000007c0000000) | |||
| eden space 219648K, 15% used [0x0000000716300000,0x000000071836d0b8,0x0000000723980000) | |||
| from space 21504K, 82% used [0x0000000723980000,0x0000000724ad00b8,0x0000000724e80000) | |||
| to space 17920K, 0% used [0x000000072cd00000,0x000000072cd00000,0x000000072de80000) | |||
| ParOldGen total 229888K, used 15584K [0x00000005c2800000, 0x00000005d0880000, 0x0000000716300000) | |||
| object space 229888K, 6% used [0x00000005c2800000,0x00000005c3738198,0x00000005d0880000) | |||
| Metaspace used 47449K, capacity 50356K, committed 50472K, reserved 1093632K | |||
| class space used 6105K, capacity 6644K, committed 6704K, reserved 1048576K | |||
| Card table byte_map: [0x00000000126a0000,0x0000000013690000] byte_map_base: 0x000000000f88c000 | |||
| Marking Bits: (ParMarkBitMap*) 0x0000000058dfd850 | |||
| Begin Bits: [0x0000000014930000, 0x000000001c890000) | |||
| End Bits: [0x000000001c890000, 0x00000000247f0000) | |||
| Polling page: 0x0000000002d20000 | |||
| CodeCache: size=245760Kb used=13768Kb max_used=15128Kb free=231991Kb | |||
| bounds [0x00000000032e0000, 0x00000000041f0000, 0x00000000122e0000] | |||
| total_blobs=4346 nmethods=3808 adapters=449 | |||
| compilation: enabled | |||
| Compilation events (10 events): | |||
| Event: 11.607 Thread 0x00000000281da000 4256 2 org.springframework.core.ResolvableType::forType (115 bytes) | |||
| Event: 11.608 Thread 0x00000000281da000 nmethod 4256 0x0000000003651390 code [0x0000000003651560, 0x0000000003651ae8] | |||
| Event: 11.627 Thread 0x00000000281da000 4257 2 org.springframework.beans.GenericTypeAwarePropertyDescriptor::<init> (323 bytes) | |||
| Event: 11.631 Thread 0x00000000281da000 nmethod 4257 0x00000000034b6ed0 code [0x00000000034b71c0, 0x00000000034b81b8] | |||
| Event: 11.657 Thread 0x00000000281da000 4258 3 org.springframework.context.support.AbstractApplicationContext::assertBeanFactoryActive (81 bytes) | |||
| Event: 11.659 Thread 0x00000000281da000 nmethod 4258 0x00000000034b4190 code [0x00000000034b4400, 0x00000000034b5698] | |||
| Event: 11.660 Thread 0x00000000281da000 4259 ! 3 com.sun.proxy.$Proxy11::value (29 bytes) | |||
| Event: 11.661 Thread 0x00000000281da000 nmethod 4259 0x00000000033edf90 code [0x00000000033ee120, 0x00000000033ee558] | |||
| Event: 11.661 Thread 0x00000000281da000 4260 3 org.springframework.core.annotation.AnnotationTypeMapping::areEquivalent (87 bytes) | |||
| Event: 11.663 Thread 0x00000000281da000 nmethod 4260 0x0000000003653ed0 code [0x0000000003654100, 0x00000000036550a8] | |||
| GC Heap History (10 events): | |||
| Event: 2.872 GC heap before | |||
| {Heap before GC invocations=3 (full 1): | |||
| PSYoungGen total 152576K, used 6505K [0x0000000716300000, 0x0000000728d00000, 0x00000007c0000000) | |||
| eden space 131072K, 0% used [0x0000000716300000,0x0000000716300000,0x000000071e300000) | |||
| from space 21504K, 30% used [0x000000071f800000,0x000000071fe5a790,0x0000000720d00000) | |||
| to space 21504K, 0% used [0x000000071e300000,0x000000071e300000,0x000000071f800000) | |||
| ParOldGen total 348160K, used 96K [0x00000005c2800000, 0x00000005d7c00000, 0x0000000716300000) | |||
| object space 348160K, 0% used [0x00000005c2800000,0x00000005c2818010,0x00000005d7c00000) | |||
| Metaspace used 19945K, capacity 21266K, committed 21296K, reserved 1067008K | |||
| class space used 2581K, capacity 2859K, committed 2864K, reserved 1048576K | |||
| Event: 2.917 GC heap after | |||
| Heap after GC invocations=3 (full 1): | |||
| PSYoungGen total 152576K, used 0K [0x0000000716300000, 0x0000000728d00000, 0x00000007c0000000) | |||
| eden space 131072K, 0% used [0x0000000716300000,0x0000000716300000,0x000000071e300000) | |||
| from space 21504K, 0% used [0x000000071f800000,0x000000071f800000,0x0000000720d00000) | |||
| to space 21504K, 0% used [0x000000071e300000,0x000000071e300000,0x000000071f800000) | |||
| ParOldGen total 165888K, used 6416K [0x00000005c2800000, 0x00000005cca00000, 0x0000000716300000) | |||
| object space 165888K, 3% used [0x00000005c2800000,0x00000005c2e44240,0x00000005cca00000) | |||
| Metaspace used 19945K, capacity 21266K, committed 21296K, reserved 1067008K | |||
| class space used 2581K, capacity 2859K, committed 2864K, reserved 1048576K | |||
| } | |||
| Event: 4.223 GC heap before | |||
| {Heap before GC invocations=4 (full 1): | |||
| PSYoungGen total 152576K, used 131072K [0x0000000716300000, 0x0000000728d00000, 0x00000007c0000000) | |||
| eden space 131072K, 100% used [0x0000000716300000,0x000000071e300000,0x000000071e300000) | |||
| from space 21504K, 0% used [0x000000071f800000,0x000000071f800000,0x0000000720d00000) | |||
| to space 21504K, 0% used [0x000000071e300000,0x000000071e300000,0x000000071f800000) | |||
| ParOldGen total 165888K, used 6416K [0x00000005c2800000, 0x00000005cca00000, 0x0000000716300000) | |||
| object space 165888K, 3% used [0x00000005c2800000,0x00000005c2e44240,0x00000005cca00000) | |||
| Metaspace used 27426K, capacity 29060K, committed 29232K, reserved 1075200K | |||
| class space used 3509K, capacity 3826K, committed 3888K, reserved 1048576K | |||
| Event: 4.231 GC heap after | |||
| Heap after GC invocations=4 (full 1): | |||
| PSYoungGen total 152576K, used 10275K [0x0000000716300000, 0x0000000726a00000, 0x00000007c0000000) | |||
| eden space 131072K, 0% used [0x0000000716300000,0x0000000716300000,0x000000071e300000) | |||
| from space 21504K, 47% used [0x000000071e300000,0x000000071ed08fe8,0x000000071f800000) | |||
| to space 21504K, 0% used [0x0000000725500000,0x0000000725500000,0x0000000726a00000) | |||
| ParOldGen total 165888K, used 6424K [0x00000005c2800000, 0x00000005cca00000, 0x0000000716300000) | |||
| object space 165888K, 3% used [0x00000005c2800000,0x00000005c2e46240,0x00000005cca00000) | |||
| Metaspace used 27426K, capacity 29060K, committed 29232K, reserved 1075200K | |||
| class space used 3509K, capacity 3826K, committed 3888K, reserved 1048576K | |||
| } | |||
| Event: 6.507 GC heap before | |||
| {Heap before GC invocations=5 (full 1): | |||
| PSYoungGen total 152576K, used 108528K [0x0000000716300000, 0x0000000726a00000, 0x00000007c0000000) | |||
| eden space 131072K, 74% used [0x0000000716300000,0x000000071c2f31e8,0x000000071e300000) | |||
| from space 21504K, 47% used [0x000000071e300000,0x000000071ed08fe8,0x000000071f800000) | |||
| to space 21504K, 0% used [0x0000000725500000,0x0000000725500000,0x0000000726a00000) | |||
| ParOldGen total 165888K, used 6424K [0x00000005c2800000, 0x00000005cca00000, 0x0000000716300000) | |||
| object space 165888K, 3% used [0x00000005c2800000,0x00000005c2e46240,0x00000005cca00000) | |||
| Metaspace used 33549K, capacity 35456K, committed 35496K, reserved 1079296K | |||
| class space used 4382K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| Event: 6.519 GC heap after | |||
| Heap after GC invocations=5 (full 1): | |||
| PSYoungGen total 234496K, used 10581K [0x0000000716300000, 0x0000000726380000, 0x00000007c0000000) | |||
| eden space 219648K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723980000) | |||
| from space 14848K, 71% used [0x0000000725500000,0x0000000725f55710,0x0000000726380000) | |||
| to space 21504K, 0% used [0x0000000723980000,0x0000000723980000,0x0000000724e80000) | |||
| ParOldGen total 165888K, used 6432K [0x00000005c2800000, 0x00000005cca00000, 0x0000000716300000) | |||
| object space 165888K, 3% used [0x00000005c2800000,0x00000005c2e48240,0x00000005cca00000) | |||
| Metaspace used 33549K, capacity 35456K, committed 35496K, reserved 1079296K | |||
| class space used 4382K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| } | |||
| Event: 6.519 GC heap before | |||
| {Heap before GC invocations=6 (full 2): | |||
| PSYoungGen total 234496K, used 10581K [0x0000000716300000, 0x0000000726380000, 0x00000007c0000000) | |||
| eden space 219648K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723980000) | |||
| from space 14848K, 71% used [0x0000000725500000,0x0000000725f55710,0x0000000726380000) | |||
| to space 21504K, 0% used [0x0000000723980000,0x0000000723980000,0x0000000724e80000) | |||
| ParOldGen total 165888K, used 6432K [0x00000005c2800000, 0x00000005cca00000, 0x0000000716300000) | |||
| object space 165888K, 3% used [0x00000005c2800000,0x00000005c2e48240,0x00000005cca00000) | |||
| Metaspace used 33549K, capacity 35456K, committed 35496K, reserved 1079296K | |||
| class space used 4382K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| Event: 6.580 GC heap after | |||
| Heap after GC invocations=6 (full 2): | |||
| PSYoungGen total 234496K, used 0K [0x0000000716300000, 0x0000000726380000, 0x00000007c0000000) | |||
| eden space 219648K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723980000) | |||
| from space 14848K, 0% used [0x0000000725500000,0x0000000725500000,0x0000000726380000) | |||
| to space 21504K, 0% used [0x0000000723980000,0x0000000723980000,0x0000000724e80000) | |||
| ParOldGen total 229888K, used 15576K [0x00000005c2800000, 0x00000005d0880000, 0x0000000716300000) | |||
| object space 229888K, 6% used [0x00000005c2800000,0x00000005c3736198,0x00000005d0880000) | |||
| Metaspace used 33549K, capacity 35456K, committed 35496K, reserved 1079296K | |||
| class space used 4382K, capacity 4770K, committed 4784K, reserved 1048576K | |||
| } | |||
| Event: 11.040 GC heap before | |||
| {Heap before GC invocations=7 (full 2): | |||
| PSYoungGen total 234496K, used 219648K [0x0000000716300000, 0x0000000726380000, 0x00000007c0000000) | |||
| eden space 219648K, 100% used [0x0000000716300000,0x0000000723980000,0x0000000723980000) | |||
| from space 14848K, 0% used [0x0000000725500000,0x0000000725500000,0x0000000726380000) | |||
| to space 21504K, 0% used [0x0000000723980000,0x0000000723980000,0x0000000724e80000) | |||
| ParOldGen total 229888K, used 15576K [0x00000005c2800000, 0x00000005d0880000, 0x0000000716300000) | |||
| object space 229888K, 6% used [0x00000005c2800000,0x00000005c3736198,0x00000005d0880000) | |||
| Metaspace used 46302K, capacity 49116K, committed 49320K, reserved 1091584K | |||
| class space used 5930K, capacity 6458K, committed 6576K, reserved 1048576K | |||
| Event: 11.069 GC heap after | |||
| Heap after GC invocations=7 (full 2): | |||
| PSYoungGen total 241152K, used 17728K [0x0000000716300000, 0x000000072de80000, 0x00000007c0000000) | |||
| eden space 219648K, 0% used [0x0000000716300000,0x0000000716300000,0x0000000723980000) | |||
| from space 21504K, 82% used [0x0000000723980000,0x0000000724ad00b8,0x0000000724e80000) | |||
| to space 17920K, 0% used [0x000000072cd00000,0x000000072cd00000,0x000000072de80000) | |||
| ParOldGen total 229888K, used 15584K [0x00000005c2800000, 0x00000005d0880000, 0x0000000716300000) | |||
| object space 229888K, 6% used [0x00000005c2800000,0x00000005c3738198,0x00000005d0880000) | |||
| Metaspace used 46302K, capacity 49116K, committed 49320K, reserved 1091584K | |||
| class space used 5930K, capacity 6458K, committed 6576K, reserved 1048576K | |||
| } | |||
| Deoptimization events (10 events): | |||
| Event: 8.813 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003e8cafc method=java.lang.CharacterDataLatin1.digit(II)I @ 60 | |||
| Event: 9.387 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003501f58 method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1 | |||
| Event: 9.387 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000034bf490 method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1 | |||
| Event: 9.922 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003da8ae0 method=org.springframework.boot.context.properties.source.ConfigurationPropertyName$ElementsParser.add(IILorg/springframework/boot/context/properties/source/ConfigurationPropertyNa | |||
| Event: 9.927 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003f6a5d0 method=org.springframework.core.annotation.TypeMappedAnnotations$IsPresent.doWithAnnotations(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/annotation/Annotation;)Ljava/lang/Bool | |||
| Event: 10.255 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000040ae318 method=org.springframework.core.annotation.AnnotationsScanner.processMethodHierarchy(Ljava/lang/Object;[ILjava/lang/Class;Lorg/springframework/core/annotation/AnnotationsProcessor; | |||
| Event: 10.259 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003f839d4 method=org.springframework.core.annotation.TypeMappedAnnotations$IsPresent.doWithAnnotations(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/annotation/Annotation;)Ljava/lang/Bool | |||
| Event: 10.507 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003f51848 method=sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; @ 9 | |||
| Event: 10.552 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000004173d70 method=org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(Ljava/lang/String;Lorg/springframework/core/ResolvableType;Z)Z @ 559 | |||
| Event: 11.659 Thread 0x00000000031e3000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000404c56c method=org.springframework.core.annotation.TypeMappedAnnotations$IsPresent.doWithAnnotations(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/annotation/Annotation;)Ljava/lang/Bool | |||
| Internal exceptions (10 events): | |||
| Event: 11.637 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x000000071819e058) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.638 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/InitializingBeanCustomizer> (0x00000007181ca6e0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp | |||
| Event: 11.640 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/servlet/HandlerMappingCustomizer> (0x00000007181f5468) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, li | |||
| Event: 11.642 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/core/OrderedCustomizer> (0x00000007182184d0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.643 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/BeanNameAwareCustomizer> (0x00000007182438c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, l | |||
| Event: 11.645 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x000000071826b220) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.646 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/context/ServletContextAwareCustomizer> (0x00000007182980e8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cp | |||
| Event: 11.649 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x00000007182bfad8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Event: 11.651 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/context/ApplicationContextAwareCustomizer> (0x00000007182ec790) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cp | |||
| Event: 11.652 Thread 0x00000000031e3000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x0000000718314718) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u151\9699\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210] | |||
| Events (10 events): | |||
| Event: 11.651 loading class org/springframework/beans/factory/AwareCustomizer done | |||
| Event: 11.651 loading class org/springframework/beans/factory/AwareCustomizer | |||
| Event: 11.651 loading class org/springframework/beans/factory/AwareCustomizer done | |||
| Event: 11.652 loading class org/springframework/beans/factory/AwareCustomizer | |||
| Event: 11.652 loading class org/springframework/beans/factory/AwareCustomizer done | |||
| Event: 11.659 Thread 0x00000000031e3000 Uncommon trap: trap_request=0xffffff65 fr.pc=0x000000000404c56c | |||
| Event: 11.659 Thread 0x00000000031e3000 DEOPT PACKING pc=0x000000000404c56c sp=0x00000000031dc410 | |||
| Event: 11.659 Thread 0x00000000031e3000 DEOPT UNPACKING pc=0x000000000332582a sp=0x00000000031dc318 mode 2 | |||
| Event: 11.659 loading class org/springframework/web/servlet/handler/AbstractHandlerMethodMapping | |||
| Event: 11.659 loading class org/springframework/web/servlet/handler/AbstractHandlerMethodMapping done | |||
| Dynamic libraries: | |||
| 0x00007ff7d0830000 - 0x00007ff7d0867000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\java.exe | |||
| 0x00007ffc75130000 - 0x00007ffc75328000 C:\WINDOWS\SYSTEM32\ntdll.dll | |||
| 0x00007ffc73470000 - 0x00007ffc7352d000 C:\WINDOWS\System32\KERNEL32.DLL | |||
| 0x00007ffc72b10000 - 0x00007ffc72e06000 C:\WINDOWS\System32\KERNELBASE.dll | |||
| 0x00007ffc74f90000 - 0x00007ffc7503e000 C:\WINDOWS\System32\ADVAPI32.dll | |||
| 0x00007ffc747a0000 - 0x00007ffc7483e000 C:\WINDOWS\System32\msvcrt.dll | |||
| 0x00007ffc73530000 - 0x00007ffc735cc000 C:\WINDOWS\System32\sechost.dll | |||
| 0x00007ffc74e60000 - 0x00007ffc74f86000 C:\WINDOWS\System32\RPCRT4.dll | |||
| 0x00007ffc73e90000 - 0x00007ffc7402e000 C:\WINDOWS\System32\USER32.dll | |||
| 0x00007ffc72810000 - 0x00007ffc72832000 C:\WINDOWS\System32\win32u.dll | |||
| 0x00007ffc745a0000 - 0x00007ffc745cc000 C:\WINDOWS\System32\GDI32.dll | |||
| 0x00007ffc72fd0000 - 0x00007ffc730ea000 C:\WINDOWS\System32\gdi32full.dll | |||
| 0x00007ffc730f0000 - 0x00007ffc7318d000 C:\WINDOWS\System32\msvcp_win.dll | |||
| 0x00007ffc72a10000 - 0x00007ffc72b10000 C:\WINDOWS\System32\ucrtbase.dll | |||
| 0x00007ffc55b30000 - 0x00007ffc55dca000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll | |||
| 0x00007ffc746f0000 - 0x00007ffc74720000 C:\WINDOWS\System32\IMM32.DLL | |||
| 0x000000005a100000 - 0x000000005a1d2000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\msvcr100.dll | |||
| 0x00000000585e0000 - 0x0000000058e7d000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\server\jvm.dll | |||
| 0x00007ffc73d20000 - 0x00007ffc73d28000 C:\WINDOWS\System32\PSAPI.DLL | |||
| 0x00007ffc696c0000 - 0x00007ffc696ca000 C:\WINDOWS\SYSTEM32\VERSION.dll | |||
| 0x00007ffc53f30000 - 0x00007ffc53f39000 C:\WINDOWS\SYSTEM32\WSOCK32.dll | |||
| 0x00007ffc5c130000 - 0x00007ffc5c157000 C:\WINDOWS\SYSTEM32\WINMM.dll | |||
| 0x00007ffc74730000 - 0x00007ffc7479b000 C:\WINDOWS\System32\WS2_32.dll | |||
| 0x000000005ae40000 - 0x000000005ae4f000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\verify.dll | |||
| 0x000000005a0d0000 - 0x000000005a0f9000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\java.dll | |||
| 0x000000005a080000 - 0x000000005a096000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\zip.dll | |||
| 0x00007ffc735d0000 - 0x00007ffc73d15000 C:\WINDOWS\System32\SHELL32.dll | |||
| 0x00007ffc70880000 - 0x00007ffc7101b000 C:\WINDOWS\SYSTEM32\windows.storage.dll | |||
| 0x00007ffc74160000 - 0x00007ffc744b4000 C:\WINDOWS\System32\combase.dll | |||
| 0x00007ffc72250000 - 0x00007ffc7227e000 C:\WINDOWS\SYSTEM32\Wldp.dll | |||
| 0x00007ffc745e0000 - 0x00007ffc7468d000 C:\WINDOWS\System32\SHCORE.dll | |||
| 0x00007ffc732d0000 - 0x00007ffc73325000 C:\WINDOWS\System32\shlwapi.dll | |||
| 0x00007ffc72740000 - 0x00007ffc72765000 C:\WINDOWS\SYSTEM32\profapi.dll | |||
| 0x000000005a030000 - 0x000000005a03d000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\management.dll | |||
| 0x000000005a060000 - 0x000000005a07a000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\net.dll | |||
| 0x00007ffc71fb0000 - 0x00007ffc7201a000 C:\WINDOWS\system32\mswsock.dll | |||
| 0x000000005a040000 - 0x000000005a051000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\nio.dll | |||
| 0x00007ffc43500000 - 0x00007ffc43517000 C:\WINDOWS\system32\napinsp.dll | |||
| 0x00007ffc434e0000 - 0x00007ffc434fb000 C:\WINDOWS\system32\pnrpnsp.dll | |||
| 0x00007ffc6ce00000 - 0x00007ffc6ce15000 C:\WINDOWS\system32\wshbth.dll | |||
| 0x00007ffc6dc80000 - 0x00007ffc6dc9d000 C:\WINDOWS\system32\NLAapi.dll | |||
| 0x00007ffc71c50000 - 0x00007ffc71c8b000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL | |||
| 0x00007ffc71ca0000 - 0x00007ffc71d6a000 C:\WINDOWS\SYSTEM32\DNSAPI.dll | |||
| 0x00007ffc74720000 - 0x00007ffc74728000 C:\WINDOWS\System32\NSI.dll | |||
| 0x00007ffc433c0000 - 0x00007ffc433d2000 C:\WINDOWS\System32\winrnr.dll | |||
| 0x00007ffc69690000 - 0x00007ffc6969a000 C:\Windows\System32\rasadhlp.dll | |||
| 0x00007ffc5ee90000 - 0x00007ffc5ef12000 C:\WINDOWS\System32\fwpuclnt.dll | |||
| 0x00007ffc72e60000 - 0x00007ffc72e87000 C:\WINDOWS\System32\bcrypt.dll | |||
| 0x00007ffc721a0000 - 0x00007ffc721b8000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll | |||
| 0x00007ffc71850000 - 0x00007ffc71884000 C:\WINDOWS\system32\rsaenh.dll | |||
| 0x00007ffc72700000 - 0x00007ffc7272e000 C:\WINDOWS\SYSTEM32\USERENV.dll | |||
| 0x00007ffc72f40000 - 0x00007ffc72fc2000 C:\WINDOWS\System32\bcryptprimitives.dll | |||
| 0x00007ffc721c0000 - 0x00007ffc721cc000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll | |||
| 0x00007ffc6acc0000 - 0x00007ffc6acd7000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL | |||
| 0x00007ffc6a3e0000 - 0x00007ffc6a3fd000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL | |||
| 0x000000005a000000 - 0x000000005a024000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\sunec.dll | |||
| 0x0000000059ff0000 - 0x0000000059ffb000 C:\Program Files\Java\jdk1.8.0_151\jre\bin\sunmscapi.dll | |||
| 0x00007ffc72840000 - 0x00007ffc7299e000 C:\WINDOWS\System32\CRYPT32.dll | |||
| VM Arguments: | |||
| java_command: C:\Users\gabri\AppData\Local\Temp\surefire1848290997935119688\surefirebooter-20250901204000385_3.jar C:\Users\gabri\AppData\Local\Temp\surefire1848290997935119688 2025-09-01T20-39-59_496-jvmRun1 surefire-20250901204000385_1tmp surefire_0-20250901204000385_2tmp | |||
| java_class_path (initial): C:\Users\gabri\AppData\Local\Temp\surefire1848290997935119688\surefirebooter-20250901204000385_3.jar | |||
| Launcher Type: SUN_STANDARD | |||
| Environment Variables: | |||
| JAVA_HOME=C:\Program Files\Java\jdk1.8.0_151 | |||
| USERNAME=gabri | |||
| OS=Windows_NT | |||
| PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 12, GenuineIntel | |||
| --------------- S Y S T E M --------------- | |||
| OS: Windows 10.0 , 64 bit Build 19041 (10.0.19041.3393) | |||
| CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 12, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx | |||
| Memory: 4k page, physical 33388072k(11668008k free), swap 97777920k(6560k free) | |||
| vm_info: Java HotSpot(TM) 64-Bit Server VM (25.151-b12) for windows-amd64 JRE (1.8.0_151-b12), built on Sep 5 2017 19:33:46 by "java_re" with MS VC++ 10.0 (VS2010) | |||
| time: Mon Sep 01 20:40:12 2025 | |||
| elapsed time: 11 seconds (0d 0h 0m 11s) | |||
| @ -1,65 +0,0 @@ | |||
| -target 1.8 ##Specify the java version number | |||
| -dontshrink ##Default is enabled, here the shrink is turned off, that is, the unused classes/members are not deleted. | |||
| -dontoptimize ##Default is enabled, here to turn off bytecode level optimization | |||
| -useuniqueclassmembernames ## Take a unique strategy for confusing the naming of class members | |||
| -adaptclassstrings ## After confusing the class name, replace it with a place like Class.forName('className') | |||
| -dontnote | |||
| -ignorewarnings ## warnings are ignored | |||
| -dontwarn | |||
| -keep public class * extends org.springframework.boot.web.support.SpringBootServletInitializer | |||
| -keepdirectories ## Keep the package structure | |||
| -keepclasseswithmembers public class * { public static void main(java.lang.String[]);} ##Maintain the class of the main method and its method name | |||
| -keepclassmembers enum * { *; } ##Reserving enumeration members and methods | |||
| -keepclassmembers class * { | |||
| @org.springframework.beans.factory.annotation.Autowired *; | |||
| @org.springframework.beans.factory.annotation.Qualifier *; | |||
| @org.springframework.beans.factory.annotation.Value *; | |||
| @org.springframework.beans.factory.annotation.Required *; | |||
| @org.springframework.context.annotation.Bean *; | |||
| @org.springframework.context.annotation.Primary *; | |||
| @org.springframework.boot.context.properties.ConfigurationProperties *; | |||
| @org.springframework.boot.context.properties.EnableConfigurationProperties *; | |||
| @javax.inject.Inject *; | |||
| @javax.annotation.PostConstruct *; | |||
| @javax.annotation.PreDestroy *; | |||
| } | |||
| -keep @org.springframework.cache.annotation.EnableCaching class * | |||
| -keep @org.springframework.context.annotation.Configuration class * | |||
| -keep @org.springframework.boot.context.properties.ConfigurationProperties class * | |||
| -keep @org.springframework.boot.autoconfigure.SpringBootApplication class * | |||
| -allowaccessmodification | |||
| -keepattributes *Annotation* | |||
| -keepdirectories com.jayk.springboot.proguard.obfuscationdemo | |||
| -keepdirectories org.springframework.boot.autoconfigure | |||
| ## Do not change names of the getters and setter, if you remove this ##thymeleaf unable to find the getter and setter i.e: ##${greetingDTO.message} | |||
| -keepclassmembers class * { | |||
| *** get*(); | |||
| void set*(***); | |||
| } | |||
| -keepclassmembernames class * { | |||
| java.lang.Class class$(java.lang.String); | |||
| java.lang.Class class$(java.lang.String, boolean); | |||
| } | |||
| -keepclassmembers enum * { | |||
| public static **[] values(); | |||
| public static ** valueOf(java.lang.String); | |||
| public static ** fromValue(java.lang.String); | |||
| } | |||
| -keepnames class * implements java.io.Serializable | |||
| -keepclassmembernames public class com.test.blah.config.liquibase.AsyncSpringLiquibase | |||
| -keepclassmembers class * implements java.io.Serializable { | |||
| static final long serialVersionUID; | |||
| private static final java.io.ObjectStreamField[] serialPersistentFields; | |||
| !static !transient <fields>; | |||
| !private <fields>; | |||
| !private <methods>; | |||
| private void writeObject(java.io.ObjectOutputStream); | |||
| private void readObject(java.io.ObjectInputStream); | |||
| java.lang.Object writeReplace(); | |||
| java.lang.Object readResolve(); | |||
| } | |||
| -keepclassmembers class * { | |||
| @org.springframework.beans.factory.annotation.Autowired <fields>; | |||
| @org.springframework.beans.factory.annotation.Autowired <methods>; | |||
| @org.springframework.security.access.prepost.PreAuthorize <methods>; | |||
| } | |||
| @ -0,0 +1,50 @@ | |||
| package com.inspect.tcpserver.domain; | |||
| import lombok.*; | |||
| import java.io.Serializable; | |||
| import java.util.List; | |||
| @ToString | |||
| @Getter | |||
| @Setter | |||
| @Builder | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| public class BasedataEqpBookMoMain implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| private Long eqpBookId; | |||
| private String stationName; | |||
| private String stationCode; | |||
| private Long areaId; | |||
| private String areaName; | |||
| private String patrolDeviceName; | |||
| private String patrolDeviceCode; | |||
| private String channelCode; | |||
| private String channelName; | |||
| private String upSystemDeviceCode; | |||
| private String deviceModel; | |||
| private String manufacturer; | |||
| private String useUnit; | |||
| private String deviceSource; | |||
| private String productionDate; | |||
| private String productionCode; | |||
| private String isTransport; | |||
| private String useMode; | |||
| private String videoMode; | |||
| private String place; | |||
| private String positionX; | |||
| private String positionY; | |||
| private String positionZ; | |||
| private String type; | |||
| private String patrolDeviceInfo; | |||
| private String robotsCode; | |||
| private String ipAddr; | |||
| private String port; | |||
| private String user; | |||
| private String password; | |||
| private String mainSystemCode; | |||
| private String delFlag; | |||
| private String status; | |||
| private List<String> algId; | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| package com.inspect.tcpserver.mapper; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.inspect.tcpserver.domain.BasedataEqpBookMoMain; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import java.util.List; | |||
| @Mapper | |||
| public interface ICameraMapper { | |||
| List<BasedataEqpBookMoMain> selectCamera(); | |||
| BasedataEqpBookMoMain getBasedataEqpBook(String upSystemDeviceCode); | |||
| } | |||
| @ -1,27 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.config; | |||
| import gov.nist.javax.sip.clientauthutils.AccountManager; | |||
| import gov.nist.javax.sip.clientauthutils.UserCredentials; | |||
| import org.springframework.beans.factory.annotation.Value; | |||
| import org.springframework.stereotype.Component; | |||
| import javax.sip.ClientTransaction; | |||
| @Component | |||
| public class AccountManagerImpl implements AccountManager { | |||
| @Value("${sip.username}") | |||
| private String username; | |||
| @Value("${sip.password}") | |||
| private String password; | |||
| @Value("${sip.domain}") | |||
| private String domain; | |||
| @Override | |||
| public UserCredentials getCredentials(ClientTransaction clientTransaction, String s) { | |||
| return null; | |||
| } | |||
| } | |||
| @ -0,0 +1,14 @@ | |||
| package com.inspect.tcpserver.sip.feign; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.inspect.tcpserver.domain.AjaxResult; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.RequestParam; | |||
| @FeignClient(name = "inspect-ivs",url = "http://199.199.199.154:9906") | |||
| public interface InspectIvsFeignService { | |||
| @GetMapping({"/api/v1/stream/rtspUrl"}) | |||
| JSONObject rtspUrl(@RequestParam("cameraCode") String cameraCode); | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| package com.inspect.tcpserver.sip.feign; | |||
| import com.inspect.tcpserver.domain.AjaxResult; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.RequestParam; | |||
| @FeignClient(name = "inspect-main",url = "http://199.199.199.104:9901") | |||
| public interface InspectMainFeignService { | |||
| @GetMapping({"/video/realtime"}) | |||
| AjaxResult realtime( | |||
| @RequestParam("patroldeviceCode") String patrolDeviceCode, | |||
| @RequestParam("channelCode") String channelCode); | |||
| } | |||
| @ -1,45 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.io.ByteArrayOutputStream; | |||
| import java.nio.ByteBuffer; | |||
| public class Gb28181PsMuxer { | |||
| private boolean headerSent = false; | |||
| public byte[] muxH264(byte[] annexB, long pts90k) { | |||
| try { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| if (!headerSent) { | |||
| out.write(PsHeader.packHeader()); | |||
| out.write(PsHeader.systemHeader()); | |||
| out.write(PsHeader.psmHeader()); | |||
| headerSent = true; | |||
| } | |||
| out.write(PesPacket.buildH264Pes(annexB, pts90k)); | |||
| return out.toByteArray(); | |||
| } catch (Exception e) { | |||
| return null; | |||
| } | |||
| } | |||
| public byte[] muxOneFrame(byte[] h264, long pts90k) { | |||
| try { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| // ⚠️ 每一帧都必须有 | |||
| out.write(PsHeader.packHeader()); | |||
| out.write(PsHeader.systemHeader()); | |||
| out.write(PsHeader.psmHeader()); | |||
| out.write(PesPacket.buildH264Pes(h264, pts90k)); | |||
| return out.toByteArray(); | |||
| } catch (Exception e) { | |||
| return null; | |||
| } | |||
| } | |||
| } | |||
| @ -1,71 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import org.bytedeco.ffmpeg.avcodec.AVPacket; | |||
| import org.bytedeco.javacpp.BytePointer; | |||
| import java.nio.ByteBuffer; | |||
| public class H264AnnexBExtractor { | |||
| private static final byte[] START_CODE = {0, 0, 0, 1}; | |||
| /** | |||
| * 从 AVPacket 中提取 Annex-B H264 | |||
| */ | |||
| public static byte[] extractFromAvPacket(AVPacket pkt) { | |||
| if (pkt == null || pkt.size() <= 0 || pkt.data() == null) { | |||
| return null; | |||
| } | |||
| BytePointer ptr = pkt.data(); | |||
| int size = pkt.size(); | |||
| byte[] raw = new byte[size]; | |||
| ptr.get(raw); | |||
| // 已经是 Annex-B | |||
| if (isAnnexB(raw)) { | |||
| return raw; | |||
| } | |||
| // AVCC → Annex-B | |||
| return avccToAnnexB(raw); | |||
| } | |||
| /** | |||
| * 判断是否 Annex-B | |||
| */ | |||
| private static boolean isAnnexB(byte[] data) { | |||
| if (data.length < 4) return false; | |||
| return data[0] == 0 && data[1] == 0 && data[2] == 0 && data[3] == 1; | |||
| } | |||
| /** | |||
| * AVCC(length-prefixed)→ Annex-B(start code) | |||
| */ | |||
| private static byte[] avccToAnnexB(byte[] avcc) { | |||
| ByteBuffer in = ByteBuffer.wrap(avcc); | |||
| ByteBuffer out = ByteBuffer.allocate(avcc.length + 64); | |||
| while (in.remaining() >= 4) { | |||
| int nalLen = | |||
| ((in.get() & 0xff) << 24) | | |||
| ((in.get() & 0xff) << 16) | | |||
| ((in.get() & 0xff) << 8) | | |||
| (in.get() & 0xff); | |||
| if (nalLen <= 0 || nalLen > in.remaining()) { | |||
| break; | |||
| } | |||
| out.put(START_CODE); | |||
| out.put(in.array(), in.position(), nalLen); | |||
| in.position(in.position() + nalLen); | |||
| } | |||
| byte[] annexB = new byte[out.position()]; | |||
| out.flip(); | |||
| out.get(annexB); | |||
| return annexB; | |||
| } | |||
| } | |||
| @ -1,46 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.net.*; | |||
| import java.util.concurrent.atomic.AtomicBoolean; | |||
| public class MediaSession { | |||
| private final String remoteIp; | |||
| private final int remotePort; | |||
| private final int ssrc; | |||
| private DatagramSocket socket; | |||
| private final AtomicBoolean running = new AtomicBoolean(false); | |||
| private final RtpSender rtpSender; | |||
| private final PsMuxer psMuxer; | |||
| public MediaSession(String ip, int port, int ssrc) throws Exception { | |||
| this.remoteIp = ip; | |||
| this.remotePort = port; | |||
| this.ssrc = ssrc; | |||
| this.socket = new DatagramSocket(); | |||
| this.rtpSender = new RtpSender(socket, InetAddress.getByName(ip), port, ssrc); | |||
| this.psMuxer = new PsMuxer(); | |||
| } | |||
| public void start() { | |||
| running.set(true); | |||
| } | |||
| public void stop() { | |||
| running.set(false); | |||
| socket.close(); | |||
| } | |||
| // RTSP Client 回调此方法 | |||
| public void onH264Frame(byte[] annexB, long pts90k) throws Exception { | |||
| if (!running.get()) return; | |||
| byte[] ps = psMuxer.muxH264(annexB, pts90k); | |||
| rtpSender.send(ps, true); | |||
| } | |||
| } | |||
| @ -1,28 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.net.DatagramPacket; | |||
| import java.net.DatagramSocket; | |||
| import java.net.InetSocketAddress; | |||
| public class MediaSessionEx { | |||
| private final RtpSenderEx rtpSenderEx; | |||
| private final Gb28181PsMuxer psMuxer; | |||
| public MediaSessionEx(String remoteIp, int remotePort, int ssrc) throws Exception { | |||
| this.rtpSenderEx = new RtpSenderEx(remoteIp, remotePort, ssrc, 96); | |||
| this.psMuxer = new Gb28181PsMuxer(); | |||
| } | |||
| /** RTSP Client 回调 */ | |||
| public void onH264Frame(byte[] annexB, long pts90k) { | |||
| byte[] ps = psMuxer.muxOneFrame(annexB, pts90k); | |||
| if (ps != null) { | |||
| rtpSenderEx.sendOne(ps, pts90k); | |||
| } | |||
| } | |||
| public void close() { | |||
| rtpSenderEx.close(); | |||
| } | |||
| } | |||
| @ -1,30 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PesPacket { | |||
| public static byte[] buildH264Pes(byte[] h264, long pts90k) throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| out.write(new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xE0, | |||
| 0x00,0x00, | |||
| (byte)0x80,(byte)0x80,0x05 | |||
| }); | |||
| writePts(out, pts90k); | |||
| out.write(h264); | |||
| return out.toByteArray(); | |||
| } | |||
| private static void writePts(ByteArrayOutputStream out, long pts) { | |||
| long val = pts & 0x1FFFFFFFFL; | |||
| out.write((byte)(0x21 | ((val >> 29) & 0x0E))); | |||
| out.write((byte)(val >> 22)); | |||
| out.write((byte)(0x01 | ((val >> 14) & 0xFE))); | |||
| out.write((byte)(val >> 7)); | |||
| out.write((byte)(0x01 | ((val << 1) & 0xFE))); | |||
| } | |||
| } | |||
| @ -1,35 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| public class PsHeader { | |||
| public static byte[] packHeader() { | |||
| return new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBA, | |||
| 0x44,0x00,0x04,0x00, | |||
| 0x04,0x01,(byte)0x89,(byte)0xC3, | |||
| (byte)0xF8 | |||
| }; | |||
| } | |||
| public static byte[] systemHeader() { | |||
| return new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBB, | |||
| 0x00,0x0C, | |||
| (byte)0x80,0x04, | |||
| (byte)0xE0,0x07, | |||
| (byte)0xE0,(byte)0xC0, | |||
| 0x20,(byte)0xBD,(byte)0xE0 | |||
| }; | |||
| } | |||
| public static byte[] psmHeader() { | |||
| return new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBC, | |||
| 0x00,0x12, | |||
| 0x00,0x00, | |||
| (byte)0xE0,0x00, | |||
| 0x1B,0x00,0x00, | |||
| 0x00,0x00 | |||
| }; | |||
| } | |||
| } | |||
| @ -1,21 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.io.*; | |||
| public class PsMuxer { | |||
| private boolean sentHeader = false; | |||
| public byte[] muxH264(byte[] annexB, long pts90k) throws IOException { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| if (!sentHeader) { | |||
| out.write(PsPackHeader.packHeader()); | |||
| out.write(PsSystemHeader.systemHeader()); | |||
| out.write(PsProgramStreamMap.psm()); | |||
| sentHeader = true; | |||
| } | |||
| out.write(PsPesPacket.pes(annexB, pts90k)); | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -1,10 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| public class PsPackHeader { | |||
| public static byte[] packHeader() { | |||
| return new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBA, | |||
| 0x44,0x00,0x04,0x00,0x04,0x01,0x00,0x01 | |||
| }; | |||
| } | |||
| } | |||
| @ -1,28 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.io.*; | |||
| public class PsPesPacket { | |||
| public static byte[] pes(byte[] h264, long pts) throws IOException { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| out.write(new byte[]{0x00,0x00,0x01,(byte)0xE0}); | |||
| int len = h264.length + 13; | |||
| out.write((len >> 8) & 0xFF); | |||
| out.write(len & 0xFF); | |||
| out.write(new byte[]{(byte)0x80,(byte)0x80,0x05}); | |||
| writePts(out, pts); | |||
| out.write(h264); | |||
| return out.toByteArray(); | |||
| } | |||
| private static void writePts(ByteArrayOutputStream out, long pts) throws IOException { | |||
| long val = pts & 0x1FFFFFFFFL; | |||
| out.write((byte)(0x21 | (((val >> 30) & 0x07) << 1))); | |||
| out.write((byte)((val >> 22) & 0xFF)); | |||
| out.write((byte)((((val >> 15) & 0x7F) << 1) | 1)); | |||
| out.write((byte)((val >> 7) & 0xFF)); | |||
| out.write((byte)(((val & 0x7F) << 1) | 1)); | |||
| } | |||
| } | |||
| @ -1,12 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| public class PsProgramStreamMap { | |||
| public static byte[] psm() { | |||
| return new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBC, | |||
| 0x00,0x12, | |||
| (byte)0xE0,0x00,0x00,0x00, | |||
| 0x01,(byte)0xE0,0x00,0x00 | |||
| }; | |||
| } | |||
| } | |||
| @ -1,12 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| public class PsSystemHeader { | |||
| public static byte[] systemHeader() { | |||
| return new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBB, | |||
| 0x00,0x0C, | |||
| (byte)0x80,(byte)0x04,(byte)0xE4,(byte)0x7F, | |||
| (byte)0xE0,0x07,(byte)0xE1,0x07 | |||
| }; | |||
| } | |||
| } | |||
| @ -1,60 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.net.*; | |||
| import java.util.concurrent.atomic.AtomicInteger; | |||
| public class RtpSender { | |||
| private static final int RTP_HEADER_SIZE = 12; | |||
| private static final int MTU = 1400; | |||
| private final DatagramSocket socket; | |||
| private final InetAddress remote; | |||
| private final int port; | |||
| private final int ssrc; | |||
| private final AtomicInteger seq = new AtomicInteger(0); | |||
| private int timestamp = 0; | |||
| public RtpSender(DatagramSocket socket, InetAddress remote, int port, int ssrc) { | |||
| this.socket = socket; | |||
| this.remote = remote; | |||
| this.port = port; | |||
| this.ssrc = ssrc; | |||
| } | |||
| public void send(byte[] ps, boolean marker) throws Exception { | |||
| int offset = 0; | |||
| while (offset < ps.length) { | |||
| int size = Math.min(MTU, ps.length - offset); | |||
| byte[] pkt = new byte[RTP_HEADER_SIZE + size]; | |||
| pkt[0] = (byte) 0x80; | |||
| pkt[1] = (byte) (96 | (marker ? 0x80 : 0x00)); | |||
| pkt[2] = (byte) (seq.get() >> 8); | |||
| pkt[3] = (byte) (seq.getAndIncrement()); | |||
| timestamp += 3600; | |||
| pkt[4] = (byte) (timestamp >> 24); | |||
| pkt[5] = (byte) (timestamp >> 16); | |||
| pkt[6] = (byte) (timestamp >> 8); | |||
| pkt[7] = (byte) (timestamp); | |||
| pkt[8] = (byte) (ssrc >> 24); | |||
| pkt[9] = (byte) (ssrc >> 16); | |||
| pkt[10] = (byte) (ssrc >> 8); | |||
| pkt[11] = (byte) (ssrc); | |||
| System.arraycopy(ps, offset, pkt, RTP_HEADER_SIZE, size); | |||
| socket.send(new DatagramPacket(pkt, pkt.length, remote, port)); | |||
| offset += size; | |||
| } | |||
| } | |||
| } | |||
| @ -1,84 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import java.net.*; | |||
| import java.util.concurrent.atomic.AtomicInteger; | |||
| public class RtpSenderEx { | |||
| private final DatagramSocket socket; | |||
| private final InetSocketAddress target; | |||
| private final int ssrc; | |||
| private final int payloadType; | |||
| private final AtomicInteger seq = new AtomicInteger(0); | |||
| public RtpSenderEx(String ip, int port, int ssrc, int pt) throws Exception { | |||
| this.socket = new DatagramSocket(); | |||
| this.target = new InetSocketAddress(ip, port); | |||
| this.ssrc = ssrc; | |||
| this.payloadType = pt; | |||
| } | |||
| // public void send(byte[] ps, long ts90k) { | |||
| // int offset = 0; | |||
| // while (offset < ps.length) { | |||
| // int len = Math.min(1400, ps.length - offset); | |||
| // byte[] rtp = buildRtp(ps, offset, len, ts90k); | |||
| // socketSend(rtp); | |||
| // offset += len; | |||
| // } | |||
| // } | |||
| // | |||
| // private byte[] buildRtp(byte[] ps, int off, int len, long ts) { | |||
| // byte[] pkt = new byte[12 + len]; | |||
| // pkt[0] = (byte) 0x80; | |||
| // pkt[1] = (byte) payloadType; | |||
| // pkt[2] = (byte) (seq.getAndIncrement() >> 8); | |||
| // pkt[3] = (byte) seq.get(); | |||
| // pkt[4] = (byte) (ts >> 24); | |||
| // pkt[5] = (byte) (ts >> 16); | |||
| // pkt[6] = (byte) (ts >> 8); | |||
| // pkt[7] = (byte) ts; | |||
| // pkt[8] = (byte) (ssrc >> 24); | |||
| // pkt[9] = (byte) (ssrc >> 16); | |||
| // pkt[10] = (byte) (ssrc >> 8); | |||
| // pkt[11] = (byte) ssrc; | |||
| // | |||
| // System.arraycopy(ps, off, pkt, 12, len); | |||
| // return pkt; | |||
| // } | |||
| public void sendOne(byte[] ps, long ts90k) { | |||
| byte[] rtp = buildRtp(ps, ts90k, true); | |||
| socketSend(rtp); | |||
| } | |||
| private byte[] buildRtp(byte[] payload, long ts, boolean marker) { | |||
| byte[] pkt = new byte[12 + payload.length]; | |||
| pkt[0] = (byte) 0x80; | |||
| pkt[1] = (byte) (payloadType | (marker ? 0x80 : 0)); | |||
| pkt[2] = (byte) (seq.get() >> 8); | |||
| pkt[3] = (byte) seq.getAndIncrement(); | |||
| pkt[4] = (byte) (ts >> 24); | |||
| pkt[5] = (byte) (ts >> 16); | |||
| pkt[6] = (byte) (ts >> 8); | |||
| pkt[7] = (byte) ts; | |||
| pkt[8] = (byte) (ssrc >> 24); | |||
| pkt[9] = (byte) (ssrc >> 16); | |||
| pkt[10] = (byte) (ssrc >> 8); | |||
| pkt[11] = (byte) ssrc; | |||
| System.arraycopy(payload, 0, pkt, 12, payload.length); | |||
| return pkt; | |||
| } | |||
| private void socketSend(byte[] pkt) { | |||
| try { | |||
| socket.send(new DatagramPacket(pkt, pkt.length, target)); | |||
| } catch (Exception ignored) {} | |||
| } | |||
| public void close() { | |||
| socket.close(); | |||
| } | |||
| } | |||
| @ -1,74 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.gb28181; | |||
| import org.bytedeco.ffmpeg.avcodec.AVPacket; | |||
| import org.bytedeco.javacv.FFmpegFrameGrabber; | |||
| import java.util.concurrent.atomic.AtomicBoolean; | |||
| import java.util.function.BiConsumer; | |||
| public class RtspClient { | |||
| private final String url; | |||
| private FFmpegFrameGrabber grabber; | |||
| private final AtomicBoolean running = new AtomicBoolean(false); | |||
| public RtspClient(String url) { | |||
| this.url = url; | |||
| } | |||
| /** | |||
| * @param onH264 callback(h264AnnexB, pts90k) | |||
| */ | |||
| public void start(BiConsumer<byte[], Long> onH264) throws Exception { | |||
| grabber = new FFmpegFrameGrabber(url); | |||
| grabber.setOption("rtsp_transport", "tcp"); | |||
| grabber.setOption("stimeout", "5000000"); | |||
| grabber.start(); | |||
| running.set(true); | |||
| new Thread(() -> { | |||
| try { | |||
| while (running.get()) { | |||
| AVPacket pkt = grabber.grabPacket(); | |||
| if (pkt == null || pkt.size() <= 0) { | |||
| continue; | |||
| } | |||
| // 1️⃣ 提取 Annex-B H264 | |||
| byte[] annexB = H264AnnexBExtractor.extractFromAvPacket(pkt); | |||
| if (annexB == null) { | |||
| continue; | |||
| } | |||
| // 2️⃣ PTS → 90kHz | |||
| long pts90k = ptsTo90k(pkt.pts(), grabber.getTimestamp()); | |||
| onH264.accept(annexB, pts90k); | |||
| } | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } finally { | |||
| stop(); | |||
| } | |||
| }, "RtspClient-Thread").start(); | |||
| } | |||
| private long ptsTo90k(long pts, double timeBase) { | |||
| if (pts <= 0 || timeBase <= 0) { | |||
| return System.nanoTime() / 11_111; // fallback | |||
| } | |||
| return (long) (pts * timeBase * 90_000); | |||
| } | |||
| public void stop() { | |||
| running.set(false); | |||
| try { | |||
| if (grabber != null) { | |||
| grabber.stop(); | |||
| grabber.release(); | |||
| } | |||
| } catch (Exception ignored) { | |||
| } | |||
| } | |||
| } | |||
| @ -1,83 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.bytedeco.javacv.*; | |||
| import org.springframework.stereotype.Service; | |||
| @Slf4j | |||
| @Service | |||
| public class Gb28181RtpStreamer { | |||
| private volatile boolean running = false; | |||
| private Thread worker; | |||
| public void start(String rtspUrl, String zlmIp, int zlmPort) { | |||
| if (running) return; | |||
| running = true; | |||
| worker = new Thread(() -> pushLoop(rtspUrl, zlmIp, zlmPort)); | |||
| worker.start(); | |||
| } | |||
| public void stop() { | |||
| running = false; | |||
| } | |||
| private void pushLoop(String rtspUrl, String ip, int port) { | |||
| while (running) { | |||
| try { | |||
| push(rtspUrl, ip, port); | |||
| } catch (Exception e) { | |||
| log.error("推流断开,5秒重连", e); | |||
| sleep(5000); | |||
| } | |||
| } | |||
| } | |||
| private void push(String rtspUrl, String ip, int port) throws Exception { | |||
| String outputUrl = "rtp://" + ip + ":" + port + | |||
| "?pkt_size=1400&localrtpport=50000"; | |||
| log.info("开始推流 -> {}", outputUrl); | |||
| // RTSP | |||
| FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(rtspUrl); | |||
| grabber.setOption("rtsp_transport", "tcp"); | |||
| grabber.setOption("stimeout", "5000000"); | |||
| grabber.start(); | |||
| // 推RTP(MPEGTS) | |||
| FFmpegFrameRecorder recorder = | |||
| new FFmpegFrameRecorder(outputUrl, | |||
| grabber.getImageWidth(), | |||
| grabber.getImageHeight()); | |||
| // 关键配置(等价ffmpeg命令) | |||
| recorder.setFormat("rtp_mpegts"); // ⭐核心 | |||
| recorder.setVideoCodec(grabber.getVideoCodec()); | |||
| recorder.setFrameRate(grabber.getFrameRate()); | |||
| recorder.setVideoBitrate(grabber.getVideoBitrate()); | |||
| // AnnexB + SPS PPS | |||
| recorder.setVideoOption("bsf:v", "h264_mp4toannexb"); | |||
| recorder.setOption("mpegts_flags", "resend_headers"); | |||
| recorder.start(); | |||
| Frame frame; | |||
| while (running && (frame = grabber.grab()) != null) { | |||
| recorder.record(frame); | |||
| } | |||
| recorder.stop(); | |||
| grabber.stop(); | |||
| } | |||
| private void sleep(long ms) { | |||
| try { Thread.sleep(ms); } catch (Exception ignored) {} | |||
| } | |||
| } | |||
| @ -1,45 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media; | |||
| import com.inspect.tcpserver.sip.media.rtcp.RtcpSrSender; | |||
| import com.inspect.tcpserver.sip.media.rtp.RtpPacketizer; | |||
| import com.inspect.tcpserver.sip.media.rtp.RtpSender; | |||
| import com.inspect.tcpserver.sip.media.rtp.RtpTcpSender; | |||
| import com.inspect.tcpserver.sip.media.rtp.RtpUdpSender; | |||
| import com.inspect.tcpserver.sip.media.rtsp.RtspClient; | |||
| public class MediaSession { | |||
| private final String remoteIp; | |||
| private final int remotePort; | |||
| private final long ssrc; | |||
| private final boolean tcp; | |||
| private final String rtspUrl; | |||
| public MediaSession(String remoteIp, int remotePort, long ssrc, boolean tcp, String rtspUrl) { | |||
| this.remoteIp = remoteIp; | |||
| this.remotePort = remotePort; | |||
| this.ssrc = ssrc; | |||
| this.tcp = tcp; | |||
| this.rtspUrl = rtspUrl; | |||
| } | |||
| public void start() throws Exception { | |||
| RtpSender sender = tcp | |||
| ? new RtpTcpSender(remoteIp, remotePort) | |||
| : new RtpUdpSender(remoteIp, remotePort); | |||
| // 先发 RTCP SR(B.6.1) | |||
| RtcpSrSender.send(sender.getControlStream(), ssrc); | |||
| // 启动 RTSP 拉流 → RTP | |||
| RtspClient rtspClient = new RtspClient(rtspUrl); | |||
| rtspClient.start(nal -> { | |||
| try { | |||
| RtpPacketizer.packetizerAndSend(nal, ssrc, sender); | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } | |||
| }); | |||
| } | |||
| } | |||
| @ -1,26 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PsMuxer { | |||
| public byte[] pack(byte[] h264) throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| // PS header (简化版) | |||
| out.write(new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xBA, | |||
| 0x44,0x00,0x04,0x00,0x04,0x01,(byte)0x89,(byte)0xC3,(byte)0xF8 | |||
| }); | |||
| // PES header | |||
| out.write(new byte[]{ | |||
| 0x00,0x00,0x01,(byte)0xE0, | |||
| 0x00,0x00 | |||
| }); | |||
| out.write(h264); | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -1,49 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media; | |||
| import java.net.DatagramPacket; | |||
| import java.net.DatagramSocket; | |||
| import java.net.InetAddress; | |||
| public class RtpSender { | |||
| private DatagramSocket socket; | |||
| private InetAddress address; | |||
| private int port; | |||
| private int seq = 0; | |||
| private long timestamp = 0; | |||
| private int ssrc; | |||
| public RtpSender(String ip, int port, int ssrc) throws Exception { | |||
| this.socket = new DatagramSocket(); | |||
| this.address = InetAddress.getByName(ip); | |||
| this.port = port; | |||
| this.ssrc = ssrc; | |||
| } | |||
| public void send(byte[] payload, boolean mark) throws Exception { | |||
| byte[] rtp = new byte[12 + payload.length]; | |||
| rtp[0] = (byte) 0x80; | |||
| rtp[1] = (byte) (96 | (mark ? 0x80 : 0)); | |||
| rtp[2] = (byte) (seq >> 8); | |||
| rtp[3] = (byte) (seq); | |||
| seq++; | |||
| timestamp += 3600; // 90k时钟 | |||
| rtp[4] = (byte) (timestamp >> 24); | |||
| rtp[5] = (byte) (timestamp >> 16); | |||
| rtp[6] = (byte) (timestamp >> 8); | |||
| rtp[7] = (byte) (timestamp); | |||
| rtp[8] = (byte) (ssrc >> 24); | |||
| rtp[9] = (byte) (ssrc >> 16); | |||
| rtp[10] = (byte) (ssrc >> 8); | |||
| rtp[11] = (byte) (ssrc); | |||
| System.arraycopy(payload, 0, rtp, 12, payload.length); | |||
| socket.send(new DatagramPacket(rtp, rtp.length, address, port)); | |||
| } | |||
| } | |||
| @ -1,82 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media; | |||
| import org.bytedeco.ffmpeg.avcodec.AVPacket; | |||
| import org.bytedeco.javacv.FFmpegFrameGrabber; | |||
| import java.nio.ByteBuffer; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class RtspPuller { | |||
| public interface StreamCallback { | |||
| void onH264(byte[] data, boolean keyFrame) throws Exception; | |||
| } | |||
| private final String rtspUrl; | |||
| public RtspPuller(String rtspUrl) { | |||
| this.rtspUrl = rtspUrl; | |||
| } | |||
| public void start(StreamCallback callback) throws Exception { | |||
| FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(rtspUrl); | |||
| grabber.setOption("rtsp_transport", "tcp"); | |||
| grabber.setOption("stimeout", "5000000"); | |||
| grabber.start(); | |||
| System.out.println("RTSP connected: " + rtspUrl); | |||
| AVPacket pkt; | |||
| while (true) { | |||
| pkt = grabber.grabPacket(); | |||
| if (pkt == null || pkt.size() <= 0) | |||
| continue; | |||
| if (pkt.stream_index() != grabber.getVideoStream()) | |||
| continue; | |||
| // ===== 读取裸数据 ===== | |||
| ByteBuffer buffer = pkt.data().asByteBuffer(); | |||
| buffer.rewind(); | |||
| byte[] avcc = new byte[pkt.size()]; | |||
| buffer.get(avcc); | |||
| // ===== AVCC → AnnexB 转换 ===== | |||
| byte[] annexb = avccToAnnexB(avcc); | |||
| boolean keyFrame = (pkt.flags() & 1) != 0; | |||
| callback.onH264(annexb, keyFrame); | |||
| } | |||
| } | |||
| /** | |||
| * AVCC 转 AnnexB (核心函数) | |||
| */ | |||
| private byte[] avccToAnnexB(byte[] avcc) throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| int offset = 0; | |||
| while (offset < avcc.length) { | |||
| int naluSize = | |||
| ((avcc[offset] & 0xff) << 24) | | |||
| ((avcc[offset+1] & 0xff) << 16) | | |||
| ((avcc[offset+2] & 0xff) << 8) | | |||
| (avcc[offset+3] & 0xff); | |||
| offset += 4; | |||
| // 写入起始码 00 00 00 01 | |||
| out.write(new byte[]{0,0,0,1}); | |||
| out.write(avcc, offset, naluSize); | |||
| offset += naluSize; | |||
| } | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -1,92 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media; | |||
| import java.util.StringTokenizer; | |||
| public class SdpParser { | |||
| public static SdpInfo parse(String sdp) { | |||
| SdpInfo info = new SdpInfo(); | |||
| String[] lines = sdp.split("\\r?\\n"); | |||
| for (String line : lines) { | |||
| line = line.trim(); | |||
| if (line.isEmpty()) continue; | |||
| // ---------- 会话级 ---------- | |||
| if (line.startsWith("c=")) { | |||
| // c=IN IP4 192.168.1.116 | |||
| String[] parts = line.split("\\s+"); | |||
| if (parts.length >= 3) { | |||
| info.setRemoteIp(parts[2]); | |||
| } | |||
| } | |||
| // ---------- media ---------- | |||
| else if (line.startsWith("m=video")) { | |||
| // m=video 50000 TCP/AVP 98 | |||
| StringTokenizer st = new StringTokenizer(line); | |||
| st.nextToken(); // m=video | |||
| info.setMediaPort(Integer.parseInt(st.nextToken())); | |||
| String proto = st.nextToken(); | |||
| if (proto.toUpperCase().contains("TCP")) { | |||
| info.setTransport(SdpInfo.Transport.RTP_TCP); | |||
| } else { | |||
| info.setTransport(SdpInfo.Transport.RTP_UDP); | |||
| } | |||
| info.setPayloadType(Integer.parseInt(st.nextToken())); | |||
| } | |||
| // ---------- rtpmap ---------- | |||
| else if (line.startsWith("a=rtpmap")) { | |||
| // a=rtpmap:98 H264/90000 | |||
| String value = line.substring("a=rtpmap:".length()); | |||
| String[] parts = value.split("\\s+"); | |||
| if (parts.length == 2) { | |||
| String[] codecInfo = parts[1].split("/"); | |||
| info.setCodec(codecInfo[0]); | |||
| info.setClockRate(Integer.parseInt(codecInfo[1])); | |||
| } | |||
| } | |||
| // ---------- setup ---------- | |||
| else if (line.startsWith("a=setup:")) { | |||
| info.setSetup(line.substring("a=setup:".length())); | |||
| } | |||
| // ---------- connection ---------- | |||
| else if (line.startsWith("a=connection:")) { | |||
| info.setConnection(line.substring("a=connection:".length())); | |||
| } | |||
| // ---------- fmtp ---------- | |||
| else if (line.startsWith("a=fmtp:")) { | |||
| // 可留作扩展 | |||
| info.putAttribute("fmtp", line); | |||
| } | |||
| // ---------- y= (SSRC) ---------- | |||
| else if (line.startsWith("y=")) { | |||
| // y=0700000038 | |||
| info.setSsrc(Long.parseLong(line.substring(2))); | |||
| } | |||
| // ---------- 其他属性 ---------- | |||
| else if (line.startsWith("a=")) { | |||
| int idx = line.indexOf(':'); | |||
| if (idx > 0) { | |||
| info.putAttribute( | |||
| line.substring(2, idx), | |||
| line.substring(idx + 1) | |||
| ); | |||
| } | |||
| } | |||
| } | |||
| return info; | |||
| } | |||
| } | |||
| @ -1,24 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtcp; | |||
| import java.nio.ByteBuffer; | |||
| public class RtcpPacket { | |||
| public static byte[] buildSr(long ssrc) { | |||
| ByteBuffer buf = ByteBuffer.allocate(28); | |||
| buf.put((byte) 0x80); | |||
| buf.put((byte) 200); | |||
| buf.putShort((short) 6); | |||
| buf.putInt((int) ssrc); | |||
| long ntp = System.currentTimeMillis() * 2208988800L; | |||
| buf.putLong(ntp); | |||
| buf.putInt(0); | |||
| buf.putInt(0); | |||
| buf.putInt(0); | |||
| return buf.array(); | |||
| } | |||
| } | |||
| @ -1,13 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtcp; | |||
| import java.io.OutputStream; | |||
| public class RtcpSrSender { | |||
| public static void send(OutputStream out, long ssrc) throws Exception { | |||
| byte[] sr = RtcpPacket.buildSr(ssrc); | |||
| out.write(sr); | |||
| out.flush(); | |||
| } | |||
| } | |||
| @ -1,37 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtp; | |||
| public class RtpPacket { | |||
| public static byte[] build( | |||
| int payloadType, | |||
| int seq, | |||
| int timestamp, | |||
| long ssrc, | |||
| byte[] payload, | |||
| boolean marker | |||
| ) { | |||
| int headerSize = 12; | |||
| byte[] packet = new byte[headerSize + payload.length]; | |||
| packet[0] = (byte) 0x80; | |||
| packet[1] = (byte) (payloadType & 0x7F); | |||
| if (marker) { | |||
| packet[1] |= 0x80; | |||
| } | |||
| packet[2] = (byte) (seq >> 8); | |||
| packet[3] = (byte) seq; | |||
| packet[4] = (byte) (timestamp >> 24); | |||
| packet[5] = (byte) (timestamp >> 16); | |||
| packet[6] = (byte) (timestamp >> 8); | |||
| packet[7] = (byte) timestamp; | |||
| packet[8] = (byte) (ssrc >> 24); | |||
| packet[9] = (byte) (ssrc >> 16); | |||
| packet[10] = (byte) (ssrc >> 8); | |||
| packet[11] = (byte) ssrc; | |||
| System.arraycopy(payload, 0, packet, headerSize, payload.length); | |||
| return packet; | |||
| } | |||
| } | |||
| @ -1,48 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtp; | |||
| public class RtpPacketizer { | |||
| private static final int MTU = 1400; | |||
| private static int seq = 0; | |||
| private static int timestamp = 0; | |||
| public static void packetizerAndSend(byte[] nal, long ssrc, RtpSender sender) throws Exception { | |||
| if (nal.length <= MTU) { | |||
| byte[] pkt = RtpPacket.build( | |||
| 98, seq++, timestamp, ssrc, nal, true | |||
| ); | |||
| sender.send(pkt, pkt.length); | |||
| } else { | |||
| // FU-A | |||
| int nalHeader = nal[0] & 0xFF; | |||
| int fuIndicator = (nalHeader & 0xE0) | 28; | |||
| int fuHeaderStart = 0x80 | (nalHeader & 0x1F); | |||
| int fuHeaderMid = nalHeader & 0x1F; | |||
| int fuHeaderEnd = 0x40 | (nalHeader & 0x1F); | |||
| int offset = 1; | |||
| boolean start = true; | |||
| while (offset < nal.length) { | |||
| int size = Math.min(MTU - 2, nal.length - offset); | |||
| byte[] payload = new byte[size + 2]; | |||
| payload[0] = (byte) fuIndicator; | |||
| payload[1] = (byte) (start ? fuHeaderStart : | |||
| (offset + size >= nal.length ? fuHeaderEnd : fuHeaderMid)); | |||
| System.arraycopy(nal, offset, payload, 2, size); | |||
| offset += size; | |||
| start = false; | |||
| byte[] pkt = RtpPacket.build( | |||
| 98, seq++, timestamp, ssrc, payload, offset >= nal.length | |||
| ); | |||
| sender.send(pkt, pkt.length); | |||
| } | |||
| } | |||
| timestamp += 3600; | |||
| } | |||
| } | |||
| @ -1,11 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtp; | |||
| import java.io.OutputStream; | |||
| public interface RtpSender { | |||
| void send(byte[] data, int len) throws Exception; | |||
| OutputStream getControlStream(); | |||
| } | |||
| @ -1,31 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtp; | |||
| import java.io.OutputStream; | |||
| import java.net.Socket; | |||
| import java.nio.ByteBuffer; | |||
| public class RtpTcpSender implements RtpSender { | |||
| private final Socket socket; | |||
| private final OutputStream out; | |||
| public RtpTcpSender(String ip, int port) throws Exception { | |||
| this.socket = new Socket(ip, port); | |||
| this.out = socket.getOutputStream(); | |||
| } | |||
| @Override | |||
| public void send(byte[] data, int len) throws Exception { | |||
| ByteBuffer buf = ByteBuffer.allocate(len + 2); | |||
| buf.putShort((short) len); | |||
| buf.put(data, 0, len); | |||
| out.write(buf.array()); | |||
| out.flush(); | |||
| } | |||
| @Override | |||
| public OutputStream getControlStream() { | |||
| return out; | |||
| } | |||
| } | |||
| @ -1,32 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtp; | |||
| import java.io.ByteArrayOutputStream; | |||
| import java.io.OutputStream; | |||
| import java.net.DatagramPacket; | |||
| import java.net.DatagramSocket; | |||
| import java.net.InetAddress; | |||
| public class RtpUdpSender implements RtpSender { | |||
| private final DatagramSocket socket; | |||
| private final InetAddress addr; | |||
| private final int port; | |||
| public RtpUdpSender(String ip, int port) throws Exception { | |||
| this.socket = new DatagramSocket(); | |||
| this.addr = InetAddress.getByName(ip); | |||
| this.port = port; | |||
| } | |||
| @Override | |||
| public void send(byte[] data, int len) throws Exception { | |||
| DatagramPacket packet = new DatagramPacket(data, len, addr, port); | |||
| socket.send(packet); | |||
| } | |||
| @Override | |||
| public OutputStream getControlStream() { | |||
| return new ByteArrayOutputStream(); // UDP 场景可忽略 | |||
| } | |||
| } | |||
| @ -1,21 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtsp; | |||
| import org.bytedeco.javacv.Frame; | |||
| import java.nio.ByteBuffer; | |||
| public class H264AnnexBExtractor { | |||
| public static byte[] extract(Frame frame) { | |||
| if (frame.image == null || frame.image.length == 0) { | |||
| return null; | |||
| } | |||
| ByteBuffer buffer = (ByteBuffer) frame.image[0]; | |||
| byte[] data = new byte[buffer.remaining()]; | |||
| buffer.get(data); | |||
| return data; | |||
| } | |||
| } | |||
| @ -1,33 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.media.rtsp; | |||
| import org.bytedeco.javacv.FFmpegFrameGrabber; | |||
| import org.bytedeco.javacv.Frame; | |||
| import java.util.function.Consumer; | |||
| public class RtspClient { | |||
| private final String url; | |||
| public RtspClient(String url) { | |||
| this.url = url; | |||
| } | |||
| public void start(Consumer<byte[]> onNal) throws Exception { | |||
| FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(url); | |||
| grabber.setOption("rtsp_transport", "tcp"); | |||
| grabber.start(); | |||
| while (true) { | |||
| Frame frame = grabber.grabImage(); | |||
| if (frame == null || frame.image == null) { | |||
| continue; | |||
| } | |||
| byte[] annexB = H264AnnexBExtractor.extract(frame); | |||
| if (annexB != null) { | |||
| onNal.accept(annexB); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -1,230 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.service; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.springframework.beans.factory.annotation.Value; | |||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | |||
| import org.springframework.stereotype.Component; | |||
| import javax.annotation.PostConstruct; | |||
| import javax.sip.*; | |||
| import javax.sip.address.Address; | |||
| import javax.sip.address.AddressFactory; | |||
| import javax.sip.address.SipURI; | |||
| import javax.sip.header.*; | |||
| import javax.sip.message.MessageFactory; | |||
| import javax.sip.message.Request; | |||
| import javax.sip.message.Response; | |||
| import java.io.BufferedReader; | |||
| import java.io.IOException; | |||
| import java.io.InputStreamReader; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| import java.util.Properties; | |||
| import java.util.Random; | |||
| @Slf4j | |||
| @Component | |||
| @ConditionalOnProperty(name = "sip.enable", havingValue = "true") | |||
| public class SipVideoClient implements SipListener { | |||
| private SipFactory sipFactory; | |||
| private SipStack sipStack; | |||
| private SipProvider sipProvider; | |||
| private HeaderFactory headerFactory; | |||
| private AddressFactory addressFactory; | |||
| private MessageFactory messageFactory; | |||
| @Value("${sip.local-ip}") | |||
| private String localIp; // 本地IP | |||
| @Value("${sip.local-port2:5062}") | |||
| private int localPort; // 本地监听端口 | |||
| @Value("${sip.domain}") | |||
| private String remoteIp; // Asterisk IP | |||
| @Value("${sip.port}") | |||
| private int remotePort; // Asterisk端口 | |||
| @Value("${sip.username}") | |||
| private String username; | |||
| @Value("${sip.domain}") | |||
| private String domain; | |||
| @Value("${sip.transport}") | |||
| private String transport; | |||
| @PostConstruct | |||
| public void init() throws Exception { | |||
| sipFactory = SipFactory.getInstance(); | |||
| sipFactory.setPathName("gov.nist"); | |||
| headerFactory = sipFactory.createHeaderFactory(); | |||
| addressFactory = sipFactory.createAddressFactory(); | |||
| messageFactory = sipFactory.createMessageFactory(); | |||
| Properties properties = new Properties(); | |||
| properties.setProperty("javax.sip.STACK_NAME", "sip-video-client"); | |||
| properties.setProperty("gov.nist.javax.sip.IP_ADDRESS", localIp); | |||
| sipStack = sipFactory.createSipStack(properties); | |||
| ListeningPoint lp = sipStack.createListeningPoint(localIp, localPort, transport); | |||
| //ListeningPoint lp = sipStack.createListeningPoint("0.0.0.0", localPort, transport); | |||
| sipProvider = sipStack.createSipProvider(lp); | |||
| sipProvider.addSipListener(this); | |||
| } | |||
| public void sendInvite() throws Exception { | |||
| SipURI requestUri = addressFactory.createSipURI(null, domain); | |||
| requestUri.setTransportParam(transport); | |||
| requestUri.setPort(remotePort); | |||
| Address fromAddress = addressFactory.createAddress("sip:" + username + "@" + domain); | |||
| FromHeader fromHeader = headerFactory.createFromHeader(fromAddress, Integer.toHexString(new Random().nextInt())); | |||
| Address toAddress = addressFactory.createAddress("sip:" + username + "@" + domain); | |||
| ToHeader toHeader = headerFactory.createToHeader(toAddress, null); | |||
| CallIdHeader callIdHeader = sipProvider.getNewCallId(); | |||
| CSeqHeader cSeqHeader = headerFactory.createCSeqHeader(1L, Request.INVITE); | |||
| MaxForwardsHeader maxForwards = headerFactory.createMaxForwardsHeader(70); | |||
| List<ViaHeader> viaHeaders = new ArrayList<>(); | |||
| viaHeaders.add(headerFactory.createViaHeader(localIp, localPort, transport, null)); | |||
| Request inviteRequest = messageFactory.createRequest( | |||
| requestUri, | |||
| Request.INVITE, | |||
| callIdHeader, | |||
| cSeqHeader, | |||
| fromHeader, | |||
| toHeader, | |||
| viaHeaders, | |||
| maxForwards); | |||
| // 添加Contact头 | |||
| Address contactAddress = addressFactory.createAddress("sip:" + username + "@" + localIp + ":" + localPort); | |||
| ContactHeader contactHeader = headerFactory.createContactHeader(contactAddress); | |||
| inviteRequest.addHeader(contactHeader); | |||
| // 添加SDP Body — 这描述视频流的RTP信息 | |||
| String sdpData = buildSdpBody(localIp, 9000); // 本地RTP端口9000 | |||
| ContentTypeHeader contentTypeHeader = headerFactory.createContentTypeHeader("application", "sdp"); | |||
| inviteRequest.setContent(sdpData, contentTypeHeader); | |||
| ClientTransaction inviteTransaction = sipProvider.getNewClientTransaction(inviteRequest); | |||
| inviteTransaction.sendRequest(); | |||
| } | |||
| private String buildSdpBody(String ip, int rtpPort) { | |||
| return "v=0\r\n" + | |||
| "o=- 0 0 IN IP4 " + ip + "\r\n" + | |||
| "s=Video Call\r\n" + | |||
| "c=IN IP4 " + ip + "\r\n" + | |||
| "t=0 0\r\n" + | |||
| "m=video " + rtpPort + " RTP/AVP 96\r\n" + | |||
| "a=rtpmap:96 H264/90000\r\n" + | |||
| "a=sendrecv\r\n"; | |||
| } | |||
| @Override | |||
| public void processResponse(ResponseEvent responseEvent) { | |||
| Response response = responseEvent.getResponse(); | |||
| CSeqHeader cSeq = (CSeqHeader) response.getHeader(CSeqHeader.NAME); | |||
| int statusCode = response.getStatusCode(); | |||
| log.info("Received response: {} for: {}", statusCode, cSeq.getMethod()); | |||
| if (statusCode == 200 && Request.INVITE.equals(cSeq.getMethod())) { | |||
| try { | |||
| ClientTransaction ct = responseEvent.getClientTransaction(); | |||
| Dialog dialog = ct.getDialog(); | |||
| Request ackRequest = dialog.createAck(cSeq.getSeqNumber()); | |||
| dialog.sendAck(ackRequest); | |||
| log.info("Sent ACK, 开始推送视频流"); | |||
| startVideoStreaming(); | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| public void processRequest(RequestEvent requestEvent) { | |||
| Request request = requestEvent.getRequest(); | |||
| String method = request.getMethod(); | |||
| log.info("Received request: {}", method); | |||
| if (Request.BYE.equals(method)) { | |||
| try { | |||
| ServerTransaction st = requestEvent.getServerTransaction(); | |||
| if (st == null) { | |||
| st = sipProvider.getNewServerTransaction(request); | |||
| } | |||
| Response response = messageFactory.createResponse(200, request); | |||
| st.sendResponse(response); | |||
| log.info("Received BYE,通话结束,停止推流"); | |||
| stopVideoStreaming(); | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| public void processTimeout(TimeoutEvent timeoutEvent) {} | |||
| @Override | |||
| public void processIOException(IOExceptionEvent exceptionEvent) {} | |||
| @Override | |||
| public void processTransactionTerminated(TransactionTerminatedEvent transactionTerminatedEvent) {} | |||
| @Override | |||
| public void processDialogTerminated(DialogTerminatedEvent dialogTerminatedEvent) {} | |||
| private Process ffmpegProcess; | |||
| private void startVideoStreaming() { | |||
| try { | |||
| String rtspUrl = "rtsp://localhost:8554/mystream"; | |||
| ProcessBuilder pb = new ProcessBuilder( | |||
| "ffmpeg", | |||
| "-rtsp_transport", "tcp", // 如果rtsp拉流失败可试试tcp | |||
| "-i", rtspUrl, | |||
| "-vcodec", "copy", | |||
| "-an", | |||
| "-f", "rtp", | |||
| "rtp://" + remoteIp + ":9000" | |||
| ); | |||
| pb.redirectErrorStream(true); | |||
| ffmpegProcess = pb.start(); | |||
| // 启动一个线程打印FFMPEG日志 | |||
| new Thread(() -> { | |||
| try (BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()))) { | |||
| String line; | |||
| while ((line = reader.readLine()) != null) { | |||
| log.info("[FFMPEG] {}", line); | |||
| } | |||
| } catch (IOException e) { | |||
| e.printStackTrace(); | |||
| } | |||
| }).start(); | |||
| log.info("视频推流开始"); | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } | |||
| private void stopVideoStreaming() { | |||
| if (ffmpegProcess != null) { | |||
| ffmpegProcess.destroy(); | |||
| System.out.println("视频推流停止"); | |||
| } | |||
| } | |||
| } | |||
| @ -1,35 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| import org.bytedeco.ffmpeg.avcodec.AVPacket; | |||
| import org.bytedeco.javacpp.BytePointer; | |||
| public class H264AnnexBExtractor { | |||
| private static final byte[] START_CODE = {0x00, 0x00, 0x00, 0x01}; | |||
| public static byte[] extractFromAvPacket(AVPacket pkt) { | |||
| BytePointer dataPtr = pkt.data(); | |||
| int size = pkt.size(); | |||
| if (dataPtr == null || size <= 0) { | |||
| return null; | |||
| } | |||
| byte[] raw = new byte[size]; | |||
| dataPtr.get(raw); | |||
| // 如果已经是 Annex-B(00 00 00 01) | |||
| if (raw.length >= 4 && | |||
| raw[0] == 0x00 && raw[1] == 0x00 && | |||
| raw[2] == 0x00 && raw[3] == 0x01) { | |||
| return raw; | |||
| } | |||
| // AVCC → Annex-B(简单处理:前置 start code) | |||
| byte[] annexB = new byte[START_CODE.length + raw.length]; | |||
| System.arraycopy(START_CODE, 0, annexB, 0, START_CODE.length); | |||
| System.arraycopy(raw, 0, annexB, START_CODE.length, raw.length); | |||
| return annexB; | |||
| } | |||
| } | |||
| @ -1,35 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| import com.inspect.tcpserver.sip.stream.ps.PsMuxer; | |||
| public class MediaSession { | |||
| private final PsMuxer psMuxer; | |||
| private final RtpSender rtpSender; | |||
| private RtspClient rtspClient; | |||
| public MediaSession(String remoteIp, int remotePort, int ssrc) throws Exception { | |||
| this.psMuxer = new PsMuxer(); | |||
| this.rtpSender = new RtpSender(remoteIp, remotePort, ssrc); | |||
| } | |||
| public void startRtsp(String rtspUrl) throws Exception { | |||
| rtspClient = new RtspClient(rtspUrl); | |||
| rtspClient.start(h264 -> { | |||
| try { | |||
| byte[] ps = psMuxer.mux(h264); | |||
| rtpSender.sendPs(ps); | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } | |||
| }); | |||
| } | |||
| public void stop() { | |||
| if (rtspClient != null) { | |||
| rtspClient.stop(); | |||
| } | |||
| rtpSender.close(); | |||
| } | |||
| } | |||
| @ -1,15 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| public class RtpClock { | |||
| private static final long CLOCK_90K = 90000; | |||
| private static final long FRAME_INTERVAL = 3600; // 40ms | |||
| private long timestamp = 0; | |||
| public long next() { | |||
| timestamp += FRAME_INTERVAL; | |||
| return timestamp; | |||
| } | |||
| } | |||
| @ -1,39 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| public class RtpPacket { | |||
| public static final int HEADER_SIZE = 12; | |||
| public byte[] buffer; | |||
| public int length; | |||
| public RtpPacket(int payloadSize) { | |||
| buffer = new byte[HEADER_SIZE + payloadSize]; | |||
| } | |||
| public void setHeader( | |||
| int payloadType, | |||
| int seq, | |||
| long timestamp, | |||
| int ssrc, | |||
| boolean marker | |||
| ) { | |||
| buffer[0] = (byte) 0x80; | |||
| buffer[1] = (byte) (payloadType & 0x7F); | |||
| if (marker) buffer[1] |= 0x80; | |||
| buffer[2] = (byte) (seq >> 8); | |||
| buffer[3] = (byte) (seq); | |||
| buffer[4] = (byte) (timestamp >> 24); | |||
| buffer[5] = (byte) (timestamp >> 16); | |||
| buffer[6] = (byte) (timestamp >> 8); | |||
| buffer[7] = (byte) (timestamp); | |||
| buffer[8] = (byte) (ssrc >> 24); | |||
| buffer[9] = (byte) (ssrc >> 16); | |||
| buffer[10] = (byte) (ssrc >> 8); | |||
| buffer[11] = (byte) (ssrc); | |||
| } | |||
| } | |||
| @ -1,46 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| @Slf4j | |||
| public class RtpSender { | |||
| private static final int MTU = 1400; | |||
| private static final int PAYLOAD_TYPE = 98; | |||
| private int seq = 0; | |||
| private final int ssrc; | |||
| private final RtpSocket socket; | |||
| private final RtpClock clock = new RtpClock(); | |||
| public RtpSender(String ip, int port, int ssrc) throws Exception { | |||
| this.ssrc = ssrc; | |||
| this.socket = new RtpSocket(ip, port); | |||
| } | |||
| public void sendPs(byte[] ps) throws Exception { | |||
| long ts = clock.next(); | |||
| int offset = 0; | |||
| while (offset < ps.length) { | |||
| int size = Math.min(MTU, ps.length - offset); | |||
| boolean marker = (offset + size) >= ps.length; | |||
| RtpPacket pkt = new RtpPacket(size); | |||
| pkt.setHeader(PAYLOAD_TYPE, seq++, ts, ssrc, marker); | |||
| System.arraycopy(ps, offset, pkt.buffer, RtpPacket.HEADER_SIZE, size); | |||
| pkt.length = RtpPacket.HEADER_SIZE + size; | |||
| socket.send(pkt.buffer, pkt.length); | |||
| offset += size; | |||
| log.info("sendPs offset = {}", offset); | |||
| } | |||
| } | |||
| public void close() { | |||
| socket.close(); | |||
| } | |||
| } | |||
| @ -1,26 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| import java.net.DatagramPacket; | |||
| import java.net.DatagramSocket; | |||
| import java.net.InetSocketAddress; | |||
| public class RtpSocket { | |||
| private final DatagramSocket socket; | |||
| private final InetSocketAddress remote; | |||
| public RtpSocket(String ip, int port) throws Exception { | |||
| socket = new DatagramSocket(); | |||
| remote = new InetSocketAddress(ip, port); | |||
| } | |||
| public void send(byte[] data, int len) throws Exception { | |||
| DatagramPacket packet = new DatagramPacket(data, len, remote); | |||
| socket.send(packet); | |||
| } | |||
| public void close() { | |||
| socket.close(); | |||
| } | |||
| } | |||
| @ -1,59 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream; | |||
| import org.bytedeco.ffmpeg.avcodec.AVPacket; | |||
| import org.bytedeco.javacv.FFmpegFrameGrabber; | |||
| import java.nio.ByteBuffer; | |||
| import java.util.concurrent.atomic.AtomicBoolean; | |||
| import java.util.function.Consumer; | |||
| public class RtspClient { | |||
| private final String url; | |||
| private FFmpegFrameGrabber grabber; | |||
| private final AtomicBoolean running = new AtomicBoolean(false); | |||
| public RtspClient(String url) { | |||
| this.url = url; | |||
| } | |||
| public void start(Consumer<byte[]> onH264) throws Exception { | |||
| grabber = new FFmpegFrameGrabber(url); | |||
| grabber.setOption("rtsp_transport", "tcp"); | |||
| grabber.setOption("stimeout", "5000000"); | |||
| grabber.start(); | |||
| running.set(true); | |||
| new Thread(() -> { | |||
| try { | |||
| while (running.get()) { | |||
| AVPacket pkt = grabber.grabPacket(); | |||
| if (pkt == null || pkt.size() <= 0) { | |||
| continue; | |||
| } | |||
| byte[] annexB = H264AnnexBExtractor.extractFromAvPacket(pkt); | |||
| if (annexB != null) { | |||
| onH264.accept(annexB); | |||
| } | |||
| } | |||
| } catch (Exception e) { | |||
| e.printStackTrace(); | |||
| } finally { | |||
| stop(); | |||
| } | |||
| }, "RtspClient-Thread").start(); | |||
| } | |||
| public void stop() { | |||
| running.set(false); | |||
| try { | |||
| if (grabber != null) { | |||
| grabber.stop(); | |||
| grabber.release(); | |||
| } | |||
| } catch (Exception ignored) { | |||
| } | |||
| } | |||
| } | |||
| @ -1,15 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream.ps; | |||
| public final class PsConstants { | |||
| public static final int PACK_START_CODE = 0x000001BA; | |||
| public static final int SYSTEM_HEADER_START_CODE = 0x000001BB; | |||
| public static final int PROGRAM_STREAM_MAP = 0x000001BC; | |||
| public static final int PES_VIDEO_START_CODE = 0x000001E0; | |||
| public static final int STREAM_ID_VIDEO = 0xE0; | |||
| public static final long CLOCK_90K = 90000L; | |||
| private PsConstants() {} | |||
| } | |||
| @ -1,28 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream.ps; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PsMuxer { | |||
| private boolean headerSent = false; | |||
| private long scr = 0; | |||
| public byte[] mux(byte[] h264) throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| scr += 3600; | |||
| if (!headerSent) { | |||
| out.write(PsPackHeader.create(scr)); | |||
| out.write(PsSystemHeader.create()); | |||
| out.write(PsProgramStreamMap.create()); | |||
| headerSent = true; | |||
| } | |||
| out.write(PsPackHeader.create(scr)); | |||
| out.write(PsPesPacket.create(h264, scr)); | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -1,27 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream.ps; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PsPackHeader { | |||
| public static byte[] create(long scr) throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| out.write(new byte[]{0, 0, 1, (byte) 0xBA}); | |||
| long b = scr & 0x1FFFFFFFFL; | |||
| out.write((byte) (0x44 | ((b >> 27) & 0x38))); | |||
| out.write((byte) (b >> 19)); | |||
| out.write((byte) (0x04 | ((b >> 14) & 0xF8))); | |||
| out.write((byte) (b >> 6)); | |||
| out.write((byte) (0x04 | ((b << 2) & 0xF8))); | |||
| out.write(0x01); | |||
| out.write(new byte[]{0x00, 0x01, (byte) 0x89, (byte) 0xC3}); | |||
| out.write(0xF8); | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -1,35 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream.ps; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PsPesPacket { | |||
| public static byte[] create(byte[] es, long pts) throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| out.write(new byte[]{0, 0, 1, (byte) 0xE0}); | |||
| int len = es.length + 8; | |||
| out.write((len >> 8) & 0xFF); | |||
| out.write(len & 0xFF); | |||
| out.write(0x80); | |||
| out.write(0x80); | |||
| out.write(0x05); | |||
| writePts(out, pts); | |||
| out.write(es); | |||
| return out.toByteArray(); | |||
| } | |||
| private static void writePts(ByteArrayOutputStream out, long pts) { | |||
| long v = pts & 0x1FFFFFFFFL; | |||
| out.write((byte) (0x21 | ((v >> 29) & 0x0E))); | |||
| out.write((byte) (v >> 22)); | |||
| out.write((byte) (0x01 | ((v >> 14) & 0xFE))); | |||
| out.write((byte) (v >> 7)); | |||
| out.write((byte) (0x01 | ((v << 1) & 0xFE))); | |||
| } | |||
| } | |||
| @ -1,26 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream.ps; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PsProgramStreamMap { | |||
| public static byte[] create() throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| out.write(new byte[]{0, 0, 1, (byte) 0xBC}); | |||
| out.write(new byte[]{0x00, 0x12}); | |||
| out.write(0xE0); | |||
| out.write(new byte[]{0x00, 0x00}); | |||
| out.write(new byte[]{0x00, 0x08}); | |||
| out.write(0x1B); // H264 | |||
| out.write(PsConstants.STREAM_ID_VIDEO); | |||
| out.write(new byte[]{0x00, 0x00}); | |||
| out.write(new byte[]{0, 0, 0, 0}); // CRC | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -1,21 +0,0 @@ | |||
| package com.inspect.tcpserver.sip.stream.ps; | |||
| import java.io.ByteArrayOutputStream; | |||
| public class PsSystemHeader { | |||
| public static byte[] create() throws Exception { | |||
| ByteArrayOutputStream out = new ByteArrayOutputStream(); | |||
| out.write(new byte[]{0, 0, 1, (byte) 0xBB}); | |||
| out.write(new byte[]{0x00, 0x0C}); | |||
| out.write(new byte[]{(byte) 0x80, 0x04, (byte) 0xE4}); | |||
| out.write(0x04); | |||
| out.write(0xE1); | |||
| out.write(new byte[]{0x7F, (byte) 0xE0, 0x7F}); | |||
| return out.toByteArray(); | |||
| } | |||
| } | |||
| @ -0,0 +1,45 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | |||
| <mapper namespace="com.inspect.tcpserver.mapper.ICameraMapper"> | |||
| <select id="selectCamera" resultType="com.inspect.tcpserver.domain.BasedataEqpBookMoMain"> | |||
| SELECT | |||
| a.eqp_book_id, | |||
| a.station_name, | |||
| a.station_code, | |||
| a.area_id, | |||
| a.area_name, | |||
| b.channel_name AS patrol_device_name, | |||
| b.patrol_device_code, | |||
| b.up_system_device_code, | |||
| a.device_model, | |||
| a.manufacturer, | |||
| a.use_unit, | |||
| b.device_source, | |||
| a.production_date, | |||
| a.production_code, | |||
| a.is_transport, | |||
| ifnull(a.use_mode,b.use_mode) as use_mode, | |||
| ifnull(a.video_mode,b.video_mode) as video_mode, | |||
| a.place, | |||
| a.position_x, | |||
| a.position_y, | |||
| a.position_z, | |||
| a.type, | |||
| a.patrol_device_info, | |||
| a.robots_code, | |||
| b.HOST AS ip_addr, | |||
| b.PORT as port, | |||
| b.username AS user, | |||
| b.`password`, | |||
| b.online_state status, | |||
| a.main_system_code | |||
| from basedata_eqpbook a | |||
| inner join basedata_eqpbook_channel b on a.eqp_book_id = b.eqp_book_id | |||
| where type in ('10') | |||
| </select> | |||
| <select id="getBasedataEqpBook" resultType="com.inspect.tcpserver.domain.BasedataEqpBookMoMain"> | |||
| select channel_id,channel_name,eqp_book_id,channel_code,patrol_device_code from basedata_eqpbook_channel where up_system_device_code = #{upSystemDeviceCode} | |||
| </select> | |||
| </mapper> | |||