Hi Stephen, Another thing to note, are you running as a non-root user? On linux, opening a port < 1024 requires higher permissions. I noticed your log said jetty starting on port 80.
CM On Wed, Sep 17, 2014 at 3:05 AM, Stephen Nutbrown <steves...@gmail.com> wrote: > Oh, I see. I found it. It took me nearly 3 or 4 hours. > > Lessons learnt: > - Always look at the full log from jetty, not just what is shown on the > page. > - Make sure filenames are capitalised correctly (Thanks Lance). > - Check that somebody else hasn't changed the required security manager > using: > System.setSecurityManager(new RMISecurityManager()) > > Although, I am not quite sure why this works on Windows and not Linux, > it was unnecessary and removing it fixed the problem. The log showing > "Access Denied" made me start questioning permissions. I'm also not > sure why this code was there, as the security policy is set through VM > args. > > Thanks Lance, I really appreciate your help! > > > On 16 September 2014 18:01, Stephen Nutbrown <steves...@gmail.com> wrote: > > Thanks Lance - I will check that first. I did fix one occurrence of > > that already but think I got them. > > > > I also wonder if this exception is could actually caused when I try to > > show an error message on the password field of the login form like > > this: > > > > loginForm.recordError(passwordField, > > "Invalid user name or password."); > > > > This is because when I look in the log which is created by jetty, I > > can see some more interesting details which I hadn't seen before: > > > > 2014-09-16 17:35:32.346:INFO:oejs.ServerConnector:main: Started > > ServerConnector@444421ab{HTTP/1.1}{0.0.0.0:80} > > [ERROR] TapestryModule.ClientDataEncoder The symbol > > 'tapestry.hmac-passphrase' has not been configured. This is used to > > configure hash-based message authentication of Tapestry data stored in > > forms, or in the URL. You application is less secure, and more > > vulnerable to denial-of-service attacks, when this symbol is not > > configured. > > [INFO] AppModule.TimingFilter Request time: 4209 ms > > [ERROR] ioc.Registry access denied ("java.net.SocketPermission" > > "127.0.0.1:1099" "connect,resolve") > > [ERROR] ioc.Registry Operations trace: > > [ERROR] ioc.Registry [ 1] Triggering event 'action' on Index:loginform > > [ERROR] ioc.Registry [ 2] Triggering event 'validate' on Index:loginform > > [INFO] AppModule.TimingFilter Request time: 115 ms > > [ERROR] ioc.Registry access denied ("java.util.PropertyPermission" > > "tapestry.exception-report-page" "read") > > [ERROR] ioc.Registry Operations trace: > > [ERROR] ioc.Registry [ 1] Realizing service RequestExceptionHandler > > [ERROR] ioc.Registry [ 2] Instantiating service > > RequestExceptionHandler implementation via > > > org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler(RequestPageCache, > > PageResponseRenderer, Logger, String, Response) (at > > DefaultRequestExceptionHandler.java:53) via > > org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at > > TapestryModule.java:308) > > [ERROR] ioc.Registry [ 3] Creating plan to instantiate > > org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler > > via public > org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler(org.apache.tapestry5.internal.services.RequestPageCache,org.apache.tapestry5.internal.services.PageResponseRenderer,org.slf4j.Logger,java.lang.String,org.apache.tapestry5.services.Response) > > [ERROR] ioc.Registry [ 4] Determining injection value for parameter #4 > > (java.lang.String) > > [ERROR] ioc.Registry [ 5] Resolving object of type java.lang.String > > using MasterObjectProvider > > 2014-09-16 17:35:45.343:WARN:oejs.ServletHandler:qtp447326139-16: > > Error for /studentportal/index.loginform > > java.lang.ExceptionInInitializerError > > > > Actually what happens (or should) is that the onValidate method calls > > a method on an object which resides on a server, using RMI to check > > the credentials. If the credentials are accepted, there is no error > > recorded on the loginForm and so onSuccess is called. If there is some > > error (including permission problems or RMI problems), then it should > > record the error message so onSuccess is not called. Since the RMI > > server is not running, the user should not be able to validate. On my > > windows machine this is fine, I just get an error message > > > > On 16 September 2014 17:33, Lance Java <lance.j...@googlemail.com> > wrote: > >> Linux file system is case sensitive whereas windows is not. I'm guessing > >> you have a tml file where the case of the tml filename does not match > the > >> class name. > >> On 16 Sep 2014 17:27, "Stephen Nutbrown" <steves...@gmail.com> wrote: > >> > >>> Hi, > >>> > >>> I have a T5 webapp which I am currently running using jetty on windows > >>> which works as expected. I am building the project using maven and > >>> running it using mvn jetty:run. However, I can (and have) tried > >>> installing jetty and building it into a .war and deploying it that > >>> way. > >>> > >>> Whichever way I do it, on the Linux server I am able to see the home > >>> page. When I then submit a form (the login form), I get an exception > >>> which I don't get on Windows. I am really stuck trying to figure out > >>> the problem. I would appreciate any guidance if possible. > >>> > >>> I have previously ran T5 webapps on this server without a problem, but > >>> the exception seems to suggest something about locale? This isn't a > >>> project which was created by myself, but I have the job of moving it > >>> to the linux server. I have been looking to see if there is any use of > >>> "message:" but I cannot see anything which would suggest anything > >>> dependant on a particular locale (Strings are just in the tml file). > >>> > >>> Thanks, > >>> Steve > >>> > >>> Here is the trace: > >>> > >>> HTTP ERROR 500 > >>> > >>> Problem accessing /project/index.loginform. Reason: > >>> > >>> Server Error > >>> > >>> Caused by: > >>> > >>> java.lang.ExceptionInInitializerError > >>> at > >>> > org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:64) > >>> at > >>> > org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) > >>> at > >>> > org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) > >>> at > >>> > org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) > >>> at > >>> > org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) > >>> at > >>> > org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) > >>> at > >>> > org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:66) > >>> at > >>> > org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54) > >>> at $RequestExceptionHandler_122c7565f8ec3f.delegate(Unknown Source) > >>> at > $RequestExceptionHandler_122c7565f8ec3f.handleRequestException(Unknown > >>> Source) > >>> at > >>> > org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42) > >>> at $RequestHandler_122c7565f8ec42.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) > >>> at $RequestHandler_122c7565f8ec42.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) > >>> at $RequestHandler_122c7565f8ec42.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) > >>> at $RequestHandler_122c7565f8ec42.service(Unknown Source) > >>> at $RequestHandler_122c7565f8ec36.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) > >>> at > >>> > org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) > >>> at $HttpServletRequestHandler_122c7565f8ec38.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) > >>> at $HttpServletRequestHandler_122c7565f8ec38.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) > >>> at $HttpServletRequestFilter_122c7565f8ec34.service(Unknown Source) > >>> at $HttpServletRequestHandler_122c7565f8ec38.service(Unknown Source) > >>> at > >>> > org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) > >>> at $HttpServletRequestHandler_122c7565f8ec38.service(Unknown Source) > >>> at $HttpServletRequestHandler_122c7565f8ec32.service(Unknown Source) > >>> at > org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171) > >>> at > >>> > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1489) > >>> at > >>> > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:517) > >>> at > >>> > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138) > >>> at > >>> > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564) > >>> at > >>> > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213) > >>> at > >>> > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097) > >>> at > >>> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:446) > >>> at > >>> > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) > >>> at > >>> > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031) > >>> at > >>> > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) > >>> at > >>> > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:200) > >>> at > >>> > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) > >>> at > >>> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > >>> at org.eclipse.jetty.server.Server.handle(Server.java:445) > >>> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:269) > >>> at > >>> > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) > >>> at > >>> > org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) > >>> at > >>> > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) > >>> at > >>> > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) > >>> at java.lang.Thread.run(Thread.java:744) > >>> Caused by: java.util.MissingResourceException: Can't find bundle for > >>> base name org.apache.tapestry5.ioc.internal.IOCStrings, locale en_US > >>> at > >>> > java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499) > >>> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322) > >>> at java.util.ResourceBundle.getBundle(ResourceBundle.java:1028) > >>> at > >>> > org.apache.tapestry5.ioc.internal.util.MessagesImpl.forClass(MessagesImpl.java:46) > >>> at > >>> > org.apache.tapestry5.ioc.internal.IOCMessages.<clinit>(IOCMessages.java:40) > >>> ... 51 more > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>> > >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >