javax.management.MBeanException

jboss.org | 3 months ago
  1. 0

    FULL PRODUCT VERSION : java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) Client VM (build 25.74-b02, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Win7 - 64 bit A DESCRIPTION OF THE PROBLEM : I'am trying to create a temp directory using the following code public static File createTemporaryDirectory() { File file = null; try { file = File.createTempFile("xyz", "Directory" + System.getProperty("file.separator")); file.delete(); file.mkdirs(); } catch (final IOException e) { e.printStackTrace(); } return file; } We want our product to be compatible with both 1.6 and 1.8 , but the above code doesnt work in 1.8 . I did some research and found that if i remove System.getProperty("file.separator") it works fine . Since i cant debug the java library code , i want to know is there any change in the code of createTempFile ; i.e. in 1.6 it didnt took care of file separator but in 1.8 it does and that is the reason why i get the following exception java.io.IOException: Unable to create temporary file, C:\Users\xxx\AppData\Local\Temp\xyz3408962131679677845Directory. I know in 1.8 there is a new method introduced to createTempDirectory to create temp directory , but we want our product to be compatible with both 1.6 and 1.8 . REGRESSION. Last worked in version 6u45 ADDITIONAL REGRESSION INFORMATION: java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) Client VM (build 25.74-b02, mixed mode, sharing) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Following code throws an exception public static File createTemporaryDirectory() { File file = null; try { file = File.createTempFile("xyz", "Directory" + System.getProperty("file.separator")); } catch (final IOException e) { e.printStackTrace(); } return file; } EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - a new file object ACTUAL - java.io.IOException: Unable to create temporary file, C:\Users\xxxAppData\Local\Temp\xyz3408962131679677845Directory ERROR MESSAGES/STACK TRACES THAT OCCUR : java.io.IOException: Unable to create temporary file, C:\Users\xxx\AppData\Local\Temp\xyz3408962131679677845Directory at java.io.File$TempDirectory.generateFile(File.java:1921) at java.io.File.createTempFile(File.java:2010) at java.io.File.createTempFile(File.java:2070) REPRODUCIBILITY : This bug can be reproduced always. CUSTOMER SUBMITTED WORKAROUND : Remove System.getProperty("file.separator") from createTempFIle

    JDK Bug System | 9 months ago | Webbug Group
    java.io.IOException: Unable to create temporary file, C:\Users\xxx\AppData\Local\Temp\xyz3408962131679677845Directory
  2. 0

    Test results on windows Vista are: Package Tests Err Fail Skip Success Rate Time com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils.resourcemanagers 3 0 0 0 100% 5 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils 4 1 1 0 50% 7 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.spec 1 1 0 0 0% 4 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.data 14 4 1 0 64.286% 76 com.sonyericsson.jenkins.plugins.externalresource.dispatcher 8 4 0 0 50% 47 org.jvnet.hudson.test.junit 1 0 0 0 100% 0 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.cli 8 0 0 0 100% 10 org.jvnet.hudson.test 7 0 0 0 100% 0 10 tests fail with the following stack trace: hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:53) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:352) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:264) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.io.IOException: Unable to delete C:\Users\xxx\AppData\Local\Temp\hudson2103820071219030666test\slave-slave0.log at hudson.Util.deleteFile(Util.java:266) at hudson.Util.deleteRecursive(Util.java:316) at hudson.Util.deleteContentsRecursive(Util.java:227) at hudson.Util.deleteRecursive(Util.java:307) at hudson.FilePath$9.invoke(FilePath.java:826) at hudson.FilePath$9.invoke(FilePath.java:824) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.FilePath.deleteRecursive(FilePath.java:824) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more

    Jenkins JIRA | 4 years ago | Patrik Johansson
    hudson.util.IOException2: Failed to clean up temp dirs
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Test results on windows Vista are: Package Tests Err Fail Skip Success Rate Time com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils.resourcemanagers 3 0 0 0 100% 5 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils 4 1 1 0 50% 7 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.spec 1 1 0 0 0% 4 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.data 14 4 1 0 64.286% 76 com.sonyericsson.jenkins.plugins.externalresource.dispatcher 8 4 0 0 50% 47 org.jvnet.hudson.test.junit 1 0 0 0 100% 0 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.cli 8 0 0 0 100% 10 org.jvnet.hudson.test 7 0 0 0 100% 0 10 tests fail with the following stack trace: hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:53) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:352) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:264) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.io.IOException: Unable to delete C:\Users\xxx\AppData\Local\Temp\hudson2103820071219030666test\slave-slave0.log at hudson.Util.deleteFile(Util.java:266) at hudson.Util.deleteRecursive(Util.java:316) at hudson.Util.deleteContentsRecursive(Util.java:227) at hudson.Util.deleteRecursive(Util.java:307) at hudson.FilePath$9.invoke(FilePath.java:826) at hudson.FilePath$9.invoke(FilePath.java:824) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.FilePath.deleteRecursive(FilePath.java:824) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more

    Jenkins JIRA | 4 years ago | Patrik Johansson
    hudson.util.IOException2: Failed to clean up temp dirs
  5. 0

    Can not index pdf file after i updated PDFBox from 1.8 to 2.0.2

    Stack Overflow | 3 months ago | Nitin Vavdiya
    org.apache.tika.exception.TikaException: Failed to close temporary resources

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      deployURL(file:/C:/Users/XXX/AppData/Local/Temp/TestWebProject.war) has not been distributed

      at org.jboss.deployment.services.DeploymentManagerService.stop()
    2. org.jboss.deployment
      DeploymentManagerService.stop
      1. org.jboss.deployment.services.DeploymentManagerService.stop(DeploymentManagerService.java:281)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    5. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    7. JBoss Application Server Server
      InvokerAdaptorService.invoke
      1. org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
      1 frame
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    9. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    10. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    11. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    12. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    13. org.jboss.mx
      ModelMBeanOperationInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      1 frame
    14. JBoss Application Server Server
      AuthenticationInterceptor.invoke
      1. org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
      2. org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:108)
      2 frames
    15. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      3 frames
    16. JBoss Application Server Server
      JRMPProxyFactory.invoke
      1. org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
      1 frame
    17. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    18. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    19. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    20. JBoss Application Server Server
      JRMPInvoker.invoke
      1. org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
      2. org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
      2 frames
    21. Java RT
      Thread.run
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      5. sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
      6. sun.rmi.transport.Transport$1.run(Transport.java:159)
      7. java.security.AccessController.doPrivileged(Native Method)
      8. sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      9. sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      10. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      11. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      12. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      13. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      14. java.lang.Thread.run(Thread.java:662)
      14 frames