DZone internals unleashed
Рубрика: Development, Java | 11 January 2008, 11:05 | juriy
Okay, there’s no perfect projects. Except HelloWorlds of course. DZone is good but not perfect. At least we’ve found one minor issue about it: it shows stack traces to end users. There’s nothing particularly bad in it considering the fact that this happens not quite often. Still we got a really-really nice stack trace from dzone and we can take a glance on it’s internals.
Here’s the reason of what has happened:
java.sql.BatchUpdateException: Lock wait timeout exceeded;
try restarting transaction
This type of exception occurs when process tries to write some data into the MyISAM table, locked by another process. The query is queued and then removed after timeout.
Let’s go down a bit:
at com.mysql.jdbc.PreparedStatement
.executeBatchSerially(PreparedStatement.java:1237)
it seems that DZone uses MySQL.
at com.ibatis.sqlmap.engine.execution
.SqlExecutor.executeBatch(SqlExecutor.java:119)
And
Then comes
at org.springframework.web.servlet.mvc
.AbstractController.handleRequest(AbstractController.java:153)...
at org.springframework.aop.framework
.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
with MVC and AOP
Seems that DZone runs on
at com.caucho.server.dispatch
.ServletFilterChain.doFilter(ServletFilterChain.java:103)
Uses
org.tuckey.web.filters.urlrewrite
.RewrittenUrl.doRewrite(RewrittenUrl.java:176)
And as a security solution
at org.acegisecurity.intercept.web
.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
That’s it! Hide your traces from users ;-)
Tweet
Спасибо за разбор ;)
Интересно, с чем связан выбор Resin?
Вы удивитесь узнав, что Google выдает свой стек трейс при использовании веб сервиса поисковика.
Chabster: Когда я “игрался” с Google Search SOAP API – при ошибке получал просто SOAPFault без стек-трейса.
Да и стектрейса там наверное всего-ничего – какой-нить AXIS или XFire и не более.
А у тебя ещё API key сохранился? :)
Это так, шоб удивить:
com.google.soap.search.GoogleSearchFault: Invalid authorization key: foo
at com.google.soap.search.QueryLimits.lookUpAndLoadFromINSIfNeedBe(
QueryLimits.java:220)
at com.google.soap.search.QueryLimits.validateKey(QueryLimits.java:127)
at com.google.soap.search.GoogleSearchService.doPublicMethodChecks(
GoogleSearchService.java:825)
at com.google.soap.search.GoogleSearchService.doGoogleSearch(
GoogleSearchService.java:121)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.soap.server.RPCRouter.invoke(RPCRouter.java:146)
at org.apache.soap.providers.RPCJavaProvider.invoke(
RPCJavaProvider.java:129)
at org.apache.soap.server.http.RPCRouterServlet.doPost(
RPCRouterServlet.java:288)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.google.gse.HttpConnection.runServlet(HttpConnection.java:237)
at com.google.gse.HttpConnection.run(HttpConnection.java:195)
at com.google.gse.DispatchQueue$WorkerThread.run(DispatchQueue.java:201)
Caused by: com.google.soap.search.UserKeyInvalidException: Key was of wrong size.
at com.google.soap.search.UserKey.(UserKey.java:59)
at com.google.soap.search.QueryLimits.lookUpAndLoadFromINSIfNeedBe(
QueryLimits.java:217)
… 14 more