Re: unable to find property UploadProgressBar.starting

2014-10-08 Thread Garret Wilson
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 andrew.ge...@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 
gar...@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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org








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



Re: unable to find property UploadProgressBar.starting

2014-10-02 Thread Martin Grigorov
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 gar...@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-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




unable to find property UploadProgressBar.starting

2014-10-01 Thread Garret Wilson

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
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-core/artifactId
  version7.0.0-M3/version
/dependency
dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-auth-roles/artifactId
  version7.0.0-M3/version
/dependency
dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-extensions/artifactId
  version7.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

Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Martin Grigorov
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 gar...@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
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-core/artifactId
   version7.0.0-M3/version
 /dependency
 dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-auth-roles/artifactId
   version7.0.0-M3/version
 /dependency
 dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-extensions/artifactId
   version7.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

Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Garret Wilson

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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Andrew Geery
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 gar...@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-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Martin Grigorov
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 andrew.ge...@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 gar...@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-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Garret Wilson
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 andrew.ge...@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 gar...@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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Martin Grigorov
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 gar...@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 andrew.ge...@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 gar...@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-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org






Re: unable to find property UploadProgressBar.starting

2014-10-01 Thread Garret Wilson

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

2014-10-01 Thread Martin Grigorov
On Wed, Oct 1, 2014 at 9:49 PM, Garret Wilson gar...@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

2014-10-01 Thread Garret Wilson

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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Unable to find property

2013-01-20 Thread Lucio Crusca
Thanks to Sven, now my DataTable has sorting columns!

However my next step is to add CSV export. I copied the code from the examples 
and added

CSVDataExporter c_exp = new CSVDataExporter();
ExportToolbar et = new ExportToolbar(dataTable);
et.addDataExporter(c_exp);
dataTable.addBottomToolbar(new
ExportToolbar(dataTable).addDataExporter(c_exp));

but when I try the app I get the following in the browser window:

java.util.MissingResourceException: Unable to find property: 
'datatable.export-file-name'. Locale: null, style: null
 at org.apache.wicket.Localizer.getString(Localizer.java:237)
 at org.apache.wicket.Localizer.getString(Localizer.java:149)
 at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:76)
 at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:33)
 at 
org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.createExportLink(ExportToolbar.java:202)

...

What part of the examples code did I miss this time?


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



Re: Unable to find property

2013-01-20 Thread Sven Meier
If you don't provide a filename to the ExportToolbar constructor, a 
String resource with key datatable.export-file-name is used.


Normally a default is provided here:

/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties

I'm not sure why this is not present in your setup.

Sven

On 01/20/2013 03:52 PM, Lucio Crusca wrote:

Thanks to Sven, now my DataTable has sorting columns!

However my next step is to add CSV export. I copied the code from the examples
and added

 CSVDataExporter c_exp = new CSVDataExporter();
 ExportToolbar et = new ExportToolbar(dataTable);
 et.addDataExporter(c_exp);
 dataTable.addBottomToolbar(new
 ExportToolbar(dataTable).addDataExporter(c_exp));

but when I try the app I get the following in the browser window:

java.util.MissingResourceException: Unable to find property:
'datatable.export-file-name'. Locale: null, style: null
  at org.apache.wicket.Localizer.getString(Localizer.java:237)
  at org.apache.wicket.Localizer.getString(Localizer.java:149)
  at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:76)
  at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:33)
  at
org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.createExportLink(ExportToolbar.java:202)

...

What part of the examples code did I miss this time?


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




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



Re: Unable to find property

2013-01-20 Thread Lucio Crusca
In data domenica 20 gennaio 2013 17:16:48, Sven Meier ha scritto:
 If you don't provide a filename to the ExportToolbar constructor, a
 String resource with key datatable.export-file-name is used.
 
 Normally a default is provided here:
 
 /wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.p
 roperties
 
 I'm not sure why this is not present in your setup.

My project was depending on wicket-examples-6.0-SNAPSHOT, which in turn 
depends on wicket-extensions-6.0-SNAPSHOT, which in turn lacks that default in 
the above properties file. My final war was being built with both 
wicket-extensions-6.4.0 and wicket-extensions-6.0-SNAPSHOT and the latter 
eventually took precedence.

It now works, except it exports only the first column of my DataTable...

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