[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"problem-detail-error-java-deploy-blocked-by-permissions-and-missing-gradle":3},{"stack":4,"error":5,"seoName":6,"seoStack":7,"seo":8,"breadcrumb":10,"titlePrefix":18,"titleAccent":19,"lead":20,"facts":23,"why":38,"log":52,"fix":89,"engine":102,"related":110,"pitch":117},"java","java-deploy-blocked-by-permissions-and-missing-gradle","Java deploy fails","Java",{"description":9},"Learn what causes Java deploy fails, how PanelAlpha Engine responds to it during deployment.",[11,14,16],{"label":12,"href":13},"App Installations","\u002Fapps",{"label":7,"href":15},"\u002Fapps\u002Fstacks\u002Fjava",{"label":17},"Java deploy fails: Gradle is unavailable in the build environment","Java deploy fails: ","Gradle is unavailable in the build environment",[21],{"text":22},"Error recorded 3 times in PanelAlpha Engine deploys on Java. The deploy log below is the recorded failure output.",[24,29,32,34],{"label":25,"value":26,"tone":27,"tooltip":28},"Type","Error","err","An error that occurred in the deployed application. It is not necessarily a PanelAlpha Engine error, but we keep working on improvements so you run into fewer of them.",{"label":30,"value":31},"Seen","3 times",{"label":33,"value":7},"Where",{"label":35,"value":36,"tooltip":37},"Status","Observed","Our team will look into this soon, verify the cause and try to fix it in an upcoming release.",{"heading":39,"body":40},"Why it happens",[41,43,46,48,50],{"text":42},"The deployment detected the Java\u002FGradle strategy, but the application contains a Maven project descriptor and the build environment does not provide a ",{"text":44,"code":45},"gradle",true,{"text":47}," command. The build container also cannot write to ",{"text":49,"code":45},"\u002Froot",{"text":51},", indicating an incorrect home-directory or volume permission mapping. Either issue can stop the application before startup.",{"heading":53,"block":54},"What the log looks like",{"header":55,"lines":56},"Deploy log",[57,61,65,69,73,77,81,85],{"segments":58},[59],{"text":60},"Detected project type: Java (Gradle)",{"segments":62},[63],{"text":64},"Using strategy: java",{"segments":66},[67],{"text":68},"Loaded base image maven:3-eclipse-temurin-21 from host cache",{"segments":70},[71],{"text":72},"Compiling application on host",{"segments":74},[75],{"text":76},"mkdir: cannot create directory ‘\u002Froot’: Permission denied",{"segments":78},[79],{"text":80},"Can not write to \u002Froot\u002F.m2\u002Fcopy_reference_file.log. Wrong volume permissions? Carrying on ...",{"segments":82},[83],{"text":84},"sh: 1: gradle: not found",{"segments":86},[87],{"text":88},"Deploy failed: Failed to start app",{"heading":90,"steps":91,"block":99},"How to fix it",[92],[93,95,97],{"text":94},"Use the Maven strategy for this repository, or configure the project to build with its Gradle wrapper (",{"text":96,"code":45},".\u002Fgradlew",{"text":98},") and ensure the wrapper is executable. If Gradle is required, use a build image that includes Gradle or install it during the build. Also correct the container home-directory or volume ownership so the build user can write its cache and home paths, then redeploy.",{"header":100,"lines":101},"Fix by hand",[],{"heading":103,"body":104,"block":107},"How PanelAlpha Engine solves it",[105],{"text":106},"The Java detector should resolve the Maven-versus-Gradle conflict from the project build files and prefer the configured build tool or wrapper. The Java build step should also set a writable HOME and validate build-tool availability before starting compilation.",{"header":108,"lines":109},"",[],{"heading":111,"items":112},"Apps affected",[113],{"title":114,"badge":115,"tone":27,"href":116},"spring-petclinic","3 occurrences","\u002Fapps\u002Fspring-projects\u002Fspring-petclinic",{"heading":118,"body":119,"footNote":120,"docsLabel":121,"docsHref":122},"Try PanelAlpha Engine yourself.","The easiest way to turn your server into a safe, controlled environment for your AI agent. Deploy, manage and maintain any project from Claude Code, Cursor, Codex or any other MCP client. Open source under Apache 2.0, free to run.","Requires Ubuntu 24.04 or 26.04 · 2 GB RAM · 1 CPU","Read the documentation","https:\u002F\u002Fpanelalpha.com\u002Fdocs"]