apex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pramod Immaneni <pra...@datatorrent.com>
Subject Re: Specify class loader policy
Date Fri, 06 May 2016 13:43:58 GMT
Ananth,

Thanks for the details. Just so that I have understood you correctly once
you drop the javaee-api-7.0 jar in the engine lib folder the app launches
successfully but that causes the monitoring service to not work or start
correctly. Would it be possible for you to share your app package. If it is
something you cannot share publicly in a list maybe you can send it to me
offline.

Thanks

On Wed, May 4, 2016 at 12:17 PM, Ananth Gundabattula <
agundabattula@gmail.com> wrote:

> Hello Pramod,
>
> Thanks for the reply. Apologies that I could not reply immediately.
>
> Here is our problem:
>
> We have an app that includes Spring + Hibernate + JPA along with other
> libraries that are part of the lib/ folder inside the "apa" package. The
> application runs perfectly fine in the "LocalMode" of a unit test. However
> when trying to deploy the app into the Apex server ( either using the
> command line dtcli or web ui) , there is an exception stating that the
> class javax.persistence.Persistence is not found.
>
> We did try including the javaee-api-7.0 jar in the maven dependencies of
> the app but to no avail. The only ugly hack was to copy this jar into the
> Apex engines lib folder. The apps start working functionally after this but
> we lost all capacity to view the "monitoring" of the app in the UI.
>
> This copying of the jar also resulted in the Apex engine not being able to
> restart if we want to restart it. We needed to move the jar out of the way
> , restart it , put this jar back in and then reinstall and rerun the apps.
> Of course this is all because of the ugly hack and we need to solve this
> properly.
>
>
> I believe the core issue is arising because the validation framework is
> pulling bval ( Apache Bean Validation ) for the JPA components that are
> present in the map. This is leading to the parent classloader somehow
> trying to look for classes in the lib folder of the Apex engine and
> ignoring the libs in the app lib folder. This is just a guess and am kind
> of stumped how to figure it out correctly.
>
> I did a dump of the class loaders and the jars they are loading at the
> launch time of the app. Please find attached a copy of the two main class
> loaders and their jars. I have also attached a copy of the stack trace of
> the error I am getting when I launch the app in Apex.
>
>
>
>
> Regards,
> Ananth
>
> On Wed, May 4, 2016 at 10:14 AM, Pramod Immaneni <pramod@datatorrent.com>
> wrote:
>
>> Hi Ananth,
>>
>> Are you facing a specific problem? We include the application jars first
>> in the classpath, followed by apex jars and then hadoop jars.
>>
>> Thanks
>>
>> On Tue, May 3, 2016 at 4:56 AM, Ananth Gundabattula <
>> agundabattula@gmail.com> wrote:
>>
>>> Hello All,
>>>
>>> Is there a way we can specify the class loader policy for an Apex app ?
>>> Basically I am looking at something equivalent of the user first class
>>> loader policy available in the traditional hadoop world. (
>>> mapreduce.job.user.classpath.first)
>>>
>>> Regards,
>>> Ananth
>>>
>>
>>
>

Mime
View raw message