The full class name IS correct. Anyway, it happens with the
struts-examples.war which is supplied by jakarta which works (I assume) for
most people.

----- Forwarded by Brian O'Hare/LND/DPIWE on 31/01/2003 10:15 AM -----
|---------+---------------------------->
|         |           "Marco Tedone"   |
|         |           <m_tedone@hotmail|
|         |           .com>            |
|         |                            |
|         |           30/01/2003 11:04 |
|         |           PM               |
|         |                            |
|---------+---------------------------->
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       <Brian.O'[EMAIL PROTECTED]>                                    
                          |
  |       cc:                                                                          
                          |
  |       Subject:  RE: problem parsing actions in struts-config.xml  
(java.lang.IllegalArgumentException: object|
  |        is not an instance of declaring class)                                      
                          |
  
>--------------------------------------------------------------------------------------------------------------|




I never had this problem before, but it could seem that there is a
difference between the struts-config.xml declaration of your Action
class(type element) and the real package(name class) where the class is
based. Just an opinion!

-----Original Message-----
From: Brian.O'[EMAIL PROTECTED] [mailto:Brian.O'[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 9:26 AM
To: [EMAIL PROTECTED]
Subject: problem parsing actions in struts-config.xml
(java.lang.IllegalArgumentException: object is not an instance of declaring
class)


Hi,

I am encountering a problem java.lang.IllegalArgumentException: object is
not an instance of declaring class  . It appears that the digester has
problems parsing ANY action that is in the struts-config.xml.

I had this problem before, when I first deployed the struts-example.war. At
the time, I had deployed it on Tomcat 1.1.17. I eliminated my problem by
going back a version of Tomcat to ver. 1.0.6.  I don't know why that would
be different, but although I was curious, I didn't care too much as I was
keen to get started developing using Struts. However, I am now finding the
same problem with my own application, which was previously working fine.
As
a test, I redeployed the struts-example.war and the problem has again
manifested itself.

It has stopped my  work progress and is frustrating me no end. Surely, some
of you have encountered this before ?

I have included below, the stacttrace of the struts-example , but my own
application has the same problem.

I hope someone can shed some light on this,
Brian

register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'jar:file:C:/Program Files/Apache Tomcat 4.0
/webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/

struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'jar:file:C:/Program Files/Apache Tomcat 4.0/webapps/
struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2

_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'jar:file:C:/Program Files/Apache Tomcat 4.0/webapps/
struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2

_3.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/
struts-config_1_0.dtd')
 Resolving to alternate DTD 'jar:file:C:/Program Files/Apache Tomcat
4.0/webapps/struts-example/WEB-INF/lib/struts.jar!/
org/apache/struts/resources/struts-config_1_0.dtd'
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call
org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[logonForm]

)
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call
org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[registrati

onForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call
org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[subscripti

onForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionServlet.addForward(ActionForward[logoff])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionServlet.addForward(ActionForward[logon])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionServlet.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Begin event threw exception
java.lang.IllegalArgumentException: object is not an instance of declaring
class
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42

)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl

.java:28)
        at java.lang.reflect.Method.invoke(Method.java:327)
        at
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98

8)
        at
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90

4)
        at
org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932)
        at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509)
        at
org.apache.struts.digester.SetPropertiesRule.begin(SetPropertiesRule.java:12

0)
        at
org.apache.struts.digester.Digester.startElement(Digester.java:528)
        at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j

ava:393)
        at
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.ja

va:571)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java

:796)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo

cumentFragmentScannerImpl.java:75
2)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc

her.dispatch(XMLDocumentFragmentS
cannerImpl.java:1454)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume

ntFragmentScannerImpl.java:333)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo

nfiguration.java:529)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo

nfiguration.java:585)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:114

8)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:316)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:91)
        at org.apache.struts.digester.Digester.parse(Digester.java:755)
        at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
        at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
        at javax.servlet.GenericServlet.init(GenericServlet.java:256)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91

8)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:

3279)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
        at
org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor

t.java:155)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42

)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl

.java:28)
        at java.lang.reflect.Method.invoke(Method.java:327)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
Starting service Tomcat-Apache
Apache Tomcat/4.0.6







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to