Re: Getting java.lang.ClassNotFoundException: for protobuf generated class

2017-11-22 Thread Gordon Weakliem
Jared has a good point, what is mvn dependency:tree showing?

On Wed, Nov 22, 2017 at 7:54 AM, Jared Stehler <
jared.steh...@intellifylearning.com> wrote:

> Protobuf is notorious for throwing things like “class not found” when
> built and run with different versions of the library; I believe flink is
> using protobuf 2.5.0 and you mentioned using 2.6.1, which I think would be
> a possible cause of this issue.
>
> --
> Jared Stehler
> Chief Architect - Intellify Learning
> o: 617.701.6330 x703 <(617)%20701-6330>
>
>
>
> On Nov 22, 2017, at 4:25 AM, Nico Kruber  wrote:
>
> But wouldn't a failed dependency show another ClassNotFoundException?
>
> On Tuesday, 21 November 2017 20:31:58 CET Gordon Weakliem wrote:
>
> Isn't one cause for ClassNotFoundException that the class can't load due to
> failed dependencies or a failure in a static constructor?
>
> If jar -tf target/program.jar | grep MeasurementTable shows the class is
> present, are there other dependencies missing? You may need to add runtime
> dependencies into your pom or gradle.build file.
>
> On Tue, Nov 21, 2017 at 2:28 AM, Nico Kruber 
> wrote:
>
> Hi Shankara,
> sorry for the late response, but honestly, I cannot think of a reason that
> some of your program's classes (using only a single jar file) are found
> some
> others are not, except for the class not being in the jar.
>
> Or there's some class loader issue in the Flink Beam runner (which I find
> unlikely though) - maybe Aljoscha (cc'd) can elaborate a bit more on the
> Beam
> side and has some other idea.
>
>
> Nico
>
> On Tuesday, 14 November 2017 14:54:28 CET Shankara wrote:
>
> Hi Nico,
>
>
> - how do you run the job?
>
> If we run same program in flink local then it works fine. For
>
>
> flink local we used command line
>
>  mvn package exec:java
>
> -Dexec.mainClass=com.huawei.ccn.intelliom.ims.tmon.TMon
> -Dexec.args="--threshold=Measurment:0:4001:1:90:85:CPU
> --broker=192.168.56.1:9092" -Pflink-runner
>
>   When we use flink cluster and submit jar using web UI then we are
>
> getting exception. like below
> 
>
> n4.nabble.com/file/t1
>
> 169/image953.png>
>
> Exception :
> 
>
> n4.nabble.com/file/t1
>
> 169/image_%281%29.png>
>
> - how do you add/include the jar with the missing class?
>
> We are generating the linked jar using the maven-jar-plugin.
>
>
> And
>
> in the bundled jar all the protobuf generated class exist. There is no
> missing class.
>
> - is that jar file part of your program's jar or separate?
>
> since we are using the jar-plugin, the protobuf jar is also
>
>
> part
>
> of the generated jar.
>
> - is the missing class, i.e. "com.huawei.ccn.intelliom.ims.
>
>
> MeasurementTable
>
> $measurementTable" (an inner class starting in lower-case?), really in
>
>
> the
>
> jar
> file? It might be a wrongly generated protobuf class ...
>
> sub Class is exit in Protobuf generated class. Please find the
>
>
> attached class.
>
> 
>
> n4.nabble.com/file/t1
>
> 169/Selection_028.png>
>
> Thanks,
> Shankara
>
>
>
> --
> Sent from:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
>
>
>
>


-- 
[image: Img]
*  Gordon Weakliem*|  Sr. Software Engineer
  *O *303.493.5490
*  Boulder* | NYC | London




CONFIDENTIALITY. This communication is intended only for the use of the
intended recipient(s) and contains information that is privileged and
confidential. As a recipient of this confidential and proprietary
information, you are prohibited from distributing this information outside
of sovrn. Further, if you are not the intended recipient, please note that
any dissemination of this communication is prohibited. If you have received
this communication in error, please erase all copies of the message,
including all attachments, and please also notify the sender immediately.
Thank you for your cooperation.


Re: Getting java.lang.ClassNotFoundException: for protobuf generated class

2017-11-22 Thread Jared Stehler
Protobuf is notorious for throwing things like “class not found” when built
and run with different versions of the library; I believe flink is using
protobuf 2.5.0 and you mentioned using 2.6.1, which I think would be a
possible cause of this issue.

--
Jared Stehler
Chief Architect - Intellify Learning
o: 617.701.6330 x703 <(617)%20701-6330>



On Nov 22, 2017, at 4:25 AM, Nico Kruber  wrote:

But wouldn't a failed dependency show another ClassNotFoundException?

On Tuesday, 21 November 2017 20:31:58 CET Gordon Weakliem wrote:

Isn't one cause for ClassNotFoundException that the class can't load due to
failed dependencies or a failure in a static constructor?

If jar -tf target/program.jar | grep MeasurementTable shows the class is
present, are there other dependencies missing? You may need to add runtime
dependencies into your pom or gradle.build file.

On Tue, Nov 21, 2017 at 2:28 AM, Nico Kruber  wrote:

Hi Shankara,
sorry for the late response, but honestly, I cannot think of a reason that
some of your program's classes (using only a single jar file) are found
some
others are not, except for the class not being in the jar.

Or there's some class loader issue in the Flink Beam runner (which I find
unlikely though) - maybe Aljoscha (cc'd) can elaborate a bit more on the
Beam
side and has some other idea.


Nico

On Tuesday, 14 November 2017 14:54:28 CET Shankara wrote:

Hi Nico,


- how do you run the job?

If we run same program in flink local then it works fine. For


flink local we used command line

 mvn package exec:java

-Dexec.mainClass=com.huawei.ccn.intelliom.ims.tmon.TMon
-Dexec.args="--threshold=Measurment:0:4001:1:90:85:CPU
--broker=192.168.56.1:9092" -Pflink-runner

  When we use flink cluster and submit jar using web UI then we are

getting exception. like below


Exception :


- how do you add/include the jar with the missing class?

We are generating the linked jar using the maven-jar-plugin.


And

in the bundled jar all the protobuf generated class exist. There is no
missing class.

- is that jar file part of your program's jar or separate?

since we are using the jar-plugin, the protobuf jar is also


part

of the generated jar.

- is the missing class, i.e. "com.huawei.ccn.intelliom.ims.


MeasurementTable

$measurementTable" (an inner class starting in lower-case?), really in


the

jar
file? It might be a wrongly generated protobuf class ...

sub Class is exit in Protobuf generated class. Please find the


attached class.



Thanks,
Shankara



--
Sent from:
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Re: Getting java.lang.ClassNotFoundException: for protobuf generated class

2017-11-22 Thread Nico Kruber
But wouldn't a failed dependency show another ClassNotFoundException?

On Tuesday, 21 November 2017 20:31:58 CET Gordon Weakliem wrote:
> Isn't one cause for ClassNotFoundException that the class can't load due to
> failed dependencies or a failure in a static constructor?
> 
> If jar -tf target/program.jar | grep MeasurementTable shows the class is
> present, are there other dependencies missing? You may need to add runtime
> dependencies into your pom or gradle.build file.
> 
> On Tue, Nov 21, 2017 at 2:28 AM, Nico Kruber  wrote:
> > Hi Shankara,
> > sorry for the late response, but honestly, I cannot think of a reason that
> > some of your program's classes (using only a single jar file) are found
> > some
> > others are not, except for the class not being in the jar.
> > 
> > Or there's some class loader issue in the Flink Beam runner (which I find
> > unlikely though) - maybe Aljoscha (cc'd) can elaborate a bit more on the
> > Beam
> > side and has some other idea.
> > 
> > 
> > Nico
> > 
> > On Tuesday, 14 November 2017 14:54:28 CET Shankara wrote:
> > > Hi Nico,
> > > 
> > > 
> > > - how do you run the job?
> > > 
> > >>> If we run same program in flink local then it works fine. For
> > > 
> > > flink local we used command line
> > > 
> > >   mvn package exec:java
> > > 
> > > -Dexec.mainClass=com.huawei.ccn.intelliom.ims.tmon.TMon
> > > -Dexec.args="--threshold=Measurment:0:4001:1:90:85:CPU
> > > --broker=192.168.56.1:9092" -Pflink-runner
> > > 
> > >When we use flink cluster and submit jar using web UI then we are
> > > 
> > > getting exception. like below
> > >  > 
> > n4.nabble.com/file/t1
> > 
> > > 169/image953.png>
> > > 
> > >  Exception :
> > >  > 
> > n4.nabble.com/file/t1
> > 
> > > 169/image_%281%29.png>
> > > 
> > > - how do you add/include the jar with the missing class?
> > > 
> > >>> We are generating the linked jar using the maven-jar-plugin.
> > 
> > And
> > 
> > > in the bundled jar all the protobuf generated class exist. There is no
> > > missing class.
> > > 
> > > - is that jar file part of your program's jar or separate?
> > > 
> > >>> since we are using the jar-plugin, the protobuf jar is also
> > 
> > part
> > 
> > > of the generated jar.
> > > 
> > > - is the missing class, i.e. "com.huawei.ccn.intelliom.ims.
> > 
> > MeasurementTable
> > 
> > > $measurementTable" (an inner class starting in lower-case?), really in
> > 
> > the
> > 
> > > jar
> > > file? It might be a wrongly generated protobuf class ...
> > > 
> > >>> sub Class is exit in Protobuf generated class. Please find the
> > > 
> > > attached class.
> > > 
> > >  > 
> > n4.nabble.com/file/t1
> > 
> > > 169/Selection_028.png>
> > > 
> > > Thanks,
> > > Shankara
> > > 
> > > 
> > > 
> > > --
> > > Sent from:
> > > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/



signature.asc
Description: This is a digitally signed message part.


Re: Getting java.lang.ClassNotFoundException: for protobuf generated class

2017-11-21 Thread Gordon Weakliem
Isn't one cause for ClassNotFoundException that the class can't load due to
failed dependencies or a failure in a static constructor?

If jar -tf target/program.jar | grep MeasurementTable shows the class is
present, are there other dependencies missing? You may need to add runtime
dependencies into your pom or gradle.build file.

On Tue, Nov 21, 2017 at 2:28 AM, Nico Kruber  wrote:

> Hi Shankara,
> sorry for the late response, but honestly, I cannot think of a reason that
> some of your program's classes (using only a single jar file) are found
> some
> others are not, except for the class not being in the jar.
>
> Or there's some class loader issue in the Flink Beam runner (which I find
> unlikely though) - maybe Aljoscha (cc'd) can elaborate a bit more on the
> Beam
> side and has some other idea.
>
>
> Nico
>
>
> On Tuesday, 14 November 2017 14:54:28 CET Shankara wrote:
> > Hi Nico,
> >
> >
> > - how do you run the job?
> >
> >>> If we run same program in flink local then it works fine. For
> >
> > flink local we used command line
> >   mvn package exec:java
> > -Dexec.mainClass=com.huawei.ccn.intelliom.ims.tmon.TMon
> > -Dexec.args="--threshold=Measurment:0:4001:1:90:85:CPU
> > --broker=192.168.56.1:9092" -Pflink-runner
> >
> >When we use flink cluster and submit jar using web UI then we are
> > getting exception. like below
> >  n4.nabble.com/file/t1
> > 169/image953.png>
> >
> >  Exception :
> >
> >  n4.nabble.com/file/t1
> > 169/image_%281%29.png>
> >
> > - how do you add/include the jar with the missing class?
> >
> >>> We are generating the linked jar using the maven-jar-plugin.
> And
> >
> > in the bundled jar all the protobuf generated class exist. There is no
> > missing class.
> >
> > - is that jar file part of your program's jar or separate?
> >
> >>> since we are using the jar-plugin, the protobuf jar is also
> part
> >
> > of the generated jar.
> >
> > - is the missing class, i.e. "com.huawei.ccn.intelliom.ims.
> MeasurementTable
> > $measurementTable" (an inner class starting in lower-case?), really in
> the
> > jar
> > file? It might be a wrongly generated protobuf class ...
> >
> >>> sub Class is exit in Protobuf generated class. Please find the
> >
> > attached class.
> >
> >  n4.nabble.com/file/t1
> > 169/Selection_028.png>
> >
> > Thanks,
> > Shankara
> >
> >
> >
> > --
> > Sent from:
> > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
>
>


-- 
[image: Img]
*  Gordon Weakliem*|  Sr. Software Engineer
  *O *303.493.5490
*  Boulder* | NYC | London




CONFIDENTIALITY. This communication is intended only for the use of the
intended recipient(s) and contains information that is privileged and
confidential. As a recipient of this confidential and proprietary
information, you are prohibited from distributing this information outside
of sovrn. Further, if you are not the intended recipient, please note that
any dissemination of this communication is prohibited. If you have received
this communication in error, please erase all copies of the message,
including all attachments, and please also notify the sender immediately.
Thank you for your cooperation.


Re: Getting java.lang.ClassNotFoundException: for protobuf generated class

2017-11-21 Thread Nico Kruber
Hi Shankara,
sorry for the late response, but honestly, I cannot think of a reason that 
some of your program's classes (using only a single jar file) are found some 
others are not, except for the class not being in the jar.

Or there's some class loader issue in the Flink Beam runner (which I find 
unlikely though) - maybe Aljoscha (cc'd) can elaborate a bit more on the Beam 
side and has some other idea.


Nico


On Tuesday, 14 November 2017 14:54:28 CET Shankara wrote:
> Hi Nico,
> 
> 
> - how do you run the job?
> 
>>> If we run same program in flink local then it works fine. For
> 
> flink local we used command line
>   mvn package exec:java
> -Dexec.mainClass=com.huawei.ccn.intelliom.ims.tmon.TMon
> -Dexec.args="--threshold=Measurment:0:4001:1:90:85:CPU
> --broker=192.168.56.1:9092" -Pflink-runner
> 
>When we use flink cluster and submit jar using web UI then we are
> getting exception. like below
>  169/image953.png>
> 
>  Exception :
> 
>  169/image_%281%29.png>
> 
> - how do you add/include the jar with the missing class?
> 
>>> We are generating the linked jar using the maven-jar-plugin. And
> 
> in the bundled jar all the protobuf generated class exist. There is no
> missing class.
> 
> - is that jar file part of your program's jar or separate?
> 
>>> since we are using the jar-plugin, the protobuf jar is also part
> 
> of the generated jar.
> 
> - is the missing class, i.e. "com.huawei.ccn.intelliom.ims.MeasurementTable
> $measurementTable" (an inner class starting in lower-case?), really in the
> jar
> file? It might be a wrongly generated protobuf class ...
> 
>>> sub Class is exit in Protobuf generated class. Please find the
> 
> attached class.
> 
>  169/Selection_028.png>
> 
> Thanks,
> Shankara
> 
> 
> 
> --
> Sent from:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/



signature.asc
Description: This is a digitally signed message part.


Re: Getting java.lang.ClassNotFoundException: for protobuf generated class

2017-11-14 Thread Shankara
Hi Nico,


- how do you run the job?  
   >> If we run same program in flink local then it works fine. For
flink local we used command line
  mvn package exec:java
-Dexec.mainClass=com.huawei.ccn.intelliom.ims.tmon.TMon 
-Dexec.args="--threshold=Measurment:0:4001:1:90:85:CPU
--broker=192.168.56.1:9092" -Pflink-runner

   When we use flink cluster and submit jar using web UI then we are
getting exception. like below

 

 Exception : 
   

 

- how do you add/include the jar with the missing class? 
   >> We are generating the linked jar using the maven-jar-plugin. And
in the bundled jar all the protobuf generated class exist. There is no
missing class. 

- is that jar file part of your program's jar or separate? 
   >> since we are using the jar-plugin, the protobuf jar is also part
of the generated jar.

- is the missing class, i.e. "com.huawei.ccn.intelliom.ims.MeasurementTable
$measurementTable" (an inner class starting in lower-case?), really in the
jar
file? It might be a wrongly generated protobuf class ...
   >> sub Class is exit in Protobuf generated class. Please find the
attached class.
 

 

Thanks,
Shankara



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/