Fórum

JackRabbit, liferay 6.0.6 and image library

thumbnail
Jaber C. Mourad, modificado 13 Anos atrás.

JackRabbit, liferay 6.0.6 and image library

Junior Member Postagens: 89 Data de Entrada: 19/02/10 Postagens Recentes
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 :

dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
jcr.jackrabbit.config.file.path=${jcr.jackrabbit.repository.root}/repository.xml


My repository.xml

<!--?xml version="1.0"?-->
<repository>
	<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
		<param name="driver" value="com.mysql.jdbc.Driver">
       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true">
       <param name="user" value="myuser">
       <param name="password" value="mypassword">

		<param name="schema" value="mysql">
		<param name="schemaObjectPrefix" value="JR_CR_FS_">
	</filesystem>

	<security appname="Jackrabbit">
		<accessmanager class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
		<loginmodule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
			<param name="anonymousId" value="anonymous">
		</loginmodule>
	</security>
	<workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="liferay" />
	<workspace name="${wsp.name}">
		<persistencemanager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
			<param name="driver" value="com.mysql.jdbc.Driver">
       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true">
       <param name="user" value="myuser">
       <param name="password" value="mypassword">
			<param name="schema" value="mysql">
			<param name="schemaObjectPrefix" value="JR_PM_${wsp.name}_">
			<param name="externalBLOBs" value="false">
		</persistencemanager>
		<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
			<param name="driver" value="com.mysql.jdbc.Driver">
       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true">
       <param name="user" value="myuser">
       <param name="password" value="mypassword">
			<param name="schema" value="mysql">
			<param name="schemaObjectPrefix" value="JR_CR_FS_${wsp.name}_">
		</filesystem>
	</workspace>
	<versioning rootpath="${rep.home}/version">
		<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
			<param name="driver" value="com.mysql.jdbc.Driver">
       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true">
       <param name="user" value="myuser">
       <param name="password" value="mypassword">
			<param name="schema" value="mysql">
			<param name="schemaObjectPrefix" value="JB_V_FS_">
		</filesystem>
		<persistencemanager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
			<param name="driver" value="com.mysql.jdbc.Driver">
       <param name="url" value="jdbc:mysql://url_to_server/LIFERAY_PORTAL?autoReconnect=true">
       <param name="user" value="myuser">
       <param name="password" value="mypassword">
			<param name="schema" value="mysql">
			<param name="schemaObjectPrefix" value="JB_V_PM_">
			<param name="externalBLOBs" value="false">
		</persistencemanager>
	</versioning>
</repository>


Under liferay 6.0.5 it works with DB configuration in repository.xml, but not with the 6.0.6 :

08:13:22,442 ERROR [ImageImpl:40] Error reading image 10555
com.liferay.documentlibrary.NoSuchFileException: /opt/liferay-portal-6.0.6/data/images/10/55/10555.png
        at com.liferay.portal.image.FileSystemHook.getImageAsBytes(FileSystemHook.java:57)
        at com.liferay.portal.model.impl.ImageImpl.getTextObj(ImageImpl.java:37)
        at com.liferay.portal.servlet.ImageServlet.getImageBytes(ImageServlet.java:265)
        at com.liferay.portal.servlet.ImageServlet.writeImage(ImageServlet.java:370)
        at com.liferay.portal.servlet.ImageServlet.service(ImageServlet.java:121)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Is there something wrong or new in 6.0.6 ?

Regards
thumbnail
William Fleming, modificado 13 Anos atrás.

RE: JackRabbit, liferay 6.0.6 and image library

Regular Member Postagens: 180 Data de Entrada: 15/09/10 Postagens Recentes
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
thumbnail
Jaber C. Mourad, modificado 13 Anos atrás.

RE: JackRabbit, liferay 6.0.6 and image library

Junior Member Postagens: 89 Data de Entrada: 19/02/10 Postagens Recentes
You are right, I forgot to reconfigure image library to go into database !

It rocks now !

Regards
thumbnail
Brian Scott Schupbach, modificado 13 Anos atrás.

RE: JackRabbit, liferay 6.0.6 and image library

Expert Postagens: 329 Data de Entrada: 23/10/08 Postagens Recentes
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
thumbnail
Hitoshi Ozawa, modificado 13 Anos atrás.

RE: JackRabbit, liferay 6.0.6 and image library

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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
thumbnail
Brian Scott Schupbach, modificado 13 Anos atrás.

RE: JackRabbit, liferay 6.0.6 and image library

Expert Postagens: 329 Data de Entrada: 23/10/08 Postagens Recentes
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.
thumbnail
Hitoshi Ozawa, modificado 13 Anos atrás.

Resolved: JackRabbit, liferay 6.0.6 and image library

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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, modificado 12 Anos atrás.

RE: JackRabbit, liferay 6.0.6 and image library

Regular Member Postagens: 106 Data de Entrada: 01/07/11 Postagens Recentes
Hi,
Im also facing this problem, moving image gallery in LR6.0.6, can u help me in this?

Thanks
Karthik