Well _ I attempted to upgrade to struts 1.2.4 and I get the following stack
trace.
Seems like it might have something to do with library mismatch?  I am
continuing to try to figure it out, any help would be appreciated.
Otherwise I have to go back to 1.1 to meet my deadlines.

2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploying class repositories to
work directory /usr/local/wwdbweb/work/Tomcat-JOnAS-Engine/localhost/wwdb
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy class files /WEB-INF/classes
to /usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/classes
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/commons-beanutils.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/commons-beanutils.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/commons-collections.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/commons-collections.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/commons-digester.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/commons-digester.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/commons-fileupload.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/commons-fileupload.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/commons-logging.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/commons-logging.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/commons-validator.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/commons-validator.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR /WEB-INF/lib/jstl.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/jstl.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/standard.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/standard.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR
/WEB-INF/lib/struts-el.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/struts-el.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR /WEB-INF/lib/struts.jar
to /usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/struts.jar
2004-10-19 23:01:51 WebappLoader[/wwdb]: Deploy JAR /WEB-INF/lib/wwdb.jar to
/usr/local/wwdbweb/webapps/worker/wwdb/WEB-INF/lib/wwdb.jar
2004-10-19 23:01:52 StandardManager[/wwdb]: Seeding random number generator
class java.security.SecureRandom
2004-10-19 23:01:52 StandardManager[/wwdb]: Seeding of random number
generator has been completed
2004-10-19 23:01:52 StandardWrapper[/wwdb:default]: Loading container
servlet default
2004-10-19 23:01:53 StandardWrapper[/wwdb:invoker]: Loading container
servlet invoker
2004-10-19 23:01:53 StandardContext[/wwdb]: Servlet /wwdb threw load()
exception
javax.servlet.ServletException: Servlet.init() for servlet action threw
exception
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:96
3)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3427)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3628)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
        at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162)
        at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.
java:182)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
        at
org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doRegist
erWar(CatalinaJWebContainerServiceImpl.java:441)
        at
org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(AbsJWebConta
inerServiceImpl.java:761)
        at
org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doStart(AbsJWebContainer
ServiceImpl.java:344)
        at
org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doStart(
CatalinaJWebContainerServiceImpl.java:245)
        at org.objectweb.jonas.service.AbsServiceImpl.start(AbsServiceImpl.java:67)
        at
org.objectweb.jonas.service.ServiceManager.startServices(ServiceManager.java
:308)
        at org.objectweb.jonas.server.Server.start(Server.java:198)
...

----- Root Cause -----
java.lang.NoSuchMethodError:
org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljav
a/lang/Object;Ljava/lang/Throwable;)V
        at
org.apache.commons.logging.impl.Log4JCategoryLog.trace(Log4JCategoryLog.java
:77)
        at
org.apache.struts.util.PropertyMessageResources.<init>(PropertyMessageResour
ces.java:84)
        at
org.apache.struts.util.PropertyMessageResourcesFactory.createResources(Prope
rtyMessageResourcesFactory.java:48)
        at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:498)
        at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1013)
        at org.apache.struts.action.ActionServlet.init(ActionServlet.java:322)
        at javax.servlet.GenericServlet.init(GenericServlet.java:256)

-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 8:37 PM
To: Struts Users Mailing List
Subject: RE: Tiles Question


I only mentioned the struts-tiles-el.tld because I didn't think the Tiles
tags were "el" compatible.  I found a struts-tiles-el.tld in 1.2.4 not in an
old 1.1-b3 I have archived on my computer.  Are you by any chance using a
container like Tomcat 5.X.X which has native EL support so that would work?
What about the departments.getItem() collection question?  Is it the right
object you want stored?

Regards,
David

-----Original Message-----
From: Ray Madigan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 11:34 PM
To: Struts Users Mailing List
Subject: RE: Tiles Question


Well - I looked all over for a struts-tiles-el tld and couldn't find one.  I
suspected that the support was native.  I am still using struts 1.1 and
haven't moved to struts 1.2.  I see that I need to move to the new release.

Like any project with deadlines, moving to a new release is costly, I was
hoping to move after this project.  Oh well, I guess it calls for an all
nighter!

Thanks for your help, and I will let you know how it goes.

-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 7:27 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Tiles Question


Ray,

>From your code examples, it seems like you are using struts-el and
struts-tiles-el.  Is this correct?  If so I can make suggestions but I can't
test it (not using them - I have JSP 2.0 in my Tomcat 5.0.2? + STruts v1.2.4
setup).

HOWEVER, I have a few well-directed questions that might explain your
issue(s):

I see you have done logging but have you done them with the iterated names
to be 100% sure they are loaded? Such as:

(your loop here)
      request.setAttribute ( department.getItem ( ), departments );
        System.out.println ( "Department: " + department.getItem ( ) + ",
collection: " + departments );

I see you are saving the "departments" object to the request, not the
"department".  Yet in your tile:put you are trying to put
departments.getItem().  Is there such a thing or did you mean to save the
"department" object so your tile:put could do a department.getItem().  From
the code you included (see next line), I'm expecting there to be JSP errors
or something logged because I can't see how it could exist - how can the
collection have a string getItem() method unless you extended the collection
Interface?  This makes me think the objects are NOT being loaded properly
from this JSP tile call:

<tile:put name='organization' beanName='${department.item}'
beanScope='request'/>

You should do the same full logging/printing in your JSP as I recommended in
your Action class.  You should be able to import all direct Tile variables
using a generic tile:importAttribute tag:

<tile:importAttribute>

Then you could manually check that the JSP can see them using something like
this (it's late so don't penalize me for bad coding if this isn't the exact
syntax):

<bean:write name="Automotive" property="item"/><br>
<bean:write name="organization" property="item"/><br>

I hope these directed questions help point you in the right direction with
your debugging.

Regards,
David

-----Original Message-----
From: Ray Madigan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 2:52 PM
To: Struts Users Mailing List
Subject: RE: Tiles Question


The action Looks like this

  Collection depList = getDepartmentList ( );
  Iterator itor = depList.iterator ( );
  while ( itor.hasNext ( ) ) {
      txDepartment department = ( txDepartment ) itor.next ( );
      Collection departments = getOrganizationData ( department.getItem
( ) );
      request.setAttribute ( department.getItem ( ), departments );
      // I can iterate over the departments collection and get the right
information
      // System.out.println ( "Department: " + department.getItem ( ) );
      // Yields Department: Automotive
      // Among others
  }

The starting JSP is

  <table class="content" border="0" cellspacing="10" cellpadding="0">
  <c:forEach var='department' items='${departments}'>
    <tr><td align="center">
        <table class="border" border="0" cellspacing="0" cellpadding="1">
            <tile:insert page='/Department.jsp'>
              <tile:put name='organization' beanName='${department.item}'
beanScope='request'/>
            </tile:insert>
        </table>
    </td></tr>
  <c:forEach>
  </Table>

If I change the put value to 'Automotive'  It works for that case like
              <tile:put name='organization' beanName='Automotive'
beanScope='request'/>
The Department.jsp looks like

<tile importAttribute name='organization'/>

<c:forEach var='org' items='${organization}'>
   <c:out value='${org.manager}'/>
</c:forEach>

The generated error is:
importAttribute : property 'organization' not found in context. Check tag
syntax'

-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 8:41 AM
To: Struts Users Mailing List
Subject: RE: Tiles Question


Ray,

Do you have an example of your tile definitions and stub pages I can look
at?

Regards,
David

-----Original Message-----
From: Ray Madigan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 19, 2004 6:05 PM
To: 'Struts Users Mailing List'
Subject: Tiles Question


I am trying to pass an attribute to a tile as follows:

<tile:insert ...
  <tile:put name='offer' beanName='${foo.name}' beanScope='request'/>
.
</tile:insert>

And
foo.getName ( ).equals ( "Adventure" )
And I have verified a requestAttribute was added.

in the tile when i do

<tile:importAttribute name='offer'/>

I get the message

importAttribute : property 'offer' not found in context. Check tag syntax'

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


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


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


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


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


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


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

Reply via email to