Author Topic: servletexception nested socketexception  (Read 2690 times)

RobinS

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
servletexception nested socketexception
« on: March 03, 2009, 06:30:05 AM »
Hi everyone,

I tried to integrate Konakart within OpenCms 7 and installed it, the way its described in the documentation(the one referencing to the konakart.com demo).
import etc. worked well, but when I try to view the index.jsp I get these exceptions

Code: [Select]
javax.servlet.ServletException: javax.servlet.jsp.JspException: ; nested exception is:
java.net.SocketException: Connection reset
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:837)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
at org.apache.jsp.WEB_002dINF.jsp.offline.konakart_002dintegration.index_jsp._jspService(index_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
at org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:1193)
at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:1227)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:1171)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:988)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1498)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)

anybody got help?

kind regards

kate

  • Administrator
  • Sr. Member
  • *****
  • Posts: 221
    • View Profile
    • KonaKart Website
Re: servletexception nested socketexception
« Reply #1 on: March 03, 2009, 07:34:36 AM »
Hi,

To verify this I just downloaded the latest OpenCms 7.0.5 and installed the KonaKart module as described in the documentation... and all worked flawlessly.

So, what is wrong with yours I wonder.....??

It's as if you can't make a connection to the KonaKart web service.  Is there a firewall problem here perhaps?

-- Kate

RobinS

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: servletexception nested socketexception
« Reply #2 on: March 03, 2009, 10:02:59 AM »
well, it could be a proxy problem, but I don't know where to configure it.
do I need to configure it in the konakartmodule, opencms or tomcat? if yes, where exaclty?

thanks in advance

kate

  • Administrator
  • Sr. Member
  • *****
  • Posts: 221
    • View Profile
    • KonaKart Website
Re: servletexception nested socketexception
« Reply #3 on: March 03, 2009, 03:29:05 PM »
There are a few ways to do this.

One way is to follow the documentation for rebuilding the module - first set your endpoint in the WSDL then generate the module using the specified ant targets.

Possibly easier...  you could modify the two JSPs:  (NewProductsBody.jsp and BestSellersTile.jsp) as follows:

In both you will see this line:

Code: [Select]
KKWSEngIf eng = new KKWSEngIfServiceLocator().getKKWebServiceEng();
This is where we create an engine that we'll use to call the KonaKart APIs.

Without parameters it'll use the default endpoint (which is our demo site).

So, instead of the above line, you can define your own endpoint for the engine like this:

Code: [Select]
KKWSEngIf eng = new KKWSEngIfServiceLocator().getKKWebServiceEng(new java.net.URL("http://yourhost:8780/konakart/services/KKWebServiceEng"));
--Kate

RobinS

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: servletexception nested socketexception
« Reply #4 on: March 04, 2009, 05:07:23 AM »
It works for me now, thank you very much for your quick help.