[Hippo-cms7-user] Error while setting up JCR repository

Woonsan Ko w.ko at onehippo.com
Wed Dec 23 13:02:17 CET 2009


Hi,

On Wed, Dec 23, 2009 at 12:53 PM, Rob van der Linden Vooren
<robvdlv at jteam.nl> wrote:
> Hi,
> Just a hunch:
> Make sure any temp directories in your environment actually exist and have
> proper read/write permissions.
> Cheers

I have same idea. In tomcat, the system property, "java.io.tmpdir", is
set for the java temp directory. The system property is set
automatically to $CATALINA_BASE/temp unless $CATALINA_TMPDIR is not
explicitly defined.
By the way, o.a.j.util.TransientFileFactory#createTransientFile() does
try to create a real temp file..

HTH,

Woonsan

>
> On Wed, Dec 23, 2009 at 12:20 PM, Wilson de Paula Pedro Junior
> <wppjunior at gmail.com> wrote:
>>
>> Hi,
>>
>> We have an application that is deployed local and at test environment
>> without problems.
>> Only on acceptation environment the cms fails to start correctly throwing
>> the following error message:
>>
>> 23.12.2009 11:48:49 ERROR
>> [org.hippoecm.repository.RepositoryServlet.init():180] Error while setting
>> up JCR repository:
>> javax.jcr.RepositoryException: failed to persist repository state: failed
>> to open output stream to file: /meta/rootUUID: failed to open output stream
>> to file: /meta/rootUUID
>>     at
>> org.apache.jackrabbit.core.RepositoryImpl.loadRootNodeId(RepositoryImpl.java:576)
>>     at
>> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:276)
>>     at
>> org.hippoecm.repository.jackrabbit.RepositoryImpl.<init>(RepositoryImpl.java:55)
>>     at
>> org.hippoecm.repository.LocalHippoRepository$LocalRepositoryImpl.<init>(LocalHippoRepository.java:251)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.initializeStartup(LocalHippoRepository.java:296)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.initialize(LocalHippoRepository.java:274)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.<init>(LocalHippoRepository.java:153)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:161)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at
>> org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:238)
>>     at
>> org.hippoecm.repository.RepositoryServlet.init(RepositoryServlet.java:154)
>>     at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
>>     at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
>>     at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
>>     at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
>>     at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>>     at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>     at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>>     at
>> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>>     at
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>     at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>> Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to
>> open output stream to file: /meta/rootUUID
>>     at
>> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.getOutputStream(DatabaseFileSystem.java:792)
>>     at
>> org.apache.jackrabbit.core.fs.BasedFileSystem.getOutputStream(BasedFileSystem.java:135)
>>     at
>> org.apache.jackrabbit.core.fs.FileSystemResource.getOutputStream(FileSystemResource.java:174)
>>     at
>> org.apache.jackrabbit.core.RepositoryImpl.loadRootNodeId(RepositoryImpl.java:552)
>>     ... 30 more
>> Caused by: java.io.IOException: No such file or directory
>>     at java.io.UnixFileSystem.createFileExclusively(Native Method)
>>     at java.io.File.checkAndCreate(File.java:1704)
>>     at java.io.File.createTempFile(File.java:1792)
>>     at
>> org.apache.jackrabbit.util.TransientFileFactory.createTransientFile(TransientFileFactory.java:121)
>>     at
>> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.getOutputStream(DatabaseFileSystem.java:739)
>>     ... 33 more
>> org.apache.jackrabbit.core.fs.FileSystemException: failed to open output
>> stream to file: /meta/rootUUID
>>     at
>> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.getOutputStream(DatabaseFileSystem.java:792)
>>     at
>> org.apache.jackrabbit.core.fs.BasedFileSystem.getOutputStream(BasedFileSystem.java:135)
>>     at
>> org.apache.jackrabbit.core.fs.FileSystemResource.getOutputStream(FileSystemResource.java:174)
>>     at
>> org.apache.jackrabbit.core.RepositoryImpl.loadRootNodeId(RepositoryImpl.java:552)
>>     at
>> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:276)
>>     at
>> org.hippoecm.repository.jackrabbit.RepositoryImpl.<init>(RepositoryImpl.java:55)
>>     at
>> org.hippoecm.repository.LocalHippoRepository$LocalRepositoryImpl.<init>(LocalHippoRepository.java:251)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.initializeStartup(LocalHippoRepository.java:296)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.initialize(LocalHippoRepository.java:274)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.<init>(LocalHippoRepository.java:153)
>>     at
>> org.hippoecm.repository.LocalHippoRepository.create(LocalHippoRepository.java:161)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at
>> org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:238)
>>     at
>> org.hippoecm.repository.RepositoryServlet.init(RepositoryServlet.java:154)
>>     at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
>>     at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
>>     at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
>>     at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
>>     at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>>     at
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>>     at
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>>     at
>> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>>     at
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>     at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>> Caused by: java.io.IOException: No such file or directory
>>     at java.io.UnixFileSystem.createFileExclusively(Native Method)
>>     at java.io.File.checkAndCreate(File.java:1704)
>>     at java.io.File.createTempFile(File.java:1792)
>>     at
>> org.apache.jackrabbit.util.TransientFileFactory.createTransientFile(TransientFileFactory.java:121)
>>     at
>> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.getOutputStream(DatabaseFileSystem.java:739)
>>     ... 33 more
>>
>>
>> We have configured tomcat to use mysql as datasource with new jars in the
>> lib directory and added to the server.xml of tomcat:
>>     <Context path="/cms" docBase="cms" debug="5" reloadable="true"
>> crossContext="true">
>>             <Resource name="jdbc/repositoryDS" auth="Container"
>> type="javax.sql.DataSource"
>>               maxActive="100" maxIdle="30" maxWait="10000"
>> username="username" password="password"
>>
>> driverClassName="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
>>                url="jdbc:mysql://localhost:3306/databasename"/>
>>     </Context>
>>
>>
>> In the database (MySQL) only one table is created: REPOSITORY_FSENTRY
>>
>> The repository.xml configuration we used as described at:
>> http://wiki.onehippo.org/display/CMS7/Configuring+Hippo+7+for+MySQL
>>
>> Versions:
>> tomcat 6.0.18
>> mysql 5.0.45
>> hippo cms 7.2
>> OS linux
>>
>> Any idea why I'm getting this error?
>>
>> Thanks in advance!
>>
>> Wilson
>>
>>
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/community.html
>
>
>
> --
> Rob van der Linden Vooren | Software Engineer | JTeam | T: +31(0)2-04862036
> | www.jteam.nl
> General conditions apply
>
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/community.html
>



-- 
w.ko at onehippo.com     www.onehippo.com
EUROPE • AMSTERDAM - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
NORTH AMERICA • SAN FRANCISCO - Hippo USA Inc. 185 H Street, Suite B
Petaluma CA 94952 +1 (877) 414-4776



More information about the Hippo-cms7-user mailing list