You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ashishm07 (via GitHub)" <gi...@apache.org> on 2026/03/05 11:49:07 UTC

[PR] IGNITE-28073 : Examples fail with IllegalStateException when run directly — deploymentUnitJar not built [ignite-3]

ashishm07 opened a new pull request, #7710:
URL: https://github.com/apache/ignite-3/pull/7710

   Running any example that requires a deployment unit directly via Gradle fails with:
   
   java.lang.IllegalStateException: Deployment unit JAR not found at: .../examples/java/build/libs/deploymentunit-example-1.0.0.jar
   
   Root Cause:
   
   deploymentUnitJar was only wired into the build lifecycle. Direct class execution via Gradle uses a JavaExec task that only depends on classes, bypassing deploymentUnitJar. As a result, the JAR is never built unless ./gradlew :ignite-examples:build is run explicitly beforehand.
   
   Affected Examples:
   
   code/deployment/CodeDeploymentExample
   
   compute/ComputeAsyncExample
   
   compute/ComputeBroadcastExample
   
   compute/ComputeCancellationExample
   
   compute/ComputeColocatedExample
   
   compute/ComputeExample
   
   compute/ComputeJobPriorityExample
   
   compute/ComputeJobStateExample
   
   compute/ComputeMapReduceExample
   
   compute/ComputeWithCustomResultMarshallerExample
   
   compute/ComputeWithResultExample
   
   serialization/SerializationExample
   
   streaming/DistributedComputeWithReceiverExample
   
   streaming/MultiTableDataStreamerExample
   
   
   Fix:
   
   Added to examples/java/build.gradle:
   
   groovy
   tasks.withType(JavaExec).configureEach {
       dependsOn deploymentUnitJar
   }
   This ensures the deployment unit JAR is always built before any example class is executed via Gradle, regardless of whether build was run first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28073 Ensure deployment unit JAR is built before running examples via Gradle [ignite-3]

Posted by "Pochatkin (via GitHub)" <gi...@apache.org>.
Pochatkin merged PR #7710:
URL: https://github.com/apache/ignite-3/pull/7710


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28073 : Examples fail with IllegalStateException when run directly - deploymentUnitJar not built [ignite-3]

Posted by "ashish-zs (via GitHub)" <gi...@apache.org>.
ashish-zs commented on code in PR #7710:
URL: https://github.com/apache/ignite-3/pull/7710#discussion_r2912450255


##########
examples/java/src/main/java/org/apache/ignite/example/table/MapperExample.java:
##########
@@ -38,46 +42,56 @@ public Integer toColumnType(String cityId) {
 
     public static void main(String[] args) throws Exception {
 
+        try (

Review Comment:
   I agree. I see no difference with main. The files are identical. I even pasted the main one to this branch and there is no difference.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-28073 : Examples fail with IllegalStateException when run directly - deploymentUnitJar not built [ignite-3]

Posted by "valepakh (via GitHub)" <gi...@apache.org>.
valepakh commented on code in PR #7710:
URL: https://github.com/apache/ignite-3/pull/7710#discussion_r2911857118


##########
examples/java/src/main/java/org/apache/ignite/example/table/MapperExample.java:
##########
@@ -38,46 +42,56 @@ public Integer toColumnType(String cityId) {
 
     public static void main(String[] args) throws Exception {
 
+        try (

Review Comment:
   These changes seem unrelated to the deployment unit issue



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org