Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jaber C. Mourad
JackRabbit, liferay 6.0.6 and image library
March 9, 2011 1:53 AM
Answer

Jaber C. Mourad

Rank: Junior Member

Posts: 89

Join Date: February 19, 2010

Recent Posts

Hi,

I'm trying to migrate my server from liferay 6.0.5 to 6.0.6.

The upgrade of liferay itself proceed without problems.

But, I'm using jackrabbit in DataBase mode.
It was working on lf 6.0.5 but now, it is working with Documents, but images are looked into filesystem !

my portal-ext.properties, I have :
1
2dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
3jcr.jackrabbit.config.file.path=${jcr.jackrabbit.repository.root}/repository.xml


My repository.xml
 1
 2<?xml version="1.0"?>
 3<Repository>
 4    <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
 5        <param name="driver" value="com.mysql.jdbc.Driver"/>
 6       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true"/>
 7       <param name="user" value="myuser"/>
 8       <param name="password" value="mypassword"/>
 9
10        <param name="schema" value="mysql"/>
11        <param name="schemaObjectPrefix" value="JR_CR_FS_"/>
12    </FileSystem>
13
14    <Security appName="Jackrabbit">
15        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
16        <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
17            <param name="anonymousId" value="anonymous" />
18        </LoginModule>
19    </Security>
20    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="liferay" />
21    <Workspace name="${wsp.name}">
22        <PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
23            <param name="driver" value="com.mysql.jdbc.Driver"/>
24       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true"/>
25       <param name="user" value="myuser"/>
26       <param name="password" value="mypassword"/>
27            <param name="schema" value="mysql"/>
28            <param name="schemaObjectPrefix" value="JR_PM_${wsp.name}_" />
29            <param name="externalBLOBs" value="false" />
30        </PersistenceManager>
31        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
32            <param name="driver" value="com.mysql.jdbc.Driver"/>
33       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true"/>
34       <param name="user" value="myuser"/>
35       <param name="password" value="mypassword"/>
36            <param name="schema" value="mysql"/>
37            <param name="schemaObjectPrefix" value="JR_CR_FS_${wsp.name}_"/>
38        </FileSystem>
39    </Workspace>
40    <Versioning rootPath="${rep.home}/version">
41        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
42            <param name="driver" value="com.mysql.jdbc.Driver"/>
43       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true"/>
44       <param name="user" value="myuser"/>
45       <param name="password" value="mypassword"/>
46            <param name="schema" value="mysql"/>
47            <param name="schemaObjectPrefix" value="JB_V_FS_"/>
48        </FileSystem>
49        <PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
50            <param name="driver" value="com.mysql.jdbc.Driver"/>
51       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true"/>
52       <param name="user" value="myuser"/>
53       <param name="password" value="mypassword"/>
54            <param name="schema" value="mysql"/>
55            <param name="schemaObjectPrefix" value="JB_V_PM_" />
56            <param name="externalBLOBs" value="false" />
57        </PersistenceManager>
58    </Versioning>
59</Repository>


Under liferay 6.0.5 it works with DB configuration in repository.xml, but not with the 6.0.6 :
 1
 208:13:22,442 ERROR [ImageImpl:40] Error reading image 10555
 3com.liferay.documentlibrary.NoSuchFileException: /opt/liferay-portal-6.0.6/data/images/10/55/10555.png
 4        at com.liferay.portal.image.FileSystemHook.getImageAsBytes(FileSystemHook.java:57)
 5        at com.liferay.portal.model.impl.ImageImpl.getTextObj(ImageImpl.java:37)
 6        at com.liferay.portal.servlet.ImageServlet.getImageBytes(ImageServlet.java:265)
 7        at com.liferay.portal.servlet.ImageServlet.writeImage(ImageServlet.java:370)
 8        at com.liferay.portal.servlet.ImageServlet.service(ImageServlet.java:121)
 9        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Is there something wrong or new in 6.0.6 ?

Regards
William Fleming
RE: JackRabbit, liferay 6.0.6 and image library
March 9, 2011 2:44 AM
Answer

William Fleming

Rank: Regular Member

Posts: 180

Join Date: September 15, 2010

Recent Posts

When you say database mode are you storing you images etc in the database rather than built in data folder jackrabbit storage. ?

Because the error look like its trying to find it in the data folder which I would assume it wouldn't be there it would be in the database if you ahev set it to be stored there..?

com.liferay.documentlibrary.NoSuchFileException:/opt/liferay-portal-6.0.6/data/images/10/55/10555.png
Jaber C. Mourad
RE: JackRabbit, liferay 6.0.6 and image library
March 12, 2011 8:12 AM
Answer

Jaber C. Mourad

Rank: Junior Member

Posts: 89

Join Date: February 19, 2010

Recent Posts

You are right, I forgot to reconfigure image library to go into database !

It rocks now !

Regards
Brian Scott Schupbach
RE: JackRabbit, liferay 6.0.6 and image library
March 30, 2011 1:11 PM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 329

Join Date: October 23, 2008

Recent Posts

I'm having the same issue...I upgraded from 6.0.5 to 6.0.6 and now none of the images are showing up. It looks like it is now configured to look for images and documents on the file system rather than the database. I thought this was a default setting that liferay stored images in the DB. I don't remember setting this up before...

Anyway, it looks like I need to set this up now. Can you point me in the right direction of where I need to set this up?

Thanks!

Brian
Hitoshi Ozawa
RE: JackRabbit, liferay 6.0.6 and image library
March 30, 2011 2:32 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I thought this was a default setting that liferay stored images in the DB. I don't remember setting this up before...


The default setting in Liferay 5.x was to store in the database, but due to performance issue, this was changed to file system in Liferay 6.x
Brian Scott Schupbach
RE: JackRabbit, liferay 6.0.6 and image library
March 30, 2011 2:38 PM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 329

Join Date: October 23, 2008

Recent Posts

OK. So, maybe I'll just keep it setup on the file system for performance reasons.

I ran into a big issue a year or so ago when storing images on the file system when using a 32 bit machine. There is a 32,000 folder max and we hit it. I had to write a custom piece to work with jackrabbit to get the images and insert them into the database. Really a mess...Now I'm working with a fresh installation on a 64 bit machine. I don't think I'll run into the same issues.
Hitoshi Ozawa
Resolved: JackRabbit, liferay 6.0.6 and image library
March 30, 2011 2:49 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I think the performance problem was caused by setting up to store images in the same database as Liferay on a one server system. Inserting and retrieving xx MB bytes image file from a database using thin JDBC driver isn't really fast.emoticon
karthik N
RE: JackRabbit, liferay 6.0.6 and image library
September 5, 2011 4:54 AM
Answer

karthik N

Rank: Regular Member

Posts: 106

Join Date: June 30, 2011

Recent Posts

Hi,
Im also facing this problem, moving image gallery in LR6.0.6, can u help me in this?

Thanks
Karthik