Wicket initialisation errors, development mode

971 views
Skip to first unread message

Chris Alexander

unread,
Jul 5, 2011, 11:02:33 AM7/5/11
to const...@googlegroups.com
Hi,

We're having problems starting up Constellio. I'm not able to work past this error message (full log / stack trace at bottom):

  • ERROR [http-9080-1] (RequestCycle.java:1502) - Can't instantiate page using constructor public com.doculibre.constellio.wicket.pages.SearchFormPage()
  • org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.doculibre.constellio.wicket.pages.SearchFormPage()

Additoinally, Wicket is started in development mode - is there a way to prevent this? Obviously it would not be desirable to deploy it in this state, and we were wondering if there's a configuration we can switch somewhere to put it in production mode.

Thanks

Chris






 INFO [http-9080-1] (WebApplication.java:662) - [ConstellioApplication] Started Wicket version 1.3.7 in development mode
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode.              ***
***                               ^^^^^^^^^^^                    ***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
ERROR [http-9080-1] (RequestCycle.java:1502) - Can't instantiate page using constructor public com.doculibre.constellio.wicket.pages.SearchFormPage()
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.doculibre.constellio.wicket.pages.SearchFormPage()
        at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:206)
        at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
        at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:272)
        at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:293)
        at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
        at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
        at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)
        at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
        at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.doculibre.constellio.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:146)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.doculibre.constellio.filters.LocalRequestFilter.doFilter(LocalRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:186)
        ... 31 more
Caused by: java.lang.NullPointerException
        at com.doculibre.constellio.wicket.panels.search.SearchFormPanel.<init>(SearchFormPanel.java:206)
        at com.doculibre.constellio.wicket.pages.SearchFormPage.initComponents(SearchFormPage.java:66)
        at com.doculibre.constellio.wicket.pages.SearchFormPage.<init>(SearchFormPage.java:42)
        ... 36 more
ERROR [http-9080-1] (RequestCycle.java:1372) - unexpected exception when handling another exception: null
java.lang.NullPointerException
        at com.doculibre.constellio.wicket.components.resource.ThemeResourceFinder.find(ThemeResourceFinder.java:49)
        at org.apache.wicket.util.resource.locator.ResourceStreamLocator.locateByResourceFinder(ResourceStreamLocator.java:198)
        at org.apache.wicket.util.resource.locator.ResourceStreamLocator.locate(ResourceStreamLocator.java:91)
        at org.apache.wicket.util.resource.locator.ResourceStreamLocator.locate(ResourceStreamLocator.java:122)
        at org.apache.wicket.markup.DefaultMarkupResourceStreamProvider.getMarkupResourceStream(DefaultMarkupResourceStreamProvider.java:82)
        at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:299)
        at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215)
        at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:342)
        at org.apache.wicket.Page.onRender(Page.java:1495)
        at org.apache.wicket.Component.render(Component.java:2361)
        at org.apache.wicket.Page.renderPage(Page.java:913)
        at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63)
        at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
        at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1254)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1321)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)
        at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
        at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.doculibre.constellio.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:146)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.doculibre.constellio.filters.LocalRequestFilter.doFilter(LocalRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
        at java.lang.Thread.run(Thread.java:662)

Vincent Dussault

unread,
Jul 5, 2011, 12:42:56 PM7/5/11
to const...@googlegroups.com
Hi Chris,

Error message : 
============
I guess you built Constellio using Eclipse. Can you make sure that the .html files are copied when you compile the code? I've run into similar issues in the past, where Eclipse was using a custom builder that had altered the exclusion patterns for file names copied during compilation.

Production mode : 
=============
Replace "development" with "deployment" in the deployment descriptor for param "configuration" of servlet "WicketServlet" (web.xml) :

    <servlet>
      <servlet-name>WicketServlet</servlet-name>
        <servlet-class>com.doculibre.constellio.wicket.servlet.ConstellioWicketServlet</servlet-class>
        
        <init-param>
          <param-name>applicationClassName</param-name>
          <param-value>com.doculibre.constellio.wicket.application.ConstellioApplication</param-value>
        </init-param>
<init-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</init-param>
    </servlet>

Vincent Dussault


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Constellio.
Pour envoyer un message à ce groupe, adressez un e-mail à const...@googlegroups.com.
Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse constellio+...@googlegroups.com.
Pour plus d'options, consultez la page de ce groupe : http://groups.google.com/group/constellio?hl=fr

Chris Alexander

unread,
Jul 6, 2011, 8:22:14 AM7/6/11
to const...@googlegroups.com
Vincent,

Thanks for the suggestions. I checked the present HTML files against those in a working installation I have on my development machine. They are the same, so I don't believe this to be the issue. Would there be a specific permissions requirements on any of Constellio's files? I haven't seen mention of it anywhere. The only difference that I know of between the working and non-working version is that the version that works is setup to use its default persistance store (derby) but the non-working version is setup to use MySQL persistence. Could this be affecting it in any way?

I will continue searching for a solution but any other hints much appreciated.

Chris

Vincent Dussault

unread,
Jul 6, 2011, 8:49:14 AM7/6/11
to const...@googlegroups.com
Hello Chris,

If you give all permissions on all Constellio files, do you still have the problem?

Regards,

Vincent Dussault

Chris Alexander

unread,
Jul 6, 2011, 12:03:44 PM7/6/11
to const...@googlegroups.com
Hi Vincent,

Yes that still caused the problem.

I have done some investigation and have since found the cause of the problem. Because we are running a number of tomcat6 servers (for long and complicated reasons I won't bore you with) we wished to change the port on which Constellio's tomcat instance ran. To do that, we used these following commands, where /solr/constellio is the Constellio installation directory:

sed -i 's|port="8080"|port="9080"|' /solr/constellio/tomcat/conf/server.xml
sed -i 's|ort="8443"|ort="9443"|' /solr/constellio/tomcat/conf/server.xml
sed -i 's|ort="8005"|ort="9005"|' /solr/constellio/tomcat/conf/server.xml

In theory this should have shifted the ports up 1000 and everything will be fine. This has been shown to be the case with another instance we have setup to run on the 7*** port series. However when I do it for Constellio, Wicket subsequently fails with the stack trace I previously posted. Unfortunately leaving Constellio on the 8*** port series is not an option here, so is there some other configuration value I need to change for Constellio to work with these different ports? What is the expected method of changing which port Constellio runs on?

Many thanks

Chris

Vincent Dussault

unread,
Jul 6, 2011, 4:04:32 PM7/6/11
to const...@googlegroups.com
Hi Chris,

Can you open the constellio.xml file (WEB-INF/classes) and make sure that you adapt any reference to port 8080?

I suspect that this may be the problem here.

Regards,

Vincent Dussault

Chris Alexander

unread,
Jul 7, 2011, 6:16:53 AM7/7/11
to const...@googlegroups.com
Vincent,

That solved it, thanks very much.

I have updated the Constellio wiki knowledge base to include this information. http://wiki.constellio.com/index.php/Knowledge_base

Chris

Vincent Dussault

unread,
Jul 7, 2011, 10:16:20 AM7/7/11
to const...@googlegroups.com
My pleasure! Thank you for your contribution to the knowledge base. :o)

Regards,

Vincent Dussault
Reply all
Reply to author
Forward
0 new messages