google-code-export / openesignforms

Automatically exported from code.google.com/p/openesignforms
1 stars 0 forks source link

Test Like Production causes an unexpected exception. #124

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Promote property set in branding library to production
2. Leave package+disclosure view as system default (even though we won't be 
showing it)
3.

Note: This is very difficult to reproduce.

What is the expected output? What do you see instead?

Should show first page of form (skipping disclosures landing page). See 
attached.
What version of the product are you using? On what operating system?

14.3.15 Amazon Linux

Please provide any additional information below.

Apr 07, 2014 1:17:50 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet 
[com.esignforms.open.servlet.StartTransaction] in context with path [] threw 
exception
java.lang.NullPointerException
        at com.esignforms.open.runtime.TransactionDocument.<init>(TransactionDocument.java:82)
        at com.esignforms.open.runtime.TransactionDocument$Manager.createNew(TransactionDocument.java:601)
        at com.esignforms.open.runtime.Transaction$Manager.setupNewTransaction(Transaction.java:2721)
        at com.esignforms.open.runtime.Transaction$Manager.createTestLikeProduction(Transaction.java:2785)
        at com.esignforms.open.servlet.StartTransaction.doGet(StartTransaction.java:336)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
        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.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:501)
        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)

Original issue reported on code.google.com by theo...@megalithtechnologies.com on 7 Apr 2014 at 6:36

GoogleCodeExporter commented 9 years ago
Most likely you have some document used in your package that is not at the 
production level.  Test like production uses only production level parts.  If 
it cannot find these as runtime, it will have issues.  

I don't think we can catch all misconfigurations like these to prevent all 
possible bugs as we don't want to litter our code with checks.  But we should 
be able to at least stop this exception during transaction setup.  In the end, 
you'll get an error of one type or another, and we generally don't leak 
information about configurations errors to end users (those who fill out forms) 
as they would not be able to address them or even understand what is wrong.

Original comment by yoz...@gmail.com on 7 Apr 2014 at 7:14

GoogleCodeExporter commented 9 years ago
Can't be entirely sure we fixed what you saw, but we did add more checks for 
correct setup to help avoid null pointers.  We can see this will happen if you 
try to run as production (or test like production) and one of the documents has 
no production level available.  This should be fixed in 14.4.12.

Original comment by yoz...@gmail.com on 7 Apr 2014 at 11:01

GoogleCodeExporter commented 9 years ago
thank you! I of course know how to "troubleshoot" and fix the issue but the 
average end-user may need a little reminder, "You have one or more components 
that haven't been promoted to production!" 

Original comment by theo...@megalithtechnologies.com on 8 Apr 2014 at 12:36

GoogleCodeExporter commented 9 years ago
Indeed. Such a reminder, though, will only be in the logs.  Again, when 
contracting with an outside party, we don't want them seeing messages about 
"components" or "promoted to production" or the like in error messages.  Also, 
there are many reasons why something can fail due to misconfiguration, so the 
logs will provide that detail for troubleshooting.

Original comment by yoz...@gmail.com on 8 Apr 2014 at 4:12