Re: javax.persistence.Persistence classNotFoundError

2016-05-02 Thread hsy...@gmail.com
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  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.(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
>>
>
>


Re: Apex engine and malhar maven versions for Kafka 0.9 version operator

2016-04-16 Thread hsy...@gmail.com
Hi Ananth,

Could you please try to add malhar-library in test scope? Thanks!

Regards,
Siyuan

On Saturday, April 16, 2016, Ananth Gundabattula 
wrote:

> Hello all,
>
> I would like to run a unit test code using the new Kafka Operator that
> supports the 0.9 version protocol.
>
> In this process, I included the malhar-kafka library version (
> 3.3.1-incubating ) and am using the apex-engine ( version 3.3.0 ) with
>  as test/provided.
>
> The compilation works fine but my unit tests fail to run properly with "
> java.lang.ClassNotFoundException: com.datatorrent.lib.util.KryoCloneUtils"
> exception.
>
>
> What is the recommended way to run a unit test which uses Kafka 0.9
> operator integrated with the Apex engine ? I am assuming that the
> malhar-contrib library kafka operator is not 0.9 compliant ..
>
> The unit test code is like this :
>
> The class CassandraEventDetailsStreamingApp extends the
> AbstractKafkaInputOperator in the below snippet of code.
>
> The exception arises in the method lma.getController();
>
> @Test
> public void testApplication() throws IOException, Exception {
> try {
> LocalMode lma = LocalMode.newInstance();
> Configuration conf = new Configuration(false);
> 
> conf.addResource(this.getClass().getResourceAsStream("/dag-test-props.xml"));
> lma.prepareDAG(new CassandraEventDetailsStreamingApp(), conf);
> LocalMode.Controller lc = lma.getController();
> lc.run();
> } catch (ConstraintViolationException e) {
> Assert.fail("constraint violations: " + e.getConstraintViolations());
> }
> }
>
>
>
> Regards,
> Ananth
>