[Yanel-dev] Adding realms from scratch and import
Michael Wechner
michael.wechner at wyona.com
Tue Apr 17 11:38:02 CEST 2007
Andreas Wuest wrote:
> Hi Josias
>
> On 16.4.2007 15:52 Uhr, Josias Thöny wrote:
>
>> Hi Andreas,
>>
>> Hm, it seems to work for me.
>> Could you please verify that the from-scratch-realm-template is
>> registered in your realms.xml? It's required as a template to create
>> a new realm. That's the only idea I have right now.
>
>
> Good catch! That was indeed the problem. Thanks a lot! :)
>
>> If that's the problem, we should add a note somewhere and improve the
>> error message.
>
>
> Definitely.
>
> The other question is if there is a better mechanism to let the user
> know what exactly he has to update in his local configs. I see that
> there is a warning that the local config is out of date, but the local
> configs and the default configs may look quite different, and
> therefore a user might not be able to find out what he has to actually
> change to make it work.
the only think I see that we can further improve is to append a
changelog saying what has been changed in between the various versions. WDYT
>
> Also, I wonder if we can somehow define dependencies between resources
> and realms (e.g. the add-realm resource requires the
> from-scratch-realm-template realm).
yes, we need to this. IIRC I have started with this, whereas I cannot
find it anymore ;-)
Anyway I guess it would make sense to declare these dependencies within
REALM/config/yanel-realm-config.xml
WDYT?
Cheers
Michael
>
>>
>> Josias
>>
>> Andreas Wuest wrote:
>>
>>> Hi
>>>
>>> As I've already written in "Catching Errors", I have problems using
>>> the AddRealm Resource. I assumed this was because it was not
>>> registered in my resource-types config. But it is:
>>>
>>> <?xml version="1.0"?>
>>>
>>> <!-- NOTE: compile is true by default -->
>>> <resource-types xmlns="http://www.wyona.org/yanel/1.0"
>>> version="2007041300">
>>> <!-- HEADSUP: Make sure to add the trailing slash (/) in the @src
>>> attribute! -->
>>> <resource-type src="../src/resources/navigation/"
>>> compile="true"/>
>>> <resource-type src="../src/resources/translation/"
>>> compile="true"/>
>>> <resource-type src="../src/resources/file/" compile="true"/>
>>> <resource-type src="../src/resources/directory/" compile="true"/>
>>> <!--
>>> <resource-type src="../src/resources/tape/" compile="true"/>
>>> -->
>>> <resource-type src="../src/resources/add-realm/" compile="true"/>
>>> <resource-type src="../src/resources/odt/" compile="true"/>
>>> <resource-type src="../src/resources/xml/" compile="true"/>
>>> <resource-type
>>> src="../src/realms/welcome-admin/yanel/resources/show-realms/"
>>> compile="true"/>
>>> <resource-type
>>> src="../src/realms/welcome-admin/yanel/resources/update-webapp/"
>>> compile="true"/>
>>> <!--
>>> <resource-type src="../src/resources/invoice/" compile="true"/>
>>> -->
>>> <resource-type src="../src/resources/testing-control/"
>>> compile="true"/>
>>> <resource-type src="../src/resources/testing-times/" compile="true"/>
>>> <resource-type src="../src/contributions/resources/atom/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/atom-entry/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/contact-form/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/wiki/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/zip/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/calendar/"
>>> compile="true"/>
>>> <resource-type
>>> src="../src/contributions/resources/resource-creator/"
>>> compile="true"/>
>>> <!--
>>> <resource-type src="../src/resources/websearch/" compile="true"/>
>>> -->
>>> <resource-type src="../src/contributions/resources/nutch/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/davcollection/"
>>> compile="true"/>
>>> <resource-type src="../src/contributions/resources/pdf/"
>>> compile="true"/>
>>>
>>> <resource-type src="../src/contributions/resources/yanel-user/"
>>> compile="true"/>
>>>
>>> <!-- local resources -->
>>> <resource-type
>>> src="../src/contributions/resources/annotation-prototype/"
>>> compile="true"/>
>>>
>>> </resource-types>
>>>
>>> If I want to add a new realm, I get:
>>>
>>> 133193 2007-04-16 15:24:47,188 [http-8080-Processor25] ERROR
>>> org.wyona.yanel.servlet.YanelServlet.getContent():388 -
>>> java.lang.NullPointerException
>>> at
>>> org.wyona.yanel.impl.resources.AddRealmResource2.getFromScratchInputDocument(AddRealmResource2.java:258)
>>>
>>> at
>>> org.wyona.yanel.impl.resources.AddRealmResource2.getFromScratchView(AddRealmResource2.java:170)
>>>
>>> at
>>> org.wyona.yanel.impl.resources.AddRealmResource2.getView(AddRealmResource2.java:120)
>>>
>>> at
>>> org.wyona.yanel.servlet.YanelServlet.getContent(YanelServlet.java:375)
>>> at
>>> org.wyona.yanel.servlet.YanelServlet.doGet(YanelServlet.java:239)
>>> at
>>> org.wyona.yanel.servlet.YanelServlet.service(YanelServlet.java:182)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>>
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>>
>>> at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>>
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>>
>>> at
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>>>
>>> at
>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>>>
>>> at
>>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>>
>>> at
>>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>>
>>> at
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>>
>>> at java.lang.Thread.run(Thread.java:613)
>>>
>>> If I want to import an existing website, I get:
>>>
>>> 153434 2007-04-16 15:25:07,429 [http-8080-Processor23] ERROR
>>> org.wyona.yanel.servlet.YanelServlet.getContent():388 -
>>> java.lang.NullPointerException
>>> at
>>> org.wyona.yanel.impl.resources.AddRealmResource2.getFromExistingWebsiteInputDocument(AddRealmResource2.java:384)
>>>
>>> at
>>> org.wyona.yanel.impl.resources.AddRealmResource2.getFromExistingWebsiteView(AddRealmResource2.java:200)
>>>
>>> at
>>> org.wyona.yanel.impl.resources.AddRealmResource2.getView(AddRealmResource2.java:122)
>>>
>>> at
>>> org.wyona.yanel.servlet.YanelServlet.getContent(YanelServlet.java:375)
>>> at
>>> org.wyona.yanel.servlet.YanelServlet.doGet(YanelServlet.java:239)
>>> at
>>> org.wyona.yanel.servlet.YanelServlet.service(YanelServlet.java:182)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>>
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>>
>>> at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>>
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>>
>>> at
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>>>
>>> at
>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>>>
>>> at
>>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>>
>>> at
>>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>>
>>> at
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>>
>>> at java.lang.Thread.run(Thread.java:613)
>>>
>>> It looks like some genuine problem with the AddRealmResource2.
>>>
>>> This is with a checkout from this morning.
>>>
>>
>>
>> _______________________________________________
>> Yanel-development mailing list
>> Yanel-development at wyona.com
>> http://wyona.com/cgi-bin/mailman/listinfo/yanel-development
>
>
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner at wyona.com michi at apache.org
+41 44 272 91 61
More information about the Yanel-development
mailing list