Hi Antoine,
> The only thing is that, when switching to 1.5 and changing the type of > Repository instance, it throwed an error concerning the configuration file > in which Security node was ommited. This error was not thrown with the > previous version (even if this node should have been defined). This is certainly due to the change in the security config made in Jackrabbit 1.5. br, Christophe > > > Thanks for your help, > > Best regards, > Antoine Larcher > > > Christophe Lombart wrote: > > > > On Thu, Nov 27, 2008 at 10:37, alarcher <[EMAIL PROTECTED]> > wrote: > > > >> > >> Christophe, > >> > >> Ok ! It works fine with the 1.5-SNAPSHOT using maven (i'm new to maven). > >> Thanks ! > >> I was using 1.4 without maven (I retrieved dependent libraries > manually). > >> > >> However, now it works I'd like to use another Repository than the > >> TrancientRepository. > >> I encountered the exactly same error while changing this repository > >> instance > >> to : Repository repository = RepositoryImpl.create(config) (my config is > >> at > >> the end of this post). > >> > >> Do you know if it can be explained because I do not use the > >> RepositoryUtil > >> to get my instance ? > > > > > > > > this error is not depending on the type of repository instance. > > Are you still on 1.5-snapshot ? I don't understand why you get this > error > > when you are changing only your repository config. > > > > Can you make a try with > > org.apache.jackrabbit.ocm.repository.RepositoryUtil > > (in srt/test). it contains some methods to create and create a new > session > > for a local repo (non transcient). > > > > > > > > > >> > >> > >> > >> I think I'm close to make it. > >> > >> Thanks again. > >> > >> Regards, > >> Antoine Larcher > >> > >> > >> > >> My configuration file is : > >> > >> <?xml version="1.0"?> > >> <!-- > >> Licensed to the Apache Software Foundation (ASF) under one or more > >> contributor license agreements. See the NOTICE file distributed with > >> this work for additional information regarding copyright ownership. > >> The ASF licenses this file to You 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. > >> --> > >> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD > >> Jackrabbit 1.4//EN" > >> > >> "http://jackrabbit.apache.org/dtd/repository-1.4.dtd"> > >> <!-- Example Repository Configuration File --> > >> <Repository> > >> <!-- > >> virtual file system where the repository stores global state > >> (e.g. registered namespaces, custom node types, etc.) > >> --> > >> > >> <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem"> > >> > >> > >> > >> > >> > >> > >> </FileSystem> > >> > >> <!-- > >> security configuration > >> --> > >> <Security appName="Jackrabbit"> > >> <!-- > >> access manager: > >> class: FQN of class implementing the AccessManager interface > >> --> > >> <AccessManager > >> class="org.apache.jackrabbit.core.security.SimpleAccessManager"> > >> <!-- --> > >> </AccessManager> > >> > >> <LoginModule > >> class="org.apache.jackrabbit.core.security.SimpleLoginModule"> > >> <!-- anonymous user name ('anonymous' is the default value) > --> > >> <!-- --> > >> <!-- > >> default user name to be used instead of the anonymous user > >> when no login credentials are provided (unset by default) > >> --> > >> <!-- --> > >> </LoginModule> > >> </Security> > >> > >> <!-- > >> location of workspaces root directory and name of default > >> workspace > >> --> > >> <Workspaces rootPath="${rep.home}/workspaces" > >> defaultWorkspace="default"/> > >> <!-- > >> workspace configuration template: > >> used to create the initial workspace if there's no workspace yet > >> --> > >> <Workspace name="${wsp.name}"> > >> <!-- > >> virtual file system of the workspace: > >> class: FQN of class implementing the FileSystem interface > >> --> > >> <FileSystem > class="org.apache.jackrabbit.core.fs.db.DbFileSystem"> > >> > >> > >> > >> > >> > >> > >> </FileSystem> > >> <!-- > >> persistence manager of the workspace: > >> class: FQN of class implementing the PersistenceManager > >> interface > >> --> > >> <PersistenceManager > >> > >> > class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager"> > >> > >> > >> > >> > >> > >> </PersistenceManager> > >> <!-- > >> Search index and the file system it uses. > >> class: FQN of class implementing the QueryHandler interface > >> --> > >> <SearchIndex > >> class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> > >> > >> > >> > >> > >> </SearchIndex> > >> </Workspace> > >> > >> <!-- > >> Configures the versioning > >> --> > >> <Versioning rootPath="${rep.home}/version"> > >> <!-- > >> Configures the filesystem to use for versioning for the > >> respective > >> persistence manager > >> --> > >> <FileSystem > class="org.apache.jackrabbit.core.fs.db.DbFileSystem"> > >> > >> > >> > >> > >> > >> > >> </FileSystem> > >> > >> <!-- > >> Configures the persistence manager to be used for persisting > >> version state. > >> Please note that the current versioning implementation is > >> based > >> on > >> a 'normal' persistence manager, but this could change in > >> future > >> implementations. > >> --> > >> <PersistenceManager > >> > >> > class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager"> > >> > >> > >> > >> > >> > >> </PersistenceManager> > >> </Versioning> > >> > >> <!-- > >> Search index for content that is shared repository wide > >> (/jcr:system tree, contains mainly versions) > >> --> > >> <SearchIndex > >> class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> > >> > >> > >> > >> > >> </SearchIndex> > >> </Repository> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Christophe Lombart wrote: > >> > > >> > Antoine > >> > > >> > With an empty maven repo, the second tutorial works fine here. Can you > >> > check > >> > with maven ? > >> > Wich OCM version are you using ? it should work only with > 1.5-SNAPSHOT. > >> > > >> > Thanks > >> > Christophe > >> > > >> > > >> > On Wed, Nov 26, 2008 at 12:03, alarcher <[EMAIL PROTECTED]> > >> wrote: > >> > > >> >> > >> >> Christophe, > >> >> > >> >> Before me to install maven and so on, I noticed that the tutorial > code > >> >> you > >> >> mention [1] is not the same as the one I mentionned [2] (the second > >> uses > >> >> @Collection annotation). > >> >> > >> >> The tutorial [1] works fine, whereas [2] throws the > "java.lang.object" > >> >> marshalling exception. > >> >> > >> >> > >> >> [1] > >> >> > >> >> > >> > http://jackrabbit.apache.org/a-simple-ocm-project-with-maven-eclipse.data/5minutes.zip > >> >> [2] > >> >> > >> >> > >> > http://jackrabbit.apache.org/how-to-map-associations-between-objects.data/Beans_and_collections.zip > >> >> > >> >> > >> >> Regards, > >> >> Antoine Larcher > >> >> > >> >> > >> >> > >> >> alarcher wrote: > >> >> > > >> >> > Thanks Christophe, > >> >> > > >> >> > I'm using Eclipse but not Maven : I'm going to read your link > >> article > >> >> and > >> >> > use Maven and pom.xml in order to see if it works (I know that it > >> >> should > >> >> > be working :) ). > >> >> > > >> >> > I'll come back to you when I found what were wrong (probably lib > >> >> > versions). > >> >> > > >> >> > Thanks again. > >> >> > > >> >> > Regards, > >> >> > Antoine Larcher > >> >> > > >> >> > > >> >> > Christophe Lombart wrote: > >> >> >> > >> >> >> This tutorial is based on maven. Check the pom.xml for the > >> dependency > >> >> >> versions. > >> >> >> > >> >> >> Are you using eclipse ? > >> >> >> If yes, you can try the following maven command from the project > >> root > >> >> : > >> >> >> mvn > >> >> >> eclipse:clean eclipse:eclipse. > >> >> >> Than, you are ready to open the tutorial project from eclipse. Try > >> to > >> >> >> make a > >> >> >> run from it. > >> >> >> > >> >> >> More info here : > >> >> >> > >> >> > >> > http://jackrabbit.apache.org/a-simple-ocm-project-with-maven-eclipse.html > >> >> >> > >> >> >> Christophe > >> >> >> > >> >> >> > >> >> >> On Tue, Nov 25, 2008 at 18:49, alarcher <[EMAIL PROTECTED] > > > >> >> wrote: > >> >> >> > >> >> >>> > >> >> >>> Thanks for your answer. > >> >> >>> In fact no, I didn't modify the tutorial code. I experienced this > >> >> kind > >> >> >>> of > >> >> >>> trouble with my own code (only when using a @Collection as > >> attribute > >> >> of > >> >> >>> a > >> >> >>> "mapped" bean) so I decided to download the tutorial code and > >> >> executing > >> >> >>> it > >> >> >>> in order to see if it would throw the same error. It does. > >> >> >>> > >> >> >>> Maybe I have to investigate around the library versions I use. > >> >> >>> Do you mind if you give me your library versions, because it > works > >> in > >> >> >>> your > >> >> >>> environment. > >> >> >>> > >> >> >>> Sorry for my english mistakes, I'm french. > >> >> >>> > >> >> >>> Thanks again. > >> >> >>> > >> >> >>> Best regards, > >> >> >>> > >> >> >>> Antoine Larcher > >> >> >>> > >> >> >>> > >> >> >>> Christophe Lombart wrote: > >> >> >>> > > >> >> >>> > It works here. Did you modify the tutorial code. Here is the > >> >> tutorial > >> >> >>> > output. > >> >> >>> > > >> >> >>> > > >> >> >>> > Start the tutorial ... > >> >> >>> > Insert a press release in the repository > >> >> >>> > Retrieve a press release from the repository > >> >> >>> > PressRelease title : This is the first tutorial on OCM > >> >> >>> > PressRelease author : Christophe Lombart > >> >> >>> > ****** URLS (Collection) : > >> >> >>> > URL : http://www.apache.org > >> >> >>> > URL : http://jackrabbit.apache.org > >> >> >>> > ****** URLS (Map) : > >> >> >>> > URL : Jackrabbit - http://jackrabbit.apache.org > >> >> >>> > > >> >> >>> > On Tue, Nov 25, 2008 at 11:54, alarcher > >> <[EMAIL PROTECTED] > >> > > >> >> >>> wrote: > >> >> >>> > > >> >> >>> >> > >> >> >>> >> Hi folks, > >> >> >>> >> > >> >> >>> >> I downloaded the OCM tutorial sample code > >> >> >>> >> ( > >> >> >>> >> > >> >> >>> > >> >> > >> > http://jackrabbit.apache.org/how-to-map-associations-between-objects.data/Beans_and_collections.zip > >> >> >>> >> ). > >> >> >>> >> When executing the Main class it throws the following > exception > >> : > >> >> >>> >> > >> >> >>> >> Insert a press release in the repository > >> >> >>> >> Exception in thread "main" > >> >> >>> >> org.apache.jackrabbit.ocm.exception.RepositoryException: null; > >> >> nested > >> >> >>> >> exception is > >> >> >>> >> > >> >> >>> > >> >> > org.apache.jackrabbit.ocm.exception.IncorrectPersistentClassException: > >> >> >>> >> Class > >> >> >>> >> of type: java.lang.Object has no descriptor. > >> >> >>> >> > >> >> >>> > >> >> > org.apache.jackrabbit.ocm.exception.IncorrectPersistentClassException: > >> >> >>> >> Class > >> >> >>> >> of type: java.lang.Object has no descriptor. > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.mapper.impl.AbstractMapperImpl.getClassDescriptorByClass(AbstractMapperImpl.java:177) > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.manager.collectionconverter.impl.DefaultCollectionConverterImpl.doInsertCollection(DefaultCollectionConverterImpl.java:109) > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.manager.collectionconverter.impl.AbstractCollectionConverterImpl.insertCollection(AbstractCollectionConverterImpl.java:80) > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insertCollectionFields(ObjectConverterImpl.java:782) > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:221) > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:146) > >> >> >>> >> at > >> >> >>> >> > >> >> >>> >> > >> >> >>> > >> >> > >> > org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl.insert(ObjectContentManagerImpl.java:406) > >> >> >>> >> at > >> >> org.apache.jackrabbit.ocm.Main.startTutorial(Main.java:53) > >> >> >>> >> at org.apache.jackrabbit.ocm.Main.main(Main.java:123) > >> >> >>> >> > >> >> >>> >> > >> >> >>> >> > >> >> >>> >> > >> >> >>> >> Have you ever experienced this weird behaviour ? > >> >> >>> >> > >> >> >>> >> By the way, if the beans only has "@Field" attributes then > it's > >> >> >>> working > >> >> >>> >> great. > >> >> >>> >> This exception is thrown as soon as I use a "@Collection" > >> >> annotation. > >> >> >>> >> > >> >> >>> >> > >> >> >>> >> Thansk very much for your help, > >> >> >>> >> > >> >> >>> >> Antoine Larcher > >> >> >>> >> -- > >> >> >>> >> View this message in context: > >> >> >>> >> > >> >> http://www.nabble.com/OCM-Sample-code-error-tp20678944p20678944.html > >> >> >>> >> Sent from the Jackrabbit - Users mailing list archive at > >> >> Nabble.com. > >> >> >>> >> > >> >> >>> >> > >> >> >>> > > >> >> >>> > > >> >> >>> > >> >> >>> -- > >> >> >>> View this message in context: > >> >> >>> > >> http://www.nabble.com/OCM-Sample-code-error-tp20678944p20686260.html > >> >> >>> Sent from the Jackrabbit - Users mailing list archive at > >> Nabble.com. > >> >> >>> > >> >> >>> > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> > >> >> -- > >> >> View this message in context: > >> >> http://www.nabble.com/OCM-Sample-code-error-tp20678944p20698819.html > >> >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > >> >> > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/OCM-Sample-code-error-tp20678944p20716066.html > >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/OCM-Sample-code-error-tp20678944p20734085.html > Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > >
