The problem was on line 130 in DynamicImageResource:

final ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(format).next();

This uses the first PNG image writer it finds. Depending on which add-ons are installed, this could vary. In my case, I had loaded the jai-imageio add-on and the first PNG writer in line was:

com.sun.media.imageioimpl.plugins.png.CLibPNGImageWriter

With standard JDK, no add-ons it is:

com.sun.imageio.plugins.png.PNGImageWriter

For some reason, the standard one is happy, but the JAI writer is not. I reinstalled the JDK without JAI, everything is fine.

------------------------

kurt heston wrote:
Looks like my problem is on line 134 of DynamicImageResource:

writer.setOutput(ImageIO.createImageOutputStream(out));
writer.write(image);

after these, "out" is empty. Not sure what the cause is yet...stay tuned.


kurt heston wrote:
I have the asterisk.

I'm in the process of setting up Maven so I can compile wicket. I don't presently use it, this is an excuse to play. :)


Igor Vaynberg wrote:
make sure your servlet mapping has a /* at the end, like /app/* not just /app

-Igor


On 4/30/06, *kurt heston* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I can see that Wicket is rendering my buttons and placing them into
    %CATALINA_HOME%\temp.  If I rename them to .gif and open them in a
    viewer, there they are.

Where should I look for the code that reads the tmp file from the disk
    and sends it to the browser?

    kurt heston wrote:
    > When I'm stepping through the code, the problem goes away.  Still
    > looking...
    >
    > Johan Compagner wrote:
    >> do debug when you just ask for the link in the browser what you
    >> excactly are sending to the browser.
    >> isn't it by accident 0 bytes?
    >>
    >> johan
    >>
    >>
    >> On 4/19/06, * kurt heston* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >> <mailto: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>> wrote:
    >>
>> Is anyone using button shapes as hyperlinks like I am? I was
    >>     coloring a
    >>     bit outside the lines when I wrote the code you see
    below.  Tell
    >> me if
    >>     you are doing it differently.  Maybe doing it another way
    will rid
    >>     me of
    >>     my broken link problem.
    >>
    >>     kurt heston wrote:
    >>     > That particular text message came up in Firefox when I was
    >>     running it
    >>     > on the server.  Running the app from another machine
    produces a
    >>     > similar message (with a different URL).
    >>     >
    >>     > Martijn Dashorst wrote:
    >>     >>
    >>     >>     The image
    >>     >>
    >>     >>     "http://localhost/feeple/?path
    >>     >>
    >>     >>
    >>     >>
    >>
    >>
=78:toppanel:contractList:contractListImg&interface=IResourceListener"
    >>
    >>     >>     cannot be displayed, because it contains errors.
    >>     >>
    >>     >>
    >>     >> Are you running the browser on the same box or on another
    >>     machine? If
    >>     >> your browser is on another box, then the reference to
    >> localhost is
    >>     >> quite strange.
    >>     >>
    >>     >> Martijn
    >>     >>
    >>     >>
    >>     >> On 4/19/06, *kurt heston* < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >>     <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
    >>     >> <mailto: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>>>
    >>     wrote:
    >>     >>
    >>     >>     The code was working fine on my development machine.
    >> However,
    >>     >> when I
    >>     >>     moved it to production (a much faster box), the
    buttons I'm
    >>     >> generating
>> >> all showed up as broken links. Just shooting from the
    >> hip, I'm
    >>     >>     guessing
    >>     >>     something isn't flushing its buffer.
    >>     >>
    >>     >>     Here's the HTML:
    >>     >>
    >>     >>     <img wicket:id="listImg" />
    >>     >>
    >>     >>     Here's the Java:
    >>     >>
    >>     >>     add(new Image("listImg", BasePage.getButton("Get
    List")))
    >>     >>
    >>     >>     public static Resource getButton(String label) {
    >>     >>         DefaultButtonImageResource r = new
    >>     >>     DefaultButtonImageResource(label);
    >>     >>         Color c = new Color(60, 179, 113);
    >>     >>         r.setColor(c);
    >>     >>
    >>     >>         return r;
    >>     >>     }
    >>     >>
    >>     >>
    >>     >>     Here's the problem (what Firefox says):
    >>     >>
    >>     >>     The image
    >>     >>
    >>     >>
    >>
    >>
"http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener <http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener>
    >>
    >>
    >>
<http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener <http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener>>
    >>
    >>     >>
    >>     >>
    >>     >>
    >>
    >> <
http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener <http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener>
    >>
    >>
    >> <
http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener <http://localhost/feeple/?path=78:toppanel:contractList:contractListImg&interface=IResourceListener>>>"
    >>
    >>     >>
    >>     >>     cannot be displayed, because it contains errors.
    >>     >>
    >>     >>     Any ideas?
    >>     >>
    >>     >>
>> >> ------------------------------------------------------- >> >> This SF.Net email is sponsored by xPML, a groundbreaking
    >>     scripting
    >>     >>     language
    >>     >>     that extends applications into web and mobile media.
    >> Attend the
    >>     >>     live webcast
    >>     >>     and join the prime developer group breaking into
    this new
    >>     coding
    >>     >>     territory!
    >>     >>
    >>     >>
    >>
    >>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
    >>
    >>
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>>
    >>
    >>     >>
    >>     >>
    >>
    >>
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
    >>
    >>
    >>
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>>>
    >>
    >>     >>
    >>     >>     _______________________________________________
    >>     >>     Wicket-user mailing list
    >>     >>     [email protected]
    <mailto:[email protected]>
    >>     <mailto:[email protected]
    <mailto:[email protected]>>
    >>     >>     <mailto: [email protected]
    <mailto:[email protected]>
    >>     <mailto:[email protected]
    <mailto:[email protected]>>>
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
    >>     <https://lists.sourceforge.net/lists/listinfo/wicket-user>
    >>     >>
    >>     >>
    >>     >>
    >>     >>
    >>     >> --
    >>     >> Wicket 1.2 is coming! Write Ajax applications without
    touching
    >>     >> JavaScript!
>> >> -- http://wicketframework.org <http://wicketframework.org>
    >>     >
    >>     >
    >>     > -------------------------------------------------------
    >>     > Using Tomcat but need to do more? Need to support web
    services,
    >>     security?
>> > Get stuff done quickly with pre-integrated technology to make
    >>     your job
    >>     > easier
    >>     > Download IBM WebSphere Application Server v.1.0.1 based
    on Apache
    >>     > Geronimo
    >>     >
    >>
    >>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
    >>
    >>
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>>
    >>
    >>     > _______________________________________________
    >>     > Wicket-user mailing list
    >>     > [email protected]
    <mailto:[email protected]>
    >>     <mailto:[email protected]
    <mailto:[email protected]>>
    >>     > https://lists.sourceforge.net/lists/listinfo/wicket-user
    <https://lists.sourceforge.net/lists/listinfo/wicket-user>
    >>     >
    >>
    >>
    >>     -------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services,
    >>     security?
    >>     Get stuff done quickly with pre-integrated technology to
    make your
    >>     job easier
    >>     Download IBM WebSphere Application Server v.1.0.1 based on
    Apache
    >>     Geronimo
    >>
    >>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
    >>
    >> <
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>>
    >>
    >>     _______________________________________________
    >>     Wicket-user mailing list
    >>     [email protected]
    <mailto:[email protected]>
    >>     <mailto: [email protected]
    <mailto:[email protected]>>
    >>     https://lists.sourceforge.net/lists/listinfo/wicket-user
    >>
    >>
    >
    >
    > -------------------------------------------------------
    > Using Tomcat but need to do more? Need to support web services,
    security?
    > Get stuff done quickly with pre-integrated technology to make
    your job
    > easier
    > Download IBM WebSphere Application Server v.1.0.1 based on Apache
    > Geronimo
    >
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
    > _______________________________________________
    > Wicket-user mailing list
    > [email protected]
    <mailto:[email protected]>
    > https://lists.sourceforge.net/lists/listinfo/wicket-user
    >


    -------------------------------------------------------
    Using Tomcat but need to do more? Need to support web services,
    security?
    Get stuff done quickly with pre-integrated technology to make your
    job easier
    Download IBM WebSphere Application Server v.1.0.1 based on Apache
    Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
    _______________________________________________
    Wicket-user mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to