You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Ivey <cb...@comcast.net> on 2004/04/22 20:04:53 UTC

Why am I getting a java.lang.InstantiationException?

After several months of working on new additions to our web application, I
have returned to a module that was working well not so long ago.  Now I get
this error:

java.lang.InstantiationException: mypackage.myactionformname

The location of this error as reported by chainsaw is:

org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:847)

After closely inspecting my struts-config.xml I can find no discrepancies.
After examining the change history in Source Safe I still find nothing
suspicious.

I am at my wits end and am getting seriously upset by this.  When I first
experienced this issue it seemed like a quick fix.  After spending half a
day working on this I am beginning to doubt that I will fix this before the
end of the day without outside help.  Any help will be appreciated.

Thanks,
Brian Ivey



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Why am I getting a java.lang.InstantiationException?

Posted by Brian Ivey <cb...@comcast.net>.
Thanks for your help, but after another developer had a moment it turned out
to be something as simple as the fact I had removed the default no-arg
constructors from my ActionForm classes.  When I was "cleaning" up some code
I removed these without thinking.

-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, April 22, 2004 2:47 PM
To: Struts Users Mailing List
Subject: Re: Why am I getting a java.lang.InstantiationException?


Look at the form class. If it couldn't find the class it should throw a
ClassNotFoundException, the fact that it throws an InstantiationException
implies theres a problem with how the class is defined - its not abstract is
it or an interface?

Niall

----- Original Message -----
From: "Brian Ivey" <cb...@comcast.net>
To: "Struts Users - List" <st...@jakarta.apache.org>
Sent: Thursday, April 22, 2004 7:04 PM
Subject: Why am I getting a java.lang.InstantiationException?


> After several months of working on new additions to our web application, I
> have returned to a module that was working well not so long ago.  Now I
get
> this error:
>
> java.lang.InstantiationException: mypackage.myactionformname
>
> The location of this error as reported by chainsaw is:
>
>
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:847)
>
> After closely inspecting my struts-config.xml I can find no discrepancies.
> After examining the change history in Source Safe I still find nothing
> suspicious.
>
> I am at my wits end and am getting seriously upset by this.  When I first
> experienced this issue it seemed like a quick fix.  After spending half a
> day working on this I am beginning to doubt that I will fix this before
the
> end of the day without outside help.  Any help will be appreciated.
>
> Thanks,
> Brian Ivey
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Why am I getting a java.lang.InstantiationException?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Look at the form class. If it couldn't find the class it should throw a
ClassNotFoundException, the fact that it throws an InstantiationException
implies theres a problem with how the class is defined - its not abstract is
it or an interface?

Niall

----- Original Message ----- 
From: "Brian Ivey" <cb...@comcast.net>
To: "Struts Users - List" <st...@jakarta.apache.org>
Sent: Thursday, April 22, 2004 7:04 PM
Subject: Why am I getting a java.lang.InstantiationException?


> After several months of working on new additions to our web application, I
> have returned to a module that was working well not so long ago.  Now I
get
> this error:
>
> java.lang.InstantiationException: mypackage.myactionformname
>
> The location of this error as reported by chainsaw is:
>
>
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:847)
>
> After closely inspecting my struts-config.xml I can find no discrepancies.
> After examining the change history in Source Safe I still find nothing
> suspicious.
>
> I am at my wits end and am getting seriously upset by this.  When I first
> experienced this issue it seemed like a quick fix.  After spending half a
> day working on this I am beginning to doubt that I will fix this before
the
> end of the day without outside help.  Any help will be appreciated.
>
> Thanks,
> Brian Ivey
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org