Com.exception.daoexception:java.io.filenotfoundexception:d:\users\liuyangos2237\workspaces\myeclipse%2010\ Zhuce\webroot\web-inf\classes\users.xml (the system cannot find the path specified.) )
At Com.dao.impl.UserDaoDom4jImpl.addUser (userdaodom4jimpl.java:84)
At Com.test.UserDaoDom4jImplTest.testAddUser (userdaodom4jimpltest.java:35)
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:606)
At Org.junit.runners.model.frameworkmethod$1.runreflectivecall (frameworkmethod.java:44)
At Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:15)
At org.junit.runners.model.FrameworkMethod.invokeExplosively (frameworkmethod.java:41)
At Org.junit.internal.runners.statements.InvokeMethod.evaluate (invokemethod.java:20)
At Org.junit.internal.runners.statements.RunBefores.evaluate (runbefores.java:28)
At Org.junit.internal.runners.statements.RunAfters.evaluate (runafters.java:31)
At Org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored (blockjunit4classrunner.java:79)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:71)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:49)
At Org.junit.runners.parentrunner$3.run (parentrunner.java:193)
At Org.junit.runners.parentrunner$1.schedule (parentrunner.java:52)
At Org.junit.runners.ParentRunner.runChildren (parentrunner.java:191)
At org.junit.runners.parentrunner.access$000 (parentrunner.java:42)
At Org.junit.runners.parentrunner$2.evaluate (parentrunner.java:184)
At Org.junit.runners.ParentRunner.run (parentrunner.java:236)
At Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (junit4testreference.java:50)
At Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:467)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:683)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:390)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:197)
caused by:java.io.filenotfoundexception:d:\users\liuyangos2237\workspaces\myeclipse%2010\zhuce\webroot\web-inf\ Classes\users.xml (the system cannot find the path specified.) )
At Java.io.FileOutputStream.open (Native Method)
At Java.io.fileoutputstream.<init> (fileoutputstream.java:221)
At Java.io.fileoutputstream.<init> (fileoutputstream.java:110)
at COM. Util.Dom4jUtil.write2xml (dom4jutil.java:27)
At Com.dao.impl.UserDaoDom4jImpl.addUser (userdaodom4jimpl.java:81)
... More
When this problem occurs, no matter how the lookup is Eclipse or myeclipse, you cannot find the Users.xml under the classes file.
To change the workspace path is to delete the file under the Package Explorer, create a new project on the desktop, then import the file into the workspace using import, and re-juit test will work, for this reason
The analysis is due to memory storage, not in the C drive, and may not be recognized by Eclipse.
Om.exception.daoexception:java.io.filenotfoundexception:d:\users\liuyangos2237\workspaces\myeclipse%2010\zhuce \webroot\web-inf\classes\users.xml (the system cannot find the path specified.) Solve