Sunday, September 25, 2011

Linux server copy command

In Linux / UNIX if you want to copy a file or a directory recursively from one server to other server you can use SCP (server copy) command

Synatax :

scp <filename> userName@server:/home/path/


scp -r <foldername> userName@server:/home/path/

It will promt for a password, after entering correct password it will copy files or a directory recursively from specified source server to specified destination server.

Options available :

  • -p : Preserves the modification and access times, as well as the permissions of the source-file in the destination-file
  • -q : Do not display the progress bar
  • -r : Recursive, so it copies the contents of the source-file (directory in this case) recursively
  • -v : Displays debugging messages

The method println(boolean) in the type PrintStream is not applicable for the arguments (void)

I got below mentioned error on my JBOSS console

The method println(boolean) in the type PrintStream is not applicable for the arguments (void)

How to solve this error.

1. Check syntax error.

          Check for any typo around SOP.

          System.out.println("Hello World!");

2. Check for any void function inside SOP.

       //Here void function is not allowed. Function must return some value to print

Friday, September 2, 2011


While migration of my code from WebSphere to JBoss i observed below mentioned error.

04:17:20,946 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /com/test.jsp(15,1) Expecting "jsp:param" standard action with "name" and "value" attributes
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(
at org.apache.jasper.compiler.ErrorDispatcher.jspError(
at org.apache.jasper.compiler.Parser.parseParam(
at org.apache.jasper.compiler.Parser.parseBody(
at org.apache.jasper.compiler.Parser.parseOptionalBody(
at org.apache.jasper.compiler.Parser.parseForward(
at org.apache.jasper.compiler.Parser.parseStandardAction(
at org.apache.jasper.compiler.Parser.parseElements(
at org.apache.jasper.compiler.Parser.parse(
at org.apache.jasper.compiler.ParserController.doParse(

Solution :

Replace old code

<jsp:include flush="true" page="file.jsp">
<jsp:forward page="file.jsp">

With new code

<jsp:include flush="true" page="file.jsp"/>
<jsp:forward page="file.jsp"/>

05:39:55,609 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception invalid entry size (expected 2504523784 but got 4151 bytes)
at java.util.jar.JarInputStream.getNextEntry(
at java.util.jar.JarInputStream.getNextJarEntry(
at org.jboss.web.tomcat.service.jasper.TagLibCache.scanJar(
at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(
at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(
at org.jboss.web.tomcat.service.jasper.TagLibCache.init(

This error looks like it is having trouble reading a jar file while looking for a tld. Hence you need to check the files in the WEB-INF/lib directory to make sure they are all valid jar files. Also it may occurs when text file entries in the source jar file contain some non-ASCII characters such as ^I ^Z ^D ^C.


Few days ago i absorbed below mentioned error on JBoss console,

06:34:22,276 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
at org.apache.catalina.session.StandardSession.setAttribute(
at org.apache.catalina.session.StandardSession.setAttribute(
at org.apache.catalina.session.StandardSessionFacade.setAttribute(
at org.apache.jasper.runtime.PageContextImpl.doSetAttribute(
at org.apache.jasper.runtime.PageContextImpl.setAttribute(
at org.apache.jsp.survey.question_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(

Solution :
I traced back the root cause of the error. I went to that particular JSP file and found that particular java class which was throwing this error.

I implemented interface Serializable for that class

eg :

class Xyz implements Serializable { }