Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-06 Thread Johan Compagner

this is very strange because as far as i know that flag is only set inside
that if:

if (!getFlag(FLAG_NEW_VERSION))  -- this may return false?
   {
   // if we have no version manager
   if (versionManager == null)
   {
   // then install a new version manager
   versionManager = newVersionManager();
   }

   // start a new version
   versionManager.beginVersion
(getRequest().mergeVersion());
   setFlag(FLAG_NEW_VERSION, true);
   }

But i guess versionManager is in some places set to null gain.. Is then that
flag not reset?

johan


On 3/5/07, Aaron Hiniker [EMAIL PROTECTED] wrote:


 I ran this through my debugger, and my assumptions where correct.  The
FLAG_NEW_VERSION flag is set while versionManager is null.  I'm, looking
around and can't figure out the exact conditions that would cause this.

Any thoughts?

Aaron

Aaron Hiniker wrote:

Yeah, I know.  But I'm not messing with any versioning settings (this is
just out-of-the-box ajax components and the like), so really there shouldn't
be any of these issues, correct?  Here's mayTrackChangesFor() method, I've
added a comment regarding my thoughts as to what is causing this:

private final boolean mayTrackChangesFor(final Component component,
MarkupContainer parent)
{
// Auto components do not participate in versioning since they are
// added during the rendering phase (which is normally illegal).
if (component.isAuto() || (parent == null 
!component.isVersioned())
|| (parent != null  !parent.isVersioned()))
{
return false;
}
else
{
// the component is versioned... are we tracking changes at
all?
if (getFlag(FLAG_TRACK_CHANGES))   -- this returns true
{
// we are tracking changes... do we need to start new
version?
if (!getFlag(FLAG_NEW_VERSION))  -- this may return
false?
{
// if we have no version manager
if (versionManager == null)
{
// then install a new version manager
versionManager = newVersionManager();
}

// start a new version
versionManager.beginVersion
(getRequest().mergeVersion());
setFlag(FLAG_NEW_VERSION, true);
}

// this returns true, even though versionManager is not
set because of false check above
// return true as we are ready for versioning
return true;
}

// we are not tracking changes or the component not versioned
return false;
}
}

Should I specifically be setting versioning/non-versioning for components
to avoid this error?

Aaron

Johan Compagner wrote:

But if it is null then you could have a problem that things should be
versioned but arent..

So adding null checks is not the fix.

johan


On 3/2/07, Aaron HIniker [EMAIL PROTECTED] wrote:

 That's why I was pointing at mayTrackChangesFor()..  I looked at the
 method and I can't see a loophole, but there must be one to generate an NPE,
 correct?

 When I implemented the not-null check, I noticed exceptions still being
 thrown from 2 other methods (if you search Page.java for versionManager,
 you can see where there is the assumption that mayTrackChangesFor() is
 checked for 'true', yet versionManager is never initialized in other methods
 as well.  So after adding the null check to each of these methods, the
 application is working fine.  Thing is, I've only seen this exception when
 dealing with ajax (default not versioned, right?).

 I will try and run a debugger through mayTrackChangesFor() with my
 current app, and see the logic flow and why versionManager is ending up
 null.

 Aaron

 Johan Compagner wrote:

 That is because the mayTrackChangesFor() method should only return true
 when it makes a version manager. Why is that not the case?
 If that method returns true the version manager can't be null because
 the version info must be tracked.

 johan


 On 3/1/07, Aaron Hiniker [EMAIL PROTECTED] wrote:
 
  I pulled the latest from trunk.  And I am getting this NPE:
 
  16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
  16:30:14,544 ERROR [STDERR] at
  wicket.Page.componentStateChanging(Page.java:327)
  16:30:14,545 ERROR [STDERR] at
  wicket.Component.addStateChange(Component.java:2553)
  16:30:14,545 ERROR [STDERR] at
  wicket.Component.setModel(Component.java:2191)
  16:30:14,545 ERROR [STDERR] at
  wicket.MarkupContainer.setModel(MarkupContainer.java :596)
  16:30:14,546 ERROR [STDERR] at
  com.edicorp.erp.web.components.search.ProductSearchPanel.query(
  ProductSearchPanel.java:144)
  

Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-06 Thread Aaron HIniker
Line #601 in Page.java is the only place where versionManager gets set
back to null from what I can tell..

// If we went all the way back to the
original page
if (page != null 
page.getCurrentVersionNumber() == 0)
{
// remove version info
page.versionManager = null;
}

I am using bookmarkable pages, without an immediate redirect to a Page
instance, do bookmarkable pages stay on version 0 when invoking an ajax
component?

Or should this be set to a new instance of VersionManager instead of null?

Aaron


Johan Compagner wrote:
 this is very strange because as far as i know that flag is only set
 inside that if:

 if (!getFlag(FLAG_NEW_VERSION))  -- this may return false?
 {
 // if we have no version manager
 if (versionManager == null)
 {
 // then install a new version manager
 versionManager = newVersionManager();
 }

 // start a new version

 versionManager.beginVersion(getRequest().mergeVersion());
 setFlag(FLAG_NEW_VERSION, true);
 }

 But i guess versionManager is in some places set to null gain.. Is
 then that flag not reset?

 johan


 On 3/5/07, *Aaron Hiniker * [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 I ran this through my debugger, and my assumptions where correct. 
 The FLAG_NEW_VERSION flag is set while versionManager is null. 
 I'm, looking around and can't figure out the exact conditions that
 would cause this.

 Any thoughts?

 Aaron

 Aaron Hiniker wrote:
 Yeah, I know.  But I'm not messing with any versioning settings
 (this is just out-of-the-box ajax components and the like), so
 really there shouldn't be any of these issues, correct?  Here's
 mayTrackChangesFor() method, I've added a comment regarding my
 thoughts as to what is causing this:

 private final boolean mayTrackChangesFor(final Component
 component, MarkupContainer parent)
 {
 // Auto components do not participate in versioning since
 they are
 // added during the rendering phase (which is normally
 illegal).
 if (component.isAuto() || (parent == null 
 !component.isVersioned())
 || (parent != null  !parent.isVersioned()))
 {
 return false;
 }
 else
 {
 // the component is versioned... are we tracking
 changes at all?
 if (getFlag(FLAG_TRACK_CHANGES))   -- this returns true
 {
 // we are tracking changes... do we need to start
 new version?
 if (!getFlag(FLAG_NEW_VERSION))  -- this may
 return false?
 {
 // if we have no version manager
 if (versionManager == null)
 {
 // then install a new version manager
 versionManager = newVersionManager();
 }

 // start a new version

 versionManager.beginVersion(getRequest().mergeVersion());
 setFlag(FLAG_NEW_VERSION, true);
 }

 // this returns true, even though versionManager
 is not set because of false check above
 // return true as we are ready for versioning
 return true;
 }

 // we are not tracking changes or the component not
 versioned
 return false;
 }
 }

 Should I specifically be setting versioning/non-versioning for
 components to avoid this error?

 Aaron

 Johan Compagner wrote:
 But if it is null then you could have a problem that things
 should be versioned but arent..

 So adding null checks is not the fix.

 johan


 On 3/2/07, * Aaron HIniker* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 That's why I was pointing at mayTrackChangesFor()..  I
 looked at the method and I can't see a loophole, but there
 must be one to generate an NPE, correct?

 When I implemented the not-null check, I noticed exceptions
 still being thrown from 2 other methods (if you search
 Page.java for versionManager, you can see where there is the
 assumption that mayTrackChangesFor() is checked for 'true',
 yet versionManager is never initialized in other methods as
 well.  So after adding the null check to each of these
 methods, the application 

Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-06 Thread Johan Compagner

normally ajax shouldn't make a new version but in 1.3 we have also an ajax
version number beside the page version number.

But that the moment page.versionManager is set to null the flag should be
false at that time.
But if you have a quick test that exposes this null pointer please make an
issue and attach it.


On 3/7/07, Aaron HIniker [EMAIL PROTECTED] wrote:


 Line #601 in Page.java is the only place where versionManager gets set
back to null from what I can tell..

// If we went all the way back to the
original page
if (page != null 
page.getCurrentVersionNumber() == 0)
{
// remove version info
page.versionManager = null;
}

I am using bookmarkable pages, without an immediate redirect to a Page
instance, do bookmarkable pages stay on version 0 when invoking an ajax
component?

Or should this be set to a new instance of VersionManager instead of null?

Aaron


Johan Compagner wrote:

this is very strange because as far as i know that flag is only set inside
that if:

 if (!getFlag(FLAG_NEW_VERSION))  -- this may return false?
{
// if we have no version manager
if (versionManager == null)
{
// then install a new version manager
versionManager = newVersionManager();
}

// start a new version
versionManager.beginVersion
(getRequest().mergeVersion());
setFlag(FLAG_NEW_VERSION, true);
}

But i guess versionManager is in some places set to null gain.. Is then
that flag not reset?

johan


On 3/5/07, Aaron Hiniker [EMAIL PROTECTED] wrote:

 I ran this through my debugger, and my assumptions where correct.  The
 FLAG_NEW_VERSION flag is set while versionManager is null.  I'm, looking
 around and can't figure out the exact conditions that would cause this.

 Any thoughts?

 Aaron

 Aaron Hiniker wrote:

  Yeah, I know.  But I'm not messing with any versioning settings (this
 is just out-of-the-box ajax components and the like), so really there
 shouldn't be any of these issues, correct?  Here's mayTrackChangesFor()
 method, I've added a comment regarding my thoughts as to what is causing
 this:

 private final boolean mayTrackChangesFor(final Component component,
 MarkupContainer parent)
 {
 // Auto components do not participate in versioning since they
 are
 // added during the rendering phase (which is normally illegal).
 if (component.isAuto() || (parent == null 
 !component.isVersioned())
 || (parent != null  !parent.isVersioned()))
 {
 return false;
 }
 else
 {
 // the component is versioned... are we tracking changes at
 all?
 if (getFlag(FLAG_TRACK_CHANGES))   -- this returns true
 {
 // we are tracking changes... do we need to start new
 version?
 if (!getFlag(FLAG_NEW_VERSION))  -- this may return
 false?
 {
 // if we have no version manager
 if (versionManager == null)
 {
 // then install a new version manager
 versionManager = newVersionManager();
 }

 // start a new version
 versionManager.beginVersion
 (getRequest().mergeVersion());
 setFlag(FLAG_NEW_VERSION, true);
 }

 // this returns true, even though versionManager is not
 set because of false check above
 // return true as we are ready for versioning
 return true;
 }

 // we are not tracking changes or the component not
 versioned
 return false;
 }
 }

 Should I specifically be setting versioning/non-versioning for
 components to avoid this error?

 Aaron

 Johan Compagner wrote:

 But if it is null then you could have a problem that things should be
 versioned but arent..

 So adding null checks is not the fix.

 johan


 On 3/2/07, Aaron HIniker [EMAIL PROTECTED] wrote:
 
  That's why I was pointing at mayTrackChangesFor()..  I looked at the
  method and I can't see a loophole, but there must be one to generate an NPE,
  correct?
 
  When I implemented the not-null check, I noticed exceptions still
  being thrown from 2 other methods (if you search Page.java for
  versionManager, you can see where there is the assumption that
  mayTrackChangesFor() is checked for 'true', yet versionManager is never
  initialized in other methods as well.  So after adding the null check to
  each of these methods, the application is working fine.  Thing is, I've only
  

Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-06 Thread Gohan

I've experienced the exact same problem. You'll get this a lot when working
with ajax components. I've also reported this issue to the wicket 2 jira. If
you add if(versionManger != null) prior to the versionManager call you'll be
fine but that's probably an ugly hack. But it seem to work til they've
actually fixed it. 


Aaron Hiniker-2 wrote:
 
 I pulled the latest from trunk.  And I am getting this NPE:
 
 16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
 16:30:14,544 ERROR [STDERR] at
 wicket.Page.componentStateChanging(Page.java:327)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.addStateChange(Component.java:2553)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.setModel(Component.java:2191)
 16:30:14,545 ERROR [STDERR] at
 wicket.MarkupContainer.setModel(MarkupContainer.java:596)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.query(ProductSearchPanel.java:144)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate(ProductSearchPanel.java:109)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(FilterPanel.java:74)
 16:30:14,547 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit(QueryPanel.java:197)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
 16:30:14,547 ERROR [STDERR] at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
 
 I remember I was getting this NPE before, and I patched the source to
 include this null check in Page.java:
 
 final void componentStateChanging(final Component component,
 Change change)
 {
 checkHierarchyChange(component);
 
 dirty();
 if (mayTrackChangesFor(component, null))
 {  
 if ( versionManager != null )

 versionManager.componentStateChanging(change);
 }
 }
 
 It seems that everywhere else in Page.java there is a null check for
 versionManager, except in this method.  Not sure, but perhaps the
 problem lies in the #mayTrackChangesFor() method, but in any case if I
 add this null check my code runs fine.
 
 Aaron
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/NPE-in-Page-componentStateChanging-tf3330773.html#a9347814
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-05 Thread Aaron Hiniker
Yeah, I know.  But I'm not messing with any versioning settings (this is
just out-of-the-box ajax components and the like), so really there
shouldn't be any of these issues, correct?  Here's mayTrackChangesFor()
method, I've added a comment regarding my thoughts as to what is causing
this:

private final boolean mayTrackChangesFor(final Component component,
MarkupContainer parent)
{
// Auto components do not participate in versioning since they are
// added during the rendering phase (which is normally illegal).
if (component.isAuto() || (parent == null 
!component.isVersioned())
|| (parent != null  !parent.isVersioned()))
{
return false;
}
else
{
// the component is versioned... are we tracking changes at all?
if (getFlag(FLAG_TRACK_CHANGES))   -- this returns true
{
// we are tracking changes... do we need to start new
version?
if (!getFlag(FLAG_NEW_VERSION))  -- this may return false?
{
// if we have no version manager
if (versionManager == null)
{
// then install a new version manager
versionManager = newVersionManager();
}

// start a new version
   
versionManager.beginVersion(getRequest().mergeVersion());
setFlag(FLAG_NEW_VERSION, true);
}

// this returns true, even though versionManager is not
set because of false check above
// return true as we are ready for versioning
return true;
}

// we are not tracking changes or the component not versioned
return false;
}
}

Should I specifically be setting versioning/non-versioning for
components to avoid this error?

Aaron

Johan Compagner wrote:
 But if it is null then you could have a problem that things should be
 versioned but arent..

 So adding null checks is not the fix.

 johan


 On 3/2/07, * Aaron HIniker* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 That's why I was pointing at mayTrackChangesFor()..  I looked at
 the method and I can't see a loophole, but there must be one to
 generate an NPE, correct?

 When I implemented the not-null check, I noticed exceptions still
 being thrown from 2 other methods (if you search Page.java for
 versionManager, you can see where there is the assumption that
 mayTrackChangesFor() is checked for 'true', yet versionManager is
 never initialized in other methods as well.  So after adding the
 null check to each of these methods, the application is working
 fine.  Thing is, I've only seen this exception when dealing with
 ajax (default not versioned, right?). 

 I will try and run a debugger through mayTrackChangesFor() with my
 current app, and see the logic flow and why versionManager is
 ending up null.

 Aaron

 Johan Compagner wrote:
 That is because the mayTrackChangesFor() method should only
 return true
 when it makes a version manager. Why is that not the case?
 If that method returns true the version manager can't be null
 because the version info must be tracked.

 johan


 On 3/1/07, *Aaron Hiniker* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 I pulled the latest from trunk.  And I am getting this NPE:

 16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
 16:30:14,544 ERROR [STDERR] at
 wicket.Page.componentStateChanging(Page.java:327)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.addStateChange(Component.java:2553)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.setModel(Component.java:2191)
 16:30:14,545 ERROR [STDERR] at
 wicket.MarkupContainer.setModel(MarkupContainer.java :596)
 16:30:14,546 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.ProductSearchPanel.query(ProductSearchPanel.java:144)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate
 (ProductSearchPanel.java:109)
 16:30:14,546 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(FilterPanel.java:74)
 16:30:14,547 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit
 (QueryPanel.java:197)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
 16:30:14,547 ERROR [STDERR] at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


 

Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-05 Thread Aaron Hiniker
I ran this through my debugger, and my assumptions where correct.  The
FLAG_NEW_VERSION flag is set while versionManager is null.  I'm, looking
around and can't figure out the exact conditions that would cause this.

Any thoughts?

Aaron

Aaron Hiniker wrote:
 Yeah, I know.  But I'm not messing with any versioning settings (this
 is just out-of-the-box ajax components and the like), so really there
 shouldn't be any of these issues, correct?  Here's
 mayTrackChangesFor() method, I've added a comment regarding my
 thoughts as to what is causing this:

 private final boolean mayTrackChangesFor(final Component
 component, MarkupContainer parent)
 {
 // Auto components do not participate in versioning since they are
 // added during the rendering phase (which is normally illegal).
 if (component.isAuto() || (parent == null 
 !component.isVersioned())
 || (parent != null  !parent.isVersioned()))
 {
 return false;
 }
 else
 {
 // the component is versioned... are we tracking changes
 at all?
 if (getFlag(FLAG_TRACK_CHANGES))   -- this returns true
 {
 // we are tracking changes... do we need to start new
 version?
 if (!getFlag(FLAG_NEW_VERSION))  -- this may return
 false?
 {
 // if we have no version manager
 if (versionManager == null)
 {
 // then install a new version manager
 versionManager = newVersionManager();
 }

 // start a new version

 versionManager.beginVersion(getRequest().mergeVersion());
 setFlag(FLAG_NEW_VERSION, true);
 }

 // this returns true, even though versionManager is
 not set because of false check above
 // return true as we are ready for versioning
 return true;
 }

 // we are not tracking changes or the component not versioned
 return false;
 }
 }

 Should I specifically be setting versioning/non-versioning for
 components to avoid this error?

 Aaron

 Johan Compagner wrote:
 But if it is null then you could have a problem that things should be
 versioned but arent..

 So adding null checks is not the fix.

 johan


 On 3/2/07, * Aaron HIniker* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 That's why I was pointing at mayTrackChangesFor()..  I looked at
 the method and I can't see a loophole, but there must be one to
 generate an NPE, correct?

 When I implemented the not-null check, I noticed exceptions still
 being thrown from 2 other methods (if you search Page.java for
 versionManager, you can see where there is the assumption that
 mayTrackChangesFor() is checked for 'true', yet versionManager is
 never initialized in other methods as well.  So after adding the
 null check to each of these methods, the application is working
 fine.  Thing is, I've only seen this exception when dealing with
 ajax (default not versioned, right?). 

 I will try and run a debugger through mayTrackChangesFor() with
 my current app, and see the logic flow and why versionManager is
 ending up null.

 Aaron

 Johan Compagner wrote:
 That is because the mayTrackChangesFor() method should only
 return true
 when it makes a version manager. Why is that not the case?
 If that method returns true the version manager can't be null
 because the version info must be tracked.

 johan


 On 3/1/07, *Aaron Hiniker* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 I pulled the latest from trunk.  And I am getting this NPE:

 16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
 16:30:14,544 ERROR [STDERR] at
 wicket.Page.componentStateChanging(Page.java:327)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.addStateChange(Component.java:2553)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.setModel(Component.java:2191)
 16:30:14,545 ERROR [STDERR] at
 wicket.MarkupContainer.setModel(MarkupContainer.java :596)
 16:30:14,546 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.ProductSearchPanel.query(ProductSearchPanel.java:144)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate
 (ProductSearchPanel.java:109)
 16:30:14,546 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(FilterPanel.java:74)
 16:30:14,547 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit
 (QueryPanel.java:197)
 16:30:14,547 ERROR [STDERR]  

Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-04 Thread Johan Compagner

But if it is null then you could have a problem that things should be
versioned but arent..

So adding null checks is not the fix.

johan


On 3/2/07, Aaron HIniker [EMAIL PROTECTED] wrote:


 That's why I was pointing at mayTrackChangesFor()..  I looked at the
method and I can't see a loophole, but there must be one to generate an NPE,
correct?

When I implemented the not-null check, I noticed exceptions still being
thrown from 2 other methods (if you search Page.java for versionManager,
you can see where there is the assumption that mayTrackChangesFor() is
checked for 'true', yet versionManager is never initialized in other methods
as well.  So after adding the null check to each of these methods, the
application is working fine.  Thing is, I've only seen this exception when
dealing with ajax (default not versioned, right?).

I will try and run a debugger through mayTrackChangesFor() with my current
app, and see the logic flow and why versionManager is ending up null.

Aaron

Johan Compagner wrote:

That is because the mayTrackChangesFor() method should only return true
when it makes a version manager. Why is that not the case?
If that method returns true the version manager can't be null because the
version info must be tracked.

johan


On 3/1/07, Aaron Hiniker [EMAIL PROTECTED] wrote:

 I pulled the latest from trunk.  And I am getting this NPE:

 16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
 16:30:14,544 ERROR [STDERR] at
 wicket.Page.componentStateChanging(Page.java:327)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.addStateChange(Component.java:2553)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.setModel(Component.java:2191)
 16:30:14,545 ERROR [STDERR] at
 wicket.MarkupContainer.setModel(MarkupContainer.java :596)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.query(
 ProductSearchPanel.java:144)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate (
 ProductSearchPanel.java:109)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(
 FilterPanel.java:74)
 16:30:14,547 ERROR [STDERR] at

 com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit(
 QueryPanel.java:197)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
 16:30:14,547 ERROR [STDERR] at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


 I remember I was getting this NPE before, and I patched the source to
 include this null check in Page.java :

 final void componentStateChanging(final Component component,
 Change change)
 {
 checkHierarchyChange(component);

 dirty();
 if (mayTrackChangesFor(component, null))
 {
 if ( versionManager != null )

 versionManager.componentStateChanging(change);
 }
 }

 It seems that everywhere else in Page.java there is a null check for
 versionManager, except in this method.  Not sure, but perhaps the
 problem lies in the #mayTrackChangesFor() method, but in any case if I
 add this null check my code runs fine.

 Aaron


 -

 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


--

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

--

___
Wicket-user mailing list
[EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-02 Thread Aaron HIniker
That's why I was pointing at mayTrackChangesFor()..  I looked at the
method and I can't see a loophole, but there must be one to generate an
NPE, correct?

When I implemented the not-null check, I noticed exceptions still being
thrown from 2 other methods (if you search Page.java for versionManager,
you can see where there is the assumption that mayTrackChangesFor() is
checked for 'true', yet versionManager is never initialized in other
methods as well.  So after adding the null check to each of these
methods, the application is working fine.  Thing is, I've only seen this
exception when dealing with ajax (default not versioned, right?). 

I will try and run a debugger through mayTrackChangesFor() with my
current app, and see the logic flow and why versionManager is ending up
null.

Aaron

Johan Compagner wrote:
 That is because the mayTrackChangesFor() method should only return true
 when it makes a version manager. Why is that not the case?
 If that method returns true the version manager can't be null because
 the version info must be tracked.

 johan


 On 3/1/07, *Aaron Hiniker* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 I pulled the latest from trunk.  And I am getting this NPE:

 16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
 16:30:14,544 ERROR [STDERR] at
 wicket.Page.componentStateChanging(Page.java:327)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.addStateChange(Component.java:2553)
 16:30:14,545 ERROR [STDERR] at
 wicket.Component.setModel(Component.java:2191)
 16:30:14,545 ERROR [STDERR] at
 wicket.MarkupContainer.setModel(MarkupContainer.java :596)
 16:30:14,546 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.ProductSearchPanel.query(ProductSearchPanel.java:144)
 16:30:14,546 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate
 (ProductSearchPanel.java:109)
 16:30:14,546 ERROR [STDERR] at
 
 com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(FilterPanel.java:74)
 16:30:14,547 ERROR [STDERR] at
 com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit
 (QueryPanel.java:197)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
 16:30:14,547 ERROR [STDERR] at
 wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
 16:30:14,547 ERROR [STDERR] at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


 I remember I was getting this NPE before, and I patched the source to
 include this null check in Page.java :

 final void componentStateChanging(final Component component,
 Change change)
 {
 checkHierarchyChange(component);

 dirty();
 if (mayTrackChangesFor(component, null))
 {
 if ( versionManager != null )

 versionManager.componentStateChanging(change);
 }
 }

 It seems that everywhere else in Page.java there is a null check for
 versionManager, except in this method.  Not sure, but perhaps the
 problem lies in the #mayTrackChangesFor() method, but in any case if I
 add this null check my code runs fine.

 Aaron


 -

 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
 share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share 

[Wicket-user] NPE in Page#componentStateChanging

2007-03-01 Thread Aaron Hiniker
I pulled the latest from trunk.  And I am getting this NPE:

16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
16:30:14,544 ERROR [STDERR] at
wicket.Page.componentStateChanging(Page.java:327)
16:30:14,545 ERROR [STDERR] at
wicket.Component.addStateChange(Component.java:2553)
16:30:14,545 ERROR [STDERR] at
wicket.Component.setModel(Component.java:2191)
16:30:14,545 ERROR [STDERR] at
wicket.MarkupContainer.setModel(MarkupContainer.java:596)
16:30:14,546 ERROR [STDERR] at
com.edicorp.erp.web.components.search.ProductSearchPanel.query(ProductSearchPanel.java:144)
16:30:14,546 ERROR [STDERR] at
com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate(ProductSearchPanel.java:109)
16:30:14,546 ERROR [STDERR] at
com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(FilterPanel.java:74)
16:30:14,547 ERROR [STDERR] at
com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit(QueryPanel.java:197)
16:30:14,547 ERROR [STDERR] at
wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
16:30:14,547 ERROR [STDERR] at
wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
16:30:14,547 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


I remember I was getting this NPE before, and I patched the source to
include this null check in Page.java:

final void componentStateChanging(final Component component,
Change change)
{
checkHierarchyChange(component);

dirty();
if (mayTrackChangesFor(component, null))
{  
if ( versionManager != null )
   
versionManager.componentStateChanging(change);
}
}

It seems that everywhere else in Page.java there is a null check for
versionManager, except in this method.  Not sure, but perhaps the
problem lies in the #mayTrackChangesFor() method, but in any case if I
add this null check my code runs fine.

Aaron


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] NPE in Page#componentStateChanging

2007-03-01 Thread Johan Compagner

That is because the mayTrackChangesFor() method should only return true
when it makes a version manager. Why is that not the case?
If that method returns true the version manager can't be null because the
version info must be tracked.

johan


On 3/1/07, Aaron Hiniker [EMAIL PROTECTED] wrote:


I pulled the latest from trunk.  And I am getting this NPE:

16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
16:30:14,544 ERROR [STDERR] at
wicket.Page.componentStateChanging(Page.java:327)
16:30:14,545 ERROR [STDERR] at
wicket.Component.addStateChange(Component.java:2553)
16:30:14,545 ERROR [STDERR] at
wicket.Component.setModel(Component.java:2191)
16:30:14,545 ERROR [STDERR] at
wicket.MarkupContainer.setModel(MarkupContainer.java:596)
16:30:14,546 ERROR [STDERR] at
com.edicorp.erp.web.components.search.ProductSearchPanel.query(
ProductSearchPanel.java:144)
16:30:14,546 ERROR [STDERR] at
com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate(
ProductSearchPanel.java:109)
16:30:14,546 ERROR [STDERR] at
com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(
FilterPanel.java:74)
16:30:14,547 ERROR [STDERR] at
com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit(
QueryPanel.java:197)
16:30:14,547 ERROR [STDERR] at
wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
16:30:14,547 ERROR [STDERR] at
wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
16:30:14,547 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


I remember I was getting this NPE before, and I patched the source to
include this null check in Page.java:

final void componentStateChanging(final Component component,
Change change)
{
checkHierarchyChange(component);

dirty();
if (mayTrackChangesFor(component, null))
{
if ( versionManager != null )

versionManager.componentStateChanging(change);
}
}

It seems that everywhere else in Page.java there is a null check for
versionManager, except in this method.  Not sure, but perhaps the
problem lies in the #mayTrackChangesFor() method, but in any case if I
add this null check my code runs fine.

Aaron


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] NPE in Page#componentStateChanging

2007-02-14 Thread Aaron HIniker
When doing an ajax update on a MarkupContainer containing a listview.. I
am replacing the listview model before the update:

java.lang.NullPointerException
at wicket.Page.componentStateChanging(Page.java:327)
at wicket.Component.addStateChange(Component.java:2551)
at wicket.MarkupContainer.removeAll(MarkupContainer.java:510)
at wicket.markup.html.list.ListView.setModel(ListView.java:514)
at
com.edicorp.erp.web.pages.admin.search.SpecEditPage$2.onNodeLinkClicked(SpecEditPage.java:79)
at
wicket.markup.html.tree.DefaultAbstractTree$9.onClick(DefaultAbstractTree.java:533)
at
wicket.markup.html.tree.DefaultAbstractTree$6.onClick(DefaultAbstractTree.java:467)
at wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:77)
at wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:164)
at
wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:216)
at
wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:97)
at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:68)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:56)
at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:938)
at
wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:978)
at wicket.RequestCycle.step(RequestCycle.java:1054)
at wicket.RequestCycle.steps(RequestCycle.java:1125)
at wicket.RequestCycle.request(RequestCycle.java:470)
at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232)
at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)



Aaron

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] NPE in Page#componentStateChanging

2007-02-14 Thread Aaron HIniker
I apologize if this gets sent twice.. my ISP smtp server is acting up.


When doing an ajax update on a MarkupContainer containing a listview.. I
am replacing the listview model before the update:

java.lang.NullPointerException
at wicket.Page.componentStateChanging(Page.java:327)
at wicket.Component.addStateChange(Component.java:2551)
at wicket.MarkupContainer.removeAll(MarkupContainer.java:510)
at wicket.markup.html.list.ListView.setModel(ListView.java:514)
at
com.edicorp.erp.web.pages.admin.search.SpecEditPage$2.onNodeLinkClicked(SpecEditPage.java:79)
at
wicket.markup.html.tree.DefaultAbstractTree$9.onClick(DefaultAbstractTree.java:533)
at
wicket.markup.html.tree.DefaultAbstractTree$6.onClick(DefaultAbstractTree.java:467)
at wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:77)
at wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:164)
at
wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:216)
at
wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:97)
at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:68)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:56)
at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:938)
at
wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:978)
at wicket.RequestCycle.step(RequestCycle.java:1054)
at wicket.RequestCycle.steps(RequestCycle.java:1125)
at wicket.RequestCycle.request(RequestCycle.java:470)
at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232)
at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)




Aaron


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] NPE in Page#componentStateChanging

2007-02-14 Thread Timo Rantalaiho
On Wed, 14 Feb 2007, Aaron HIniker wrote:
 When doing an ajax update on a MarkupContainer containing a listview.. I
 am replacing the listview model before the update:

To update a ListView with ajax, I just manipulate its list
instead of replacing the whole model. To make removals work,
I recreate the whole list component on update (do a new
MyListView()...).

This works for me, but if there is a better way to update
ListViews via ajax, I'd be happy to know it.

- Timo

-- 
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] NPE in Page#componentStateChanging

2007-02-14 Thread Igor Vaynberg

it would be helpful to know the version

-igor


On 2/14/07, Aaron HIniker [EMAIL PROTECTED] wrote:


When doing an ajax update on a MarkupContainer containing a listview.. I
am replacing the listview model before the update:

java.lang.NullPointerException
at wicket.Page.componentStateChanging(Page.java:327)
at wicket.Component.addStateChange(Component.java:2551)
at wicket.MarkupContainer.removeAll(MarkupContainer.java:510)
at wicket.markup.html.list.ListView.setModel(ListView.java:514)
at
com.edicorp.erp.web.pages.admin.search.SpecEditPage$2.onNodeLinkClicked(
SpecEditPage.java:79)
at
wicket.markup.html.tree.DefaultAbstractTree$9.onClick(
DefaultAbstractTree.java:533)
at
wicket.markup.html.tree.DefaultAbstractTree$6.onClick(
DefaultAbstractTree.java:467)
at wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:77)
at wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java
:164)
at
wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(
AbstractDefaultAjaxBehavior.java:216)
at

wicket.request.target.component.listener.BehaviorRequestTarget.processEvents
(BehaviorRequestTarget.java:97)
at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(
DefaultEventProcessorStrategy.java:68)
at

wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents
(AbstractCompoundRequestCycleProcessor.java:56)
at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:938)
at
wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:978)
at wicket.RequestCycle.step(RequestCycle.java:1054)
at wicket.RequestCycle.steps(RequestCycle.java:1125)
at wicket.RequestCycle.request(RequestCycle.java:470)
at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232)
at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(
JaccContextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(
CachedConnectionValve.java:156)
at
org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(
MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)



Aaron

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user