You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Flavio Pompermaier <po...@okkam.it> on 2018/05/04 16:02:30 UTC
Wrong joda lib
Hi to all,
I'm trying to run a job on a test cluster with Flink 1.3.1 but my job fails
with the following error:
java.lang.NoSuchMethodError: org.joda.time.DateTime.<init>(IIIII)V
The job works when I run it from the IDE and in our production
environment...I've looked into all jars within libs and that class is not
present. The class within my shaded jar is indeed correct (I've checked the
decompiled version of the class file)...how can I discover which jar on the
classpath is "obscuring" the class contained in my shaded jar??
Best,
Flavio
Re: Wrong joda lib
Posted by Stefan Richter <s....@data-artisans.com>.
Then that is the jar from which it currently takes the code for your DateTime class at that point in the code.
> Am 04.05.2018 um 18:29 schrieb Flavio Pompermaier <po...@okkam.it>:
>
> The output of that code is file:/opt/cloudera/parcels/CDH-5.11.2-1.cdh5.11.2.p0.4/jars/jruby-cloudera-1.0.0.jar
>
> On Fri, May 4, 2018 at 6:11 PM, Stefan Richter <s.richter@data-artisans.com <ma...@data-artisans.com>> wrote:
> Hi,
>
> you can try to figure out the jar with org.joda.time.DateTime.class.getProtectionDomain().getCodeSource().getLocation() in the right context.
>
> Best,
> Stefan
>
> > Am 04.05.2018 um 18:02 schrieb Flavio Pompermaier <pompermaier@okkam.it <ma...@okkam.it>>:
> >
> > Hi to all,
> > I'm trying to run a job on a test cluster with Flink 1.3.1 but my job fails with the following error:
> >
> > java.lang.NoSuchMethodError: org.joda.time.DateTime.<init>(IIIII)V
> >
> >
> > The job works when I run it from the IDE and in our production environment...I've looked into all jars within libs and that class is not present. The class within my shaded jar is indeed correct (I've checked the decompiled version of the class file)...how can I discover which jar on the classpath is "obscuring" the class contained in my shaded jar??
> >
> > Best,
> > Flavio
>
>
>
Re: Wrong joda lib
Posted by Flavio Pompermaier <po...@okkam.it>.
The output of that code is
file:/opt/cloudera/parcels/CDH-5.11.2-1.cdh5.11.2.p0.4/jars/jruby-cloudera-1.0.0.jar
On Fri, May 4, 2018 at 6:11 PM, Stefan Richter <s....@data-artisans.com>
wrote:
> Hi,
>
> you can try to figure out the jar with org.joda.time.DateTime.class.
> getProtectionDomain().getCodeSource().getLocation() in the right context.
>
> Best,
> Stefan
>
> > Am 04.05.2018 um 18:02 schrieb Flavio Pompermaier <pompermaier@okkam.it
> >:
> >
> > Hi to all,
> > I'm trying to run a job on a test cluster with Flink 1.3.1 but my job
> fails with the following error:
> >
> > java.lang.NoSuchMethodError: org.joda.time.DateTime.<init>(IIIII)V
> >
> >
> > The job works when I run it from the IDE and in our production
> environment...I've looked into all jars within libs and that class is not
> present. The class within my shaded jar is indeed correct (I've checked the
> decompiled version of the class file)...how can I discover which jar on the
> classpath is "obscuring" the class contained in my shaded jar??
> >
> > Best,
> > Flavio
>
>
Re: Wrong joda lib
Posted by Stefan Richter <s....@data-artisans.com>.
Why does it make this a problem? You could also run method in a static block and move the initialization of your variable at the bottom of that static block (or comment it out).
> Am 04.05.2018 um 18:14 schrieb Flavio Pompermaier <po...@okkam.it>:
>
> The problem is that the problem occurs during the initialization of a static variable:
>
> private static final DateTime MIN_DATE = new DateTime(1850, 01, 01, 0, 0);
>
> On Fri, May 4, 2018 at 6:11 PM, Stefan Richter <s.richter@data-artisans.com <ma...@data-artisans.com>> wrote:
> Hi,
>
> you can try to figure out the jar with org.joda.time.DateTime.class.getProtectionDomain().getCodeSource().getLocation() in the right context.
>
> Best,
> Stefan
>
> > Am 04.05.2018 um 18:02 schrieb Flavio Pompermaier <pompermaier@okkam.it <ma...@okkam.it>>:
> >
> > Hi to all,
> > I'm trying to run a job on a test cluster with Flink 1.3.1 but my job fails with the following error:
> >
> > java.lang.NoSuchMethodError: org.joda.time.DateTime.<init>(IIIII)V
> >
> >
> > The job works when I run it from the IDE and in our production environment...I've looked into all jars within libs and that class is not present. The class within my shaded jar is indeed correct (I've checked the decompiled version of the class file)...how can I discover which jar on the classpath is "obscuring" the class contained in my shaded jar??
> >
> > Best,
> > Flavio
>
>
Re: Wrong joda lib
Posted by Flavio Pompermaier <po...@okkam.it>.
The problem is that the problem occurs during the initialization of a
static variable:
private static final DateTime MIN_DATE = new DateTime(1850, 01, 01, 0, 0);
On Fri, May 4, 2018 at 6:11 PM, Stefan Richter <s....@data-artisans.com>
wrote:
> Hi,
>
> you can try to figure out the jar with org.joda.time.DateTime.class.g
> etProtectionDomain().getCodeSource().getLocation() in the right context.
>
> Best,
> Stefan
>
> > Am 04.05.2018 um 18:02 schrieb Flavio Pompermaier <pompermaier@okkam.it
> >:
> >
> > Hi to all,
> > I'm trying to run a job on a test cluster with Flink 1.3.1 but my job
> fails with the following error:
> >
> > java.lang.NoSuchMethodError: org.joda.time.DateTime.<init>(IIIII)V
> >
> >
> > The job works when I run it from the IDE and in our production
> environment...I've looked into all jars within libs and that class is not
> present. The class within my shaded jar is indeed correct (I've checked the
> decompiled version of the class file)...how can I discover which jar on the
> classpath is "obscuring" the class contained in my shaded jar??
> >
> > Best,
> > Flavio
>
>
Re: Wrong joda lib
Posted by Stefan Richter <s....@data-artisans.com>.
Hi,
you can try to figure out the jar with org.joda.time.DateTime.class.getProtectionDomain().getCodeSource().getLocation() in the right context.
Best,
Stefan
> Am 04.05.2018 um 18:02 schrieb Flavio Pompermaier <po...@okkam.it>:
>
> Hi to all,
> I'm trying to run a job on a test cluster with Flink 1.3.1 but my job fails with the following error:
>
> java.lang.NoSuchMethodError: org.joda.time.DateTime.<init>(IIIII)V
>
>
> The job works when I run it from the IDE and in our production environment...I've looked into all jars within libs and that class is not present. The class within my shaded jar is indeed correct (I've checked the decompiled version of the class file)...how can I discover which jar on the classpath is "obscuring" the class contained in my shaded jar??
>
> Best,
> Flavio