java.lang.IllegalArgumentException: Unknown signal: HUP

Oracle Community | 807592 | 2 decades ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    addShutdownHook not working in HP-Unix

    Oracle Community | 2 decades ago | 807592
    java.lang.IllegalArgumentException: Unknown signal: HUP
  2. 0

    Problem with Runtime.addShutdownHook when porting from Windows to HP-UX

    Google Groups | 2 decades ago | Jean-Fran├žois Daune
    java.lang.IllegalArgumentException: Unknown signal: HUP
  3. 0

    Hi, i am using the SingletonBeanFactoryLocator to create my context (no webapp and no single main there, so i need to do it so). Its possible that many threads does call this method and they all get the same context. But registerShutdownHook fails for some threads, because its already registered. May it be possible to make this like refresh + close synchronized on the startupShutdown monitor to register only one hook. {noformat} /** * Context. * @param bfLocatorKey * @param parentContextKey * @return */ public static ApplicationContext getAppContext(String bfLocatorKey, String parentContextKey) { BeanFactoryLocator bfLocator = SingletonBeanFactoryLocator .getInstance(bfLocatorKey); BeanFactoryReference bfReference = bfLocator.useBeanFactory(parentContextKey); BeanFactory factory = bfReference.getFactory(); ConfigurableApplicationContext c = (ConfigurableApplicationContext) factory; c.registerShutdownHook(); return c; } {noformat} Exception is: {noformat} java.lang.IllegalArgumentException: Hook previously registered at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:72) ~[na:1.7.0_147-icedtea] at java.lang.Runtime.addShutdownHook(Runtime.java:209) ~[na:1.7.0_147-icedtea] at org.springframework.context.support.AbstractApplicationContext.registerShutdownHook(AbstractApplicationContext.java:961) ~[org.springframework.context-3.1.1.RELEASE.jar:3.1.1.RELEASE] {noformat}

    Spring JIRA | 5 years ago | Torsten Krah
    java.lang.IllegalArgumentException: Hook previously registered
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Xrs option and shutdown hooks

    Oracle Community | 2 decades ago | 843798
    java.lang.IllegalArgumentException: Signal already used by VM: SIGINT
  6. 0

    Hi, i am using the SingletonBeanFactoryLocator to create my context (no webapp and no single main there, so i need to do it so). Its possible that many threads does call this method and they all get the same context. But registerShutdownHook fails for some threads, because its already registered. May it be possible to make this like refresh + close synchronized on the startupShutdown monitor to register only one hook. {noformat} /** * Context. * @param bfLocatorKey * @param parentContextKey * @return */ public static ApplicationContext getAppContext(String bfLocatorKey, String parentContextKey) { BeanFactoryLocator bfLocator = SingletonBeanFactoryLocator .getInstance(bfLocatorKey); BeanFactoryReference bfReference = bfLocator.useBeanFactory(parentContextKey); BeanFactory factory = bfReference.getFactory(); ConfigurableApplicationContext c = (ConfigurableApplicationContext) factory; c.registerShutdownHook(); return c; } {noformat} Exception is: {noformat} java.lang.IllegalArgumentException: Hook previously registered at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:72) ~[na:1.7.0_147-icedtea] at java.lang.Runtime.addShutdownHook(Runtime.java:209) ~[na:1.7.0_147-icedtea] at org.springframework.context.support.AbstractApplicationContext.registerShutdownHook(AbstractApplicationContext.java:961) ~[org.springframework.context-3.1.1.RELEASE.jar:3.1.1.RELEASE] {noformat}

    Spring JIRA | 5 years ago | Torsten Krah
    java.lang.IllegalArgumentException: Hook previously registered

  1. hoangtranwork 1 times, last 11 months ago

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Unknown signal: HUP

    at sun.misc.Signal.<init>()
  2. Java RT
    Runtime.addShutdownHook
    1. sun.misc.Signal.<init>(Unknown Source)
    2. java.lang.Terminator.setup(Unknown Source)
    3. java.lang.Shutdown.add(Unknown Source)
    4. java.lang.Runtime.addShutdownHook(Unknown Source)
    4 frames