Re: Switching Modules - isn't working for me...

2002-12-30 Thread Matt Raible
This was caused by the StrutsMenu PlugIn in my situation.  Changing
ApplicationConfig to ModuleConfig fixed the problem.  Here's from from the bug
I documented:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697

---
I compiled with the latest nightly of Struts and got some deprecation warnings 
for ApplicationConfig, but it wouldn't compile because of the init
(ActionServlet, ModuleConfig) method:

[javac] 
D:\source\StrutsMenu\src\share\com\fgm\web\menu\MenuPlugIn.java:26: 
com.fgm.web.menu.MenuPlugIn should be declared abstract; it does not d
efine init
(org.apache.struts.action.ActionServlet,org.apache.struts.config.ModuleConfig) 
in com.fgm.web.menu.MenuPlugIn
[javac] public class MenuPlugIn implements PlugIn {
[javac]^

Changing my init method to use init(ActionServlet, ModuleConfig) vs. 
(ActionServlet, ApplicationConfig) fixed the problem.  Does this break 
backwards compatibility with old PlugIns? 
---

Thanks,

Matt

> Does someone have a simple example war file reproducing the problem ? 
> If yes, could you send it to me ?
> 
>   Cedric
> 
> Matt Raible wrote:
> 
> >I tried switching to last night's build, but that appears to be even
> >worse - I can't even use the default module.  I get the following error
> >the first time (and all other times) I hit an action:
> >
> >- Root Cause -
> >java.lang.AbstractMethodError
> > at
> >org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
> >ava:1096)
> > at
> >org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> >
> >My log file never shows any modules getting initialized (save '').  The
> >last build I had, from 11-24, the default app worked, just the switching
> >didn't.  Are there any sample applications I can prove this works
> >against?
> >
> >Thanks,
> >
> >Matt
> >
> >  
> >
> >> -Original Message-
> >>From:   Matt Raible [mailto:[EMAIL PROTECTED]] 
> >>Sent:   Friday, December 27, 2002 1:37 AM
> >>To: '[EMAIL PROTECTED]'
> >>Subject:Switching Modules - isn't working for me...
> >>
> >>It's late, so it's possible my problem is something small and 
> >>I just need a second set of eyes on it.  I am trying to 
> >>configure my application have an "upload" module.  I'm 
> >>following the instructions at 
> >>http://jakarta.apache.org/struts/userGuide/configuration.html#
> >>module_config-switching.
> >>
> >>In my , I have the following forward:
> >>
> >>
> >> >>path="/upload/index.do" redirect="true" />
> >>
> >>I have my ActionServlet configured as follows:
> >>
> >>
> >>config
> >>/WEB-INF/struts-config.xml
> >>
> >>
> >>config/upload
> >>/WEB-INF/struts-upload.xml
> >>
> >>
> >>And struts-upload.xml has the following action-mappings:
> >>
> >>
> >> >>path="/index"
> >>type="org.apache.struts.actions.ForwardAction"
> >>parameter="upload"/>
> >>
> >>
> >> >>   type="org.appfuse.webapp.actions.UploadAction"
> >>   name="uploadForm"
> >>  scope="request"
> >>  input="upload">
> >>
> >>   
> >>
> >>Where "upload" and "display" are tiles definitions.  When I 
> >>try to access this forward (either via link or direct URL), I get:
> >>
> >>Tomcat 404: The requested resource (/appfuse/upload) is not available.
> >>
> >>And in the log file:
> >>
> >>INFO [Thread-4] 
> >>[org.apache.struts.util.PropertyMessageResources] 
> >>PropertyMessageResources.(127) | Initializing, c
> >>onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
> >>INFO [Thread-4] 
> >>[org.apache.struts.tiles.TilesRequestProcessor] 
> >>TilesRequestProcessor.initDefinitionsMapping(154) | Tile
> >>s definition factory found for request processor '/upload'.
> >>INFO [Thread-4] [org.apache.struts.action.RequestProcessor] 
> >>RequestProcessor.process(225) | Processing a 'GET' for path
> >>'/index'
> >>DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> >>RequestProcessor.processActionCreate(305) |  Looking for Ac
> >>tion instance for class org.apache.struts.actions.ForwardAction
> >>DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> >>RequestProcessor.processActionCreate(321) |   Creating new
> >>Action instance
> >>DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> >>RequestProcessor.processForwardConfig(428) | processForward
> >>Config(ForwardConfig[name=null,path=upload,redirect=false,cont
> >>
> >>
> >extRelative=true])
> >  
> >
> >>
> >>Any ideas?
> >>
> >>Thanks,
> >>
> >>Matt
> >>
> >>
> >>
> >>
> >
> >  
> >
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

Re: Switching Modules - isn't working for me...

2002-12-30 Thread Cedric Dumoulin

 Does someone have a simple example war file reproducing the problem ? 
If yes, could you send it to me ?

 Cedric

Matt Raible wrote:

I tried switching to last night's build, but that appears to be even
worse - I can't even use the default module.  I get the following error
the first time (and all other times) I hit an action:

- Root Cause -
java.lang.AbstractMethodError
	at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava:1096)
	at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)

My log file never shows any modules getting initialized (save '').  The
last build I had, from 11-24, the default app worked, just the switching
didn't.  Are there any sample applications I can prove this works
against?

Thanks,

Matt

 

-Original Message-
From: 	Matt Raible [mailto:[EMAIL PROTECTED]] 
Sent:	Friday, December 27, 2002 1:37 AM
To:	'[EMAIL PROTECTED]'
Subject:	Switching Modules - isn't working for me...

It's late, so it's possible my problem is something small and 
I just need a second set of eyes on it.  I am trying to 
configure my application have an "upload" module.  I'm 
following the instructions at 
http://jakarta.apache.org/struts/userGuide/configuration.html#
module_config-switching.

In my , I have the following forward:

   
   
   path="/upload/index.do" redirect="true" />

I have my ActionServlet configured as follows:

   
   config
   /WEB-INF/struts-config.xml
   
   
   config/upload
   /WEB-INF/struts-upload.xml
   

And struts-upload.xml has the following action-mappings:

   
   
   path="/index"
   type="org.apache.struts.actions.ForwardAction"
   parameter="upload"/>
   
   
   
  type="org.appfuse.webapp.actions.UploadAction"
  name="uploadForm"
 scope="request"
 input="upload">
   
  

Where "upload" and "display" are tiles definitions.  When I 
try to access this forward (either via link or direct URL), I get:

Tomcat 404: The requested resource (/appfuse/upload) is not available.

And in the log file:

INFO [Thread-4] 
[org.apache.struts.util.PropertyMessageResources] 
PropertyMessageResources.(127) | Initializing, c
onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
INFO [Thread-4] 
[org.apache.struts.tiles.TilesRequestProcessor] 
TilesRequestProcessor.initDefinitionsMapping(154) | Tile
s definition factory found for request processor '/upload'.
INFO [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.process(225) | Processing a 'GET' for path
'/index'
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processActionCreate(305) |  Looking for Ac
tion instance for class org.apache.struts.actions.ForwardAction
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processActionCreate(321) |   Creating new
Action instance
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processForwardConfig(428) | processForward
Config(ForwardConfig[name=null,path=upload,redirect=false,cont
   

extRelative=true])
 


Any ideas?

Thanks,

Matt


   


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Switching Modules - isn't working for me...

2002-12-30 Thread lldias
Hi,

I am having that problem too. As I think that that bug is already reported
under Bugzilla Bug # 11021, I was waiting for a fix.

Last friday I had to do some testing im my application, and that bug was
avoiding it. Reading what people were saying about this and other related
bug I decided to have a look where the problem could be.

After downloading Struts sources and doing a lot of "try and test" I found
that commenting the first line (I am not sure now as I did it in a computer
at my work) of the method internalModuleRelativeForward in the class
RequestProcessor resolved my problem. That line was something like "uri =
nameOfMethodIDontRememberToGetModuleName() + uri;".

With that, Struts is now understanding that "/ModuleA/action1.do" means that
it should look for "/action1" in ModuleA config.xml. Another problem that it
solved is the forwarding: if I was in ModuleA and forwarded to a "/test.jsp"
page, Struts was appending "ModuleA" and so, looking for a
"ModuleA/test.jsp".

For the tests I need to do, it resolved my problem, but as it was late in
the night, I could not do any other further tests, and so, I can not say
what consequences / problems that change could bring.

Sorry if I did something wrong, but I just wanted to share my experience:
maybe it could be useful.

Luciano

My scenario:
The hole application I am developping is based on several Modules and all my
JSP pages are stored as definitions in a tiles-config.xml file. I reference
those definitions in all my struts-config.xml files and never directly the
JSPs.
I only use actions to access my JSPs (tiles definitions) as my pages are
under "WEB-INF".
I am using the "display" custom tag to display data in tables and the
action-plug-in for a first level of security.

- Original Message -
From: "Cedric Dumoulin" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Saturday, December 28, 2002 11:09 AM
Subject: Re: Switching Modules - isn't working for me...



  Hi,

  For me it sound like a binary version problem. Maybe one of your
plugin has been compiled with an older and incompatible jar file.

  The tiles-documentation.war file use modules and tiles (module
default, example, test). It works on my configuration.
  Hope this help,

Cedric


Matt Raible wrote:

>I tried switching to last night's build, but that appears to be even
>worse - I can't even use the default module.  I get the following error
>the first time (and all other times) I hit an action:
>
>- Root Cause -
>java.lang.AbstractMethodError
> at
>org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
>ava:1096)
> at
>org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>
>My log file never shows any modules getting initialized (save '').  The
>last build I had, from 11-24, the default app worked, just the switching
>didn't.  Are there any sample applications I can prove this works
>against?
>
>Thanks,
>
>Matt
>
>
>
>> -Original Message-
>>From: Matt Raible [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, December 27, 2002 1:37 AM
>>To: '[EMAIL PROTECTED]'
>>Subject: Switching Modules - isn't working for me...
>>
>>It's late, so it's possible my problem is something small and
>>I just need a second set of eyes on it.  I am trying to
>>configure my application have an "upload" module.  I'm
>>following the instructions at
>>http://jakarta.apache.org/struts/userGuide/configuration.html#
>>module_config-switching.
>>
>>In my , I have the following forward:
>>
>>
>>>path="/upload/index.do" redirect="true" />
>>
>>I have my ActionServlet configured as follows:
>>
>>
>>config
>>/WEB-INF/struts-config.xml
>>
>>
>>config/upload
>>/WEB-INF/struts-upload.xml
>>
>>
>>And struts-upload.xml has the following action-mappings:
>>
>>
>>>path="/index"
>>type="org.apache.struts.actions.ForwardAction"
>>parameter="upload"/>
>>
>>
>>>   type="org.appfuse.webapp.actions.UploadAction"
>>   name="uploadForm"
>>  scope="request"
>>  input="upload">
>>
>>   
>&g

Re: Switching Modules - isn't working for me...

2002-12-28 Thread Cedric Dumoulin

 Hi,

 For me it sound like a binary version problem. Maybe one of your 
plugin has been compiled with an older and incompatible jar file.

 The tiles-documentation.war file use modules and tiles (module 
default, example, test). It works on my configuration.
 Hope this help,

   Cedric


Matt Raible wrote:

I tried switching to last night's build, but that appears to be even
worse - I can't even use the default module.  I get the following error
the first time (and all other times) I hit an action:

- Root Cause -
java.lang.AbstractMethodError
	at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava:1096)
	at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)

My log file never shows any modules getting initialized (save '').  The
last build I had, from 11-24, the default app worked, just the switching
didn't.  Are there any sample applications I can prove this works
against?

Thanks,

Matt

 

-Original Message-
From: 	Matt Raible [mailto:[EMAIL PROTECTED]] 
Sent:	Friday, December 27, 2002 1:37 AM
To:	'[EMAIL PROTECTED]'
Subject:	Switching Modules - isn't working for me...

It's late, so it's possible my problem is something small and 
I just need a second set of eyes on it.  I am trying to 
configure my application have an "upload" module.  I'm 
following the instructions at 
http://jakarta.apache.org/struts/userGuide/configuration.html#
module_config-switching.

In my , I have the following forward:

   
   
   path="/upload/index.do" redirect="true" />

I have my ActionServlet configured as follows:

   
   config
   /WEB-INF/struts-config.xml
   
   
   config/upload
   /WEB-INF/struts-upload.xml
   

And struts-upload.xml has the following action-mappings:

   
   
   path="/index"
   type="org.apache.struts.actions.ForwardAction"
   parameter="upload"/>
   
   
   
  type="org.appfuse.webapp.actions.UploadAction"
  name="uploadForm"
 scope="request"
 input="upload">
   
  

Where "upload" and "display" are tiles definitions.  When I 
try to access this forward (either via link or direct URL), I get:

Tomcat 404: The requested resource (/appfuse/upload) is not available.

And in the log file:

INFO [Thread-4] 
[org.apache.struts.util.PropertyMessageResources] 
PropertyMessageResources.(127) | Initializing, c
onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
INFO [Thread-4] 
[org.apache.struts.tiles.TilesRequestProcessor] 
TilesRequestProcessor.initDefinitionsMapping(154) | Tile
s definition factory found for request processor '/upload'.
INFO [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.process(225) | Processing a 'GET' for path
'/index'
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processActionCreate(305) |  Looking for Ac
tion instance for class org.apache.struts.actions.ForwardAction
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processActionCreate(321) |   Creating new
Action instance
DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
RequestProcessor.processForwardConfig(428) | processForward
Config(ForwardConfig[name=null,path=upload,redirect=false,cont
   

extRelative=true])
 


Any ideas?

Thanks,

Matt


   


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Switching Modules - isn't working for me...

2002-12-27 Thread Matt Raible
For some reason, I thought Cedric fixed this problem today.  However, I
just checked out Struts from CVS and no dice - it's still broken.  In
fact, I can't run my app at all, regardless of whether I use a sub app
or not.  This has been broken for a couple of weeks now, I'll enter a
bug.

Matt

>  -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 27, 2002 2:02 AM
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: Switching Modules - isn't working for me...
> 
> I tried switching to last night's build, but that appears to 
> be even worse - I can't even use the default module.  I get 
> the following error the first time (and all other times) I 
> hit an action:
> 
> - Root Cause -
> java.lang.AbstractMethodError
>   at 
> org.apache.struts.action.ActionServlet.initModulePlugIns(Actio
nServlet.java:1096)
>   at 
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
>   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> 
> My log file never shows any modules getting initialized (save 
> '').  The last build I had, from 11-24, the default app 
> worked, just the switching didn't.  Are there any sample 
> applications I can prove this works against?
> 
> Thanks,
> 
> Matt
> 
> >  -Original Message-
> > From:   Matt Raible [mailto:[EMAIL PROTECTED]] 
> > Sent:   Friday, December 27, 2002 1:37 AM
> > To: '[EMAIL PROTECTED]'
> > Subject:Switching Modules - isn't working for me...
> > 
> > It's late, so it's possible my problem is something small and 
> > I just need a second set of eyes on it.  I am trying to 
> > configure my application have an "upload" module.  I'm 
> > following the instructions at 
> > http://jakarta.apache.org/struts/userGuide/configuration.html#
> > module_config-switching.
> > 
> > In my , I have the following forward:
> > 
> > 
> >  > path="/upload/index.do" redirect="true" />
> > 
> > I have my ActionServlet configured as follows:
> > 
> > 
> > config
> > /WEB-INF/struts-config.xml
> > 
> > 
> > config/upload
> > /WEB-INF/struts-upload.xml
> > 
> > 
> > And struts-upload.xml has the following action-mappings:
> > 
> > 
> >  > path="/index"
> > type="org.apache.struts.actions.ForwardAction"
> > parameter="upload"/>
> > 
> > 
> >  >type="org.appfuse.webapp.actions.UploadAction"
> >name="uploadForm"
> >   scope="request"
> >   input="upload">
> > 
> >
> > 
> > Where "upload" and "display" are tiles definitions.  When I 
> > try to access this forward (either via link or direct URL), I get:
> > 
> > Tomcat 404: The requested resource (/appfuse/upload) is not 
> available.
> > 
> > And in the log file:
> > 
> > INFO [Thread-4] 
> > [org.apache.struts.util.PropertyMessageResources] 
> > PropertyMessageResources.(127) | Initializing, c
> > onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
> > INFO [Thread-4] 
> > [org.apache.struts.tiles.TilesRequestProcessor] 
> > TilesRequestProcessor.initDefinitionsMapping(154) | Tile
> > s definition factory found for request processor '/upload'.
> > INFO [Thread-4] [org.apache.struts.action.RequestProcessor] 
> > RequestProcessor.process(225) | Processing a 'GET' for path
> > '/index'
> > DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> > RequestProcessor.processActionCreate(305) |  Looking for Ac
> > tion instance for class org.apache.struts.actions.ForwardAction
> > DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> > RequestProcessor.processActionCreate(321) |   Creating new
> > Action instance
> > DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> > RequestProcessor.processForwardConfig(428) | processForward
> > Config(ForwardConfig[name=null,path=upload,redirect=false,cont
> extRelative=true])
> > 
> > 
> > 
> > Any ideas?
> > 
> > Thanks,
> > 
> > Matt
> > 
> > 



RE: Switching Modules - isn't working for me...

2002-12-27 Thread Matt Raible
I tried switching to last night's build, but that appears to be even
worse - I can't even use the default module.  I get the following error
the first time (and all other times) I hit an action:

- Root Cause -
java.lang.AbstractMethodError
at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava:1096)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)

My log file never shows any modules getting initialized (save '').  The
last build I had, from 11-24, the default app worked, just the switching
didn't.  Are there any sample applications I can prove this works
against?

Thanks,

Matt

>  -Original Message-
> From: Matt Raible [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 27, 2002 1:37 AM
> To:   '[EMAIL PROTECTED]'
> Subject:  Switching Modules - isn't working for me...
> 
> It's late, so it's possible my problem is something small and 
> I just need a second set of eyes on it.  I am trying to 
> configure my application have an "upload" module.  I'm 
> following the instructions at 
> http://jakarta.apache.org/struts/userGuide/configuration.html#
> module_config-switching.
> 
> In my , I have the following forward:
> 
> 
>  path="/upload/index.do" redirect="true" />
> 
> I have my ActionServlet configured as follows:
> 
> 
> config
> /WEB-INF/struts-config.xml
> 
> 
> config/upload
> /WEB-INF/struts-upload.xml
> 
> 
> And struts-upload.xml has the following action-mappings:
> 
> 
>  path="/index"
> type="org.apache.struts.actions.ForwardAction"
> parameter="upload"/>
> 
> 
> type="org.appfuse.webapp.actions.UploadAction"
>name="uploadForm"
>   scope="request"
>   input="upload">
> 
>
> 
> Where "upload" and "display" are tiles definitions.  When I 
> try to access this forward (either via link or direct URL), I get:
> 
> Tomcat 404: The requested resource (/appfuse/upload) is not available.
> 
> And in the log file:
> 
> INFO [Thread-4] 
> [org.apache.struts.util.PropertyMessageResources] 
> PropertyMessageResources.(127) | Initializing, c
> onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true
> INFO [Thread-4] 
> [org.apache.struts.tiles.TilesRequestProcessor] 
> TilesRequestProcessor.initDefinitionsMapping(154) | Tile
> s definition factory found for request processor '/upload'.
> INFO [Thread-4] [org.apache.struts.action.RequestProcessor] 
> RequestProcessor.process(225) | Processing a 'GET' for path
> '/index'
> DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> RequestProcessor.processActionCreate(305) |  Looking for Ac
> tion instance for class org.apache.struts.actions.ForwardAction
> DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> RequestProcessor.processActionCreate(321) |   Creating new
> Action instance
> DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] 
> RequestProcessor.processForwardConfig(428) | processForward
> Config(ForwardConfig[name=null,path=upload,redirect=false,cont
extRelative=true])
> 
> 
> 
> Any ideas?
> 
> Thanks,
> 
> Matt
> 
>