Re: Struts 2 multiple wars in single ear, under JBoss

2009-10-02 Thread Yohan Liyanage

I modified the jboss-web.xml files to the following :

?xml version=1.0 encoding=UTF-8?

!DOCTYPE jboss-web PUBLIC -//JBoss//DTD Web Service Reference 4.2//EN
http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd;

jboss-web
loader-repository
com...crs.maintenance:loader=-maintenance-web.war

loader-repository-configjava2ParentDelegation=false/loader-repository-config
/loader-repository
/jboss-web

But now I get a Linkage Error when starting JBoss :

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving overridden method
com...service.maintenance.internal.FlightScheduleServiceImpl$$EnhancerByCGLIB$$f599cbe3.saveFlightSchedule(Lcom///maintenance/core/dto/FlightScheduleDTO;)V
the class loader (instance of
org/jboss/web/tomcat/service/WebAppClassLoader) of the current class,
com///service/maintenance/internal/FlightScheduleServiceImpl$$EnhancerByCGLIB$$f599cbe3,
and its superclass loader (instance of
org/jboss/mx/loading/UnifiedClassLoader3), have different Class objects for
the type com///maintenance/core/dto/FlightScheduleDTO used in the
signature
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)



Yohan Liyanage wrote:
 
 Hi,
 
 I am trying to deploy a EAR file which contains two WAR files, each of
 which uses Struts 2 into JBoss, but it fails due to a class loading
 problem. The exception I get is as follows:
 
 10:52:46,698 ERROR [[/-reservation-web]] Exception starting filter
 struts2
 Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory -
 bean -
 jar:file:/opt/jboss/jboss-4.2.3.GA/server/default/tmp/deploy/tmp44322-crs.ear-contents/-reservation-web-0.0.1-SNAPSHOT-exp.war/WEB-INF/lib/struts2-core-2.0.14.jar!/struts-default.xml:30:72
   at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
   at
 org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
   at
 com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
   at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
   at
 org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
   at
 org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
   at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
 ..
 
 Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the
 name xwork has already been loaded by bean -
 jar:file:/opt/jboss/jboss-4.2.3.GA/server/default/tmp/deploy/tmp44322-crs.ear-contents/-maintenance-web-0.0.1-SNAPSHOT-exp.war/WEB-INF/lib/struts2-core-2.0.14.jar!/struts-default.xml:30:72
 - bean -
 jar:file:/opt/jboss/jboss-4.2.3.GA/server/default/tmp/deploy/tmp44322-crs.ear-contents/-reservation-web-0.0.1-SNAPSHOT-exp.war/WEB-INF/lib/struts2-core-2.0.14.jar!/struts-default.xml:30:72
   at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193)
   ... 145 more
 
 In each WAR file's WEB-INF/lib folder, the struts2 jar files are present.
 I have used JBoss loader repositories at EAR level and WAR level to scope
 the class loading. But still, it seems  that one WAR file can see the
 libraries in other WAR file's lib folder.
 
 The JBoss class loading configurations are as follows :
 
 jboss-app.xml (in EAR) :
 
  jboss-app
loader-repository
com...crs:loader=-crs.ear
loader-repository-configjava2ParentDelegation=false
/loader-repository-config
/loader-repository
  /jboss-app
 
 jboss-web.xml (in each WAR, with different repository ids)
 jboss-web
   class-loading java2ClassLoadingCompliance=false
   loader-repository
   
 com...crs.maintenance:loader=-maintenance-web.war
   
 loader-repository-configjava2ParentDelegation=false/loader-repository-config
   /loader-repository
   /class-loading
 /jboss-web
 
 My environment is as follows :
 
 JBoss AS 4.2.3 GA
 Struts 2.0.14 (and related libraries)
 
 Any assistance in resolving this issue would be much appreciated.
 
 Thanks in advance.
 
 Regards,
 Yohan.
 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-multiple-wars-in-single-ear%2C-under-JBoss-tp25710696p25710849.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, 

Re: Access Denied error with Struts 2.1.8

2009-10-02 Thread Allen Lee
It kind of looks like a security manager / policy permissions issue to
me from the access denied message.  Like your app server has a grant
codebase set for the old struts jar but not the new one.  I'm not sure
how to set the grant codebase perms on Jetty though (jetty.policy?).

On Thu, Oct 1, 2009 at 3:04 PM, Dan R. Olsen III danec...@gmail.com wrote:
 When I am trying to run my Struts application under 2.1.8 I am getting an
 Access Denied error. I have checked the file permissions on the
 struts-core-2.1.8.jar file and it is the same as my 2.1.6 file. Under 2.1.6
 it works just fine. Any ideas? The error and stack trace I get are below.


   HTTP ERROR: 500

 access denied (java.io.FilePermission jar:file:\C:\Documents and
 Settings\...\war\WEB-INF\lib\struts2-core-2.1.8.jar read)

 RequestURI=/success


     Caused by:

 java.security.AccessControlException: access denied (java.io.FilePermission
 jar:file:\C:\Documents and Settings\DOLSEN\My
 Documents\Eclipse3.5Projects\Temp\war\WEB-INF\lib\struts2-core-2.1.8.jar
 read)
        at
 java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at
 java.security.AccessController.checkPermission(AccessController.java:546)
        at
 java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at
 com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
        at java.util.zip.ZipFile.(ZipFile.java:109)
        at java.util.jar.JarFile.(JarFile.java:133)
        at java.util.jar.JarFile.(JarFile.java:70)
        at
 com.opensymphony.xwork2.util.FileManager$JarEntryRevision.needsReloading(FileManager.java:264)
        at
 com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:70)
        at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:324)
        at
 org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
        at
 com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
        at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
        at
 org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:819)
        at
 org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:77)
        at
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:78)
        at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
        at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at
 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121)
        at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at
 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54)
        at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at
 com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:313)
        at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
        at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
        at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

 /Powered by Jetty:// http://jetty.mortbay.org//
























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



[Struts2] Problem using Struts2 with EJB3 over ServiceLocator (Jboss say Caller unauthorized)

2009-10-02 Thread Michael Obster

Hi everybody,

After I have written some mails to JBoss security forum, I found out 
that the Servlet has a problem. As I can see that has to do with the 
usage of Struts 2 because another application with Struts 1 works.


The problem I don't know where I can continue to resolve the problem an 
wanted to ask if someone can help?


---
Mail 1:

I have a big problem using JAAS in JBoss 5.1.0GA, which I try to solve 
about 2 days (my employer is not very amused of that...). I use a own 
JASSLoginModule to authenticate a user on a LDAP directory. The roleSet 
is fetched from a database. This part works as I can see and give me the 
result - AdminUser.


But now when I call a EJB stateless session bean, I always get the 
Caller unauthorized error (Stacktrace is at bottom of the message).


Can anybody give me a hint whats wrong.

The Constants in the @RolesAllowed has AdminUser in the list. The 
class is also attached at the end of the message.


error-statcktrace.txt

UserFacadeBean.java


Reply 1: From Wolfgang Knauf

Hi Michael,

you probably checked the JBoss log of the security layer (see question 4 
in FAQ)? Do you see output that JBoss could map a user to the required 
roles?


Please post the relevant snippets of your login module.

Best regards

Wolfgang

-
Mail 2:

Some new output was generated after enabling debugging. But the only 
thing I can see, that the error is not in the login module but somewhere 
in the servlet container.


Is there something special that I have to pay attention when I'm using 
Struts2 as framework?


error-stacktrace-with-security-debugging.txt

--
Mail 3:

My web.xml:
web.xml

And the struts2 interceptor I use on sites you have to be logged in:
JaasLoginInterceptor:
JAASLoginInterceptor.java

---

Hope anyone has a hint what I'm doing wrong.

Kind regards,
Michael Obster

javax.ejb.EJBAccessException: Caller unauthorized
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(Ro
leBasedAuthorizationInterceptorv2.java:199)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3Au
thenticationInterceptorv2.java:186)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
ptor.java:41)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContaine
rShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invo
ke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContain
er.java:176)
at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContain
er.java:216)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandl
erBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandl
erBase.invoke(SessionProxyInvocationHandlerBase.java:164)
at $Proxy1287.getAllUsers(Unknown Source)
at vwg.yyy.cancard.ui.action.Usermanagement.Usermanagement.list(Userman
agement.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
ctionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
ultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInte
rcept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(Default
ActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(Default
ActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTim
erStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
nvocation.java:221)
   

Convention Plugin: How to specify a redirect action

2009-10-02 Thread RogerV

Could someone tell me the correct format for the @Result annotation for a
redirect action. The action class I want to redirect to is called
ProcessTemplate and I've tried

@Action(result...@result(name=success, type=redirect-action,
location=process-template)})
public String execute() throws Exception {
return SUCCESS;
}

@Action(result...@result(name=success, type=redirect-action,
location=processtemplate)})
@Action(result...@result(name=success, type=redirect-action,
location=ProcessTemplate)})

and the app fails to start with
The Result type [redirect-action] which is defined in the Result annotation
on the class [class com.vasilikon.actions.CreateTemplate] or determined by
the file extension or is the default result type for the PackageConfig of
the action, could not be found as a result-type defined for the Struts/XWork
package [com.blackbox.actions#convention-default#] - [unknown location]

If I remove the annotation and deploy the app, config-browser finds the
action as process-template

Regards

-- 
View this message in context: 
http://www.nabble.com/Convention-Plugin%3A-How-to-specify-a-redirect-action-tp25713026p25713026.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Convention Plugin: How to specify a redirect action

2009-10-02 Thread Paweł Wielgus
Hi Roger,
try redirectAction.

Best greetings,
Paweł Wielgus.


2009/10/2 RogerV roger.var...@googlemail.com:

 Could someone tell me the correct format for the @Result annotation for a
 redirect action. The action class I want to redirect to is called
 ProcessTemplate and I've tried

 @Action(result...@result(name=success, type=redirect-action,
 location=process-template)})
        public String execute() throws Exception {
                return SUCCESS;
        }

 @Action(result...@result(name=success, type=redirect-action,
 location=processtemplate)})
 @Action(result...@result(name=success, type=redirect-action,
 location=ProcessTemplate)})

 and the app fails to start with
 The Result type [redirect-action] which is defined in the Result annotation
 on the class [class com.vasilikon.actions.CreateTemplate] or determined by
 the file extension or is the default result type for the PackageConfig of
 the action, could not be found as a result-type defined for the Struts/XWork
 package [com.blackbox.actions#convention-default#] - [unknown location]

 If I remove the annotation and deploy the app, config-browser finds the
 action as process-template

 Regards

 --
 View this message in context: 
 http://www.nabble.com/Convention-Plugin%3A-How-to-specify-a-redirect-action-tp25713026p25713026.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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



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



Re: Problem Using Struts 2.1.8 Portlet Plugin With redirectAction

2009-10-02 Thread phillips1021

Nils - I'm not following how to implement your quick fix.  Do you mean I
should do this:

result name=success type=redirectAction
index.action
/result

I tried the above and it didn't work for me.

Thank you for researching this issue so quickly.  We would like to move to
Struts 2.1.8 (we are still on 2.0.14 for our Struts 2 applications that are
also portlets.

Bruce


Definitively a bug somewhere. A quick fix is to add .action in the
configuration for the redirectAction result. 
-- 
View this message in context: 
http://www.nabble.com/Problem-Using-Struts-2.1.8-Portlet-Plugin-With-redirectAction-tp25702898p25716027.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [Struts2] Problem using Struts2 with EJB3 over ServiceLocator (Jboss say Caller unauthorized)

2009-10-02 Thread Wes Wannemacher
How are you getting a copy of your EJB in your action?

vwg.yyy.cancard.ui.action.Usermanagement.Usermanagement.list(Userman
agement.java:41)

That line in the stacktrace indicates that you are in the action when
you get the error, but the stacktrace dives down into a proxied object
after that. You do realize that you can't use the standard @Remote /
@Local on struts 2 action properties? Struts 2 creates it's own
objects so any JEE annotations are probably not going to work.

-Wes

On Fri, Oct 2, 2009 at 4:09 AM, Michael Obster mich...@obster.org wrote:
 Hi everybody,

 After I have written some mails to JBoss security forum, I found out that
 the Servlet has a problem. As I can see that has to do with the usage of
 Struts 2 because another application with Struts 1 works.

 The problem I don't know where I can continue to resolve the problem an
 wanted to ask if someone can help?

 ---
 Mail 1:

 I have a big problem using JAAS in JBoss 5.1.0GA, which I try to solve about
 2 days (my employer is not very amused of that...). I use a own
 JASSLoginModule to authenticate a user on a LDAP directory. The roleSet is
 fetched from a database. This part works as I can see and give me the result
 - AdminUser.

 But now when I call a EJB stateless session bean, I always get the Caller
 unauthorized error (Stacktrace is at bottom of the message).

 Can anybody give me a hint whats wrong.

 The Constants in the @RolesAllowed has AdminUser in the list. The class is
 also attached at the end of the message.

 error-statcktrace.txt

 UserFacadeBean.java

 
 Reply 1: From Wolfgang Knauf

 Hi Michael,

 you probably checked the JBoss log of the security layer (see question 4 in
 FAQ)? Do you see output that JBoss could map a user to the required roles?

 Please post the relevant snippets of your login module.

 Best regards

 Wolfgang

 -
 Mail 2:

 Some new output was generated after enabling debugging. But the only thing I
 can see, that the error is not in the login module but somewhere in the
 servlet container.

 Is there something special that I have to pay attention when I'm using
 Struts2 as framework?

 error-stacktrace-with-security-debugging.txt

 --
 Mail 3:

 My web.xml:
 web.xml

 And the struts2 interceptor I use on sites you have to be logged in:
 JaasLoginInterceptor:
 JAASLoginInterceptor.java

 ---

 Hope anyone has a hint what I'm doing wrong.

 Kind regards,
 Michael Obster


 javax.ejb.EJBAccessException: Caller unauthorized
        at
 org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(Ro
 leBasedAuthorizationInterceptorv2.java:199)
        at
 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
 java:102)
        at
 org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3Au
 thenticationInterceptorv2.java:186)
        at
 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
 java:102)
        at
 org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
 ptor.java:41)
        at
 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
 java:102)
        at
 org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContaine
 rShutdownInterceptor.java:67)
        at
 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
 java:102)
        at
 org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invo
 ke(CurrentInvocationInterceptor.java:67)
        at
 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
 java:102)
        at
 org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContain
 er.java:176)
        at
 org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContain
 er.java:216)
        at
 org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandl
 erBase.invoke(SessionProxyInvocationHandlerBase.java:207)
        at
 org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandl
 erBase.invoke(SessionProxyInvocationHandlerBase.java:164)
        at $Proxy1287.getAllUsers(Unknown Source)
        at
 vwg.yyy.cancard.ui.action.Usermanagement.Usermanagement.list(Userman
 agement.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
        at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
 com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultA
 ctionInvocation.java:404)
        at
 com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Defa
 ultActionInvocation.java:267)
        at
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionI
 nvocation.java:229)
        at
 

Struts2 2.1.8 MD5 not found

2009-10-02 Thread mailtolouis2020-struts
Hello,

Click on the MD5 link for Struts 2.1.8 in 
http://struts.apache.org/download.cgi#struts218

get this :
Not Found
The requested URL /dist/struts/binaries/struts-2.1.8-all.zip.md5 was not found 
on this server.

Regards
Louis

Re: Struts2 2.1.8 MD5 not found

2009-10-02 Thread Wes Wannemacher
Can you tell which server? I'm guessing that it is a mirror that
hasn't sync'd properly yet.

-Wes

On Fri, Oct 2, 2009 at 11:00 AM,  mailtolouis2020-str...@yahoo.com wrote:
 Hello,

 Click on the MD5 link for Struts 2.1.8 in
 http://struts.apache.org/download.cgi#struts218

 get this :
 Not Found
 The requested URL /dist/struts/binaries/struts-2.1.8-all.zip.md5 was not 
 found on this server.

 Regards
 Louis



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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



Re: Struts2 2.1.8 MD5 not found

2009-10-02 Thread mailtolouis2020-struts
http://www.apache.org/dist/struts/binaries/struts-2.1.8-all.zip.md5
http://www.apache.org/dist/struts/binaries/struts-2.1.8-all.zip.asc






From: Wes Wannemacher w...@wantii.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, October 2, 2009 4:05:39 PM
Subject: Re: Struts2 2.1.8 MD5 not found

Can you tell which server? I'm guessing that it is a mirror that
hasn't sync'd properly yet.

-Wes

On Fri, Oct 2, 2009 at 11:00 AM,  mailtolouis2020-str...@yahoo.com wrote:
 Hello,

 Click on the MD5 link for Struts 2.1.8 in
 http://struts.apache.org/download.cgi#struts218

 get this :
 Not Found
 The requested URL /dist/struts/binaries/struts-2.1.8-all.zip.md5 was not 
 found on this server.

 Regards
 Louis



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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

Re: [Struts2] Problem using Struts2 with EJB3 over ServiceLocator (Jboss say Caller unauthorized)

2009-10-02 Thread Michael Obster

Hi Wes,

I'm accessing the bean over a service locator. I have attached the class 
source at the end.


Regards,
Michael

Wes Wannemacher schrieb:

How are you getting a copy of your EJB in your action?

vwg.yyy.cancard.ui.action.Usermanagement.Usermanagement.list(Userman
agement.java:41)

That line in the stacktrace indicates that you are in the action when
you get the error, but the stacktrace dives down into a proxied object
after that. You do realize that you can't use the standard @Remote /
@Local on struts 2 action properties? Struts 2 creates it's own
objects so any JEE annotations are probably not going to work.

-Wes




package vwg.audi.cancard.ejb3connectors;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.apache.log4j.Logger;

import vwg.audi.cancard.business.facade.CancardFacade;
import vwg.audi.cancard.business.facade.UserFacade;

/**
 * ServiceLocator
 * 
 * pThe ServiceLocator handles the lookup of the EnterpriseJavaBeans.
 *
 *  @author Michael Obster
 */
public class ServiceLocator {

private static Logger log = Logger.getLogger(ServiceLocator.class);
private static ServiceLocator instance;
private InitialContext context = null;
private MapString, Object cache;

private static final String USERSERVICE = cancard/UserFacadeBean/local;
private static final String CANCARDSERVICE = 
cancard/CancardFacadeBean/local;

/**
 * Create instance.
 * @param context initial context
 */
private ServiceLocator(InitialContext context) {
this.context = context;
cache = Collections.synchronizedMap(new HashMapString, Object());
}

/**
 * Returns the instance of ServiceLocator class
 */
public static ServiceLocator getInstance() throws ServiceLocatorException {
if (instance == null) {
try {
instance = new ServiceLocator(new InitialContext());
} catch (NamingException ne) {
log.fatal(ServiceLocater could not be initialized!, ne);
throw new ServiceLocatorException(ne);
}
}
return instance;
}

public UserFacade getUserService() throws ServiceLocatorException {
return (UserFacade) getRef(USERSERVICE);
}

public CancardFacade getCancardService() throws ServiceLocatorException {
return (CancardFacade) getRef(CANCARDSERVICE);
}

private Object getRef(String refName) throws ServiceLocatorException {
try {
if (cache.containsKey(refName)) {
return cache.get(refName);
}
Object ref = context.lookup(refName);
cache.put(refName, ref);
return ref;
} catch (NamingException ne) {
log.error(Service :  + refName +  could not be looked up!, ne);
throw new ServiceLocatorException(ne);
}
}
}
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

about testing releases

2009-10-02 Thread Musachy Barroso
Hi all, to make a long story short, we have problems in the way that
we test/release struts. We cannot announce test builds in the user
mailing list, but at the same time we really need the help of user to
test releases, and find any problems before calling a release GA. It
is assumed that anyone interested in helping test releases is watching
the dev@ mailing list, but I have disagree with this. We don't have
releases often, so when we do cut builds they are intended to be GA
releases, so the users will end up testing either way, as it stands
right now, after it is called GA and released.

What I would like to ask from you is to keep an eye on the dev@
mailing list and help us test the releases, when a release is posted
in dev@ you can vote for it and give us feedback. This would guarantee
better quality for the releases. The dev@ mailing list is low traffic
and you will be up to date on what is happening, feel free to
contribute and give us feedback there.

regards
musachy
-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



Re: Access Denied error with Struts 2.1.8

2009-10-02 Thread Dan R. Olsen III
I moved the project to a path with no spaces and I am still getting the 
same access denied error.


On 10/1/2009 9:17 PM, Wes Wannemacher wrote:

Try moving your project to a directory on your machine that doesn't
have spaces in it... There are problems with the JDK's built-in URL
handling and if eclipse is accessing your jars via constructed URLs
(like it seems from the stacktrace), then you might be bitten by this
bug. Of course we'll work to fix it, but before I assume that this is
the problem, check by trying to run the project without spaces in the
directory names. If that fixes it, file a bug, it should be
reproducible.

-Wes

On Thu, Oct 1, 2009 at 6:38 PM, Dan R. Olsen IIIdanec...@gmail.com  wrote:
   

I don't set that path. It seems to be building that path in one of the
functions listed in the stack trace. Like I said, if I switch out the jar
files to the Struts 2.1.6 jars it works just fine.

On 10/1/2009 4:34 PM, Dale Newfield wrote:
 

Dan R. Olsen III wrote:
jar:file:\C:\Documents and Settings\DOLSEN\My
Documents\Eclipse3.5Projects\Temp\war\WEB-INF\lib\struts2-core-2.1.8.jar

Surely doesn't seem like a valid URL

Even
file:\C:\Documents and Settings\DOLSEN\My
Documents\Eclipse3.5Projects\Temp\war\WEB-INF\lib\struts2-core-2.1.8.jar

seems to have lots of problems.  The direction of the slashes, the fact
that given that direction they're not doubled, the very first slash (I
believe shouldn't be there), etc.

-Dale

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

   
 



   


Any good Open source project using Struts2 + Hibernate+Spring I can learn from ?

2009-10-02 Thread BlackKnight
Hi,Folks,

I've been using SSH for a while and are hoping to learn from some open
source code if there are any.

As for .net there are petshop. and Ejb there are petstore.

Are there any good open sourced project using SSH?


Thanks!

Frank

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



Re: Any good Open source project using Struts2 + Hibernate+Spring I can learn from ?

2009-10-02 Thread Antonio Petrelli
2009/10/2 BlackKnight ar3...@gmail.com:
 Are there any good open sourced project using SSH?

Well, in fact I mean something else for SSH, anyway the Roller
weblogger uses it:
http://roller.apache.org/

Antonio

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



Re: Any good Open source project using Struts2 + Hibernate+Spring I can learn from ?

2009-10-02 Thread Rafael Nami
Appfuse 2 (http://appfuse.org)

2009/10/2 Antonio Petrelli antonio.petre...@gmail.com

 2009/10/2 BlackKnight ar3...@gmail.com:
  Are there any good open sourced project using SSH?

 Well, in fact I mean something else for SSH, anyway the Roller
 weblogger uses it:
 http://roller.apache.org/

 Antonio

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




Struts 2.1.8 + SiteMesh 2.4.2 + FreeMarkerPageFilter Broken

2009-10-02 Thread Scott Hong


The dependency of Struts 2.1.8 on SiteMesh 2.4.2 breaks FreeMarkerPageFilter
as a decorator.

If the web.xml is setup as follows and using Freemarker as the SiteMesh
decorator,
sitemesh cannot render the decorated page properly. After tracking down the
source, 
the root cause of the issue is that the PageFilter in deprecated and
SiteMesh developer
have to force existing application to use the new SiteMeshFilter by using
the following
implementation!!! This deprecated change seems to be heavy handed on the
SiteMesh 
side!

public class PageFilter extends SiteMeshFilter {
}

One solution is to use older version of sitemesh (2.2.1) and it would work
normally.
Until struts-sitemesh-plugin is updated to address this issue either by
moving the
old SiteMesh 2.2.1's implementation of PageFilter or fixed current
implementation 
using the new SiteMeshFilter.

web.xml setup...

filter
filter-namestruts-cleanup/filter-name
   
filter-classorg.apache.struts2.dispatcher.ActionContextCleanUp/filter-class
/filter
filter
filter-namesitemesh/filter-name
   
filter-classorg.apache.struts2.sitemesh.FreeMarkerPageFilter/filter-class
/filter
filter
filter-namestruts/filter-name
   
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
init-param
param-nameactionPackages/param-name
param-valueorg.acme.*Action/param-value
/init-param
/filter
filter-mapping
filter-namestruts-cleanup/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherFORWARD/dispatcher
/filter-mapping
filter-mapping
filter-namesitemesh/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherFORWARD/dispatcher
dispatcherINCLUDE/dispatcher
/filter-mapping
filter-mapping
filter-namestruts/filter-name
url-pattern/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherFORWARD/dispatcher
/filter-mapping

-- Scott
-- 
View this message in context: 
http://www.nabble.com/Struts-2.1.8-%2B-SiteMesh-2.4.2-%2B-FreeMarkerPageFilter-Broken-tp25721587p25721587.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2.1.8 + SiteMesh 2.4.2 + FreeMarkerPageFilter Broken

2009-10-02 Thread Musachy Barroso
can you please file a jira ticket with the details?

thanks
musachy

On Fri, Oct 2, 2009 at 12:52 PM, Scott Hong yowmh...@yahoo.com wrote:


 The dependency of Struts 2.1.8 on SiteMesh 2.4.2 breaks FreeMarkerPageFilter
 as a decorator.

 If the web.xml is setup as follows and using Freemarker as the SiteMesh
 decorator,
 sitemesh cannot render the decorated page properly. After tracking down the
 source,
 the root cause of the issue is that the PageFilter in deprecated and
 SiteMesh developer
 have to force existing application to use the new SiteMeshFilter by using
 the following
 implementation!!! This deprecated change seems to be heavy handed on the
 SiteMesh
 side!

 public class PageFilter extends SiteMeshFilter {
 }

 One solution is to use older version of sitemesh (2.2.1) and it would work
 normally.
 Until struts-sitemesh-plugin is updated to address this issue either by
 moving the
 old SiteMesh 2.2.1's implementation of PageFilter or fixed current
 implementation
 using the new SiteMeshFilter.

 web.xml setup...

    filter
        filter-namestruts-cleanup/filter-name

 filter-classorg.apache.struts2.dispatcher.ActionContextCleanUp/filter-class
    /filter
    filter
        filter-namesitemesh/filter-name

 filter-classorg.apache.struts2.sitemesh.FreeMarkerPageFilter/filter-class
    /filter
    filter
        filter-namestruts/filter-name

 filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
        init-param
            param-nameactionPackages/param-name
            param-valueorg.acme.*Action/param-value
        /init-param
    /filter
    filter-mapping
        filter-namestruts-cleanup/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
    /filter-mapping
    filter-mapping
        filter-namesitemesh/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
        dispatcherINCLUDE/dispatcher
    /filter-mapping
    filter-mapping
        filter-namestruts/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
    /filter-mapping

 -- Scott
 --
 View this message in context: 
 http://www.nabble.com/Struts-2.1.8-%2B-SiteMesh-2.4.2-%2B-FreeMarkerPageFilter-Broken-tp25721587p25721587.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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





-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



Setting a checkbox

2009-10-02 Thread Dan R. Olsen III

I have the following tag:

s:checkbox id=termsofservice name=isChecked fieldValue =true /

isChecked is a boolean variable that is set in the action. When I put a 
variable in the name field for a textfield tag it will bring up the 
value of the variable in the text box. I want the checkbox above to be 
checked if isChecked is true and not checked if isChecked is false. All 
the examples I have found have not worked for me. Any extra help would 
be appreciated. I'm sure it is something simple that I am missing.





Dyanamic properties in Struts2

2009-10-02 Thread Scott Smith
Has anyone found a good way to do the following. 

 

I have a menu on a web page.  The strings used to display menu items are
in properties files and so the tags on the web page reference the menu
property name instead of hard-coding the actual string .  Therefore, I
can have an English version of the property file and a Spanish version
of the property file and different users will see different language
versions of the menu.  All that works fine.

 

Now the customer wants to be able to change the translations of the
strings on the fly.  It's easy enough to give them a web page that
allows them to look at the various strings and type in a new/different
Spanish version of an English string.  But writing that out to the
property file doesn't cause Struts2 to reload the property file and so
anyone looking at a web page will see the old translation and not the
new translation.  

 

I can see how to do this by doing a custom version of the struts tags
that get the property values and completely re-implement the property
support in struts/java.  But, it seems like there should be an easier
way.  

 

Is there a way to get at the properties class instances (for different
languages) that are loaded into the jvm and change the values on the
fly?  I'd like to piggyback on the existing java support for the java
properties class (and maybe put the different properties out in a
database instead of in property files).

 

Does anyone have any suggestions?  



ognl problem with double value in form

2009-10-02 Thread Bill Bohnenberger
I have a double in an action:

private double dval;

with mutators

public double getDval() { return dval; }

public void setDval (double dval) { this.dval = dval; }

I have this form in my jsp page:

s:form action=TestAction_doCommand
s:textfield label=Double Value name=dval size=10/
s:submit/
/s:form

Whenever I enter 0 or 0.0 in the text field, OGNL throws

ognl.MethodFailedException: Method setDval failed for object
com.rp.db.actions.testact...@16cefa8 [java.lang.NoSuchMethodException:
setDval([Ljava.lang.String;)]

BUT, it properly converts all non-zero values without complaint and even
converts the empty string to 0.0!

Is there some way I can get OGNL to accept the 0 and 0.0 values?

Thanks,
Bill B


Re: Struts 2.1.8 + SiteMesh 2.4.2 + FreeMarkerPageFilter Broken

2009-10-02 Thread Scott Hong

As suggested, the following issue has been created.

https://issues.apache.org/struts/browse/WW-3275


Musachy Barroso wrote:
 
 can you please file a jira ticket with the details?
 
 thanks
 musachy
 
 On Fri, Oct 2, 2009 at 12:52 PM, Scott Hong yowmh...@yahoo.com wrote:


 The dependency of Struts 2.1.8 on SiteMesh 2.4.2 breaks
 FreeMarkerPageFilter
 as a decorator.

 If the web.xml is setup as follows and using Freemarker as the SiteMesh
 decorator,
 sitemesh cannot render the decorated page properly. After tracking down
 the
 source,
 the root cause of the issue is that the PageFilter in deprecated and
 SiteMesh developer
 have to force existing application to use the new SiteMeshFilter by using
 the following
 implementation!!! This deprecated change seems to be heavy handed on the
 SiteMesh
 side!

 public class PageFilter extends SiteMeshFilter {
 }

 One solution is to use older version of sitemesh (2.2.1) and it would
 work
 normally.
 Until struts-sitemesh-plugin is updated to address this issue either by
 moving the
 old SiteMesh 2.2.1's implementation of PageFilter or fixed current
 implementation
 using the new SiteMeshFilter.

 web.xml setup...

    filter
        filter-namestruts-cleanup/filter-name

 filter-classorg.apache.struts2.dispatcher.ActionContextCleanUp/filter-class
    /filter
    filter
        filter-namesitemesh/filter-name

 filter-classorg.apache.struts2.sitemesh.FreeMarkerPageFilter/filter-class
    /filter
    filter
        filter-namestruts/filter-name

 filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
        init-param
            param-nameactionPackages/param-name
            param-valueorg.acme.*Action/param-value
        /init-param
    /filter
    filter-mapping
        filter-namestruts-cleanup/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
    /filter-mapping
    filter-mapping
        filter-namesitemesh/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
        dispatcherINCLUDE/dispatcher
    /filter-mapping
    filter-mapping
        filter-namestruts/filter-name
        url-pattern/*/url-pattern
        dispatcherREQUEST/dispatcher
        dispatcherFORWARD/dispatcher
    /filter-mapping

 -- Scott
 --
 View this message in context:
 http://www.nabble.com/Struts-2.1.8-%2B-SiteMesh-2.4.2-%2B-FreeMarkerPageFilter-Broken-tp25721587p25721587.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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


 
 
 
 -- 
 Hey you! Would you help me to carry the stone? Pink Floyd
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1.8-%2B-SiteMesh-2.4.2-%2B-FreeMarkerPageFilter-Broken-tp25721587p25724696.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



[ANN] VTD-XML 2.7

2009-10-02 Thread jimmy Zhang

VTD-XML 2.7 is released and can be downloaded at
http://sourceforge.net/projects/vtd-xml/files/

Below is a summary of what are the new features and enhancements.

Expanded VTD-XML's Core API

* VTDNav: toStringUpperCase, toStringLowerCase, contains(), endsWith(),
startsWith()
* Extended VTD added in-memory buffer support

Improved Xpath

* added the following XPath 2.0 functions: abs(), ends-with(), upper-case(),
lower-case()
* added support for variable reference
* significantly enhanced XPath syntax, checking error reporting (Special
thanks to Mark Swanson)
* Internal performance tuning

Bug fixes and Code Enhancement

* C version significantly removed warning message, fix memory leak during
Xpath expression parsing,
* Various bug fies (Special thanks to Jon Roberts, John Zhu, Matej Spiller,
Steve Polson, and Romain La Tellier) 



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