Re: OT: wicket running in Tomcat got a java.lang.NoClassDefFoundError: javax/servlet/ServletRequest

2009-10-12 Thread Martijn Reuvers
Hi Fernando,

If I were you and want to quickly test if there's something wrong with
your Tomcat. Download the .zip distribution of Tomcat, extract, run
and deploy your application in /webapps/. That should work just fine
normally, if it does - then you know your current installation of
Tomcat is bugged...

Martijn

On Mon, Oct 12, 2009 at 5:08 PM, Fernando Wermus
 wrote:
> I omitted this part of stack trace:
> INFO: Illegal access: this web application instance has been stopped
> already.  Could not load javax.servlet.ServletRequest.  The eventual
> following stack trace is caused by an error thrown for debugging purposes as
> well as to attempt to terminate the thread which caused the illegal access,
> and has no functional impact.
> java.lang.IllegalStateException
>        at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1249)
>        at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
>
>
> On Mon, Oct 12, 2009 at 11:40 AM, Fernando Wermus > wrote:
>
>> Is jetty ready for production?
>>
>>
>> On Mon, Oct 12, 2009 at 11:40 AM, Fernando Wermus <
>> fernando.wer...@gmail.com> wrote:
>>
>>> *Servlet/JSP Spec* *Apache Tomcat version*2.5/2.1 6.0.202.4/2.0 5.5.28
>>> 2.3/1.2 4.1.402.2/1.1 3.3.2 (archived)
>>> I supports 2.4 servlet api.
>>>
>>> any other thoughts? The guy that installed tomcat, added a open-java 6.0
>>> and there are set java_home as well as tomcat_home.
>>>
>>> On Mon, Oct 12, 2009 at 5:17 AM, Martijn Dashorst <
>>> martijn.dasho...@gmail.com> wrote:
>>>
 Does tomcat 5.5 support servlet api 1.4?

 Martijn

 On Mon, Oct 12, 2009 at 10:10 AM, Fernando Wermus
  wrote:
 > Does anyone face this exception under Tomcat?
 > The servelet-api.jar is in usr/share/tomcat5.5/lib/commons
 >
 > javax.servlet.ServletException: Filter execution threw an exception
 >
 > *root cause*
 >
 > java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
 >        java.lang.Class.getDeclaredMethods0(Native Method)
 >        java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
 >        java.lang.Class.getMethod0(Class.java:2687)
 >        java.lang.Class.getMethod(Class.java:1620)
 >
  org.apache.catalina.security.SecurityUtil.createMethodAndCacheIt(SecurityUtil.java:345)
 >
  org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:212)
 >
 > *root cause*
 >
 > java.lang.ClassNotFoundException: javax.servlet.ServletRequest
 >
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
 >
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
 >        java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
 >        java.lang.Class.getDeclaredMethods0(Native Method)
 >        java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
 >        java.lang.Class.getMethod0(Class.java:2687)
 >        java.lang.Class.getMethod(Class.java:1620)
 >
  org.apache.catalina.security.SecurityUtil.createMethodAndCacheIt(SecurityUtil.java:345)
 >
  org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:212)
 >
 >
 >
 > --
 > Fernando Wermus.
 >
 > www.linkedin.com/in/fernandowermus
 >



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.4 increases type safety for web applications
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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


>>>
>>>
>>> --
>>> Fernando Wermus.
>>>
>>> www.linkedin.com/in/fernandowermus
>>>
>>
>>
>>
>> --
>> Fernando Wermus.
>>
>> www.linkedin.com/in/fernandowermus
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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



Re: Mysterious NullPointerException

2009-06-29 Thread Martijn Reuvers
Likely the message or stacktrace(s) (the actual cause) is throwing the
nullpointer, in which case that is all you can see when logging. You
might wanna try: log.error("whatever here",e.getCause()), generally
the latter is what you're interested in anyway. You might also try:


 @Override
  protected void logRuntimeException(RuntimeException e) {
//super.logRuntimeException(e); // Turn this one off as
somewhere the error seems to occur
log.error("whatever, but NOT the message",e);
   }

Finally, I'd personally attempt to write it all to a custom file to
see if you can get anything useful into it.

On Mon, Jun 29, 2009 at 6:49 PM, Igor Vaynberg wrote:
> log.runtimeexception is already doing log.error(e.getMessage(), e);
> and he is still not seeing the stacktrace...
>
> -igor
>
> On Mon, Jun 29, 2009 at 9:41 AM, mbrictson wrote:
>>
>> If you simply call log.error(e), your log will only contain e.toString(),
>> which does not include the stack trace. You need to use the 2-arg version of
>> log.error() if you want the full trace.
>>
>> Try this:
>>
>> log.error("An uncaught runtime exception occurred", e);
>>
>>
>> jelevy wrote:
>>>
>>> Igor,
>>> Can you give me some direction on how to go about getting the "e".
>>>
>>> In my own RequestCycle I've done the following:
>>>
>>> �...@override
>>>     protected void logRuntimeException(RuntimeException e) {
>>>         super.logRuntimeException(e);
>>>         log.error(e);
>>>     }
>>>
>>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Mysterious-NullPointerException-tp24094116p24257631.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> 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
>
>

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



Re: JDeveloper - Can I get a show of hands?

2009-06-19 Thread Martijn Reuvers
JDev is not a bad IDE actually. If you want a lot of ready to use
integrated functionality then its by far better than any of the
earlier mentioned IDE's (especially if you use e.g. bc4j, soa, adf
etc) - this is true as long as you need the oracle taste that is.

For pure java programming the other IDE's are a lot more pleasant to
use (especially with non-oracle open-source frameworks like wicket,
spring, seam etc). I've done projects in both JDeveloper and the other
IDE's, and they all get the job done. :) And you're right I guess, for
non-java people JDeveloper is easier to start with I think...

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



Re: JDeveloper - Can I get a show of hands?

2009-06-19 Thread Martijn Reuvers
You might want to try Netbeans for UML (there is a single plugin,
install it and it works fine). I have not had any problems with it, it
has quite some features (similar to the ones in JDeveloper).

Use SQLDeveloper (of Oracle as well) if you need to replace Toad,
however keep in mind it does not have all the dba features Toad
provides, no free tool has these in fact.

Well Apex is Apex, it cannot be replaced easily as its tied so closely
to the oracle database and its pl/sql.

As soon as you use Maven there is no need anymore for JDeveloper, at
least not for running/building the project. If you really require
specific features for instance for Apex you can still create a single
workspace next to the normal maven one and use that separately.

As for weblogic, just deploy a war manually through its console if you
need to test it. However for faster testing I'd use Jetty with mvn
jetty:run (you can always add a weblogic*.xml to the final war to
override some libraries or so).


On Fri, Jun 19, 2009 at 5:26 PM, Dane Laverty wrote:
> I've really enjoyed getting to use Maven on my recent projects. I'm no
> Maven expert, but I'm finding that I don't have to be -- it really
> just does a great job. Getting Maven working with JDeveloper has not
> been going well so far, so that's been one hangup.
>
> There are a few reasons for the department-wide IDE mandate. Our
> manager has just discovered UML (I don't know anything about it, to be
> honest), and JDeveloper provides UML functionality out of the box,
> while any of the free Eclipse UML plugins I could find required a
> mountain of dependencies and don't appear to work as smoothly as the
> JDev one. Also, we're trying to replace TOAD as our database tool, and
> JDev looks like it can do that. The third reason is that most of our
> applications are Oracle ApEx, and JDev has stuff for that too.
>
> I'm trying to port my existing apps to JDeveloper, but without much
> success. The main problems so far are:
> - How do I import a Wicket project using the Maven standard directory
> layout? (I am aware of the Maven JDev plugin for JDev 10, but it has
> issues with JDev 11)
> - How do I run a Wicket app in JDeveloper using the internal WebLogic server?
> - Does JDeveloper have some sort of Maven-like functionality for
> project lifecycle management?
>
> I imagine (hope) that most of these questions have easy answers, but
> I'm just not finding a lot of relevant online
> documentation/discussion. Most of the JDeveloper web app documentation
> is focused on EJBs or basic Servlet/JSP-based apps.
>
>
> On Fri, Jun 19, 2009 at 3:53 AM, James
> Carman wrote:
>> +1 on using Maven.  Most folks at our job site use eclipse, but I'm an
>> IntelliJ junkie (they got me hooked many years ago and I can't break
>> free).  For the most part, we don't have issues between environments,
>> provided folks have their plugins set up correctly.
>>
>> On Fri, Jun 19, 2009 at 6:39 AM, Martijn Reuvers
>>  wrote:
>>>
>>> When you use ADF, then stick to JDeveloper you'll get a lot of
>>> integration for your application and can really build applications
>>> fast.
>>>
>>> However if you use open-source frameworks like wicket, you're better
>>> off using one of the other IDE's (Netbeans, Eclipse, IntelliJ). Just
>>> use maven or so, then your management has nothing to say, as it does
>>> not really matter what IDE you use. I always say: Use whatever gets
>>> the job done. =)
>>>
>>> On Fri, Jun 19, 2009 at 1:00 AM, Dane Laverty wrote:
>>> > Our management has chosen to make JDeveloper 11g the required IDE for
>>> > the department. Searching the Wicket mailing list archives, I find
>>> > that there is very little discussion about JDev. I'd be interested to
>>> > know, are any of you currently using JDeveloper as your main Wicket
>>> > IDE?
>>> >
>>> > -
>>> > 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
>>>
>>
>> -
>> 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
>
>

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



Re: JDeveloper - Can I get a show of hands?

2009-06-19 Thread Martijn Reuvers
When you use ADF, then stick to JDeveloper you'll get a lot of
integration for your application and can really build applications
fast.

However if you use open-source frameworks like wicket, you're better
off using one of the other IDE's (Netbeans, Eclipse, IntelliJ). Just
use maven or so, then your management has nothing to say, as it does
not really matter what IDE you use. I always say: Use whatever gets
the job done. =)

On Fri, Jun 19, 2009 at 1:00 AM, Dane Laverty wrote:
> Our management has chosen to make JDeveloper 11g the required IDE for
> the department. Searching the Wicket mailing list archives, I find
> that there is very little discussion about JDev. I'd be interested to
> know, are any of you currently using JDeveloper as your main Wicket
> IDE?
>
> -
> 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: maven-eclipse-plugin 2.6 will break your wicket projects

2009-04-03 Thread Martijn Reuvers
> We've got a guy at work that swears by emacs and refuses to use
> anything else.  Of course, he's the slowest guy on the project team
> and he never gets anything done.

Hehe if you generate say getters and setters for 20 fields with an
IDE, or type them all out instead - you have to type extremely fast I
guess to keep up. :)
(ok I lied, I use an IDE too ...), but at school we were forced to use
an editor like textpad, in the old days (about 10 years ago) .. I
still painfully remember. Not to mention the 'proper' indent of 3
spaces, and brackets really had to start on a new line... :S

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



Re: maven-eclipse-plugin 2.6 will break your wicket projects

2009-04-03 Thread Martijn Reuvers
What's wrong with using notepad or vi? Never such issues with them. :P

On Fri, Apr 3, 2009 at 5:26 PM, James Carman
 wrote:
> On Fri, Apr 3, 2009 at 11:21 AM, Gwyn Evans  wrote:
>>
>> Yes - use IDEA!  :-)
>
> +1! (I can hear the sound of a can of worms opening)

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



Re: [vote] In Wicket 1.4 and onwards, remove widening from the list of choices model in DropDownChoice, changing it from IModel> to IModel>

2009-03-04 Thread Martijn Reuvers
+1 for me too.

On Tue, Mar 3, 2009 at 9:39 PM, Martijn Dashorst
 wrote:
> Though I haven't done much work with 1.4, I think DDC and LV need to
> have the same generics semantics. And I prefer the simple version.
>
> So count my +1.
>
> Martijn
>
> On Tue, Mar 3, 2009 at 9:33 PM, Timo Rantalaiho  wrote:
>> On Mon, 02 Mar 2009, Johan Compagner wrote:
>>> If we loose the wildcard is it then still possible to do everything?
>>>
>>> We have it to be able to use a  List when we declare it as a
>>> 
>>> When you have that you have to copy it over i guess by a helper method.
>>>
>>> I just want to know for sure that i dont miss something that if we remove it
>>> that then something is not possible anymore
>>
>> Right, for example this does not work
>>
>>  List doesntWork = new ArrayList(Arrays.asList("foo", 
>> "bar"));
>>
>> But this does
>>
>>  List works = new ArrayList(Arrays.asList("foo", 
>> "bar"));
>>
>> As Igor says, this might not be a very common scenario(?).
>>
>> The case that has come up a couple of times in the last few
>> days is that the same model didn't work for DropDownChoice
>> and ListView. This seems like a more likely case so it would
>> make sense to align them with each other. So far there have
>> only been a couple of -1s, so maybe that will happen.
>>
>> Best wishes,
>> Timo
>>
>> --
>> Timo Rantalaiho
>> Reaktor Innovations Oy    http://www.ri.fi/ >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.5 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> -
> 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: bad practice in sharing models between wicket form and hibernate?

2009-02-28 Thread Martijn Reuvers
Hello Stephen,

Does not sound like a problem to me. As long as your hibernate session
is closed after the save you do, this object will be in a detached
state and generally should cause no trouble (same goes for if you
fetch an object from the database thru hibernate).

Martijn

On Sat, Feb 28, 2009 at 7:20 PM, Stephen Swinsburg
 wrote:
> Hi all,
>
> I'm after your thoughts on the following method.
>
> Suppose there is a wicket form with some fields that can map directly to a
> simple Hibernate object, and hence a db table. Is it safe to simply wrap
> this object in a CompoundPropertyModel and use it as the backing model for
> the form?
> Then in the onSubmit method, calling a method to get the object from the
> form's model and saving it via Hibernate.
>
> This does work fine, I'm just after any pitfalls that might happen down the
> track. Very simple form here.
>
> thanks.
> S
>
> -
> 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: NullPointerExceptions due to missing Spring constructor injection

2009-02-28 Thread Martijn Reuvers
Hi Christian,

I think you should not use use the static modifier with this, instead use:

@SpringBean
private ArticleRepository repos;

This should work fine and you can use it inside your constructor.
Static does not add anything useful in this case, as its already a
singleton in Spring.

Martijn

On Sat, Feb 28, 2009 at 4:49 PM, Christian Helmbold
 wrote:
> A page in my Wicket app has a contructor which should access an injected 
> repository, but the repository is injected not until construction is 
> complete..
>
> public class ArticlePage extends WebPage
> {
>   �...@springbean
>    private static ArticleRepository repository; // initialized after 
> construction!
>    private Article article;
>
>    public ArticlePage()
>    {
>        this(repository.findByName("index")); // NullPointerException here
>    }
>
>    public ArticlePage(Article article)
>    {
>        add(new Label("name", new PropertyModel(article, "name")));
>        add(new Label("contentHtml", new PropertyModel(article, 
> "contentHtml")));
>        add(new Label("revision", new PropertyModel(article, "revision")));
>        add(new Label("revisionDate", new PropertyModel(article, 
> "revisionDate")));
>        add(new Label("author", new PropertyModel(article, "author")));
>    }
>
> }
>
> This code looks for the default page in a database an passes it to the real 
> constructor. But this is only a footnote because the problem is more general.
>
> How do I access injected objects within a constructor? When I try to access 
> "repository" I get a NullPointerException because this field is initialized 
> after construction. The reason is that the Spring integration in Wicket does 
> not allow constructor injection.
>
> How can solve this problem? Is Wicket+Spring (or DI in general) really a good 
> combination? It seems again and again improper to me.
>
> Thanks for help!
>
> Christian
>
>  --
> http://www.groovy-forum.de
>
>
>
>
>
>
> -
> 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: Dynamically changing CSS style attribute

2009-02-24 Thread Martijn Reuvers
Hello,

As Martin says use javascript, if you really want it easy use jQuery,
you can do something like $('#myElem').css( ... ); and do the
calculation in javascript. Check the docs on the exact syntax
(docs.jquery.com),

Martijn

On Tue, Feb 24, 2009 at 8:00 PM, Martin Makundi
 wrote:
> You could use javaScript
> http://docstore.mik.ua/orelly/webprog/jscript/ch18_03.htm
>
> **
> Martin
>
> 2009/2/24 Seven Corners :
>>
>> I have a control with a needle that moves.  The needle's value is continually
>> changing, so on a timer I ask the server its value and set its position with
>> the "left" CSS attribute, as in:
>>
>> .Needle
>> {
>>  z-index: 1;
>>  width: 2px;
>>  ...
>>  left: 20%;
>> }
>>
>> I do have a bean that returns a percentage string for the value, and I have
>> verified I hit that getter when the update occurs.
>>
>> It looks like I need to create an AttributeModifier for this object's style
>> attribute, and spit out ALL the style attributes in the model, not just the
>> value for the "left" style attribute.  I don't want to do that, because it
>> hard-codes irrelevant styles attributes and I might want to change them in
>> the future.
>>
>> I could use an AttributeAppender, but wouldn't that just add a "left" to the
>> end of the "style" attribute, so that over time (the timer goes off every
>> minute), the "style" attribute would become a really long string?  Don't
>> want to do that either.
>>
>> Is there some way just to tweak a single CSS attribute?
>>
>> Thanks.
>> --
>> View this message in context: 
>> http://www.nabble.com/Dynamically-changing-CSS-style-attribute-tp22187801p22187801.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> 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
>
>

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



Re: Depricated HeaderContributor.forJavaScript?

2009-02-21 Thread Martijn Reuvers
Hi Brill,

You can use: JavascriptPackageResource.getHeaderContribution(..).

Martijn

On Sat, Feb 21, 2009 at 5:17 PM, Brill Pappin  wrote:
> It seems that in 1.4-SNAPSHOT "HeaderContributor.forJavaScript" among other
> is deprecated, but I am unable to find any documentation about what I should
> be using instead.
>
> What is the replacement for the methods in HeaderContributor?
>
> - Brill
>
> -
> 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: Solved: Troubles with Spring: bean of type X not found

2009-02-21 Thread Martijn Reuvers
Hi Christian,

Glad it helped you, I once had something similar. :) Have fun with the
real problems now! ;)

Martijn

On Sat, Feb 21, 2009 at 12:05 PM, Christian Helmbold
 wrote:
> Hello Martijn,
>
> thank you very much! The Spring config was not in the correct directory. 
> Another problem were missing JARs (yes, I should use maven ...). Now I'm 
> happy that it works and that I can concentrate myself on the next problems - 
> with JPA this time and not Wicket and Spring ;-)
>
>
> Regards
> Christian
>
> --
> http://www.groovy-forum.de
>
>
>
>
>
> -
> 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: AW: AW: Troubles with Spring: bean of type X not found

2009-02-21 Thread Martijn Reuvers
Hi Christian,

I am using the same config as you (as far as I can tell), with the
exception I always use: @SpringBean (name="nameHere") so I always use
the name of a bean. So far I never had trouble with that. Perhaps its
the wicket version you are using different from ours? I use 1.4rc2 and
accompanying modules. My main config spring file (your .xml file) is
located directly under WEB-INF/classes (when its deployed) and not in
WEB-INF itself.

Martijn



On Sat, Feb 21, 2009 at 10:40 AM, Christian Helmbold
 wrote:
> Hello Nicolas,
>
>
>> Have you add the following statement in your web.xml
>
> Yes, exactly as you wrote:
>
>  contextConfigLocation
>  classpath:applicationContext.xml
>
>
> I've also tried to use a wrong name for the xml file, only to see if I get an 
> error - and I get one. So the spring config seems to be found.
>
> Regards
> Christian
>
>
>
>
>
>
> -
> 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: @SpringBean vs getApplication().getDao()

2009-02-18 Thread Martijn Reuvers
Hey Sergey,

As far as I know it should create only a single instance for each
spring bean (if they are singletons that is). Thus always the same
bean should be injected into your wicket classes. Does this problem
occur with the @SpringBean or using the proxy approach? I've been
using @SpringBean and never encountered this particular issue before.
Perhaps theress something wrong with the proxy approach or its not
configured properly. Could you try using @SpringBean, see Patricks
reply on how to enable this.

Martijn

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



Re: @SpringBean vs getApplication().getDao()

2009-02-17 Thread Martijn Reuvers
Hello,

I am not entirely sure if I understand your question correctly. But I
usually use Spring like this:

YourDao (either defined in applicationContext.xml or in separate
spring-config files, or annotation-driven e.g. with @Repository. The
template you mention I usually autowire into the dao so basically it
looks like (this example is annotation-driven):

@Repository (value="myDao")
class YourDao {

   @Autowired
   private YourTemplate yourTemplate;


   public void xxx() {
 // use your template here
   }
}

In Wicket you can then use :

@SpringBean (name="myDao")
private YourDao yourDao;

You can do the same using wiring through xml files, the idea is the
same nevertheless. If you need 'larger' services I'd advice to use a
service layer (which uses multiple dao's or whatever is needed to do
the work in a single transaction), the latter is just a matter of
taste.

Martijn

On Tue, Feb 17, 2009 at 5:55 PM, Sergey Podatelev
 wrote:
> Okay, this question might actually be more related to Spring, but I'm
> completely lost here, and my question on Spring forums usually don't get any
> replies, so I hope Wicket community might help as it usually does.
>
> I'm using JCR, and have a RepositoryDao bean configured in
> applicationContext.xml.
> RepositoryDao has a "template" property which points to an instance of
> JcrTemplate in applicationContext.xml, all repository access is performed
> through that template.
>
> I have an AccessPage which has a RepositoryDao injected via @SpringBean.
> There is an inner class Form on that page, it has a default submit button
> and three submit buttons that skip default processing and perform their own
> operations onSubmit(). Both default button and skip-default-processing
> buttons use the same repositoryDao property of AccessPage to perform certain
> operations on repository.
>
> I noticed that when I actually open that AccessPage, there's a new
> RepositoryDao object created, and it's "template" property is null. When I
> press any of those non-default submit buttons of the form, everything works
> fine. But on default button onSubmit(), I see that there's yet another
> insance of RepositoryDao created, and it's "template" is also null, which
> leads to NullPointerException.
>
> I assumed that beans configured in applicationContext.xml are actually
> singletons, so there won't be any new instances of such nodes upon
> pages-with-injections instantiation.
>
> Regardless of whether that assumption is correct/incorrect/my-god-rtfm, I
> still won't understand why default submit button reaction is NPE as it uses
> same partnershipDao property of AccessPage.
>
> Could someone please elaborate some internal differences of the
> annotation-based approach as opposed to storing DAOs in Application object.
> In the latter case it's quite clear that there's a single instance of
> RepositoryDao as a property of MyApplication which is pulled on
> ((MyApplication) Application.get()).getRepositoryDao().
>
> Thanks.
>
> --
> sp
>

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



Re: SubmitLink question

2009-02-16 Thread Martijn Reuvers
Hello Martin,

I've reproduced the problem and created a JIRA issue with it see:
https://issues.apache.org/jira/browse/WICKET-2106 and attached a test
project. I hope this is sufficient information. Thanks for your help!

Martijn

On Mon, Feb 16, 2009 at 10:15 AM, Martin Voigt
 wrote:
> Wicket is built using apache maven 2. A quickstart is a
> self-containing project created from the wicket-quickstart archetype
> which uses Jetty as it's servlet container and is usually used to
> demonstrate bugs or issues.
>
> Go here: http://wicket.apache.org/quickstart.html and generate a
> quickstart project quite easily. Then try to reproduce your problem in
> the generated project, and if the problem still occurs, it is likely
> that the source of the problem lies within wicket and not within your
> custom code. In that case, create a JIRA issue here:
> http://issues.apache.org/jira/browse/WICKET and attach your quickstart
> project reproducing the problem.
>
> Martin
>
> 2009/2/16 Martijn Reuvers :
>> Hello Igor,
>>
>> I am new to this list, so what do you mean with a quickstart?
>>
>> Martijn
>>
>> On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg  
>> wrote:
>>> quickstart please
>>>
>>> -igor
>>>
>>> On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
>>>  wrote:
>>>> Hello everyone,
>>>>
>>>> I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
>>>> trying to add some logic to the onSubmit() of the link. However when I
>>>> do not use the constructor where you need to pass the Form to it, it
>>>> generates really 'weird' html and the link does not work. The link is
>>>> a child (somewhere down the hierarchy) of a Form. The form is a
>>>> transparent resolver, if I pass the form along it happily works and
>>>> generates the needed javascript in the onclick of the link.
>>>>
>>>> Without form parameter SubmitLink generates something like:  >>> href="#" onclick>Detailed information. As you can see
>>>> the onclick is not finished (the spans are from a Label). Any ideas?
>>>>
>>>> Best regards,
>>>> Martijn
>>>>
>>>> -
>>>> 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
>>>
>>>
>>
>> -
>> 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
>
>

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



Re: SubmitLink question

2009-02-16 Thread Martijn Reuvers
Hi Martin,

Thanks for the info! I'll give it a try and see if I can reproduce it somehow.

Martijn

On Mon, Feb 16, 2009 at 10:15 AM, Martin Voigt
 wrote:
> Wicket is built using apache maven 2. A quickstart is a
> self-containing project created from the wicket-quickstart archetype
> which uses Jetty as it's servlet container and is usually used to
> demonstrate bugs or issues.
>
> Go here: http://wicket.apache.org/quickstart.html and generate a
> quickstart project quite easily. Then try to reproduce your problem in
> the generated project, and if the problem still occurs, it is likely
> that the source of the problem lies within wicket and not within your
> custom code. In that case, create a JIRA issue here:
> http://issues.apache.org/jira/browse/WICKET and attach your quickstart
> project reproducing the problem.
>
> Martin
>
> 2009/2/16 Martijn Reuvers :
>> Hello Igor,
>>
>> I am new to this list, so what do you mean with a quickstart?
>>
>> Martijn
>>
>> On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg  
>> wrote:
>>> quickstart please
>>>
>>> -igor
>>>
>>> On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
>>>  wrote:
>>>> Hello everyone,
>>>>
>>>> I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
>>>> trying to add some logic to the onSubmit() of the link. However when I
>>>> do not use the constructor where you need to pass the Form to it, it
>>>> generates really 'weird' html and the link does not work. The link is
>>>> a child (somewhere down the hierarchy) of a Form. The form is a
>>>> transparent resolver, if I pass the form along it happily works and
>>>> generates the needed javascript in the onclick of the link.
>>>>
>>>> Without form parameter SubmitLink generates something like:  >>> href="#" onclick>Detailed information. As you can see
>>>> the onclick is not finished (the spans are from a Label). Any ideas?
>>>>
>>>> Best regards,
>>>> Martijn
>>>>
>>>> -
>>>> 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
>>>
>>>
>>
>> -
>> 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
>
>

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



Re: SubmitLink question

2009-02-16 Thread Martijn Reuvers
Hello Igor,

I am new to this list, so what do you mean with a quickstart?

Martijn

On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg  wrote:
> quickstart please
>
> -igor
>
> On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
>  wrote:
>> Hello everyone,
>>
>> I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
>> trying to add some logic to the onSubmit() of the link. However when I
>> do not use the constructor where you need to pass the Form to it, it
>> generates really 'weird' html and the link does not work. The link is
>> a child (somewhere down the hierarchy) of a Form. The form is a
>> transparent resolver, if I pass the form along it happily works and
>> generates the needed javascript in the onclick of the link.
>>
>> Without form parameter SubmitLink generates something like:  > href="#" onclick>Detailed information. As you can see
>> the onclick is not finished (the spans are from a Label). Any ideas?
>>
>> Best regards,
>> Martijn
>>
>> -
>> 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
>
>

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



SubmitLink question

2009-02-15 Thread Martijn Reuvers
Hello everyone,

I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
trying to add some logic to the onSubmit() of the link. However when I
do not use the constructor where you need to pass the Form to it, it
generates really 'weird' html and the link does not work. The link is
a child (somewhere down the hierarchy) of a Form. The form is a
transparent resolver, if I pass the form along it happily works and
generates the needed javascript in the onclick of the link.

Without form parameter SubmitLink generates something like:  Detailed information. As you can see
the onclick is not finished (the spans are from a Label). Any ideas?

Best regards,
Martijn

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