You are not logged in.
Pages: 1
Bonjour,
J’essaie d'installer Ametys sur le serveur Tomcat existant. Après avoir copié le dossier cms dans webapps et après le redémarrage de Tomcat je tombe directement sur la page de config. Et la, ça devient compliqué. Les trois bases qu'il me demande - Kernel, Monitoring, Front-office - je veux utiliser Derby pour toutes. J'ai mis partout org.apache.derby.jdbc.EmbeddedDriver comme pilote et jdbc:derby:/usr/local/apache-tomcat-7.0/webapps/cms/WEB-INF/data/db;create=true comme URL - apres la configuration (succes) je n'arrive pas à ajouter les utilisateurs: ERROR 42Y07: Schema 'USERNAME' does not exist.
J'ai essayé de mettre les URLs différentes pour les trois bases (db1, db2, db3) - idem. Le dossier avec la base est créé, il n'est pas vide, mais Ametys ne trouve pas les tables. Est-que j'ai raté quelque chose?
Merci
Peter
Offline
Bonjour,
Vous avez tout bon, excepté que Ametys ne créée pas les tables SQL tout seul (ça viendra mais ce n'est pas encore le cas).
Vous trouverez donc normalement, un répertoire sql/derby avec les scripts à exécuter. (attention, pour les utilisateurs, il faut choisir entre users.sql users_auth.sql mais pas faire les deux ; en l’occurrence si vous n'avez pas de système de SSO, prenez users_auth.sql)
Raphael Franchet
Expert Ametys
Offline
Merci pour la réponse rapide.
J'ai lancé les scripts trouvés dans ../scripts/derby, les tables sont créées avec succès. Par contre, j'ai toujours le même message d'erreur lors de la création des utilisateurs. J'ai regardé les scripts - il n'y a pas de table 'USERNAME' dedans!! On crée la table 'Users' dans jdbc_users.sql, mais pas 'USERNAME'!
Offline
Alors, on n'utilise normalement jamais de table nommée USERNAME, c'est bien Users.
A moins d'un bug bien sûr
Pouvez-vous fournier la trace complète de l'erreur, s'il vous plait, qu'on puisse voir qui demande ce USERNAME.
Raphael Franchet
Expert Ametys
Offline
La voila:
Schema 'USERNAME' does not exist
ERROR 42Y07: Schema 'USERNAME' does not exist
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.DMLModStatementNode.verifyTargetTable(Unknown Source)
at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
at org.ametys.runtime.plugins.core.user.jdbc.ModifiableJdbcUsersManager.createAddStatement(ModifiableJdbcUsersManager.java:239)
at org.ametys.runtime.plugins.core.user.jdbc.ModifiableJdbcUsersManager.add(ModifiableJdbcUsersManager.java:155)
at org.ametys.runtime.plugins.core.user.ui.actions.EditAction.act(EditAction.java:110)
at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:120)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:194)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:111)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:194)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
at org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:333)
at org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:215)
at org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:65)
at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:129)
at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator.generate(DispatchGenerator.java:84)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579)
at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:280)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481)
at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1159)
at org.ametys.runtime.servlet.RuntimeServlet._doService(RuntimeServlet.java:135)
at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
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:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
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(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Offline
Quelle version d'Ametys utilisez-vous ?
Quelle extension pour la gestion des utilisateurs utilisez-vous ? (dans WEB-INF/runtime.xml la ligne qui contient <org.ametys.runtime.user.UsersManager>)
Raphael Franchet
Expert Ametys
Offline
J'ai telechargé ametys-3.5.4.zip sur votre site et copié le dossier cms de l'archive dans webapps de Tomcat - c'est tout ce que je sais
Je n'ai rien installé en plus!
Offline
J'ai oublié poster runtime.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 Anyware Services
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<runtime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ametys.org/Runtime/2.0/runtime.xsd">
<application>
<version>3.5.4</version>
<date>20140403T1043 GMT</date>
</application>
<plugins>
<locations>
<location>modules</location>
</locations>
<exclude>
<feature>core/runtime.sqlmap</feature>
<feature>core/runtime.core.has_right_sitemap_components</feature>
<feature>workflow/workflow-store</feature>
<feature>cms/link-resolver</feature>
<feature>cms/content-clientside-targetfactory</feature>
<feature>cms/userinterface.rights.assignment.tool</feature>
<feature>cms/org.ametys.cms.content.global.consistency</feature>
<feature>cms/org.ametys.cms.content.consistency.scheduler</feature>
<feature>cms/userinterface.content</feature>
<feature>cms/docbookUpdateHandler</feature>
<!--<feature>core/runtime.datasource.core</feature>-->
</exclude>
</plugins>
<incompleteConfig>
<allowedURLs>
<allowedURL>_admin/public</allowedURL>
<allowedURL>_admin/resources</allowedURL>
<allowedURL>_admin/_plugins/core/administrator/config</allowedURL>
<allowedURL>_admin/plugins/core/administrator/config</allowedURL>
</allowedURLs>
<redirectURL>cocoon://_admin/public/load-config.html?uri=core/administrator/config/edit.html</redirectURL>
</incompleteConfig>
<workspaces default="web"/>
<extensions>
<!-- extension for point 'org.ametys.runtime.authentication.CredentialsProvider' responsible for authenticating the user and getting its login
default extension is 'org.ametys.runtime.plugins.core.authentication.Defined' which "authenticates" the user as "anonymous" -->
<org.ametys.runtime.authentication.CredentialsProvider>org.ametys.runtime.plugins.core.authentication.FormBased</org.ametys.runtime.authentication.CredentialsProvider>
<!-- extension for point 'org.ametys.runtime.user.UsersManager' responsible for listing known users
default extension is 'org.ametys.runtime.plugins.core.user.Static' which contains only one User named "Anonymous" -->
<org.ametys.runtime.user.UsersManager>org.ametys.runtime.plugins.core.user.CoreModifiableCredentialsAwareJdbc</org.ametys.runtime.user.UsersManager>
<!-- extension for point 'org.ametys.runtime.user.UsersManager.FO' responsible for listing known users for Front Office
default extension is 'org.ametys.web.frontoffice.DefaultFrontOfficeUsersManager' that makes FOUsers equals to BOUsers -->
<org.ametys.runtime.user.UsersManager.FO>org.ametys.web.frontoffice.user.ModifiableCredentialsAwareSiteAwareJdbc</org.ametys.runtime.user.UsersManager.FO>
<!-- extension for point 'org.ametys.runtime.group.GroupsManager' responsible for listing known groups
default extension is 'org.ametys.runtime.plugins.core.group.Empty' which contains no group -->
<org.ametys.runtime.group.GroupsManager>org.ametys.runtime.plugins.core.group.ModifiableJdbcCore</org.ametys.runtime.group.GroupsManager>
<!-- extension for point 'org.ametys.runtime.right.RightsManager' responsible for granting rights to users
default extension is 'org.ametys.runtime.plugins.core.right.Basic' which grants all rights to all users -->
<org.ametys.runtime.right.RightsManager>org.ametys.runtime.plugins.web.right.WebHierarchicalProfileBased</org.ametys.runtime.right.RightsManager>
<!-- extension for point 'org.ametys.runtime.right.RightsContextExtensionPoint' responsible for giving the rights context
default extension is 'org.ametys.runtime.plugins.core.right.context.Default' which checks on context '/application' -->
<org.ametys.runtime.right.RightsContextPrefixExtensionPoint>org.ametys.web.rights.RightsContextPrefix</org.ametys.runtime.right.RightsContextPrefixExtensionPoint>
<!-- extension for point 'org.ametys.runtime.exception.ExceptionHandler' responsible for serving error pages
default extension is 'org.ametys.runtime.plugins.core.exception.Default' which serves standard Ametys error pages -->
<org.ametys.runtime.exception.ExceptionHandler>org.ametys.runtime.plugins.core.exception.Default</org.ametys.runtime.exception.ExceptionHandler>
<org.ametys.plugins.repository.provider.WorkspaceSelector>org.ametys.cms.repository.RequestAttributeWorkspaceSelector</org.ametys.plugins.repository.provider.WorkspaceSelector>
<!-- extension for point 'org.ametys.cms.clientsideelement.styles.HTMLEditorStyleExtensionPoint' responsible for
default extension is 'org.ametys.cms.clientsideelement.styles.EmptyHTMLEditorStyleExtension' which serves no styles at all -->
<org.ametys.cms.clientsideelement.styles.HTMLEditorStyleExtensionPoint>org.ametys.web.clientsideelement.styles.SkinHTMLEditorStyleExtension</org.ametys.cms.clientsideelement.styles.HTMLEditorStyleExtensionPoint>
<!-- extension for point 'org.ametys.cms.source.ContentView' responsible for looking for content stylesheets
default extension is 'org.ametys.cms.source.DefaultContentView' -->
<org.ametys.cms.source.ContentView>org.ametys.web.source.WebContentView</org.ametys.cms.source.ContentView>
<!-- extension for point 'org.ametys.cms.source.ViewSelector' responsible for looking for stylesheets
default extension is 'org.ametys.cms.source.DefaultViewSelector' -->
<org.ametys.cms.source.ViewSelector>org.ametys.web.source.WebViewSelector</org.ametys.cms.source.ViewSelector>
<!-- extension for point 'org.ametys.cms.source.ContentWrapper' responsible for wrapping contents
default extension is 'org.ametys.cms.source.DefaultContentWrapper' -->
<org.ametys.cms.source.ContentWrapper>org.ametys.web.source.WebContentWrapper</org.ametys.cms.source.ContentWrapper>
<!-- extension for point 'org.ametys.web.repository.page.ContentTypesAssignmentHandler' responsible for getting the list of available content types for content creation
default extension is 'org.ametys.web.repository.page.DefaultContentTypesAssignmentHandler' which retrieves the all content types -->
<org.ametys.runtime.plugins.core.administrator.version.VersionsHandler>org.ametys.cms.workspace.version.CMS</org.ametys.runtime.plugins.core.administrator.version.VersionsHandler>
</extensions>
</runtime>
Il parait que User Manager est org.ametys.runtime.plugins.core.user.CoreModifiableCredentialsAwareJdbc, on voit le même nom dans le dump Java.
Last edited by Peter (23/05/2014 13:37:27)
Offline
En fait j'avais mal lu le message d'erreur.
Il dit "Schema 'USERNAME' does not exist".
En derby, le schema est l'équivalent d'une database en MySQL par exemple.
C'est le groupement de tables.
Dans votre configuration vous avez peut-être à tort saisi un login et un mdp pour la connexion à la base derby ? Laissez ces champs vide.
Raphael Franchet
Expert Ametys
Offline
C'est ça. J'ai laissé 'username' à sa place!
C'est bizarre qu'il utilise le login comme le nom de la base...
Ca marche mieux maintenant, merci de votre aide!
Offline
Pages: 1