Common problems and solutions.
Problem:
Error: A JNI error has occurred
Unsupported major.minor version
Solution:
# Check Java version
java -version
# Should be 17 or higher
# If not, install Java 17+Problem:
BUILD FAILED
Could not resolve dependencies
Solution:
# Clean and rebuild
./gradlew clean build --refresh-dependenciesProblem:
Port 9080 is already in use
Solution:
# Find process using port 9080
lsof -i :9080
# Kill the process
kill -9 <PID>
# Or use different port (edit server.xml)Problem: Server hangs or crashes on startup
Solution:
# Check logs
tail -f build/wlp/usr/servers/defaultServer/logs/console.log
# Clean and restart
./gradlew clean libertyStop libertyRunProblem: Browser shows "Cannot connect" at localhost:9080
Solution:
- Check server is running: Look for "server is ready"
- Try
http://127.0.0.1:9080instead - Check firewall settings
- Wait longer (first start takes ~30 seconds)
Problem: Empty or null path provided
Solution:
# Make sure to provide path
curl -X POST http://localhost:9080/api/analyze \
-d "projectPath=/full/path/to/project" # Don't forget thisProblem:
curl ... -d "projectPath=../my-project" # ❌ Relative path
Solution:
# Use absolute path
curl ... -d "projectPath=/Users/you/my-project" # ✅ AbsoluteProblem: Directory doesn't contain Gradle build files
Solution:
# Check for build files
ls -la /path/to/project/build.gradle
ls -la /path/to/project/settings.gradle
# Make sure at least one existsPossible Causes:
1. Already fixed
# Check if already migrated
grep -r "compile " build.gradle # Should find nothing2. Wrong directory
# Make sure you're pointing to project root
# Not a subdirectory3. Kotlin DSL only
# Tool has basic Kotlin DSL support
# Some patterns might not match .gradle.kts syntaxProblem: Takes >30 seconds for small project
Possible Causes:
-
Large number of files
# Count .gradle files find /path/to/project -name "*.gradle" | wc -l
-
Network drives
- Don't analyze projects on network/cloud drives
- Copy to local disk first
-
Antivirus scanning
- Temporarily disable antivirus
- Add project to exclusions
Problem: Session expired or server restarted
Solution:
# Re-analyze project first
curl -X POST http://localhost:9080/api/analyze \
-d "projectPath=/path/to/project"
# Then fix
curl -X POST http://localhost:9080/api/fix \
-d '{"issueIds": ["..."]}'Problem: Wrong issue IDs or issues already fixed
Solution:
# Get current issues
curl http://localhost:9080/api/analyze | jq '.issues[].id'
# Use those IDs for fixingProblem: API returns success but file not modified
Possible Causes:
1. Wrong file path
# Check the filePath in response
# Make sure it matches actual file location2. File permissions
# Check if file is writable
ls -la /path/to/build.gradle
# Fix permissions
chmod 644 /path/to/build.gradle3. File locked
- Close IDE/editor
- Make sure no other process has the file open
Problem:
Applied all fixes but ./gradlew build fails
Troubleshooting Steps:
1. Check what was fixed
# Look at backup files
diff build.gradle build.gradle.backup.*2. Verify the changes
# Make sure changes are correct
cat build.gradle3. Clean build
./gradlew clean build --info4. Check for additional issues
# Some issues need manual fixes
# Look for "autoFixable": false
curl http://localhost:9080/api/analyze | jq '.issues[] | select(.autoFixable == false)'5. Update plugins
// In build.gradle
plugins {
id 'java'
id 'com.android.application' version '8.0.0' // Update to latest
}Problem:
Applied fix but no .backup.* files
Solution:
# Search recursively
find /path/to/project -name "*.backup.*"
# Check backup path in API response
# "backupPath": "/full/path/to/file.backup.timestamp"Problem: Tried to restore but file corrupted
Solution:
# Check backup file integrity
cat file.backup.* | head -10
# If corrupted, check git history
git log --all --full-history -- path/to/file
# Restore from git
git checkout HEAD~1 -- path/to/fileProblem:
Hundreds of .backup.* files cluttering project
Solution:
# List backups by date
find . -name "*.backup.*" -ls
# Remove old backups (7+ days)
find . -name "*.backup.*" -mtime +7 -delete
# Remove all backups (after confirming fixes work)
find . -name "*.backup.*" -deleteProblem: Blank page or "Cannot GET /"
Solution:
- Make sure server is running
- Check browser console for errors (F12)
- Clear browser cache
- Try incognito mode
- Try different browser
Problem: Click button but nothing happens
Solution:
- Open browser console (F12)
- Look for JavaScript errors
- Check if path field is filled
- Try refreshing page
Problem: Analysis complete but no issues shown
Solution:
# Check API directly
curl http://localhost:9080/api/analyze
# If API returns issues, it's a UI bug
# Refresh page or check browser consoleProblem:
curl: (6) Could not resolve hostSolution:
# Check server is running
curl http://localhost:9080
# Try 127.0.0.1
curl http://127.0.0.1:9080/api/analyzeProblem:
{
"error": "Unexpected token"
}Solution:
# Make sure JSON is valid
echo '{"issueIds": ["123"]}' | jq .
# Use proper quotes
curl ... -d '{"issueIds": ["123"]}' # Single quotes outsideProblem: "No project analysis found" after idle time
Solution:
- Sessions expire after 30 minutes
- Re-run analysis
- For long sessions, analyze periodically
Problem: Java process using >2GB RAM
Solution:
# Set max heap size
export JAVA_OPTS="-Xmx1024m"
./gradlew libertyRunProblem: Project with 1000+ files takes minutes
Workarounds:
- Analyze individual modules separately
- Exclude build directories
- Run overnight for very large projects
Cause: File read/write error
Solutions:
- Check file permissions
- Ensure disk space available
- Close files in editors
Cause: File changed since analysis
Solution:
- Re-run analysis
- Don't edit files between analyze and fix
Cause: No write permissions or disk full
Solutions:
# Check permissions
ls -la /path/to/file
# Check disk space
df -h./gradlew libertyRun --debug > debug.log 2>&1# Console log
tail -f build/wlp/usr/servers/defaultServer/logs/console.log
# Messages log
tail -f build/wlp/usr/servers/defaultServer/logs/messages.logInclude:
- Operating system and version
- Java version (
java -version) - Full error message
- Steps to reproduce
- Sample build.gradle (if possible)
❌ Using relative paths
curl ... -d "projectPath=../my-project"✅ Use absolute paths
curl ... -d "projectPath=/Users/you/my-project"❌ Not waiting for server
./gradlew libertyRun &
curl ... # Too fast!✅ Wait for "server is ready"
❌ Forgetting to re-analyze
# Made manual changes
curl -X POST .../api/fix # Uses old analysis!✅ Re-analyze after changes
❌ Batch fixing without testing
# Fix all 50 issues at once
# Build breaks✅ Fix in small batches, test each batch
Still stuck? Check Examples for similar scenarios.
Back to: Documentation Home | User Guide