http://poi.apache.org/

-----Original Message-----
From: Jim Pinkham [mailto:pinkh...@gmail.com] 
Sent: Tuesday, January 18, 2011 1:18 PM
To: users@wicket.apache.org
Subject: Re: JasperReport viewing options for wicket 1.5

Well, I seem to be making good progress, but still not 100% there.

I got "git" and did a clone of wicketstuff and built jasperreports and added
it's target\jar to my local repo.
I only had to change the core's pom.xml to refer to the 1.5-M3 version I'm
using instead of 1.5-SNAPSHOT.

So far so good - pdf reports work fine (hooray) but now XLS is giving me
this:

NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFCellStyle

Also, while I'm at it, maybe this saves someone else a bit of effort -

I had to add a log4j dependency to the jasperreports-maven-plugin as
described in the final post here:
http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=63750

And here's how I'm using it:

public class ReportResource extends JRConcreteResource<IJRResourceHandler> {

public ReportResource(final String report, final IJRResourceHandler handler,
final Map<String,Object> params) {
        super(new File(ReportResource.class.getClassLoader()
                .getResource(report+".jasper").getFile()), fixXls(handler));

        setReportParameters(params);
        setFileName(report+handler.getExtension());
        setConnectionProvider(new IDatabaseConnectionProvider() {
            private static final long serialVersionUID = 1L;
            public Connection get() {
                try {
                    // If I hold on to conn reference here I get
serializable problems
                    return
MyApplication.get().getConnectionForCurrentDatabase();
                } catch (SQLException e) {
                    return null;
                }
            }
            public void release() {}   // should I be doing conn.close?
        });
    }
}

And then here's how I use it:
        add(new ResourceLink<Void>("testPdf", new ReportResource("report1",
new PdfResourceHandler(), params)));
        add(new ResourceLink<Void>("testXls", new ReportResource("report1",
new XlsResourceHandler(), params)));

So I think it's just a missing dependency someplace... anyone got a tip for
me? (ideally, how I can find it myself rather than mooch)

Any advice would be most welcome!

Thanks,
-- Jim.

On Tue, Jan 18, 2011 at 8:59 AM, Martin Grigorov <mgrigo...@apache.org>wrote:

> You'll need to build it yourself locally.
> There is not yet a release of wicketstuff-1.5 at oss.sonatype.org. I think
> we will release it once Wicket 1.5-RC1 is released (hopefully this week).
>
> On Tue, Jan 18, 2011 at 2:48 PM, Jim Pinkham <pinkh...@gmail.com> wrote:
>
> > Thanks - so glad to see it's been ported to 1.5; now, I need the jar.
> >
> > Maven gives me:
> > Unable to find resource 'org.wicketstuff:jasperreports:pom:1.5-SNAPSHOT'
> in
> > repository public (http://public)
> > .. and then again for 2 repositories I tried adding: wicket-snaps, and
> > nonatype-nexus-snapshots at
> >        <url>http://wicketstuff.org/maven/repository</url>
> > and
> >            <url>http://oss.sonatype.org/content/repositories/snapshots
> > </url>
> >
> > Am I missing a new repository since the move to GIT ?  Everything else
> > (wicket, wicket-extensions, wicket-datetime, wicket-auth-roles,
> > mysql-connectory-java, commons-dbcp, spring, jasperreports, ehcache,
> jetty
> > ...etc works OK.  ??
> >
> > Perhaps someone who knows might be able to update this wiki page:
> >
> >
> http://wicketstuff.org/confluence/display/STUFFWEB/Home#Home-WheredoIdownloadstablereleases%3F
> >
> > Thanks,
> > -- Jim.
> >
> > On Tue, Jan 18, 2011 at 3:16 AM, Martin Grigorov <mgrigo...@apache.org
> > >wrote:
> >
> > >
> > >
> >
> https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/jasperreports-parent
> > >
> > >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to