You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Omar Chiyean <om...@gmail.com> on 2010/04/21 00:41:33 UTC

Problems compiling pdfbox1.1.0

Hi there...
When compiling with maven pdfbox1.1.0 i get this error:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
/Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be applied
to (int)

How can I fix it?
Has any one of you have this error?

Thanks in advance.
Im using MacOS 10.5.7 and java 1.5, for the record

Date issues in several JIRA project can be resolved with an additional patch I provided.

Posted by "Lenahan, Peter" <Pe...@ibi.com>.
https://issues.apache.org/jira/browse/PDFBOX-643 Only resolved a small number of the date issues.

I looked at the date issue described in PDFBOX-643 and it is only a partial fix for a much complained about problem.
I posted another patch in project PDFBOX-643, which includes patches for several other related date issues.

I also linked the projects, with this patch I think we can close all of them.

PDFBOX-164-PDFBOX-170-PDFBOX-402-PDFBOX-465-patch.txt, these are all in the same file, and very similar issues.
All having to do with SimpleDateFormat.

Could someone possibly apply the patch to the trunk version?

Thanks,
Peter


PDFBOX 465

Posted by "Lenahan, Peter" <Pe...@ibi.com>.
Jukka,

There were 2 reports of problems with parsing dates for this problem.
In JIRA, I supplied a test program that corrects the issues, but I saw that there were no watchers.
Does this mean that no one sees the fix?

https://issues.apache.org/jira/browse/PDFBOX-465

I fixed the problem in my version and was wondering if someone could take a look and put the changes into the main code.
It is a really simple fix, just adding additional date formats for the array of formats, in the date parser.

(You might remember me, from Apache Con in Oakland, I needed the unlock code for my phone and you found it really fast on the web.)

Thanks,
Peter

Re: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
No luck Daniel, the jar isn't created in the target directory...
Need to be all compiled and tested...

2010/4/21 Omar Chiyean <om...@gmail.com>

> Ok Daniel...
> I will probe if there no are errors in use...
>
> Tnx!!
>
> 2010/4/21 Daniel Wilson <wi...@gmail.com>
>
> Omar, you did get it to compile if it ran the tests.
>>
>> The test failed ... whether due to missing test case files or something
>> else, I'm not sure.
>>
>> But if you just need the compiled JAR file, you now have it.
>>
>> Daniel
>>
>> On Wed, Apr 21, 2010 at 10:44 AM, Omar Chiyean <omar.chiyean@gmail.com
>> >wrote:
>>
>> > Hey Jukka,  i found what whas the error.
>> > I have installed old jars of pdfbox1.0.0 and other jars in my lib/ext of
>> > java home directory.
>> >
>> > I removed them from there and it compiled, but i can't still get
>> compiled
>> > at
>> > all.
>> > Now I have this error:
>> >
>> > -------------------------------------------------------
>> >  T E S T S
>> > -------------------------------------------------------
>> > Running org.apache.pdfbox.TestAll
>> > Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.318
>> sec
>> > Running org.apache.pdfbox.util.TestTextStripper
>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.515
>> sec
>> > <<< FAILURE!
>> >
>> > Results :
>> >
>> > Failed tests:
>> >  testExtract(org.apache.pdfbox.util.TestTextStripper)
>> >
>> > Tests run: 10, Failures: 1, Errors: 0, Skipped: 0
>> >
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [ERROR] BUILD FAILURE
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] There are test failures.
>> >
>> > Please refer to
>> >
>> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/target/surefire-reports
>> > for the individual test results.
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] For more information, run Maven with the -e switch
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] Total time: 34 seconds
>> > [INFO] Finished at: Wed Apr 21 09:40:24 CDT 2010
>> > [INFO] Final Memory: 33M/63M
>> > [INFO]
>> > ------------------------------------------------------------------------
>> >
>> > This is the new downloaded source without modifications...
>> > Do you now any issue of this??
>> >
>> > Tnx in advance.
>> >
>>
>
>

Re: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
Ok Daniel...
I will probe if there no are errors in use...

Tnx!!

2010/4/21 Daniel Wilson <wi...@gmail.com>

> Omar, you did get it to compile if it ran the tests.
>
> The test failed ... whether due to missing test case files or something
> else, I'm not sure.
>
> But if you just need the compiled JAR file, you now have it.
>
> Daniel
>
> On Wed, Apr 21, 2010 at 10:44 AM, Omar Chiyean <omar.chiyean@gmail.com
> >wrote:
>
> > Hey Jukka,  i found what whas the error.
> > I have installed old jars of pdfbox1.0.0 and other jars in my lib/ext of
> > java home directory.
> >
> > I removed them from there and it compiled, but i can't still get compiled
> > at
> > all.
> > Now I have this error:
> >
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > Running org.apache.pdfbox.TestAll
> > Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.318 sec
> > Running org.apache.pdfbox.util.TestTextStripper
> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.515 sec
> > <<< FAILURE!
> >
> > Results :
> >
> > Failed tests:
> >  testExtract(org.apache.pdfbox.util.TestTextStripper)
> >
> > Tests run: 10, Failures: 1, Errors: 0, Skipped: 0
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] There are test failures.
> >
> > Please refer to
> >
> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/target/surefire-reports
> > for the individual test results.
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 34 seconds
> > [INFO] Finished at: Wed Apr 21 09:40:24 CDT 2010
> > [INFO] Final Memory: 33M/63M
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > This is the new downloaded source without modifications...
> > Do you now any issue of this??
> >
> > Tnx in advance.
> >
>

Re: Problems compiling pdfbox1.1.0

Posted by Daniel Wilson <wi...@gmail.com>.
Omar, you did get it to compile if it ran the tests.

The test failed ... whether due to missing test case files or something
else, I'm not sure.

But if you just need the compiled JAR file, you now have it.

Daniel

On Wed, Apr 21, 2010 at 10:44 AM, Omar Chiyean <om...@gmail.com>wrote:

> Hey Jukka,  i found what whas the error.
> I have installed old jars of pdfbox1.0.0 and other jars in my lib/ext of
> java home directory.
>
> I removed them from there and it compiled, but i can't still get compiled
> at
> all.
> Now I have this error:
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.pdfbox.TestAll
> Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.318 sec
> Running org.apache.pdfbox.util.TestTextStripper
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.515 sec
> <<< FAILURE!
>
> Results :
>
> Failed tests:
>  testExtract(org.apache.pdfbox.util.TestTextStripper)
>
> Tests run: 10, Failures: 1, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] There are test failures.
>
> Please refer to
> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/target/surefire-reports
> for the individual test results.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 34 seconds
> [INFO] Finished at: Wed Apr 21 09:40:24 CDT 2010
> [INFO] Final Memory: 33M/63M
> [INFO]
> ------------------------------------------------------------------------
>
> This is the new downloaded source without modifications...
> Do you now any issue of this??
>
> Tnx in advance.
>

Re: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
Hey Jukka,  i found what whas the error.
I have installed old jars of pdfbox1.0.0 and other jars in my lib/ext of
java home directory.

I removed them from there and it compiled, but i can't still get compiled at
all.
Now I have this error:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.pdfbox.TestAll
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.318 sec
Running org.apache.pdfbox.util.TestTextStripper
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.515 sec
<<< FAILURE!

Results :

Failed tests:
  testExtract(org.apache.pdfbox.util.TestTextStripper)

Tests run: 10, Failures: 1, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to
/Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/target/surefire-reports
for the individual test results.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 34 seconds
[INFO] Finished at: Wed Apr 21 09:40:24 CDT 2010
[INFO] Final Memory: 33M/63M
[INFO]
------------------------------------------------------------------------

This is the new downloaded source without modifications...
Do you now any issue of this??

Tnx in advance.

Re: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
This is what i got in o.a.p.cos.COSInteger.java from line 79


    public static COSInteger get(long val) {

        if (LOW <= val && val <= HIGH) {

            int index = (int) val - LOW;

            // no synchronization needed

            if (STATIC[index] == null) {

                STATIC[index] = new COSInteger(val);

            }

            return STATIC[index];

        } else {

            return new COSInteger(val);

        }

    }

And this is what i got in TestCOSInteger.java at line 34


            Assert.assertEquals(i, COSInteger.get(i).intValue());
So i guess that i'm going to download again source and compile it without
modifications...

Tnx, i'll be in touch...

2010/4/21 Jukka Zitting <ju...@gmail.com>

> Hi,
>
> On Wed, Apr 21, 2010 at 3:39 PM, Omar Chiyean <om...@gmail.com>
> wrote:
> > By the way no modification to this files...
> > On other files i've made modifications but not from o.a.p.cos
>
> Can you check that line 79 of your copy of
> src/main/java/org/apache/pdfbox/cos/COSInteger.java is:
>
>    public static COSInteger get(long val) {
>
> and that line 34 of src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java
> is:
>
>    Assert.assertEquals(i, COSInteger.get(i).intValue());
>
> You may also want to try re-downloading the sources and doing a fresh
> compile without local modifications to any files.
>
> BR,
>
> Jukka Zitting
>

Re: Problems compiling pdfbox1.1.0

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Apr 21, 2010 at 3:39 PM, Omar Chiyean <om...@gmail.com> wrote:
> By the way no modification to this files...
> On other files i've made modifications but not from o.a.p.cos

Can you check that line 79 of your copy of
src/main/java/org/apache/pdfbox/cos/COSInteger.java is:

    public static COSInteger get(long val) {

and that line 34 of src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java is:

    Assert.assertEquals(i, COSInteger.get(i).intValue());

You may also want to try re-downloading the sources and doing a fresh
compile without local modifications to any files.

BR,

Jukka Zitting

Re: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
By the way no modification to this files...
On other files i've made modifications but not from o.a.p.cos


2010/4/21 Omar Chiyean <om...@gmail.com>

> Hi Jukka. I've downloaded and placed this two classes, but with no luck.
> I'm still getting the same error in the same line...
> This is what I get:
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
> get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be applied
> to (int)
>
> What could it be?
> Is there a way to clean java cache??
>
> For the compilation i'm using maven 2.2.0
> the instruction is:
> mvn clean install
>
> Tnx in advance...
>
> 2010/4/21 Jukka Zitting <ju...@gmail.com>
>
> Hi,
>>
>> On Wed, Apr 21, 2010 at 2:41 AM, Omar Chiyean <om...@gmail.com>
>> wrote:
>> > When compiling with maven pdfbox1.1.0 i get this error:
>> > [...]
>> > [INFO] Compilation failure
>> >
>> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
>> > get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be
>> applied
>> > to (int)
>>
>> This line of code is trying to invoke the COSInteger.get(long) method
>> found on line 79 of o.a.p.cos.COSInteger [1]. In your case it looks
>> like it's falling back to the parent class method
>> COSNumber.get(String) (line 77, [2]).
>>
>> Have you modified the COSInteger class in your copy of the sources?
>>
>> [1]
>> http://svn.apache.org/viewvc/pdfbox/tags/1.1.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInteger.java?view=markup
>> [2]
>> http://svn.apache.org/viewvc/pdfbox/tags/1.1.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSNumber.java?view=markup
>>
>> BR,
>>
>> Jukka Zitting
>>
>
>

Re: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
Hi Jukka. I've downloaded and placed this two classes, but with no luck.
I'm still getting the same error in the same line...
This is what I get:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
/Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be applied
to (int)

What could it be?
Is there a way to clean java cache??

For the compilation i'm using maven 2.2.0
the instruction is:
mvn clean install

Tnx in advance...

2010/4/21 Jukka Zitting <ju...@gmail.com>

> Hi,
>
> On Wed, Apr 21, 2010 at 2:41 AM, Omar Chiyean <om...@gmail.com>
> wrote:
> > When compiling with maven pdfbox1.1.0 i get this error:
> > [...]
> > [INFO] Compilation failure
> >
> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
> > get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be
> applied
> > to (int)
>
> This line of code is trying to invoke the COSInteger.get(long) method
> found on line 79 of o.a.p.cos.COSInteger [1]. In your case it looks
> like it's falling back to the parent class method
> COSNumber.get(String) (line 77, [2]).
>
> Have you modified the COSInteger class in your copy of the sources?
>
> [1]
> http://svn.apache.org/viewvc/pdfbox/tags/1.1.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInteger.java?view=markup
> [2]
> http://svn.apache.org/viewvc/pdfbox/tags/1.1.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSNumber.java?view=markup
>
> BR,
>
> Jukka Zitting
>

Re: Problems compiling pdfbox1.1.0

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Apr 21, 2010 at 2:41 AM, Omar Chiyean <om...@gmail.com> wrote:
> When compiling with maven pdfbox1.1.0 i get this error:
> [...]
> [INFO] Compilation failure
> /Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
> get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be applied
> to (int)

This line of code is trying to invoke the COSInteger.get(long) method
found on line 79 of o.a.p.cos.COSInteger [1]. In your case it looks
like it's falling back to the parent class method
COSNumber.get(String) (line 77, [2]).

Have you modified the COSInteger class in your copy of the sources?

[1] http://svn.apache.org/viewvc/pdfbox/tags/1.1.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInteger.java?view=markup
[2] http://svn.apache.org/viewvc/pdfbox/tags/1.1.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSNumber.java?view=markup

BR,

Jukka Zitting

Fwd: Problems compiling pdfbox1.1.0

Posted by Omar Chiyean <om...@gmail.com>.
Hi there...
When compiling with maven pdfbox1.1.0 i get this error:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
/Users/ochiyean/Downloads/java/pdfbox-1.1.0/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java:[34,45]
get(java.lang.String) in org.apache.pdfbox.cos.COSNumber cannot be applied
to (int)

How can I fix it?
Has any one of you have this error?

Thanks in advance.
Im using MacOS 10.5.7 and java 1.5, for the record