java.io.FileNotFoundException: F:\projects\bizservice\src\main\filtered-resources\org\openbiz\bizservice\domain\User.hbm.xml (The system cannot find the path specified)

Hibernate JIRA | Thai | 8 years ago
  1. 0

    I received the following exception when Openning Mapping File from Hibernate perspective: java.io.FileNotFoundException: F:\projects\bizservice\src\main\filtered-resources\org\openbiz\bizservice\domain\User.hbm.xml (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.getDocument(OpenFileActionUtils.java:233) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.rootClassInResource(OpenFileActionUtils.java:98) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.elementInResource(OpenFileActionUtils.java:86) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.getResource(OpenFileActionUtils.java:282) at org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:120) at org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:96) at org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:71) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) I find out the root cause in the following class org.hibernate.eclipse.console.actions.OpenFileActionUtils (lines 273-282) for (int i = 0; i < packageFragmentRoots.length && resource == null; i++) { //search in source folders. if (packageFragmentRoots[i].getClass() == PackageFragmentRoot.class) { IPackageFragmentRoot packageFragmentRoot = packageFragmentRoots[i]; IPath path = packageFragmentRoot.getPath().append(file.getValue()); resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path); } } if (resource != null && elementInResource(consoleConfiguration, resource, element)) return resource; The code assumes that if resource variable is not null, then the corresponding file exists at that location. In fact, when the file doesn't exist, the method org.eclipse.core.internal.resources.Container.getFile(..) might still return a not-null value (see http://mobius.inria.fr/eclipse-doc/org/eclipse/core/resources/IContainer.html#getFile(org.eclipse.core.runtime.IPath)). As a result, a not-null file path will be passed to OpenFileActionUtils.elementInResource(..), and a FileNotFoundException will be thrown. * Note that my project contains more than one source folder. This issue may not happen on one-source-folder project.

    Hibernate JIRA | 8 years ago | Thai
    java.io.FileNotFoundException: F:\projects\bizservice\src\main\filtered-resources\org\openbiz\bizservice\domain\User.hbm.xml (The system cannot find the path specified)
  2. 0

    I received the following exception when Openning Mapping File from Hibernate perspective: java.io.FileNotFoundException: F:\projects\bizservice\src\main\filtered-resources\org\openbiz\bizservice\domain\User.hbm.xml (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.getDocument(OpenFileActionUtils.java:233) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.rootClassInResource(OpenFileActionUtils.java:98) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.elementInResource(OpenFileActionUtils.java:86) at org.hibernate.eclipse.console.actions.OpenFileActionUtils.getResource(OpenFileActionUtils.java:282) at org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:120) at org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:96) at org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:71) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) I find out the root cause in the following class org.hibernate.eclipse.console.actions.OpenFileActionUtils (lines 273-282) for (int i = 0; i < packageFragmentRoots.length && resource == null; i++) { //search in source folders. if (packageFragmentRoots[i].getClass() == PackageFragmentRoot.class) { IPackageFragmentRoot packageFragmentRoot = packageFragmentRoots[i]; IPath path = packageFragmentRoot.getPath().append(file.getValue()); resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path); } } if (resource != null && elementInResource(consoleConfiguration, resource, element)) return resource; The code assumes that if resource variable is not null, then the corresponding file exists at that location. In fact, when the file doesn't exist, the method org.eclipse.core.internal.resources.Container.getFile(..) might still return a not-null value (see http://mobius.inria.fr/eclipse-doc/org/eclipse/core/resources/IContainer.html#getFile(org.eclipse.core.runtime.IPath)). As a result, a not-null file path will be passed to OpenFileActionUtils.elementInResource(..), and a FileNotFoundException will be thrown. * Note that my project contains more than one source folder. This issue may not happen on one-source-folder project.

    Hibernate JIRA | 8 years ago | Thai
    java.io.FileNotFoundException: F:\projects\bizservice\src\main\filtered-resources\org\openbiz\bizservice\domain\User.hbm.xml (The system cannot find the path specified)
  3. 0

    OpenGrok leaving too many open files. (Bugzilla #17127)

    GitHub | 4 years ago | vladak
    java.io.FileNotFoundException: /usr/local/tomcat/conf/web.xml (Too many open files)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to typically start kestrel on windows... in simple steps.

    GitHub | 5 years ago | nutharsh
    java.io.FileNotFoundException: \etc\kestrel.conf (The system cannot find the path specified)
  6. 0

    Graph Window in Overview Tab Fails to Load

    GitHub | 5 years ago | mbastian
    java.io.FileNotFoundException: /platform/modules/* (No such file or directory)

  1. gehel 2 times, last 1 week ago
  2. Kialandei 100 times, last 1 week ago
  3. Reich 1 times, last 2 weeks ago
  4. bluebunnty 1 times, last 2 weeks ago
  5. Aria Pahlavan 1 times, last 2 weeks ago
43 more registered users
52 unregistered visitors
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.FileNotFoundException

    F:\projects\bizservice\src\main\filtered-resources\org\openbiz\bizservice\domain\User.hbm.xml (The system cannot find the path specified)

    at java.io.FileInputStream.open()
  2. Java RT
    FileInputStream.<init>
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(FileInputStream.java:106)
    2 frames
  3. org.hibernate.eclipse
    OpenMappingAction.run
    1. org.hibernate.eclipse.console.actions.OpenFileActionUtils.getDocument(OpenFileActionUtils.java:233)
    2. org.hibernate.eclipse.console.actions.OpenFileActionUtils.rootClassInResource(OpenFileActionUtils.java:98)
    3. org.hibernate.eclipse.console.actions.OpenFileActionUtils.elementInResource(OpenFileActionUtils.java:86)
    4. org.hibernate.eclipse.console.actions.OpenFileActionUtils.getResource(OpenFileActionUtils.java:282)
    5. org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:120)
    6. org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:96)
    7. org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:71)
    7 frames
  4. Eclipse UI
    BaseSelectionListenerAction.runWithEvent
    1. org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
    1 frame
  5. JFace
    ActionContributionItem$5.handleEvent
    1. org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
    2. org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
    3. org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    3 frames
  6. RWT
    Display.readAndDispatch
    1. org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    2. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    3. org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
    4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
    4 frames
  7. Eclipse UI
    Workbench$5.run
    1. org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
    2. org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
    3. org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
    4. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
    4 frames
  8. Databinding
    Realm.runWithDefault
    1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    1 frame
  9. Eclipse UI
    Workbench.createAndRunWorkbench
    1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
    1 frame
  10. Eclipse UI
    PlatformUI.createAndRunWorkbench
    1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    1 frame
  11. Eclipse IDE
    IDEApplication.start
    1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    1 frame
  12. Equinox Container
    EclipseAppHandle.run
    1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    1 frame
  13. Eclipse OSGi
    EclipseStarter.run
    1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    4 frames
  14. 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
  15. Equinox
    Main.main
    1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    3. org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    4. org.eclipse.equinox.launcher.Main.main(Main.java:1212)
    4 frames