You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Garret Wilson <ga...@globalmentor.com> on 2014/10/01 17:10:42 UTC

unable to find property UploadProgressBar.starting

Friends,

I have a Wicket page using the upload progress bar:

   <span wicket:id="progress">[[upload progress bar]]</span>

   form.add(new UploadProgressBar("progress", form, fileUpload));

Dependencies are declared normally in Maven:

     <dependency>
       <groupId>org.apache.wicket</groupId>
       <artifactId>wicket-core</artifactId>
       <version>7.0.0-M3</version>
     </dependency>
     <dependency>
       <groupId>org.apache.wicket</groupId>
       <artifactId>wicket-auth-roles</artifactId>
       <version>7.0.0-M3</version>
     </dependency>
     <dependency>
       <groupId>org.apache.wicket</groupId>
       <artifactId>wicket-extensions</artifactId>
       <version>7.0.0-M3</version>
     </dependency>

We're using embedded Jetty 9.1.0.v20131115. Running from my IDE 
(Eclipse) this works just fine. But when our team creates a jar file and 
distributes the application with an installer, just tried to browser to 
the page in question gives us a MissingResourceException: Unable to find 
property: 'UploadProgressBar.starting' (see below).

No doubt there's something simple I'm forgetting. Any suggestions? 
Here's the stack trace:

2014-09-22 07:40:49 ERROR (DefaultExceptionMapper) [2014-09-22 
07:40:49,433] - org.apache.wicket.DefaultExceptionMapper.
internalMap(DefaultExceptionMapper.java:128): Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Exception in rendering 
component: [HtmlHeaderContainer [Component id = _header
_0]]
         at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2566)
         at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1550)
         at org.apache.wicket.Component.internalRender(Component.java:2357)
         at org.apache.wicket.Component.render(Component.java:2285)
         at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
         at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1611)
         at org.apache.wicket.Page.onRender(Page.java:879)
         at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
         at org.apache.wicket.Component.internalRender(Component.java:2357)
         at org.apache.wicket.Component.render(Component.java:2285)
         at org.apache.wicket.Page.renderPage(Page.java:1018)
         at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:122)
         at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:247)
         at 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
         at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:837)
         at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
         at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
         at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
         at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
         at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
         at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
         at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
         at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539)
         at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
         at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
         at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:544)
         at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
         at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
         at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
         at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
         at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
         at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
         at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
         at org.eclipse.jetty.server.Server.handle(Server.java:459)
         at 
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280)
         at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)
         at 
org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
         at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
         at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
         at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.MissingResourceException: Unable to find property: 
'UploadProgressBar.starting' for component: form
:progress 
[class=org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar]. 
Locale: null, style: null

         at org.apache.wicket.Localizer.getString(Localizer.java:237)
         at org.apache.wicket.Localizer.getString(Localizer.java:170)
         at 
org.apache.wicket.model.StringResourceModel.getString(StringResourceModel.java:427)
         at 
org.apache.wicket.model.StringResourceModel.getString(StringResourceModel.java:401)
         at 
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar.renderHead(UploadProgressBar.java
:236)
         at org.apache.wicket.Component.renderHead(Component.java:4459)
         at 
org.apache.wicket.Component.internalRenderHead(Component.java:2692)
         at 
org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy$1.component(ChildFirstHeaderRenderStra
tegy.java:85)
         at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:96)
         at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87)
         at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87)
         at 
org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:51)
         at 
org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy.renderChildHeaders(ChildFirstHeaderRen
derStrategy.java:78)
         at 
org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy.renderHeader(ChildFirstHeaderRenderStr
ategy.java:57)
         at 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:170)
         at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStr
ategy.java:71)
         at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2542)
         ... 39 more

Thanks,

Garret

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


Re: unable to find property UploadProgressBar.starting

Posted by Garret Wilson <ga...@globalmentor.com>.
I just wanted to report back and say that, after our installer team 
updated the distribution to maintain the individual JARs (and thus not 
overwrite the files with clashing filenames), that solved the problem! 
Thanks to Martin Grigorov and Andrew Geery for helping point me in the 
direction of the problem.

Garret

On 10/1/2014 1:04 PM, Garret Wilson wrote:
> I think I've found the source of the problem (even though I don't 
> understand the internal details). Our installer creates an uber-JAR 
> that has all the dependencies exploded and then placed inside a single 
> JAR file. I looked inside wicket-extensions-7.0.0-M3.jar, and it has a 
> file wicket.properties /in the root of the JAR file!/ Unfortunately, 
> wicket-core-7.0.0-M3.jar (and likely other Wicket JARs) also have a 
> wicket.properties file in their root as well. As you might guess, 
> these have conflicting values:
>
> initializer=org.apache.wicket.extensions.Initializer
>
> initializer=org.apache.wicket.Initializer
>
> So when we create our uber-JAR only one of these wicket.properties 
> files wins and gets placed in the uber-JAR. The one we happen to have 
> now contains initializer=org.apache.wicket.Initializer.
>
> I will check with the installer team to see if we can distribute the 
> application with all its dependencies as separate JARs rather than an 
> uber-JAR. But on Wicket's side, is it really a good practice to stick 
> some file in the root directory of a JAR, outside of any package, with 
> a name you expect to be identical across JARs but with different 
> contents? I naively would imagine that some better approach exists.
>
> Garret
>
> On 10/1/2014 1:22 PM, Martin Grigorov wrote:
>> The .properties file is packed inside wicket-extensions.jar, not in his
>> application.
>>
>> I have no other ideas but to attach a remote debugger
>> to 
>> org.apache.wicket.resource.loader.InitializerStringResourceLoader#loadStringResource(java.lang.Class<?>,
>> java.lang.String, java.util.Locale, java.lang.String, 
>> java.lang.String) and
>> set condition on the "key" parameter to be equal to the missing resource
>> key.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Oct 1, 2014 at 5:55 PM, Andrew Geery <an...@gmail.com> 
>> wrote:
>>
>>> As a sanity check, is the property file with the property
>>> UploadProgressBar.starting
>>> in the jar file?  Perhaps it didn't get copied over by the Maven build
>>> process into the jar but the IDE was properly copying it over...
>>>
>>> Andrew
>>>
>>> On Wed, Oct 1, 2014 at 11:38 AM, Garret Wilson 
>>> <ga...@globalmentor.com>
>>> wrote:
>>>
>>>> On 10/1/2014 12:33 PM, Martin Grigorov wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Do you by chance manipulate the list of IStringResourceLoader's in
>>>>> DEPLOYMENT mode ?
>>>>>
>>>> I don't think I touched anything related to IStringResourceLoader. The
>>>> only thing I've done relating to modes is this:
>>>>
>>>>        //turn on Wicket development mode if in debug mode
>>>>        final String wicketConfiguration = Debug.isDebug() ? 
>>>> "development"
>>> :
>>>> "deployment";
>>>>        filterHolder.setInitParameter("configuration",
>>> wicketConfiguration);
>>>> In other words, in embedded Jetty, if we've started up specifying a 
>>>> debug
>>>> mode (using a system variable), then I set the Wicket configuration to
>>>> "development"; otherwise, I set it to "deployment".
>>>>
>>>>
>>>> Garret
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>
>


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


Re: unable to find property UploadProgressBar.starting

Posted by Martin Grigorov <mg...@apache.org>.
https://issues.apache.org/jira/browse/WICKET-5713

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 1, 2014 at 11:11 PM, Garret Wilson <ga...@globalmentor.com>
wrote:

> On 10/1/2014 5:17 PM, Martin Grigorov wrote:
>
>> ...
>> Are you aware of JDK APIs (e.g. ClassLoader) or Servlet APIs (e.g.
>> SevletContext) that make it simple to find the list of resources in a
>> folder in the classpath ?
>> E.g. "give me a list of all files with extension '.properties' in
>> /META-INF/wicket/ ?
>>
>
> Hmmm... not offhand. That was the "brainstorming" part. ;)
>
>  I don't claim to know anything about this IIinitializer system, other than
>>> it causes a problem under a certain use case. I'm just offering
>>> brainstorming suggestions for improvement.
>>>
>>>  Suggestions and feedback (especially negative!) are always welcome!
>> Now let's find a technical solution that doesn't cost much!
>>
>
>
> Assign me a JIRA item and I'll look into it more, I promise. :D
>
> OK, I imagine once my team gets the installer code to use separate
> dependency JARs all will be OK even under the current system. I'm back to
> my project now. Thanks for the tips.
>
>
> Garret
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: unable to find property UploadProgressBar.starting

Posted by Garret Wilson <ga...@globalmentor.com>.
On 10/1/2014 5:17 PM, Martin Grigorov wrote:
> ...
> Are you aware of JDK APIs (e.g. ClassLoader) or Servlet APIs (e.g.
> SevletContext) that make it simple to find the list of resources in a
> folder in the classpath ?
> E.g. "give me a list of all files with extension '.properties' in
> /META-INF/wicket/ ?

Hmmm... not offhand. That was the "brainstorming" part. ;)

>> I don't claim to know anything about this IIinitializer system, other than
>> it causes a problem under a certain use case. I'm just offering
>> brainstorming suggestions for improvement.
>>
> Suggestions and feedback (especially negative!) are always welcome!
> Now let's find a technical solution that doesn't cost much!


Assign me a JIRA item and I'll look into it more, I promise. :D

OK, I imagine once my team gets the installer code to use separate 
dependency JARs all will be OK even under the current system. I'm back 
to my project now. Thanks for the tips.

Garret

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


Re: unable to find property UploadProgressBar.starting

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 1, 2014 at 9:49 PM, Garret Wilson <ga...@globalmentor.com>
wrote:

> On 10/1/2014 3:31 PM, Martin Grigorov wrote:
>
>> Apache Isis uses
>> http://simplericity.org/jetty-console/jetty-console-maven-plugin/ to
>> generate an executable .jar that contains all dependencies in WEB-INF/lib/
>> folder inside. Exactly as you need it.
>>
>
> Yeah, in another subproject I had already created a .zip with all the
> dependency JARs. I have instructed to the person creating the product
> installer to do the same for the subproject that uses Wicket, so that
> should probably be taken care of shortly.
>
> I was just wanted to give feedback, though, that perhaps there is a better
> way to  do this IIinitializer thing.
>
>
>  About IIinitializer:
>> this is the simple plugin system Wicket uses. It loads all
>> /wicket.properties from the root of the classpath and executes the
>> IInitializer implementations.
>> If wicket.properties is not in the root (or another predefined location)
>> then Wicket should do full scan of the classpath to find it. This may be
>> expensive!
>>
>
>
>  * Maybe a better place for these files would be inside
>    /META-INF/wicket or something.
>  * Maybe rather than using the same filename, you could name it based
>    upon the package+class, e.g.
>    org.apache.wicket.extensions.Initializer.properties.
>
>
> Then the plugin system could simply look for all the
> /META-INF/wicket/*.properties files. That wouldn't be expensive at all, and
> it would cause no conflicts. Plus it wouldn't clutter the root classpath
> with clashing filenames.
>

Are you aware of JDK APIs (e.g. ClassLoader) or Servlet APIs (e.g.
SevletContext) that make it simple to find the list of resources in a
folder in the classpath ?
E.g. "give me a list of all files with extension '.properties' in
/META-INF/wicket/ ?


>
> I don't claim to know anything about this IIinitializer system, other than
> it causes a problem under a certain use case. I'm just offering
> brainstorming suggestions for improvement.
>
>
Suggestions and feedback (especially negative!) are always welcome!
Now let's find a technical solution that doesn't cost much!


>
>
>  ...
>> I don't know what you use to merge the making the uberjar but
>> maven-shade-plugin provides hooks to merge such files.
>>
>
> Yeah, there are several options. I think we have that covered, now that we
> know what the problem was. I hope some of my feedback was helpful.
>
>
>  A workaround is to register and call the initializer in your code...
>>
>
>
> I'll keep that in mind as a last resort, thanks.
>
> Garret
>

Re: unable to find property UploadProgressBar.starting

Posted by Garret Wilson <ga...@globalmentor.com>.
On 10/1/2014 3:31 PM, Martin Grigorov wrote:
> Apache Isis uses
> http://simplericity.org/jetty-console/jetty-console-maven-plugin/ to
> generate an executable .jar that contains all dependencies in WEB-INF/lib/
> folder inside. Exactly as you need it.

Yeah, in another subproject I had already created a .zip with all the 
dependency JARs. I have instructed to the person creating the product 
installer to do the same for the subproject that uses Wicket, so that 
should probably be taken care of shortly.

I was just wanted to give feedback, though, that perhaps there is a 
better way to  do this IIinitializer thing.


> About IIinitializer:
> this is the simple plugin system Wicket uses. It loads all
> /wicket.properties from the root of the classpath and executes the
> IInitializer implementations.
> If wicket.properties is not in the root (or another predefined location)
> then Wicket should do full scan of the classpath to find it. This may be
> expensive!


  * Maybe a better place for these files would be inside
    /META-INF/wicket or something.
  * Maybe rather than using the same filename, you could name it based
    upon the package+class, e.g.
    org.apache.wicket.extensions.Initializer.properties.


Then the plugin system could simply look for all the 
/META-INF/wicket/*.properties files. That wouldn't be expensive at all, 
and it would cause no conflicts. Plus it wouldn't clutter the root 
classpath with clashing filenames.

I don't claim to know anything about this IIinitializer system, other 
than it causes a problem under a certain use case. I'm just offering 
brainstorming suggestions for improvement.



> ...
> I don't know what you use to merge the making the uberjar but
> maven-shade-plugin provides hooks to merge such files.

Yeah, there are several options. I think we have that covered, now that 
we know what the problem was. I hope some of my feedback was helpful.


> A workaround is to register and call the initializer in your code...


I'll keep that in mind as a last resort, thanks.

Garret

Re: unable to find property UploadProgressBar.starting

Posted by Martin Grigorov <mg...@apache.org>.
Apache Isis uses
http://simplericity.org/jetty-console/jetty-console-maven-plugin/ to
generate an executable .jar that contains all dependencies in WEB-INF/lib/
folder inside. Exactly as you need it.

About IIinitializer:
this is the simple plugin system Wicket uses. It loads all
/wicket.properties from the root of the classpath and executes the
IInitializer implementations.
If wicket.properties is not in the root (or another predefined location)
then Wicket should do full scan of the classpath to find it. This may be
expensive!
Although https://github.com/ronmamo/reflections does exactly this and it is
quite fast! But we try to keep Wicket as light as possible and not depend
on other libraries.
I don't know what you use to merge the making the uberjar but
maven-shade-plugin provides hooks to merge such files.
A workaround is to register and call the initializer in your code...

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 1, 2014 at 8:04 PM, Garret Wilson <ga...@globalmentor.com>
wrote:

> I think I've found the source of the problem (even though I don't
> understand the internal details). Our installer creates an uber-JAR that
> has all the dependencies exploded and then placed inside a single JAR file.
> I looked inside wicket-extensions-7.0.0-M3.jar, and it has a file
> wicket.properties /in the root of the JAR file!/ Unfortunately,
> wicket-core-7.0.0-M3.jar (and likely other Wicket JARs) also have a
> wicket.properties file in their root as well. As you might guess, these
> have conflicting values:
>
> initializer=org.apache.wicket.extensions.Initializer
>
> initializer=org.apache.wicket.Initializer
>
> So when we create our uber-JAR only one of these wicket.properties files
> wins and gets placed in the uber-JAR. The one we happen to have now
> contains initializer=org.apache.wicket.Initializer.
>
> I will check with the installer team to see if we can distribute the
> application with all its dependencies as separate JARs rather than an
> uber-JAR. But on Wicket's side, is it really a good practice to stick some
> file in the root directory of a JAR, outside of any package, with a name
> you expect to be identical across JARs but with different contents? I
> naively would imagine that some better approach exists.
>
> Garret
>
>
> On 10/1/2014 1:22 PM, Martin Grigorov wrote:
>
>> The .properties file is packed inside wicket-extensions.jar, not in his
>> application.
>>
>> I have no other ideas but to attach a remote debugger
>> to org.apache.wicket.resource.loader.InitializerStringResourceLoade
>> r#loadStringResource(java.lang.Class<?>,
>> java.lang.String, java.util.Locale, java.lang.String, java.lang.String)
>> and
>> set condition on the "key" parameter to be equal to the missing resource
>> key.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Oct 1, 2014 at 5:55 PM, Andrew Geery <an...@gmail.com>
>> wrote:
>>
>>  As a sanity check, is the property file with the property
>>> UploadProgressBar.starting
>>> in the jar file?  Perhaps it didn't get copied over by the Maven build
>>> process into the jar but the IDE was properly copying it over...
>>>
>>> Andrew
>>>
>>> On Wed, Oct 1, 2014 at 11:38 AM, Garret Wilson <ga...@globalmentor.com>
>>> wrote:
>>>
>>>  On 10/1/2014 12:33 PM, Martin Grigorov wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> Do you by chance manipulate the list of IStringResourceLoader's in
>>>>> DEPLOYMENT mode ?
>>>>>
>>>>>  I don't think I touched anything related to IStringResourceLoader. The
>>>> only thing I've done relating to modes is this:
>>>>
>>>>        //turn on Wicket development mode if in debug mode
>>>>        final String wicketConfiguration = Debug.isDebug() ?
>>>> "development"
>>>>
>>> :
>>>
>>>> "deployment";
>>>>        filterHolder.setInitParameter("configuration",
>>>>
>>> wicketConfiguration);
>>>
>>>> In other words, in embedded Jetty, if we've started up specifying a
>>>> debug
>>>> mode (using a system variable), then I set the Wicket configuration to
>>>> "development"; otherwise, I set it to "deployment".
>>>>
>>>>
>>>> Garret
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>

Re: unable to find property UploadProgressBar.starting

Posted by Garret Wilson <ga...@globalmentor.com>.
I think I've found the source of the problem (even though I don't 
understand the internal details). Our installer creates an uber-JAR that 
has all the dependencies exploded and then placed inside a single JAR 
file. I looked inside wicket-extensions-7.0.0-M3.jar, and it has a file 
wicket.properties /in the root of the JAR file!/ Unfortunately, 
wicket-core-7.0.0-M3.jar (and likely other Wicket JARs) also have a 
wicket.properties file in their root as well. As you might guess, these 
have conflicting values:

initializer=org.apache.wicket.extensions.Initializer

initializer=org.apache.wicket.Initializer

So when we create our uber-JAR only one of these wicket.properties files 
wins and gets placed in the uber-JAR. The one we happen to have now 
contains initializer=org.apache.wicket.Initializer.

I will check with the installer team to see if we can distribute the 
application with all its dependencies as separate JARs rather than an 
uber-JAR. But on Wicket's side, is it really a good practice to stick 
some file in the root directory of a JAR, outside of any package, with a 
name you expect to be identical across JARs but with different contents? 
I naively would imagine that some better approach exists.

Garret

On 10/1/2014 1:22 PM, Martin Grigorov wrote:
> The .properties file is packed inside wicket-extensions.jar, not in his
> application.
>
> I have no other ideas but to attach a remote debugger
> to org.apache.wicket.resource.loader.InitializerStringResourceLoader#loadStringResource(java.lang.Class<?>,
> java.lang.String, java.util.Locale, java.lang.String, java.lang.String) and
> set condition on the "key" parameter to be equal to the missing resource
> key.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Oct 1, 2014 at 5:55 PM, Andrew Geery <an...@gmail.com> wrote:
>
>> As a sanity check, is the property file with the property
>> UploadProgressBar.starting
>> in the jar file?  Perhaps it didn't get copied over by the Maven build
>> process into the jar but the IDE was properly copying it over...
>>
>> Andrew
>>
>> On Wed, Oct 1, 2014 at 11:38 AM, Garret Wilson <ga...@globalmentor.com>
>> wrote:
>>
>>> On 10/1/2014 12:33 PM, Martin Grigorov wrote:
>>>
>>>> Hi,
>>>>
>>>> Do you by chance manipulate the list of IStringResourceLoader's in
>>>> DEPLOYMENT mode ?
>>>>
>>> I don't think I touched anything related to IStringResourceLoader. The
>>> only thing I've done relating to modes is this:
>>>
>>>        //turn on Wicket development mode if in debug mode
>>>        final String wicketConfiguration = Debug.isDebug() ? "development"
>> :
>>> "deployment";
>>>        filterHolder.setInitParameter("configuration",
>> wicketConfiguration);
>>> In other words, in embedded Jetty, if we've started up specifying a debug
>>> mode (using a system variable), then I set the Wicket configuration to
>>> "development"; otherwise, I set it to "deployment".
>>>
>>>
>>> Garret
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>


Re: unable to find property UploadProgressBar.starting

Posted by Martin Grigorov <mg...@apache.org>.
The .properties file is packed inside wicket-extensions.jar, not in his
application.

I have no other ideas but to attach a remote debugger
to org.apache.wicket.resource.loader.InitializerStringResourceLoader#loadStringResource(java.lang.Class<?>,
java.lang.String, java.util.Locale, java.lang.String, java.lang.String) and
set condition on the "key" parameter to be equal to the missing resource
key.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 1, 2014 at 5:55 PM, Andrew Geery <an...@gmail.com> wrote:

> As a sanity check, is the property file with the property
> UploadProgressBar.starting
> in the jar file?  Perhaps it didn't get copied over by the Maven build
> process into the jar but the IDE was properly copying it over...
>
> Andrew
>
> On Wed, Oct 1, 2014 at 11:38 AM, Garret Wilson <ga...@globalmentor.com>
> wrote:
>
> > On 10/1/2014 12:33 PM, Martin Grigorov wrote:
> >
> >> Hi,
> >>
> >> Do you by chance manipulate the list of IStringResourceLoader's in
> >> DEPLOYMENT mode ?
> >>
> >
> > I don't think I touched anything related to IStringResourceLoader. The
> > only thing I've done relating to modes is this:
> >
> >       //turn on Wicket development mode if in debug mode
> >       final String wicketConfiguration = Debug.isDebug() ? "development"
> :
> > "deployment";
> >       filterHolder.setInitParameter("configuration",
> wicketConfiguration);
> >
> > In other words, in embedded Jetty, if we've started up specifying a debug
> > mode (using a system variable), then I set the Wicket configuration to
> > "development"; otherwise, I set it to "deployment".
> >
> >
> > Garret
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: unable to find property UploadProgressBar.starting

Posted by Andrew Geery <an...@gmail.com>.
As a sanity check, is the property file with the property
UploadProgressBar.starting
in the jar file?  Perhaps it didn't get copied over by the Maven build
process into the jar but the IDE was properly copying it over...

Andrew

On Wed, Oct 1, 2014 at 11:38 AM, Garret Wilson <ga...@globalmentor.com>
wrote:

> On 10/1/2014 12:33 PM, Martin Grigorov wrote:
>
>> Hi,
>>
>> Do you by chance manipulate the list of IStringResourceLoader's in
>> DEPLOYMENT mode ?
>>
>
> I don't think I touched anything related to IStringResourceLoader. The
> only thing I've done relating to modes is this:
>
>       //turn on Wicket development mode if in debug mode
>       final String wicketConfiguration = Debug.isDebug() ? "development" :
> "deployment";
>       filterHolder.setInitParameter("configuration", wicketConfiguration);
>
> In other words, in embedded Jetty, if we've started up specifying a debug
> mode (using a system variable), then I set the Wicket configuration to
> "development"; otherwise, I set it to "deployment".
>
>
> Garret
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: unable to find property UploadProgressBar.starting

Posted by Garret Wilson <ga...@globalmentor.com>.
On 10/1/2014 12:33 PM, Martin Grigorov wrote:
> Hi,
>
> Do you by chance manipulate the list of IStringResourceLoader's in
> DEPLOYMENT mode ?

I don't think I touched anything related to IStringResourceLoader. The 
only thing I've done relating to modes is this:

       //turn on Wicket development mode if in debug mode
       final String wicketConfiguration = Debug.isDebug() ? 
"development" : "deployment";
       filterHolder.setInitParameter("configuration", wicketConfiguration);

In other words, in embedded Jetty, if we've started up specifying a 
debug mode (using a system variable), then I set the Wicket 
configuration to "development"; otherwise, I set it to "deployment".

Garret

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


Re: unable to find property UploadProgressBar.starting

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Do you by chance manipulate the list of IStringResourceLoader's in
DEPLOYMENT mode ?
See org.apache.wicket.settings.ResourceSettings#getStringResourceLoaders()

org.apache.wicket.resource.loader.InitializerStringResourceLoader is
responsible to load the resource bundle
wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 1, 2014 at 5:10 PM, Garret Wilson <ga...@globalmentor.com>
wrote:

> Friends,
>
> I have a Wicket page using the upload progress bar:
>
>   <span wicket:id="progress">[[upload progress bar]]</span>
>
>   form.add(new UploadProgressBar("progress", form, fileUpload));
>
> Dependencies are declared normally in Maven:
>
>     <dependency>
>       <groupId>org.apache.wicket</groupId>
>       <artifactId>wicket-core</artifactId>
>       <version>7.0.0-M3</version>
>     </dependency>
>     <dependency>
>       <groupId>org.apache.wicket</groupId>
>       <artifactId>wicket-auth-roles</artifactId>
>       <version>7.0.0-M3</version>
>     </dependency>
>     <dependency>
>       <groupId>org.apache.wicket</groupId>
>       <artifactId>wicket-extensions</artifactId>
>       <version>7.0.0-M3</version>
>     </dependency>
>
> We're using embedded Jetty 9.1.0.v20131115. Running from my IDE (Eclipse)
> this works just fine. But when our team creates a jar file and distributes
> the application with an installer, just tried to browser to the page in
> question gives us a MissingResourceException: Unable to find property:
> 'UploadProgressBar.starting' (see below).
>
> No doubt there's something simple I'm forgetting. Any suggestions? Here's
> the stack trace:
>
> 2014-09-22 07:40:49 ERROR (DefaultExceptionMapper) [2014-09-22
> 07:40:49,433] - org.apache.wicket.DefaultExceptionMapper.
> internalMap(DefaultExceptionMapper.java:128): Unexpected error occurred
> org.apache.wicket.WicketRuntimeException: Exception in rendering
> component: [HtmlHeaderContainer [Component id = _header
> _0]]
>         at org.apache.wicket.Component.internalRenderComponent(
> Component.java:2566)
>         at org.apache.wicket.MarkupContainer.onRender(
> MarkupContainer.java:1550)
>         at org.apache.wicket.Component.internalRender(Component.java:2357)
>         at org.apache.wicket.Component.render(Component.java:2285)
>         at org.apache.wicket.MarkupContainer.renderNext(
> MarkupContainer.java:1418)
>         at org.apache.wicket.MarkupContainer.renderAll(
> MarkupContainer.java:1611)
>         at org.apache.wicket.Page.onRender(Page.java:879)
>         at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:
> 142)
>         at org.apache.wicket.Component.internalRender(Component.java:2357)
>         at org.apache.wicket.Component.render(Component.java:2285)
>         at org.apache.wicket.Page.renderPage(Page.java:1018)
>         at org.apache.wicket.request.handler.render.
> WebPageRenderer.renderPage(WebPageRenderer.java:122)
>         at org.apache.wicket.request.handler.render.
> WebPageRenderer.respond(WebPageRenderer.java:247)
>         at org.apache.wicket.core.request.handler.
> RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
>         at org.apache.wicket.request.cycle.RequestCycle$
> HandlerExecutor.respond(RequestCycle.java:837)
>         at org.apache.wicket.request.RequestHandlerStack.execute(
> RequestHandlerStack.java:64)
>         at org.apache.wicket.request.cycle.RequestCycle.execute(
> RequestCycle.java:265)
>         at org.apache.wicket.request.cycle.RequestCycle.
> processRequest(RequestCycle.java:222)
>         at org.apache.wicket.request.cycle.RequestCycle.
> processRequestAndDetach(RequestCycle.java:293)
>         at org.apache.wicket.protocol.http.WicketFilter.
> processRequestCycle(WicketFilter.java:261)
>         at org.apache.wicket.protocol.http.WicketFilter.
> processRequest(WicketFilter.java:203)
>         at org.apache.wicket.protocol.http.WicketFilter.doFilter(
> WicketFilter.java:284)
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1539)
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
> ServletHandler.java:524)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143)
>         at org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:544)
>         at org.eclipse.jetty.server.session.SessionHandler.
> doHandle(SessionHandler.java:221)
>         at org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java:1110)
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(
> ServletHandler.java:453)
>         at org.eclipse.jetty.server.session.SessionHandler.
> doScope(SessionHandler.java:183)
>         at org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:1044)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.Server.handle(Server.java:459)
>         at org.eclipse.jetty.server.HttpChannel.handle(
> HttpChannel.java:280)
>         at org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:229)
>         at org.eclipse.jetty.io.AbstractConnection$1.run(
> AbstractConnection.java:505)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:607)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
> QueuedThreadPool.java:536)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.util.MissingResourceException: Unable to find property:
> 'UploadProgressBar.starting' for component: form
> :progress [class=org.apache.wicket.extensions.ajax.markup.html.
> form.upload.UploadProgressBar]. Locale: null, style: null
>
>         at org.apache.wicket.Localizer.getString(Localizer.java:237)
>         at org.apache.wicket.Localizer.getString(Localizer.java:170)
>         at org.apache.wicket.model.StringResourceModel.getString(
> StringResourceModel.java:427)
>         at org.apache.wicket.model.StringResourceModel.getString(
> StringResourceModel.java:401)
>         at org.apache.wicket.extensions.ajax.markup.html.form.upload.
> UploadProgressBar.renderHead(UploadProgressBar.java
> :236)
>         at org.apache.wicket.Component.renderHead(Component.java:4459)
>         at org.apache.wicket.Component.internalRenderHead(Component.
> java:2692)
>         at org.apache.wicket.markup.renderStrategy.
> ChildFirstHeaderRenderStrategy$1.component(ChildFirstHeaderRenderStra
> tegy.java:85)
>         at org.apache.wicket.markup.renderStrategy.
> DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:96)
>         at org.apache.wicket.markup.renderStrategy.
> DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87)
>         at org.apache.wicket.markup.renderStrategy.
> DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87)
>         at org.apache.wicket.markup.renderStrategy.
> DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:51)
>         at org.apache.wicket.markup.renderStrategy.
> ChildFirstHeaderRenderStrategy.renderChildHeaders(ChildFirstHeaderRen
> derStrategy.java:78)
>         at org.apache.wicket.markup.renderStrategy.
> ChildFirstHeaderRenderStrategy.renderHeader(ChildFirstHeaderRenderStr
> ategy.java:57)
>         at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.
> onComponentTagBody(HtmlHeaderContainer.java:170)
>         at org.apache.wicket.markup.html.panel.
> DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStr
> ategy.java:71)
>         at org.apache.wicket.Component.internalRenderComponent(
> Component.java:2542)
>         ... 39 more
>
> Thanks,
>
> Garret
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>