Hello Thomas, Thanks for the input.
I tried both the UI and the command line dtcli client . Both of them are giving the same exact stack trace error. Regards, Ananth On Thu, May 5, 2016 at 5:23 AM, Thomas Weise <thomas.we...@gmail.com> wrote: > Hi Ananth, > > One possibility is the bval resolver not considering the context class > loader when processing the annotation. Do you see the same issue when > launching the application through the UI? > > Thanks, > Thomas > > > On Mon, May 2, 2016 at 2:35 PM, Ananth Gundabattula < > agundabatt...@gmail.com> wrote: > >> Hello Siyuan, >> >> Please find attached the output of the unzip -t command on the apa >> package. >> >> The library jar is indeed present in there. >> >> What confuses me here is that the stack trace suggests that it is coming >> when the engine is validating the App ( and not from my application code). >> I am suspecting one of the following is causing this : >> >> >> - the bval ( JSR 303 ) jar validation path is somehow conflicting >> with the JPA validation framework and is causing this issue but am not >> sure. >> - CDH 5.7 might have changed restructured a few jars ?? ( I am not >> sure of this either as I am not sure how Apex uses the underlying Hadoop >> distribution jars ) >> >> Pasting the stack trace once more here for reference: >> >> An error occurred trying to launch the application. Server message: >> java.lang.NoClassDefFoundError: javax/persistence/Persistence at >> org.apache.bval.jsr303.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:34) >> at >> org.apache.bval.jsr303.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:60) >> at >> org.apache.bval.jsr303.resolver.CachingTraversableResolver.isReachable(CachingTraversableResolver.java:82) >> at >> org.apache.bval.jsr303.ConstraintValidation.isReachable(ConstraintValidation.java:241) >> at >> org.apache.bval.jsr303.ConstraintValidation.validate(ConstraintValidation.java:166) >> at >> org.apache.bval.jsr303.ConstraintValidation.validate(ConstraintValidation.java:141) >> at >> org.apache.bval.util.ValidationHelper.validateProperty(ValidationHelper.java:233) >> at >> org.apache.bval.util.ValidationHelper.validateBean(ValidationHelper.java:216) >> at >> org.apache.bval.jsr303.ClassValidator.validateBeanNet(ClassValidator.java:393) >> at org.apache.bval.jsr303.ClassValidator.validate(ClassValidator.java:149) >> at >> com.datatorrent.stram.plan.logical.LogicalPlan.validate(LogicalPlan.java:1672) >> at com.datatorrent.stram.StramClient.<init>(StramClient.java:161) at >> com.datatorrent.stram.client.StramAppLauncher.launchApp(StramAppLauncher.java:509) >> at com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:2050) >> at com.datatorrent.stram.cli.DTCli.launchAppPackage(DTCli.java:3456) at >> com.datatorrent.stram.cli.DTCli.access$7100(DTCli.java:106) at >> com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:1895) at >> com.datatorrent.stram.cli.DTCli$3.run(DTCli.java:1449) Fatal error >> encountered >> >> >> >> >> Regards, >> Ananth >> >> On Tue, May 3, 2016 at 3:22 AM, hsy...@gmail.com <hsy...@gmail.com> >> wrote: >> >>> Hey Ananth, >>> >>> Can you unzip your apa file to see if it is in the lib folder? If it is >>> not there, it means the packaging is not correct. >>> >>> Regards, >>> Siyuan >>> >>> On Mon, May 2, 2016 at 4:39 AM, Ananth Gundabattula < >>> agundabatt...@gmail.com> wrote: >>> >>>> Hello All, >>>> >>>> I was able to get around the issue pasted above by manually copying the >>>> javaee-api-7.0 jar inside the lib folder of Apex engine. It may be noted >>>> that the code works perfectly fine in a unit test that launches all of the >>>> operators in the DAG. ( Works end to end ) . However when I launch it on >>>> CDH 5.7 I run into the exception pasted above. It may be noted that the >>>> exception is being raised when I launch the app and the Apex engine is >>>> trying to validate the newly deployed app. >>>> >>>> I am suspecting that this could be an issue with incompatibility with >>>> CDH 5.7 ( The Hadoop stack on which I am trying to run Apex 3.3 on ) >>>> >>>> Could anyone help me if they were able to run Apex on top of CDH 5.7. I >>>> got the same exception with both Apex 3.3 and 3.2. >>>> >>>> Regards, >>>> Ananth >>>> >>>> On Sat, Apr 30, 2016 at 11:34 AM, Ananth Gundabattula < >>>> agundabatt...@gmail.com> wrote: >>>> >>>>> Hello All, >>>>> >>>>> I am getting the following exception when I launch my Apex app. >>>>> >>>>> I tried including javaee-api- version 7.0 as well to get around this >>>>> error but does not seem to take effect. >>>>> >>>>> Any ideas why javax.persistence.Persistence is not getting loaded by >>>>> the APex engine classloader ? >>>>> >>>>> An error occurred trying to launch the application. Server message: >>>>>> java.lang.NoClassDefFoundError: javax/persistence/Persistence at >>>>>> org.apache.bval.jsr303.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:34) >>>>>> at >>>>>> org.apache.bval.jsr303.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:60) >>>>>> at >>>>>> org.apache.bval.jsr303.resolver.CachingTraversableResolver.isReachable(CachingTraversableResolver.java:82) >>>>>> at >>>>>> org.apache.bval.jsr303.ConstraintValidation.isReachable(ConstraintValidation.java:241) >>>>>> at >>>>>> org.apache.bval.jsr303.ConstraintValidation.validate(ConstraintValidation.java:166) >>>>>> at >>>>>> org.apache.bval.jsr303.ConstraintValidation.validate(ConstraintValidation.java:141) >>>>>> at >>>>>> org.apache.bval.util.ValidationHelper.validateProperty(ValidationHelper.java:233) >>>>>> at >>>>>> org.apache.bval.util.ValidationHelper.validateBean(ValidationHelper.java:216) >>>>>> at >>>>>> org.apache.bval.jsr303.ClassValidator.validateBeanNet(ClassValidator.java:393) >>>>>> at >>>>>> org.apache.bval.jsr303.ClassValidator.validate(ClassValidator.java:149) >>>>>> at >>>>>> com.datatorrent.stram.plan.logical.LogicalPlan.validate(LogicalPlan.java:1672) >>>>>> at com.datatorrent.stram.StramClient.<init>(StramClient.java:161) at >>>>>> com.datatorrent.stram.client.StramAppLauncher.launchApp(StramAppLauncher.java:509) >>>>>> at com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:2050) >>>>>> at com.datatorrent.stram.cli.DTCli.launchAppPackage(DTCli.java:3456) at >>>>>> com.datatorrent.stram.cli.DTCli.access$7100(DTCli.java:106) at >>>>>> com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:1895) at >>>>>> com.datatorrent.stram.cli.DTCli$3.run(DTCli.java:1449) Fatal error >>>>>> encountered >>>>> >>>>> >>>>> Regards, >>>>> Ananth >>>>> >>>> >>>> >>> >> >