TeamLog尝试部署在Bae遇到的问题

发布于 2021-11-21 07:01:17 字数 9081 浏览 904 评论 4

数据库:

1 源程序用的H2数据库,我改造成Mysql的。有些sql用法:数据类型(uuid)、函数(dateadd(),HASH())、语法(insert into userInfo(id) values(select id from user where username=?))需换成Mysql的。

2 数据源连接,参考的OSC的DBManager http://www.oschina.net/code/snippet_12_8

配置文件:

params.properties里邮件信息改成自己的。

3 其它参考:

http://my.oschina.net/u/173975/blog/137423

其中:

1 添加<sessions-eabled>true</sessions-eabled>后就提示发布失败,不加则登陆后提示session不可用。

java.lang.RuntimeException: Session support is not enabled in duapp-web.xml.  To enable sessions, put <sessions-enabled>true</sessions-enabled> in that file.  Without it, getSession() is allowed, but manipulation of sessionattributes is not.
	at com.baidu.bae.jetty.server.session.EmptySessionManager$StubSession.throwException(EmptySessionManager.java:91)
	at com.baidu.bae.jetty.server.session.EmptySessionManager$StubSession.setAttribute(EmptySessionManager.java:83)
	at com.wiseach.teamlog.web.security.UserAuthProcessor.saveUserToSession(UserAuthProcessor.java:48)
	at com.wiseach.teamlog.web.security.UserAuthProcessor.doLogin(UserAuthProcessor.java:41)
	at com.wiseach.teamlog.web.actions.LoginActionBean.login(LoginActionBean.java:30)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at com.baidu.cloud.env.tools.agent.runtime.Runtime.invoke(Runtime.java:151)
	at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(DispatcherHelper.java:456)
	at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
	at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
	at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
	at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
	at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:454)
	at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:278)
	at net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:160)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at net.sourceforge.stripes.controller.DynamicMappingFilter$2.doFilter(DynamicMappingFilter.java:431)
	at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:260)
	at net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:418)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1372)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:487)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:480)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:249)
	at com.baidu.jetty.security.quotalimit.LimitQuotaHandler.doHandle(LimitQuotaHandler.java:64)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1003)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:200)
	at com.baidu.jetty.security.quotalimit.LimitQuotaHandler.doScope(LimitQuotaHandler.java:43)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:934)
	at org.eclipse.jetty.webapp.WebAppContext.doScope(WebAppContext.java:539)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:226)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:305)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
	at org.eclipse.jetty.server.Server.handle(Server.java:368)
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:605)
	at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1086)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:425)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
	at java.lang.Thread.run(Thread.java:679)

2 TeamlogContextListener中,估计它ScheduledExecutorService scheduler,引起下面错误,把contextInitialized中的scheduler执行的方法注掉就好了。

WARNING:2013-09-16 18:02:150.zkool4j.duapp.com

null0Sep 16, 2013 6:02:15 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Unable to reach node goal: undeployed
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThread)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
at java.security.AccessController.checkPermission(AccessController.java:553)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at org.eclipse.jetty.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:39)
at java.util.concurrent.ThreadPoolExecutor.checkShutdownAccess(ThreadPoolExecutor.java:711)
at java.util.concurrent.ThreadPoolExecutor.shutdown(ThreadPoolExecutor.java:1351)
at java.util.concurrent.ScheduledThreadPoolExecutor.shutdown(ScheduledThreadPoolExecutor.java:638)
at java.util.concurrent.Executors$DelegatedExecutorService.shutdown(Executors.java:630)
at com.wiseach.teamlog.web.listeners.TeamlogContextListener.contextDestroyed(TeamlogContextListener.java:41)
at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:736)
at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:152)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:568)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:83)
at org.eclipse.jetty.deploy.bindings.StandardStopper.processBinding(StandardStopper.java:36)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:484)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:444)
at org.eclipse.jetty.deploy.DeploymentManager.removeApp(DeploymentManager.java:391)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.removeApp(ScanningAppProvider.java:250)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.getContextHandler(ScanningAppProvider.java:303)
at org.eclipse.jetty.deploy.handler.PreviewAndLazyLoadHandler.handle(PreviewAndLazyLoadHandler.java:84)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:305)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:605)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1069)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:425)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:679)

3 印象中还有:index.jsp中 <jsp:forward page="/worklog"/>,初次访问zkool4j.duapp.com时,不会拦截跳到config页面中,改成<jsp:forward page="/login" />可以。

@wiseach

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

白龙吟 2021-11-24 11:14:22

这个是INFO,不是错误,是stripes的标准输出。url后面的数值是用户id。有没有截图?

笑红尘 2021-11-24 11:05:39

2013-09-16 19:18:47,202 [qtp381531395-13] [net.sourceforge.stripes.config.BootstrapPropertyResolver] [INFO] - Class implementing/extending LocalizationBundleFactory found in web.xml: com.wiseach.teamlog.web.extensions.TeamlogLocalizationBundleFactory

这个算错误吗?

登陆后

HTTP ERROR 403

又不知啥原因,先在路径后面加上/5,http://zkool4j.duapp.com/worklog/5

5是admin的主键,可以访问。

管理员账号:admin/123456

狠疯拽 2021-11-24 09:34:19

@zha0ku1 很帅啊! 为其它BAE玩家提供了参考和范本。 

眼眸里的那抹悲凉 2021-11-21 23:02:10

,其中的1,发布失败是因为标签写错了,<sessions-enabled>true</sessions-enabled>写成了
<sessions-eabled>true</sessions-eabled>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文