You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by Nick Burch <ap...@gagravarr.org> on 2014/08/28 08:11:32 UTC

Trunk broken - forbidden API check failing

Hi All

Anyone know about this, which is causing trunk to not build, triggering 
during creating the bundle:

[ERROR] BUILD FAILURE
[INFO] 
------------------------------------------------------------------------
[INFO] Check for forbidden API calls failed: 
java.lang.ClassNotFoundException: Loading of class 
com.google.protobuf.Descriptors$Descriptor failed: Not found

Nick

RE: Trunk broken - forbidden API check failing

Posted by Uwe Schindler <uw...@thetaphi.de>.
To me it fails not in forbiddenapis, but while compiling tests of example:

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ tika-example ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to C:\Users\Uwe Schindler\Projects\TIKA\svn\tika-example\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/Uwe Schindler/Projects/TIKA/svn/tika-example/src/test/java/org/apache/tika/example/ContentHandlerExampleTest.java:[28,30] cannot find symbol
  symbol:   class TikaTest
  location: package org.apache.tika

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Nick Burch [mailto:apache@gagravarr.org]
> Sent: Thursday, August 28, 2014 8:12 AM
> To: dev@tika.apache.org
> Subject: Trunk broken - forbidden API check failing
> 
> Hi All
> 
> Anyone know about this, which is causing trunk to not build, triggering during
> creating the bundle:
> 
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Check for forbidden API calls failed:
> java.lang.ClassNotFoundException: Loading of class
> com.google.protobuf.Descriptors$Descriptor failed: Not found
> 
> Nick


Re: Trunk broken - forbidden API check failing

Posted by Tyler Palsulich <tp...@gmail.com>.
I'll update the site later today about the Java version.

Good catch, Tim! I just looked at the dependencies, not the test-jar.

Tyler
On Aug 29, 2014 1:04 AM, "Mattmann, Chris A (3980)" <
chris.a.mattmann@jpl.nasa.gov> wrote:

> Thanks TA
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Chris Mattmann, Ph.D.
> Chief Architect
> Instrument Software and Science Data Systems Section (398)
> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
> Office: 168-519, Mailstop: 168-527
> Email: chris.a.mattmann@nasa.gov
> WWW:  http://sunset.usc.edu/~mattmann/
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Adjunct Associate Professor, Computer Science Department
> University of Southern California, Los Angeles, CA 90089 USA
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
>
> -----Original Message-----
> From: <Allison>, "Timothy B." <ta...@mitre.org>
> Reply-To: "dev@tika.apache.org" <de...@tika.apache.org>
> Date: Thursday, August 28, 2014 12:30 PM
> To: "dev@tika.apache.org" <de...@tika.apache.org>
> Subject: RE: Trunk broken - forbidden API check failing
>
> >The issue (I think) is that the tika-examples pom is pulling test-jar
> >from tika-core, not tika-parsers where TikaTest lives.
> >
> >Fixed in trunk r1621185.
> >
> >
> >>I don't know why the TikaTest imports are failing. Other tika-parser
> >>classes aren't a problem.
> >
> >>Thanks for the quick response and patch, Uwe.
>
>

Re: Trunk broken - forbidden API check failing

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
Thanks TA

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: <Allison>, "Timothy B." <ta...@mitre.org>
Reply-To: "dev@tika.apache.org" <de...@tika.apache.org>
Date: Thursday, August 28, 2014 12:30 PM
To: "dev@tika.apache.org" <de...@tika.apache.org>
Subject: RE: Trunk broken - forbidden API check failing

>The issue (I think) is that the tika-examples pom is pulling test-jar
>from tika-core, not tika-parsers where TikaTest lives.
>
>Fixed in trunk r1621185.
>
>
>>I don't know why the TikaTest imports are failing. Other tika-parser
>>classes aren't a problem.
>
>>Thanks for the quick response and patch, Uwe.


RE: Trunk broken - forbidden API check failing

Posted by "Allison, Timothy B." <ta...@mitre.org>.
The issue (I think) is that the tika-examples pom is pulling test-jar from tika-core, not tika-parsers where TikaTest lives.

Fixed in trunk r1621185.


>I don't know why the TikaTest imports are failing. Other tika-parser
>classes aren't a problem.

>Thanks for the quick response and patch, Uwe.

RE: Trunk broken - forbidden API check failing

Posted by Nick Burch <ap...@gagravarr.org>.
On Thu, 28 Aug 2014, Tyler Palsulich wrote:
> Quick unrelated question: to resolve that issue, we're using Locale.ROOT 
> (from Java 1.6). Our default Maven target is 1.6. But, on the website, 
> we list Java 1.5 as the minimum. What exactly is the minimum?

I believe we switched to 1.6 a year or two back. There was probably even a 
vote...

> I don't know why the TikaTest imports are failing. Other tika-parser
> classes aren't a problem.

Nor me. Works in Eclipse, fails in Maven on the command line. The corner 
shop is all out of goats, so I've nothing to offer to the gods of maven to 
ask their help with solving this... Maybe someone else can have more luck 
;-)

Nick

RE: Trunk broken - forbidden API check failing

Posted by Tyler Palsulich <tp...@gmail.com>.
> hrm, I thought Tyler disabled this?
I re-enabled forbidden-apis once it was passing again. But, the issue isn't
resolved yet.

Quick unrelated question: to resolve that issue, we're using Locale.ROOT
(from Java 1.6). Our default Maven target is 1.6. But, on the website, we
list Java 1.5 as the minimum. What exactly is the minimum?

I don't know why the TikaTest imports are failing. Other tika-parser
classes aren't a problem.

Thanks for the quick response and patch, Uwe.

RE: Trunk broken - forbidden API check failing

Posted by Nick Burch <ap...@gagravarr.org>.
On Thu, 28 Aug 2014, Uwe Schindler wrote:
> Patch, the attachment go lost (I have no commits rights):

Ta, committed in r1621077 (along with a comment on why we do it)

(I'll leave commenting on why the bundler works like that, and why the 
examples isn't pulling in the asserts from the Tika Core Tests to someone 
else...)

Nick

RE: Trunk broken - forbidden API check failing

Posted by Uwe Schindler <uw...@thetaphi.de>.
Patch, the attachment go lost (I have no commits rights):

Index: tika-bundle/pom.xml
===================================================================
--- tika-bundle/pom.xml	(revision 1621062)
+++ tika-bundle/pom.xml	(working copy)
@@ -251,6 +251,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>de.thetaphi</groupId>
+        <artifactId>forbiddenapis</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>


-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Thursday, August 28, 2014 9:23 AM
> To: dev@tika.apache.org
> Subject: RE: Trunk broken - forbidden API check failing
> 
> Hi,
> The example problem is another problem, the problem in tika-bundle is
> another one:
> 
> If you run the maven build after "mvn clean", it works. As the bundle has no
> classes, the forbidden-api checker just logs a notice that there are no classes.
> All fine :-)
> 
> The problem happens on a second build:
> 
> During the first build, while building the bundle, something in the build chain
> extracts all classes from all jar files to target/classes (which is against Maven
> standards). If you then run the build again, without doing "mvn clean"
> before, forbidden-apis picks the classes extracted to target/classes in the
> previous run and scans them. While doing this it fails because of a
> dependency problem.
> 
> In my opinion there is something wrong: target/classes should only contain
> classes compiled from source folder. The bad guy is here the workaround for
> TIKA-763 (Workaround to avoid including LGPL classes): The maven-
> dependncy plugin is used to extract the classes of netcdf to the classes
> folder.
> 
> To fix: As the maven-bundle plugin contains no classes to check, the easiest is
> to disable the plugin for this module. Attached is a patch to do this!
> 
> Uwe
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
> 
> 
> > -----Original Message-----
> > From: Uwe Schindler [mailto:uwe@thetaphi.de]
> > Sent: Thursday, August 28, 2014 8:58 AM
> > To: 'dev@tika.apache.org'
> > Subject: RE: Trunk broken - forbidden API check failing
> >
> > To me it fails not in forbiddenapis, but while compiling tests of example:
> >
> > [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile)
> > @ tika-example --- [INFO] Changes detected - recompiling the module!
> > [INFO] Compiling 4 source files to C:\Users\Uwe
> > Schindler\Projects\TIKA\svn\tika-example\target\test-classes
> > [INFO] -------------------------------------------------------------
> > [ERROR] COMPILATION ERROR :
> > [INFO] -------------------------------------------------------------
> > [ERROR] /C:/Users/Uwe Schindler/Projects/TIKA/svn/tika-
> >
> example/src/test/java/org/apache/tika/example/ContentHandlerExampleT
> > est.java:[28,30] cannot find symbol
> >   symbol:   class TikaTest
> >   location: package org.apache.tika
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >
> > > -----Original Message-----
> > > From: Nick Burch [mailto:apache@gagravarr.org]
> > > Sent: Thursday, August 28, 2014 8:12 AM
> > > To: dev@tika.apache.org
> > > Subject: Trunk broken - forbidden API check failing
> > >
> > > Hi All
> > >
> > > Anyone know about this, which is causing trunk to not build,
> > > triggering during creating the bundle:
> > >
> > > [ERROR] BUILD FAILURE
> > > [INFO]
> > > --------------------------------------------------------------------
> > > --
> > > -- [INFO] Check for forbidden API calls failed:
> > > java.lang.ClassNotFoundException: Loading of class
> > > com.google.protobuf.Descriptors$Descriptor failed: Not found
> > >
> > > Nick


RE: Trunk broken - forbidden API check failing

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,
The example problem is another problem, the problem in tika-bundle is another one:

If you run the maven build after "mvn clean", it works. As the bundle has no classes, the forbidden-api checker just logs a notice that there are no classes. All fine :-)

The problem happens on a second build:

During the first build, while building the bundle, something in the build chain extracts all classes from all jar files to target/classes (which is against Maven standards). If you then run the build again, without doing "mvn clean" before, forbidden-apis picks the classes extracted to target/classes in the previous run and scans them. While doing this it fails because of a dependency problem.

In my opinion there is something wrong: target/classes should only contain classes compiled from source folder. The bad guy is here the workaround for TIKA-763 (Workaround to avoid including LGPL classes): The maven-dependncy plugin is used to extract the classes of netcdf to the classes folder.

To fix: As the maven-bundle plugin contains no classes to check, the easiest is to disable the plugin for this module. Attached is a patch to do this!

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Thursday, August 28, 2014 8:58 AM
> To: 'dev@tika.apache.org'
> Subject: RE: Trunk broken - forbidden API check failing
> 
> To me it fails not in forbiddenapis, but while compiling tests of example:
> 
> [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
> tika-example --- [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 4 source files to C:\Users\Uwe
> Schindler\Projects\TIKA\svn\tika-example\target\test-classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] /C:/Users/Uwe Schindler/Projects/TIKA/svn/tika-
> example/src/test/java/org/apache/tika/example/ContentHandlerExampleT
> est.java:[28,30] cannot find symbol
>   symbol:   class TikaTest
>   location: package org.apache.tika
> 
> Uwe
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
> 
> 
> > -----Original Message-----
> > From: Nick Burch [mailto:apache@gagravarr.org]
> > Sent: Thursday, August 28, 2014 8:12 AM
> > To: dev@tika.apache.org
> > Subject: Trunk broken - forbidden API check failing
> >
> > Hi All
> >
> > Anyone know about this, which is causing trunk to not build,
> > triggering during creating the bundle:
> >
> > [ERROR] BUILD FAILURE
> > [INFO]
> > ----------------------------------------------------------------------
> > -- [INFO] Check for forbidden API calls failed:
> > java.lang.ClassNotFoundException: Loading of class
> > com.google.protobuf.Descriptors$Descriptor failed: Not found
> >
> > Nick

Re: Trunk broken - forbidden API check failing

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
hrm, I thought Tyler disabled this?

I'm behind on cutting the RC #2, but if I can get some
time to do so tomorrow I'll try this out.

Cheers,
Chris


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: Nick Burch <ap...@gagravarr.org>
Reply-To: "dev@tika.apache.org" <de...@tika.apache.org>
Date: Wednesday, August 27, 2014 11:11 PM
To: "dev@tika.apache.org" <de...@tika.apache.org>
Subject: Trunk broken - forbidden API check failing

>Hi All
>
>Anyone know about this, which is causing trunk to not build, triggering
>during creating the bundle:
>
>[ERROR] BUILD FAILURE
>[INFO] 
>------------------------------------------------------------------------
>[INFO] Check for forbidden API calls failed:
>java.lang.ClassNotFoundException: Loading of class
>com.google.protobuf.Descriptors$Descriptor failed: Not found
>
>Nick