fitnesse
fitnesse copied to clipboard
Got error exception when trying to run FitNesse server from Eclipse IDE localhost
Describe the bug I followed the GUIDE in the https://github.com/unclebob/fitnesse#import-fitnesse-in-eclipse at below
Import FitNesse in Eclipse
- Clone the FitNesse Git repository from https://github.com/unclebob/fitnesse.
- Import FitNesse via File -> Import... -> Gradle Project.
- Select the just cloned project folder. Follow the wizard.
- Ensure the project properties have a Java 7 compiler or newer set.
When everything is done and I tried to run FitNesse form Eclipse IDE following below step, but it got error exception
To Reproduce Steps to reproduce the behavior:
- Go to /fitnesse/src/fitnesseMain/FitNesseMain.java
- Right click on public static void main(String[] args) and select Run As -> Java Application
- See error : SEVERE: Error while starting the FitNesse [source] java.lang.NullPointerException: source
Expected behavior FitNesse server should be start successful.
Screenshots
Sample Wiki Structure/content If the problem has to do with how a file handled in the wiki or how it is parsed, please add a zip file containing files that demonstrate the problem.
Stack Trace
Loaded custom comparator inverse: fitnesse.slim.test.InverseComparator
Bootstrapping FitNesse, the fully integrated standalone wiki and acceptance testing framework.
root page: fitnesse.wiki.fs.FileSystemPage at .\FitNesseRoot#latest
logger: none
authenticator: fitnesse.authentication.PromiscuousAuthenticator
page factory: fitnesse.html.template.PageFactory
page theme: bootstrap
Unpacking new version of FitNesse resources. Please be patient...
SEVERE: Error while starting the FitNesse [source]
java.lang.NullPointerException: source
at java.util.Objects.requireNonNull(Unknown Source)
at java.util.Scanner.
Configuration:
- OS: Windows 10 x64bit
- Browser [e.g. chrome, safari]
- Version [e.g. 20200501] of FitNesse
- Test System:
- Plugins in use:
Additional context
Some questions:
- Are you able to run using Gradle (run)?
- What Java version are you using?
- Are you running as a limited user account by any chance?
From the screenshot I gather Java 8 is used. I'll update the README to indicate this is indeed required.
@nguyentuanviet77
- Did you execute
./gradlew copyRuntimeLibs
before trying to start the main? - Which directory did you clone the project in? Any chance its name contains a space or non-ASCII character (I've seen that cause problems in the past).
Did Eclipse execute the gradle task createUpdateList
for you?
I don't use Eclipse (I use IntelliJ community edition) when I try to start the main I see IntelliJ perform a gradle build first (ensuring all required work is done). Does Eclipse also do that also?
The output I get before starting main:
08:40:40: Executing task 'FitNesseMain.main()'...
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy UP-TO-DATE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test UP-TO-DATE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE
> Configure project :
Building FitNesse v20201021...
> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :compileGroovy NO-SOURCE
> Task :compileBootstrap
> Task :createUpdateLists
> Task :fitNesseVersion UP-TO-DATE
> Task :processResources
> Task :classes
> Task :FitNesseMain.main()
Bootstrapping FitNesse, the fully integrated standalone wiki and acceptance testing framework.
Having said that, I never start FitNesse this way. I use the gradle task specific for that task (like @tcnh suggested):
gradlew run
Does that work for you?
Like I said I don't use Eclipse. If you get this to work, and it turns out extra steps are needed to run: can you maybe create a PR to update the README with better instructions for Eclipse?
Hi @fhoeben ,
regarding your question i like to update some info below:
- Java: Java 8
- project directory: E:\Working\Fitnesse_20200501\fitnesse
- and I ran below gradle commands but it still didn't work, please see the screenshot.
Your screenshot suggests you are using Gradle 6.7. I haven't tested that version.
Could you try using Gradle 6.3? That's the version you should get using gradlew
, don't know why you are getting a different one.