You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jason Lane <ja...@root10.net> on 2004/05/17 13:53:03 UTC
HELP: no indexes associated with this database
Hi list,
I have a Cocoon app that has an authenticated database admin area that
uses aggregation to build the site. The DB in question is just the
standard HSQLDB that comes with Cocoon, all seems to be well, I can
query the DB fine but I can't insert, delete or update. I'm pretty sure
that my database descriptor file is fine and that although my sitemap
still needs tuning and perhaps some further rationalisation, is also
ok.
Here are some of the relevant parts of my sitemap:
...
<map:actions>
<!-- declare actions for database operations -->
<map:action name="mod-db-add"
src="org.apache.cocoon.acting.modular.DatabaseAddAction">
<descriptor>database.xml</descriptor>
<throw-exception>false</throw-exception>
</map:action>
<map:action name="mod-db-del"
src="org.apache.cocoon.acting.modular.DatabaseDeleteAction">
<descriptor>database.xml</descriptor>
<throw-exception>false</throw-exception>
</map:action>
<map:action name="mod-db-upd"
src="org.apache.cocoon.acting.modular.DatabaseUpdateAction">
<descriptor>database.xml</descriptor>
<throw-exception>false</throw-exception>
</map:action>
<!-- a real world application would use the form validation here -->
<!-- this action just checks for existence of request parameters -->
<map:action name="req-params"
src="org.apache.cocoon.acting.RequestParameterExistsAction"/>
<!-- form validation -->
<map:action name="formval" logger="sitemap.action.form-validator"
src="org.apache.cocoon.acting.FormValidatorAction"/>
</map:actions>
</map:components>
...
<map:pipelines>
<!-- authentification framework -->
<map:component-configurations>
<authentication-manager>
<handlers>
<handler name="demohandler">
<redirect-to uri="cocoon:/login"/>
<authentication uri="cocoon:raw:/authenticate"/>
<!-- load roles -->
<load-roles uri="cocoon:raw://user-roles"/>
</handler>
</handlers>
</authentication-manager>
</map:component-configurations>
<map:pipeline>
<!-- match common content types -->
<map:match pattern="**.js">
<map:read src="../common/js/{1}.js" mime-type="text/javascript"/>
</map:match>
<map:match pattern="**.css">
<map:read src="../common/css/{1}.css" mime-type="text/css"/>
</map:match>
<map:match pattern="**.gif">
<map:read src="../common/images/{1}.gif" mime-type="image/gif"/>
</map:match>
<map:match pattern="**.jpg">
<map:read src="../common/images/{1}.jpg" mime-type="image/jpg"/>
</map:match>
<map:match pattern="**.png">
<map:read src="../common/images/{1}.png" mime-type="image/png"/>
</map:match>
<map:match pattern="**.swf">
<map:read src="../common/swf/{1}.swf"
mime-type="application/x-shockwave-flash"/>
</map:match>
<!-- catch all (Log in) -->
<map:match pattern="">
<map:redirect-to uri="login"/>
</map:match>
<!-- Simple login page -->
<map:match pattern="login">
<!-- if we are already logged in, redirect to the protected
document -->
<map:act type="auth-loggedIn">
<map:parameter name="handler" value="demohandler"/>
<map:redirect-to uri="protected-protected"/>
</map:act>
<map:generate src="doc/login.xml"/>
<map:call resource="styles">
<map:parameter name="xsltarget" value="loggin"/>
</map:call>
<map:transform type="encodeURL"/>
<map:serialize/>
</map:match>
<!-- Form target which performs auth service -->
<map:match pattern="do-login">
<!-- try to login -->
<map:act type="auth-login">
<map:parameter name="handler" value="demohandler"/>
<map:parameter name="parameter_name"
value="{request-param:username}"/>
<map:parameter name="parameter_password"
value="{request-param:password}"/>
<!--<map:redirect-to uri="protected"/>-->
</map:act>
<!-- something was wrong, try it again -->
<map:redirect-to uri="login"/>
</map:match>
<!-- Internal parts pipeline -->
<map:pipeline internal-only="true">
<!-- session inf pipe -->
<map:match pattern="session.xml">
<map:generate src="doc/session.xml"/>
<map:serialize type="xml"/>
</map:match>
<!-- start navigation pipes (internalized to protect the resource)
-->
<map:match pattern="county.xml">
<map:generate type="serverpages" src="nav/county.xsp"/>
<map:transform type="sql">
<map:parameter name="use-connection" value="personnel"/>
</map:transform>
<map:call resource="styles">
<map:parameter name="xsltarget" value="simple"/>
</map:call>
<map:serialize type="xml"/>
</map:match>
<!-- only get counties who have new items -->
<map:match pattern="count.xml">
<map:generate type="serverpages" src="nav/count.xsp"/>
<map:transform type="sql">
<map:parameter name="use-connection" value="personnel"/>
</map:transform>
<map:call resource="styles">
<map:parameter name="xsltarget" value="count"/>
</map:call>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="dyn.xsl">
<map:generate src="cocoon:/count.xml"/>
<map:call resource="styles">
<map:parameter name="xsltarget" value="generate-nav"/>
</map:call>
<map:serialize type="xml"/>
<map:generate/>
</map:match>
<!-- Admin parts (internalized to protect the resource) -->
<map:match pattern="body-*.xml">
<map:generate type="serverpages" src="doc/{1}.html.xsp">
<map:parameter name="cid" value="{request-param:cid}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<!-- dynamically create navigation / XSL -->
<map:match pattern="nav.xml">
<map:aggregate element="foot">
<map:part src="cocoon:/count.xml"/>
<map:part src="cocoon:/county.xml"/>
</map:aggregate>
<map:transform src="cocoon:/dyn.xsl"/>
<map:serialize type="xml"/>
</map:match>
<!-- combine head and body in XML -->
<map:match pattern="fulldoc-*.xml">
<map:aggregate element="fulldoc">
<map:part src="cocoon:/session.xml"/>
<map:part src="cocoon:/nav.xml"/>
<map:part src="cocoon:/body-{1}.xml"/>
</map:aggregate>
<map:serialize type="xml"/>
</map:match>
<!-- This is the user roles resource -->
<map:match pattern="user-roles">
<map:generate src="doc/roles.xml"/>
<map:transform src="../xsl/authenticate.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
<!-- This is the authentication resource -->
<map:match pattern="authenticate">
<map:generate src="doc/userlist.xml"/>
<map:transform src="../xsl/authenticate.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
<!-- Protected area (The Admin template) -->
<map:match pattern="protected-*">
<map:act type="auth-protect">
<map:parameter name="handler" value="demohandler"/>
</map:act>
<map:generate src="cocoon:/fulldoc-{1}.xml"/>
<map:transform type="session"/>
<map:transform src="../xsl/admin2html.xsl">
<map:parameter name="cid" value="{request-param:cid}"/>
</map:transform>
<map:transform type="encodeURL"/>
<map:serialize type="xhtml"/>
</map:match>
<!-- Logout link which invalidates the session -->
<map:match pattern="do-logout">
<map:act type="auth-protect">
<map:parameter name="handler" value="demohandler"/>
<map:act type="auth-logout"/>
</map:act>
<map:redirect-to uri="login"/>
</map:match>
<!-- Database descriptor file -->
<map:match pattern="database.xml">
<map:generate src="{0}"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="schema.sql">
<map:read src="{0}" mime-type="text/plain"/>
</map:match>
<!-- ========================== Modular DB
================================= -->
<map:match pattern="*">
<!-- ========================== inserts ==========================
-->
<!-- add new groups to a user's groups -->
<map:act type="req-params">
<map:parameter name="parameters" value="add-groups user_groups.uid
user_groups.gid"/>
<map:act type="mod-db-add">
<map:parameter name="table-set" value="user_groups"/>
</map:act>
</map:act>
...
<!-- updatate company -->
<map:act type="req-params">
<map:parameter name="parameters" value="remove-company
company.cname company.contact_name company.contact_email_0
company.contact_email_1 company.contact_email_2 company.contact_phone_0
company.contact_phone_1 company.contact_phone_2"/>
<map:act type="mod-db-del">
<map:parameter name="table-set" value="company"/>
</map:act>
</map:act>
<!-- ========================== content ==========================
-->
<map:generate type="serverpages" src="doc/{1}.xsp"/>
<map:call resource="styles">
<map:parameter name="xsltarget" value="dynamic-page2html"/>
<map:parameter name="servletPath" value="{request:servletPath}"/>
<map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
<map:parameter name="contextPath" value="{request:contextPath}"/>
<map:parameter name="file" value=".xsp"/>
<map:parameter name="xsltarget" value="stupid"/>
</map:call>
<map:serialize/>
</map:match>
<!-- match the continuation -->
<map:match pattern="continue.*">
<map:call continuation="{1}"/>
</map:match>
</map:pipeline>
<!-- cached main pipe (THE Admin site) -->
<map:pipeline type="caching">
<!-- set cache expires -->
<map:parameter name="expires" value="access plus 1 minutes"/>
<!-- here's the HTML version -->
<map:match pattern="protected-*.html">
<map:generate src="cocoon:/fulldoc-{1}.xml"/>
<map:transform src="xsl/admin2html.xsl">
<map:parameter name="cid" value="{request-param:cid}"/>
</map:transform>
<map:serialize type="xhtml"/>
</map:match>
</map:pipeline>
<!--<map:pipeline>
<map:match pattern="admin/**">
<map:mount uri-prefix="admin" src="admin/sitemap.xmap"
check-reload="yes" reload-method="synchron"/>
</map:match>
</map:pipeline>-->
</map:pipelines>
</map:sitemap>
In my error.log & my core.log I get this when ever I try to do a
delete, update or insert action:
ERROR (2004-05-17) 12:38.21:017 [core.store.persistent]
(/cocoon/samples/myapp/admin-db/protected-areas-list)
Thread-58/AbstractJispFilesystemStore: get(..): Exception
com.coyotegulch.jisp.DatabaseException: no indexes associated with this
database
at
com.coyotegulch.jisp.IndexedObjectDatabase.<clinit>(IndexedObjectDatabas
e.java:88)
at
org.apache.cocoon.components.store.impl.DefaultPersistentStore.parameter
ize(DefaultPersistentStore.java:174)
at
org.apache.avalon.framework.container.ContainerUtil.parameterize(Contain
erUtil.java:266)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc
e(DefaultComponentFactory.java:310)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial
ize(ThreadSafeComponentHandler.java:143)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(E
xcaliburComponentManager.java:312)
at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonCompone
ntManager.java:324)
at
org.apache.avalon.framework.service.WrapperServiceManager.lookup(Wrapper
ServiceManager.java:106)
at
org.apache.excalibur.store.impl.MRUMemoryStore.parameterize(MRUMemorySto
re.java:153)
at
org.apache.cocoon.components.store.impl.DefaultStore.parameterize(Defaul
tStore.java:72)
at
org.apache.avalon.framework.container.ContainerUtil.parameterize(Contain
erUtil.java:266)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc
e(DefaultComponentFactory.java:310)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial
ize(ThreadSafeComponentHandler.java:143)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initiali
ze(ExcaliburComponentManager.java:558)
at
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonCom
ponentManager.java:547)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:282)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:340)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:282)
at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:
1371)
at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:514)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1033)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3814)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
4105)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:868)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:852)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:614)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy
er.java:319)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:838)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:583)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:920)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
399)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1135)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:795)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1127)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:502)
at
org.apache.catalina.core.StandardService.start(StandardService.java:
519)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2312)
at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:394)
Many thanks in advance all.
Jason Lane
Developer
Root10 developments
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [SOLVED] HELP: no indexes associated with this database
Posted by Jason Lane <ja...@root10.net>.
OK it was my own stupid fault. All solved now
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org