You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Richard W. Adams" <RW...@UP.COM> on 2012/11/14 16:26:13 UTC
Finding HTML Markup in External JARs
We're enhancing a Wicket app which has been running in production for many
months. One of the enhancements was adding a panel to a JAR (which we
wrote) used by our app. The new panel works fine on the local workstation
under Eclipse/Jetty, but fails when we deploy it to our JBOSS server.
Cause: Wicket says it can't find the HTML associated with the Java class,
even though the HTML & .class file are in the same folder. If finds HTML
markup in *other* JARs, but not the JAR with our new panel. (This panel is
the first class with markup we've attempted in this JAR.)
Is there some special configuration or initialization that is required to
let Wicket find the HTML inside an external JAR?
Version info: Our app uses Wicket 1.4.17 & wicket-extensions 1.4.17. The
versions are dictated by our corporate framework, so upgrading to newer
versions is not an option for now.
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Re: Finding HTML Markup in External JARs
Posted by "Richard W. Adams" <RW...@UP.COM>.
Well, as usual, it's never what you think of. We have two experienced (?)
developers looking at this all morning, & no one noticed that the
extension was "hml" instead of "html". (Hides red face & slinks away).
From: Sven Meier <sv...@meiers.net>
To: users@wicket.apache.org
Date: 11/14/2012 12:12 PM
Subject: Re: Finding HTML Markup in External JARs
I'd recommend putting a proper xml header with explicit encoding into
each markup, but you can also specify a default encoding with
IMarkupSettings#defaultMarkupEncoding.
However you do it, it shouldn't have any effect on Wicket *finding* the
markup.
Sven
On 11/14/2012 07:07 PM, Richard W. Adams wrote:
> I've been digging into this all morning, and my current theory is that
> it's a file encoding problem. After adding the Maven resource plugin to
my
> POM to force copying in UTF-8, I now get the identical error running on
my
> Jetty on my workstation (which worked fine earlier this morning). Does
> wicket have special encoding requirements? Anyone know what the encoding
> best practices are for Wicket?
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.6</version>
> <configuration>
> <encoding>UTF-8</encoding>
> </configuration>
> </plugin>
>
> _____________________________________________________________________
>
> I have yet to meet a C compiler that is more friendly and easier to use
> than eating soup with a knife.
>
>
>
>
> From: Eric Jablow <er...@gmail.com>
> To: users@wicket.apache.org
> Date: 11/14/2012 11:22 AM
> Subject: Re: Finding HTML Markup in External JARs
>
>
>
> On Wed, Nov 14, 2012 at 11:35 AM, Sven Meier <sv...@meiers.net> wrote:
>> Depending on what your *PathLocator *does, it might not serve the usual
>> markup from beside components.
>>
>>
>>> Wicket is finding HTML files in *other* JARs. This is a puzzler.
> Could this be a ClassLoader issue? The two JAR files' ClassLoaders may
> be different and unrelated.
>
> Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> **
>
> This email and any attachments may contain information that is
confidential and/or privileged for the sole use of the intended recipient.
Any use, review, disclosure, copying, distribution or reliance by others,
and any forwarding of this email or its contents, without the express
permission of the sender is strictly prohibited by law. If you are not
the intended recipient, please contact the sender immediately, delete the
e-mail and destroy all copies.
> **
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Re: Finding HTML Markup in External JARs
Posted by Sven Meier <sv...@meiers.net>.
I'd recommend putting a proper xml header with explicit encoding into
each markup, but you can also specify a default encoding with
IMarkupSettings#defaultMarkupEncoding.
However you do it, it shouldn't have any effect on Wicket *finding* the
markup.
Sven
On 11/14/2012 07:07 PM, Richard W. Adams wrote:
> I've been digging into this all morning, and my current theory is that
> it's a file encoding problem. After adding the Maven resource plugin to my
> POM to force copying in UTF-8, I now get the identical error running on my
> Jetty on my workstation (which worked fine earlier this morning). Does
> wicket have special encoding requirements? Anyone know what the encoding
> best practices are for Wicket?
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.6</version>
> <configuration>
> <encoding>UTF-8</encoding>
> </configuration>
> </plugin>
>
> _____________________________________________________________________
>
> I have yet to meet a C compiler that is more friendly and easier to use
> than eating soup with a knife.
>
>
>
>
> From: Eric Jablow <er...@gmail.com>
> To: users@wicket.apache.org
> Date: 11/14/2012 11:22 AM
> Subject: Re: Finding HTML Markup in External JARs
>
>
>
> On Wed, Nov 14, 2012 at 11:35 AM, Sven Meier <sv...@meiers.net> wrote:
>> Depending on what your *PathLocator *does, it might not serve the usual
>> markup from beside components.
>>
>>
>>> Wicket is finding HTML files in *other* JARs. This is a puzzler.
> Could this be a ClassLoader issue? The two JAR files' ClassLoaders may
> be different and unrelated.
>
> Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> **
>
> This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
> **
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Finding HTML Markup in External JARs
Posted by "Richard W. Adams" <RW...@UP.COM>.
I've been digging into this all morning, and my current theory is that
it's a file encoding problem. After adding the Maven resource plugin to my
POM to force copying in UTF-8, I now get the identical error running on my
Jetty on my workstation (which worked fine earlier this morning). Does
wicket have special encoding requirements? Anyone know what the encoding
best practices are for Wicket?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
_____________________________________________________________________
I have yet to meet a C compiler that is more friendly and easier to use
than eating soup with a knife.
From: Eric Jablow <er...@gmail.com>
To: users@wicket.apache.org
Date: 11/14/2012 11:22 AM
Subject: Re: Finding HTML Markup in External JARs
On Wed, Nov 14, 2012 at 11:35 AM, Sven Meier <sv...@meiers.net> wrote:
> Depending on what your *PathLocator *does, it might not serve the usual
> markup from beside components.
>
>
>> Wicket is finding HTML files in *other* JARs. This is a puzzler.
Could this be a ClassLoader issue? The two JAR files' ClassLoaders may
be different and unrelated.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Re: Finding HTML Markup in External JARs
Posted by Eric Jablow <er...@gmail.com>.
On Wed, Nov 14, 2012 at 11:35 AM, Sven Meier <sv...@meiers.net> wrote:
> Depending on what your *PathLocator *does, it might not serve the usual
> markup from beside components.
>
>
>> Wicket is finding HTML files in *other* JARs. This is a puzzler.
Could this be a ClassLoader issue? The two JAR files' ClassLoaders may
be different and unrelated.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Finding HTML Markup in External JARs
Posted by Sven Meier <sv...@meiers.net>.
Depending on what your *PathLocator *does, it might not serve the usual
markup from beside components.
> Wicket is finding HTML files in *other* JARs. This is a puzzler.
That's strange indeed.
Sven
On 11/14/2012 04:58 PM, Richard W. Adams wrote:
> I double checked, & the html & class files are indeed in the folder
> (see image below):
>
>
>
> Heres the error message:
>
> *2012-11-14 09:50:31,875 [ajp-10002-3] ERROR - Markup of type 'html'
> for component
> 'com.uprr.ecm.wicket.components.panels.location.PointLocationPanel'
> not found. Enable debug messages for org.apache.wicket.util.resource
> to get a list of all filenames tried.: [MarkupContainer [Component id
> = switch-location]]
> org.apache.wicket.markup.MarkupNotFoundException: Markup of type
> 'html' for component
> 'com.uprr.ecm.wicket.components.panels.location.PointLocationPanel'
> not found. Enable debug messages for org.apache.wicket.util.resource
> to get a list of all filenames tried.: [MarkupContainer [Component id
> = switch-location]]
> at
> org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
> at
> org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
> at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:654)
> at
> org.apache.wicket.markup.html.form.FormComponentPanel.onComponentTagBody(FormComponentPanel.java:223)
> at org.apache.wicket.Component.renderComponent(Component.java:2690)
> at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
> at org.apache.wicket.Component.render(Component.java:2521)*
>
> Though I don't think it's significant, but our main app does have some
> code (below) that tells Wicket to look in an additional location for
> HTML files. But I don't that's causing the problem, because Wicket is
> finding HTML files in *other* JARs. This is a puzzler.
>
> *final IResourceSettings resourceSettings = getResourceSettings();*
> * resourceSettings.addResourceFolder("WEB-INF/html");*
> * resourceSettings.setResourceStreamLocator(new PathLocator());*
>
>
>
> From: Martin Grigorov <mg...@apache.org>
> To: users@wicket.apache.org
> Date: 11/14/2012 09:29 AM
> Subject: Re: Finding HTML Markup in External JARs
> ------------------------------------------------------------------------
>
>
>
> Hi,
>
> I'm 99% certain that the .html files are not in the .jar.
> Double check that they are actually packed with the .class files.
>
>
> On Wed, Nov 14, 2012 at 5:26 PM, Richard W. Adams <RW...@up.com> wrote:
>
> > We're enhancing a Wicket app which has been running in production
> for many
> > months. One of the enhancements was adding a panel to a JAR (which we
> > wrote) used by our app. The new panel works fine on the local
> workstation
> > under Eclipse/Jetty, but fails when we deploy it to our JBOSS server.
> > Cause: Wicket says it can't find the HTML associated with the Java
> class,
> > even though the HTML & .class file are in the same folder. If finds HTML
> > markup in *other* JARs, but not the JAR with our new panel. (This
> panel is
> > the first class with markup we've attempted in this JAR.)
> >
> >
> > Is there some special configuration or initialization that is
> required to
> > let Wicket find the HTML inside an external JAR?
> >
> > Version info: Our app uses Wicket 1.4.17 & wicket-extensions 1.4.17. The
> > versions are dictated by our corporate framework, so upgrading to newer
> > versions is not an option for now.
> >
> > **
> >
> > This email and any attachments may contain information that is
> > confidential and/or privileged for the sole use of the intended
> recipient.
> > Any use, review, disclosure, copying, distribution or reliance by
> others,
> > and any forwarding of this email or its contents, without the express
> > permission of the sender is strictly prohibited by law. If you are
> not the
> > intended recipient, please contact the sender immediately, delete the
> > e-mail and destroy all copies.
> > **
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/><http://jweekend.com/>
>
>
> **
>
> This email and any attachments may contain information that is
> confidential and/or privileged for the sole use of the intended
> recipient. Any use, review, disclosure, copying, distribution or
> reliance by others, and any forwarding of this email or its contents,
> without the express permission of the sender is strictly prohibited by
> law. If you are not the intended recipient, please contact the sender
> immediately, delete the e-mail and destroy all copies.
> **
Re: Finding HTML Markup in External JARs
Posted by "Richard W. Adams" <RW...@UP.COM>.
I double checked, & the html & class files are indeed in the folder (see
image below):
Heres the error message:
2012-11-14 09:50:31,875 [ajp-10002-3] ERROR - Markup of type 'html' for
component
'com.uprr.ecm.wicket.components.panels.location.PointLocationPanel' not
found. Enable debug messages for org.apache.wicket.util.resource to get a
list of all filenames tried.: [MarkupContainer [Component id =
switch-location]]
org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
for component
'com.uprr.ecm.wicket.components.panels.location.PointLocationPanel' not
found. Enable debug messages for org.apache.wicket.util.resource to get a
list of all filenames tried.: [MarkupContainer [Component id =
switch-location]]
at
org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
at
org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:654)
at
org.apache.wicket.markup.html.form.FormComponentPanel.onComponentTagBody(FormComponentPanel.java:223)
at
org.apache.wicket.Component.renderComponent(Component.java:2690)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
at
org.apache.wicket.Component.render(Component.java:2521)
Though I don't think it's significant, but our main app does have some
code (below) that tells Wicket to look in an additional location for HTML
files. But I don't that's causing the problem, because Wicket is finding
HTML files in *other* JARs. This is a puzzler.
final IResourceSettings resourceSettings = getResourceSettings();
resourceSettings.addResourceFolder("WEB-INF/html");
resourceSettings.setResourceStreamLocator(new PathLocator());
From: Martin Grigorov <mg...@apache.org>
To: users@wicket.apache.org
Date: 11/14/2012 09:29 AM
Subject: Re: Finding HTML Markup in External JARs
Hi,
I'm 99% certain that the .html files are not in the .jar.
Double check that they are actually packed with the .class files.
On Wed, Nov 14, 2012 at 5:26 PM, Richard W. Adams <RW...@up.com> wrote:
> We're enhancing a Wicket app which has been running in production for
many
> months. One of the enhancements was adding a panel to a JAR (which we
> wrote) used by our app. The new panel works fine on the local
workstation
> under Eclipse/Jetty, but fails when we deploy it to our JBOSS server.
> Cause: Wicket says it can't find the HTML associated with the Java
class,
> even though the HTML & .class file are in the same folder. If finds HTML
> markup in *other* JARs, but not the JAR with our new panel. (This panel
is
> the first class with markup we've attempted in this JAR.)
>
>
> Is there some special configuration or initialization that is required
to
> let Wicket find the HTML inside an external JAR?
>
> Version info: Our app uses Wicket 1.4.17 & wicket-extensions 1.4.17. The
> versions are dictated by our corporate framework, so upgrading to newer
> versions is not an option for now.
>
> **
>
> This email and any attachments may contain information that is
> confidential and/or privileged for the sole use of the intended
recipient.
> Any use, review, disclosure, copying, distribution or reliance by
others,
> and any forwarding of this email or its contents, without the express
> permission of the sender is strictly prohibited by law. If you are not
the
> intended recipient, please contact the sender immediately, delete the
> e-mail and destroy all copies.
> **
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Re: Finding HTML Markup in External JARs
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
I'm 99% certain that the .html files are not in the .jar.
Double check that they are actually packed with the .class files.
On Wed, Nov 14, 2012 at 5:26 PM, Richard W. Adams <RW...@up.com> wrote:
> We're enhancing a Wicket app which has been running in production for many
> months. One of the enhancements was adding a panel to a JAR (which we
> wrote) used by our app. The new panel works fine on the local workstation
> under Eclipse/Jetty, but fails when we deploy it to our JBOSS server.
> Cause: Wicket says it can't find the HTML associated with the Java class,
> even though the HTML & .class file are in the same folder. If finds HTML
> markup in *other* JARs, but not the JAR with our new panel. (This panel is
> the first class with markup we've attempted in this JAR.)
>
>
> Is there some special configuration or initialization that is required to
> let Wicket find the HTML inside an external JAR?
>
> Version info: Our app uses Wicket 1.4.17 & wicket-extensions 1.4.17. The
> versions are dictated by our corporate framework, so upgrading to newer
> versions is not an option for now.
>
> **
>
> This email and any attachments may contain information that is
> confidential and/or privileged for the sole use of the intended recipient.
> Any use, review, disclosure, copying, distribution or reliance by others,
> and any forwarding of this email or its contents, without the express
> permission of the sender is strictly prohibited by law. If you are not the
> intended recipient, please contact the sender immediately, delete the
> e-mail and destroy all copies.
> **
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>