cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the ScriptDebugger

princeali
Champ in-the-making
Champ in-the-making
Hello,

I had a problem with my logger.log("message") command in my js extension file. The message was not shown in the alfresco.log file. So I changed in my log4j.properties, the ScriptDebbuger to on : log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=on. Unfortunately, I got this error and my alfresco stopped working.

18:14:30,298 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03110002 IO exception parsing request
org.springframework.extensions.webscripts.WebScriptException: 03110002 IO exception parsing request
   at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:51)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:422)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:268)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(Unknown Source)
   at java.net.SocketInputStream.read(Unknown Source)
   at sun.security.ssl.InputRecord.readFully(Unknown Source)
   at sun.security.ssl.InputRecord.read(Unknown Source)
   at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
   at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
   at sun.security.ssl.AppInputStream.read(Unknown Source)
   at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:532)
   at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501)
   at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:563)
   at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:124)
   at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346)
   at org.apache.coyote.Request.doRead(Request.java:422)
   at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290)
   at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:449)
   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315)
   at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:167)
   at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112)
   at org.springframework.extensions.surf.util.InputStreamContent.getContent(InputStreamContent.java:70)
   at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.buildModel(AlfrescoModelsDiff.java:78)
   at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:42)
   … 33 more
18:14:30,341 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03110001 IO exception parsing request
org.springframework.extensions.webscripts.WebScriptException: 03110001 IO exception parsing request
   at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:51)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:422)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:268)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(Unknown Source)
   at java.net.SocketInputStream.read(Unknown Source)
   at sun.security.ssl.InputRecord.readFully(Unknown Source)
   at sun.security.ssl.InputRecord.read(Unknown Source)
   at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
   at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
   at sun.security.ssl.AppInputStream.read(Unknown Source)
   at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:532)
   at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501)
   at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:563)
   at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:124)
   at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346)
   at org.apache.coyote.Request.doRead(Request.java:422)
   at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290)
   at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:449)
   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315)
   at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:167)
   at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112)
   at org.springframework.extensions.surf.util.InputStreamContent.getContent(InputStreamContent.java:70)
   at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.buildModel(AlfrescoModelsDiff.java:78)
   at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:42)
   … 33 more

I can't figure out where this ERROR comes from.
4 REPLIES 4

kaynezhang
World-Class Innovator
World-Class Innovator
Setting log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=on will enable javascript debugger ,which is a swing debugger window.
The debugger window is used to debug javascript ,not where you'll see the output of logger.log .
Try following seetings to enable log

log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug

princeali
Champ in-the-making
Champ in-the-making
Thanks for the clarification!
I've set both the ScriptLogger values to debug but it still won't work. Alfresco.log doesn't show my message.

Here's a part of my log4j file:


# Web Framework
log4j.logger.org.springframework.extensions.webscripts=debug
log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=debug
log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off

# Repository
log4j.logger.org.alfresco.repo.web.scripts=info
log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
log4j.logger.org.alfresco.repo.jscript=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug
log4j.logger.org.alfresco.repo.cmis.rest.CMISTest=info

kaynezhang
World-Class Innovator
World-Class Innovator
Put your customization log4j properties file in the extension directory and named like this

$TOMCAT_HOME/shared/classes/alfresco/extension/*-log4j.properties

princeali
Champ in-the-making
Champ in-the-making
I've put a log4j properties file in the extension directory and now it works!
Thanks