Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

marcopas
Hi there,

for one of my projects i am using the Grails Rendering plugin,
unfortunately this plugin dies on my when combining the plugin with the
Jasper reports plugin.

When trying to render a pdf a get an error:

java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

Any idea how to fix this?

/Marco

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

mmorett
FWIW, I saw that same error message today while trying out the Rendering plugin for the first time.  I'm on Grails 2.0.3.  That might have something to do with it.  As for me, I bailed on the Rendering plugin and still on the hunt for a GSP to PDF solution.  I really don't want to have to code up a separate "report" that differs from the GSP which was already coded and has the information I need, presented in the manner in which I need it.

If you find out the answer to that issue, I'd take another look at the Rendering plugin (even though the documentation is pretty light with little to no examples).

Michael.
Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

ld@ldaley.com

On 05/04/2012, at 2:08 AM, mmorett wrote:

> FWIW, I saw that same error message today while trying out the Rendering
> plugin for the first time.  I'm on Grails 2.0.3.  That might have something
> to do with it.  As for me, I bailed on the Rendering plugin and still on the
> hunt for a GSP to PDF solution.  I really don't want to have to code up a
> separate "report" that differs from the GSP which was already coded and has
> the information I need, presented in the manner in which I need it.
>
> If you find out the answer to that issue, I'd take another look at the
> Rendering plugin (even though the documentation is pretty light with little
> to no examples).

Googling for ‘java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C] grails’ reveals lots of already asked questions for this.

It's a dependency conflict between iText versions.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

marcopas
The cause of the problem seems not to be the iText version but the
Flying Saucer version that is compiled against a specific version of
iText.
I seem to get the problem solved by downloading the source of the
Flying Saucer and re-compile that againts the newer version of iText..
Placing the resulting core-renderer.jar file in the /lib folder and
renaming that to core-renderer-R8 seems to solve my problem. So i
guess it is not iText
but Flying Saucer..

/Marco

2012/4/5 [hidden email] <[hidden email]>:

>
> On 05/04/2012, at 2:08 AM, mmorett wrote:
>
>> FWIW, I saw that same error message today while trying out the Rendering
>> plugin for the first time.  I'm on Grails 2.0.3.  That might have something
>> to do with it.  As for me, I bailed on the Rendering plugin and still on the
>> hunt for a GSP to PDF solution.  I really don't want to have to code up a
>> separate "report" that differs from the GSP which was already coded and has
>> the information I need, presented in the manner in which I need it.
>>
>> If you find out the answer to that issue, I'd take another look at the
>> Rendering plugin (even though the documentation is pretty light with little
>> to no examples).
>
> Googling for ‘java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C] grails’ reveals lots of already asked questions for this.
>
> It's a dependency conflict between iText versions.
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

basejump (Josh)
It would be easier to exclude the newer itext core renderer dependency for jasper in BuildConfig.
Also, i believe you can exclude the core-render dependency for the redering plugin and rely on the newer one in jasper and it will work fine.
Thats what Luke meant by its a "dependency conflict"

On Apr 5, 2012, at 8:47 AM, Marco Pas wrote:

> The cause of the problem seems not to be the iText version but the
> Flying Saucer version that is compiled against a specific version of
> iText.
> I seem to get the problem solved by downloading the source of the
> Flying Saucer and re-compile that againts the newer version of iText..
> Placing the resulting core-renderer.jar file in the /lib folder and
> renaming that to core-renderer-R8 seems to solve my problem. So i
> guess it is not iText
> but Flying Saucer..
>
> /Marco


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

basejump (Josh)
In reply to this post by mmorett
The source for the tests has some decent examples and doc contributions are always "very" welcome for open source projects. 

On Apr 4, 2012, at 8:08 PM, mmorett wrote:
...
If you find out the answer to that issue, I'd take another look at the
Rendering plugin (even though the documentation is pretty light with little
to no examples).

Michael.
...
Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

marcopas
In reply to this post by basejump (Josh)
I seem not to be able to exclude it.. :( Could you give an example on
how i could exclude the 'core-renderer' from the rendering plugin?

2012/4/5 Josh (basejump) <[hidden email]>:

> It would be easier to exclude the newer itext core renderer dependency for jasper in BuildConfig.
> Also, i believe you can exclude the core-render dependency for the redering plugin and rely on the newer one in jasper and it will work fine.
> Thats what Luke meant by its a "dependency conflict"
>
> On Apr 5, 2012, at 8:47 AM, Marco Pas wrote:
>
>> The cause of the problem seems not to be the iText version but the
>> Flying Saucer version that is compiled against a specific version of
>> iText.
>> I seem to get the problem solved by downloading the source of the
>> Flying Saucer and re-compile that againts the newer version of iText..
>> Placing the resulting core-renderer.jar file in the /lib folder and
>> renaming that to core-renderer-R8 seems to solve my problem. So i
>> guess it is not iText
>> but Flying Saucer..
>>
>> /Marco
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

basejump (Josh)
does this not work?
http://grails.1312388.n4.nabble.com/Trying-to-exclude-jar-from-being-packaged-in-WAR-td4526572.html

On Apr 5, 2012, at 10:03 AM, Marco Pas wrote:

> I seem not to be able to exclude it.. :( Could you give an example on
> how i could exclude the 'core-renderer' from the rendering plugin?
>
> 2012/4/5 Josh (basejump) <[hidden email]>:
>> It would be easier to exclude the newer itext core renderer dependency for jasper in BuildConfig.
>> Also, i believe you can exclude the core-render dependency for the redering plugin and rely on the newer one in jasper and it will work fine.
>> Thats what Luke meant by its a "dependency conflict"
>>
>> On Apr 5, 2012, at 8:47 AM, Marco Pas wrote:
>>
>>> The cause of the problem seems not to be the iText version but the
>>> Flying Saucer version that is compiled against a specific version of
>>> iText.
>>> I seem to get the problem solved by downloading the source of the
>>> Flying Saucer and re-compile that againts the newer version of iText..
>>> Placing the resulting core-renderer.jar file in the /lib folder and
>>> renaming that to core-renderer-R8 seems to solve my problem. So i
>>> guess it is not iText
>>> but Flying Saucer..
>>>
>>> /Marco
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

marcopas
The challenge sits in the core-renderer-R8 that is shipped with the
Rendering plugin. The core-renderer cannot work with the IText version
that comes with the new Jasper plugin. The Jasper plugin has no
dependencies on the core-renderer-R8. So i have to make a choice,
exclude the IText version shipping with the Jasper Plugin and fallback
to IText 2.1.0 or recompile the core-renderer-R8 against the new IText
version.

Is there a preferred choice?

2012/4/5 Josh (basejump) <[hidden email]>:

> does this not work?
> http://grails.1312388.n4.nabble.com/Trying-to-exclude-jar-from-being-packaged-in-WAR-td4526572.html
>
> On Apr 5, 2012, at 10:03 AM, Marco Pas wrote:
>
>> I seem not to be able to exclude it.. :( Could you give an example on
>> how i could exclude the 'core-renderer' from the rendering plugin?
>>
>> 2012/4/5 Josh (basejump) <[hidden email]>:
>>> It would be easier to exclude the newer itext core renderer dependency for jasper in BuildConfig.
>>> Also, i believe you can exclude the core-render dependency for the redering plugin and rely on the newer one in jasper and it will work fine.
>>> Thats what Luke meant by its a "dependency conflict"
>>>
>>> On Apr 5, 2012, at 8:47 AM, Marco Pas wrote:
>>>
>>>> The cause of the problem seems not to be the iText version but the
>>>> Flying Saucer version that is compiled against a specific version of
>>>> iText.
>>>> I seem to get the problem solved by downloading the source of the
>>>> Flying Saucer and re-compile that againts the newer version of iText..
>>>> Placing the resulting core-renderer.jar file in the /lib folder and
>>>> renaming that to core-renderer-R8 seems to solve my problem. So i
>>>> guess it is not iText
>>>> but Flying Saucer..
>>>>
>>>> /Marco
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

basejump (Josh)
are you saying that you need to compile the flying-saucer code because you are actually making changes to their code to update it to work with a new version of itext?
if thats the case then you seem to indeed be doing the right thing. did you try excluding itext from the jasper and rendering and include it your self?

On Apr 5, 2012, at 1:58 PM, Marco Pas wrote:

> The challenge sits in the core-renderer-R8 that is shipped with the
> Rendering plugin. The core-renderer cannot work with the IText version
> that comes with the new Jasper plugin. The Jasper plugin has no
> dependencies on the core-renderer-R8. So i have to make a choice,
> exclude the IText version shipping with the Jasper Plugin and fallback
> to IText 2.1.0 or recompile the core-renderer-R8 against the new IText
> version.
>
> Is there a preferred choice?
>
> 2012/4/5 Josh (basejump) <[hidden email]>:
>> does this not work?
>> http://grails.1312388.n4.nabble.com/Trying-to-exclude-jar-from-being-packaged-in-WAR-td4526572.html
>>
>> On Apr 5, 2012, at 10:03 AM, Marco Pas wrote:
>>
>>> I seem not to be able to exclude it.. :( Could you give an example on
>>> how i could exclude the 'core-renderer' from the rendering plugin?
>>>
>>> 2012/4/5 Josh (basejump) <[hidden email]>:
>>>> It would be easier to exclude the newer itext core renderer dependency for jasper in BuildConfig.
>>>> Also, i believe you can exclude the core-render dependency for the redering plugin and rely on the newer one in jasper and it will work fine.
>>>> Thats what Luke meant by its a "dependency conflict"
>>>>
>>>> On Apr 5, 2012, at 8:47 AM, Marco Pas wrote:
>>>>
>>>>> The cause of the problem seems not to be the iText version but the
>>>>> Flying Saucer version that is compiled against a specific version of
>>>>> iText.
>>>>> I seem to get the problem solved by downloading the source of the
>>>>> Flying Saucer and re-compile that againts the newer version of iText..
>>>>> Placing the resulting core-renderer.jar file in the /lib folder and
>>>>> renaming that to core-renderer-R8 seems to solve my problem. So i
>>>>> guess it is not iText
>>>>> but Flying Saucer..
>>>>>
>>>>> /Marco
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

marcopas
That is one scenario i did not do yet..

I found this post about the Flying Saucer jar (core-renderer-R8) which
seems to be my problem.
http://code.google.com/p/flying-saucer/issues/detail?id=126

I do not have to change the code but only recompile the source of
Flying Saucer against the new IText version and then it works.
"Unfortunately there is a binary (but not source) incompatibility
between iText 2.0.x and iText 2.1.x"...
So just recompiling seems to solve my problem..

I am open for other suggestions, but as far as i can see, the
recompilation is the only way to make things work without errors.

2012/4/5 Josh (basejump) <[hidden email]>:

> are you saying that you need to compile the flying-saucer code because you are actually making changes to their code to update it to work with a new version of itext?
> if thats the case then you seem to indeed be doing the right thing. did you try excluding itext from the jasper and rendering and include it your self?
>
> On Apr 5, 2012, at 1:58 PM, Marco Pas wrote:
>
>> The challenge sits in the core-renderer-R8 that is shipped with the
>> Rendering plugin. The core-renderer cannot work with the IText version
>> that comes with the new Jasper plugin. The Jasper plugin has no
>> dependencies on the core-renderer-R8. So i have to make a choice,
>> exclude the IText version shipping with the Jasper Plugin and fallback
>> to IText 2.1.0 or recompile the core-renderer-R8 against the new IText
>> version.
>>
>> Is there a preferred choice?
>>
>> 2012/4/5 Josh (basejump) <[hidden email]>:
>>> does this not work?
>>> http://grails.1312388.n4.nabble.com/Trying-to-exclude-jar-from-being-packaged-in-WAR-td4526572.html
>>>
>>> On Apr 5, 2012, at 10:03 AM, Marco Pas wrote:
>>>
>>>> I seem not to be able to exclude it.. :( Could you give an example on
>>>> how i could exclude the 'core-renderer' from the rendering plugin?
>>>>
>>>> 2012/4/5 Josh (basejump) <[hidden email]>:
>>>>> It would be easier to exclude the newer itext core renderer dependency for jasper in BuildConfig.
>>>>> Also, i believe you can exclude the core-render dependency for the redering plugin and rely on the newer one in jasper and it will work fine.
>>>>> Thats what Luke meant by its a "dependency conflict"
>>>>>
>>>>> On Apr 5, 2012, at 8:47 AM, Marco Pas wrote:
>>>>>
>>>>>> The cause of the problem seems not to be the iText version but the
>>>>>> Flying Saucer version that is compiled against a specific version of
>>>>>> iText.
>>>>>> I seem to get the problem solved by downloading the source of the
>>>>>> Flying Saucer and re-compile that againts the newer version of iText..
>>>>>> Placing the resulting core-renderer.jar file in the /lib folder and
>>>>>> renaming that to core-renderer-R8 seems to solve my problem. So i
>>>>>> guess it is not iText
>>>>>> but Flying Saucer..
>>>>>>
>>>>>> /Marco
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

basejump (Josh)
I see. seems recompile is required if you need the newest iText 2.1.x version. If you have a working compiled jar then we can host it on our repo.9ci.com artifactory. Frankly I am surprised that we have not run into this issue but I think we are still using an older version of Jasper.
Are you sure the newer Jasper wont work with iText 2.0.8?

On Apr 5, 2012, at 3:10 PM, Marco Pas wrote:

> That is one scenario i did not do yet..
>
> I found this post about the Flying Saucer jar (core-renderer-R8) which
> seems to be my problem.
> http://code.google.com/p/flying-saucer/issues/detail?id=126
>
> I do not have to change the code but only recompile the source of
> Flying Saucer against the new IText version and then it works.
> "Unfortunately there is a binary (but not source) incompatibility
> between iText 2.0.x and iText 2.1.x"...
> So just recompiling seems to solve my problem..
>
> I am open for other suggestions, but as far as i can see, the


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Rendering Plugin error - java.lang.NoSuchMethodError: com.lowagie.text.pdf.BaseFont.getCharBBox[C]

mmorett
In reply to this post by basejump (Josh)
Hi Josh,

I'd love to contribute back to the docs, if I can just figure out how to get this plugin to work.  ;-)

Looking at the continuation of the conversation by the OP, before I even get to trying it out, I'll likely have to contend with the issue he's seeing with respect to the appropriate version of iText to use and/or recompiling, etc.

What I meant by the documentation being light is that there's no end-to-end explanation of how to get started with even a Hello World type of example.  There are nuggets of explanations of things, but its looks as though, as you suggested, one has to peek into the tests to get a feel for how to use this.  Or maybe I'm just spoiled by the type of documentation Burt Beckwith puts together for the Spring related plugins.  The ckEditor plugin is also nicely documented. In both instances, they layout how to get quickly started and provide end to end examples.

This plugin would be perfect for a lot of folks.