Not sure if it only happens in ajax templates, but if validation fails and a message should be rendered next to an input element I get this error in the tomcat console, and no validation message rendered/template not updated properly. I do see these exceptions pop up in the tomcat log of other webdsl apps as well.

Exception:

exception occured while handling request URL: http://localhost:8080/reposearch/addProject
exception message: could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
at webdsl.generated.domain.SecurityContext_$$_javassist_13.getPrincipal(SecurityContext_$$_javassist_13.java)
at webdsl.generated.templates.AddProjectPage.serve(AddProjectPage.java:182)
at utils.DispatchServletHelper.handlePage(DispatchServletHelper.java:593)
at utils.DispatchServletHelper.doServe(DispatchServletHelper.java:553)
at utils.DispatchServlet.doPost(DispatchServlet.java:363)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Error: server received POST request but was unable to dispatch to a proper action

Example code

define ajax addProject(){
var p := "";
var gu := "";
var gr := "";
var n : URL := "";
var r : Request := Request{};

"Add your project/repository!"
form{
  table {
    row { column{"Project name: "}     column{input(p)} }
    row { column{"SVN: "}              column{input(n)}    }
    row { column{<span class="home-text">"or"</span>} column{}    }
    row { column{"Github user: "}      column{input(gu)} }
    row { column{"Github repository: "}column{input(gr)} }
  }
  submit action{replace("requestPH", req(""));} {"cancel"}
  submit action{
   validate(/[A-Za-z0-9]+[A-Za-z0-9\-_\.\s][A-Za-z0-9]+/.match(p), "Project name should be at least 3 characters (allowed chars: a-z,A-Z,0-9,-,_, ,.)");
   validate( (n.length() > 0 || (gu.length() > 0 && gr.length() > 0) ), "Please specify an SVN repository url or Github user and repository");

   r.project:=p; r.svn:=n; r.gu:=gu; r.gr:=gr; r.save(); replace("requestPH", req("Your request is sent to the administrators. Please allow some time to process your request"));} {"add request"}
}
submitlink openPendingRequests(){nOfPendingRequests()}

action openPendingRequests(){return pendingRequests();}

}

Submitted by Elmer van Chastelet on 20 June 2012 at 15:21

On 20 June 2012 at 15:21 Elmer van Chastelet tagged error

On 21 June 2012 at 11:51 Elmer van Chastelet closed this issue.

On 21 June 2012 at 11:51 Elmer van Chastelet commented:

Fixed in r5174

Log in to post comments