Alfresco on Glassfish

I recently posted an updated version of this walkthrough that covers Alfresco 3.2r2.

This walkthrough is for OpenSolaris, it was made on the b98 development build but I'd expect it to work on the release version of 2008.05. It probably works on all other platforms as well with some changes to the pathnames and some of the commands. I'll work on something similar for Solaris, Ubuntu and for Windows.

I've posted a shorter version for those who have previously tried to get it working but were just missing the vital ingredient.

Initial Setup

I'm going to assume you are doing this as a non-root user. If you do this as root, just drop the pfexec statement from any commands you issue.

First install Glassfish and MySQL:

$ pfexec pkg refresh 
$ pfexec pkg install glassfishv2 
$ pfexec pkg install SUNWmysql5

Unlike with the best tutorials, I won't first remind you to turn your system on or not to install the packages if they are already installed.

OpenSolaris has this nifty feature called SMF but we haven't yet managed to hook the installation of packages up such that Services are automatically registered with it yet although that should be there in the November release. For now run the following to register it:

$ pfexec svccfg import /var/svc/manifest/application/database/mysql.xml

and then start the MySQL service:

$ pfexec svcadm enable mysql

This will do all of the work required to get MySQL up and running for the first time. Now create a DB and a user to access it with.

$ /usr/mysql/50/bin/mysqladmin -u root create alfresco
$ /usr/mysql/50/bin/mysql -u root
mysql> grant all privileges on alfresco.\* to 'alfresco'@'%' identified by 'alfresco';
Query OK, 0 rows modified (0.00sec) 
mysql> grant all privileges on alfresco.\* to 'alfresco'@'localhost' identified by 'alfresco';
Query OK, 0 rows modified (0.00sec) 

Now setup a Glassfish domain:

$ pfexec /usr/sbin/asadmin create-domain --adminport 4848 domain1

You need a JDBC MySQL driver:

$ wget http://mysql.osuosl.org/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz

The URL used for the MySQL JDBC driver is just one of many mirrors. You might be better off going to http://dev.mysql.com/downloads/connector/j/5.1.html and choosing where to get it from.

Unpack this somewhere and copy mysql-connector-java-5.1.6-bin.jar to the Glassfish domain's lib directory:

$ pfexec cp mysql-connector-java-5.1.6-bin.jar /var/appserver/domains/domain1/lib

While you are doing this you may as well create an alfresco directory in the same place, you'll need it later.

$ pfexec mkdir /var/appserver/domains/domain1/lib/classes/alfresco

Alfresco War file and configuration

This testing was done with Alfresco labs 3b, it should work with other versions, but if it doesn't post a comment on this blog and I'll look into it.

Next we'll need the Alfresco War file, which you can probably get like this:

$ wget http://us.dl.alfresco.com/build-1164/alfresco-labs-war-3b.tar.gz

But as that looks like a URI than might have been created by SkyNet a machine, you may need to fallback to going here:

http://wiki.alfresco.com/wiki/Installing_Labs_3#Linux_download_and_installation

Once you have it, extract the bundle somewhere, you won't need it after the setup is finished.

You now need to setup the Alfresco bits that aren't contained in the WAR file. From the directory in which you unpacked the Alfresco bundle, copy the entire contents of the extensions directory to the directory you created earlier:
$ pfexec cp -r extensions/\* /var/appserver/domains/domain1/lib/classes/alfresco

You don't want to copy over the extensions directory itself, just it's contents (extension and messages directories).

Alfresco needs somewhere to keep all of it's documents and indexes. This is usually named alf_data, if you don't specify a path to alf_data or the path doesn't exist it will create one for you... somewhere. Let's not leave things to chance and create one and then configure Alfresco to find it:

$ pfexec mkdir /var/alfresco/alf_data

Now cd to /var/appserver/domains/domain1/lib/classes/alfresco/extension and modify the config files so that Alfresco can find alf_data and can find the database. The files that need changing are:

custom-repository.properties 
custom-hibernate-dialog.properties

In custom-repository.properties do the following:

Uncomment the dir.root line and change it's path to /var/alfresco/alf_data

#dir.root=/srv/alfresco/alf_data

becomes:

dir.root=/var/alfresco/alf_data

Uncomment the db.username and db.password lines

#db.username=alfresco
#db.password=alfresco 

becomes:

db.username=alfresco
db.password=alfresco 

The last part of the file has sections for specific databases, by default it's setup to use Derby. Comment out the lines for derby and uncomment the lines for MySQL

db.driver=org.apache.derby.jdbc.EmbeddedDriver
db.url=jdbc:derby:data/derby_data/alfrescocreate=true
...
...
#db.driver=org.gjt.mm.mysql.Driver
#db.url=jdbc:mysql://localhost/alfresco

becomes

#db.driver=org.apache.derby.jdbc.EmbeddedDriver
#db.url=jdbc:derby:data/derby_data/alfrescocreate=true
...
...
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco

In custom-hibernate-dialog.properties, comment out the line for Derby and uncomment the line for MySQL

The Glassfish specific deployment descriptor

Now for the fun bit. Go to the directory in which you unpacked the Alfresco bundle, create a directory called WEB-INF and in that create a file called sun-web.xml with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app>
 <class-loader delegate="false"/>
 <property name="useMyFaces" value="true"/>
</sun-web-app> 

and then add that file to the alfresco.war file:

$ jar uvf alfresco.war WEB-INF/sun-web.xml
adding: WEB-INF/sun-web.xml(in = 316) (out= 236)(deflated 25%)

You're now ready to start Glassfish and deploy alfresco.war to the Glassfish domain:

$ pfexec /usr/bin/asadmin start-domain domain1
$ /usr/sbin/asadmin deploy alfresco.war
Please enter the admin user name>admin
Please enter the admin password> 
Command deploy executed successfully

Now you should be able to fire up a browser and connect to Alfresco at http://localhost:8080/afresco

Summary

This really just covers the basics and uses a clean OpenSolaris install just to show what actually needs to be done to get it working. Hopefully it can be extrapolated from to help install Alfresco on Glassfish in more complicated scenarios. I'll post this on the Alfresco forums once I'm happy that nothing silly creeped in. Hopefully we can extend this to cover different setups and configurations.

At some point it would be nice to show how to get the PDF to Flash functionality working as currently that's missing,

Troubleshooting

Check that it's using the MySQL database that you created by connecting to MySQL through the mysql command and looking to see if the Alfresco database has a bunch of tables. Also check that /var/alfresco/alf_data contains directories if it doesn't then it probably hasn't picked up the configuration in /var/appserver/domains/domain1/lib/classes/alfresco/extensions. Check that you've used the correct path and that the changes that you made to custom-repository.properties and custom-hibernate-dialog.properties are correct.

Remember to stop and start MySQL (if you need to) using svcadm.

The sun-web.xml file has along line in it, if you cut and paste make sure that it doesn't get split across multiple lines.

If you see any issues or mistakes then post a comment on this blog.


Comments:

Hi Mandy,

Very good post, I use it for reinstall a new version glassfish with the new version of alfresco on a new hard drive on my mac.

With fink you have all commands, after replace "pfexec" by "sudo".

All work fine.

Just one question, have you try to install vti-module.amp.
I have trying an nothing append, alfresco work but share module not active, have you install this module ?

Thanks

Laurent

Posted by Laurent Voillot on October 11, 2008 at 04:35 PM BST #

Well done on getting this working!

I tried a while back and the JSF used by Alfresco seemed to clash with the Glassfish-bundled version;
I take it that's what the sun-web.xml step works around?

Posted by Dick Davies on October 13, 2008 at 02:41 AM BST #

Laurent, Sorry but I've not tried the Sharepoint module. It's not something that I would be able to test easily at the moment. Once I go back to my Windows setup I'll see if there's an easy way to setup a test environment.

Dick, thanks, yes the sun-web.xml gets around the JSF/MyFaces clash.

Posted by Amanda on October 13, 2008 at 07:17 AM BST #

Thanks Mandy,
With your instructions, I could configure glassfish + alfresco in a breeze. It works for windows platform with out any additional steps (only commands need to be changed).

Posted by Gireesh Nemath on October 13, 2008 at 07:22 AM BST #

Hi, instructions were a great help. I tried them in OpenSolaris 10 and Windows XP and Alfresco works good in both systems.
The only problem now is that i need share working and it is launching a class cast exception in first page after login :S.
Please if anyone have solved this problem post it, it is urgent!

Posted by Eryx Paredes on November 21, 2008 at 04:20 PM GMT #

Hi, I just made it in centos 5, MySql 5, and glassfish 2.1
and it really really works :) thanks a lot, I´ve been trying this
for over a week with no such a good results. Thanks, bye then.

Posted by Jonathan Fernández on February 09, 2009 at 08:17 AM GMT #

Install went great with OpenSolaris. I had to restart the domain in order for the Alfresco to work after the war deployment.

Excellent post!

Posted by Jeff Higham on April 07, 2009 at 10:40 PM BST #

Hello, I followed these instructions and when I try to connect to http://localhost:8080/afresco I receive an http status 503. Any ideas what I am missing?

Posted by Tom Kawalec on April 16, 2009 at 11:32 AM BST #

Have a look in the <glassfish_home>/domains/domain1/log/server.log file. Specifically near the end. Errors are usually full stacktraces with the useful part being the first couple of lines. If you find any that are obviously from the time that you deployed the alfresco.war file post them here.

Amanda

Posted by Amanda Waite on April 16, 2009 at 12:32 PM BST #

Here are some errors from the server.log file

Caused by: java.sql.SQLException: Access denied for user: 'alfresco@localhost' (Using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:911)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1329)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2048)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.GeneratedConstructorAccessor165.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
... 98 more
|#]

[#|2009-04-16T14:51:11.755-0400|SEVERE|sun-appserver9.1|org.apache.catalina.core.StandardContext|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;_RequestID=07e23d6d-a70f-40c4-8a3a-dbdf5b03b535;|PWC1306: Startup of context /alfresco failed due to previous errors|#]

[#|2009-04-16T14:51:11.769-0400|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|PWC1412: WebModule[/alfresco] ServletContext.log():Closing Spring root WebApplicationContext|#]

[#|2009-04-16T14:51:11.770-0400|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|PWC1412: WebModule[/alfresco] ServletContext.log():Shutting down Log4J|#]

[#|2009-04-16T14:51:11.886-0400|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;_RequestID=07e23d6d-a70f-40c4-8a3a-dbdf5b03b535;|
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.|#]

Posted by Tom Kawalec on April 16, 2009 at 12:55 PM BST #

add a grant to your DB:

grant all privileges on alfresco.\* to 'alfresco'@'localhost' identified by 'alfresco';

You may have missed this step or made a typo (easy to do).

Amanda

Posted by Amanda Waite on April 16, 2009 at 01:33 PM BST #

Thanks for the reply. I added the grant but still receiving the same http 503 page.

Posted by Tom Kawalec on April 17, 2009 at 05:27 AM BST #

The 503 error is just a high level error. What are you getting in the log file? The same error? Is the MySQL server on the same system as Glassfish? If so try running 'mysql -u alfresco -p alfresco' it'll prompt you for the password, if you get "Access denied for user: alfresco@localhost" then you still have an issue with your grants. If you can connect (assuming you still see the "Access denied message" in the log file) then maybe the password isn't specified correctly in custom-repository.properties file.

You can also try connecting as the user that you setup the grants with and run:
mysql> flush privileges;
mysql> show grants for alfresco@localhost;

Posted by Amanda on April 17, 2009 at 06:09 AM BST #

FYI, I simply created the database with name alfresco and username/pass alfresco/alfresco as described in repository.properties file (under WEB-INF/classes/alfresco) and I can log in easily (without 503 error).

I installed Alfresco 3.1 Labs stable on Glassfish 2.1.

Bye !

Posted by Emidio Stani on June 06, 2009 at 07:49 AM BST #

Is it easy to replace "direct" connections from Alfresco WebApp to MySQL server, to use pooled connections maintained by the App Server instead?

Would this have any proven benefit (i.e. scalability to several servers, transparent failover/reconnect without restart of webapp/glassfish when/if the DB server is restarted)?

Thanks,
//Jim

Posted by Jim Klimov on July 12, 2009 at 09:44 AM BST #

Hi Amanda,

I tried the above, except that with alf 3.2 custom-repository.properties... are now in single file called alfresco-global.properties. I'm having however, a javax.faces.FacesException: java.net.UnknownHostException: java.sun.com caused by: java.net.UnknownHostException: java.sun.com

I suspect that the problem lies on my glassfish domain's port which I set to 8888. Is there a file where I can set a custom port other than 8080?

thanks in advance for the quick reply.

Posted by far-easterner on July 20, 2009 at 01:57 AM BST #

If you are behind a Web Proxy then take a look at http://forums.alfresco.com/en/viewtopic.php?f=8&t=18132

If you have no internet connectivity at all then you may need to edit the web.xml file and change the DOCTYPE for the DTD to point to the local copy of the dtd. I've no experience doing this though.

Posted by Mandy Waite on July 20, 2009 at 06:26 AM BST #

I'm not sure about the Web proxy settings, but the box that I'm working at sits inside a DMZ, although my other apps like the jee blueprint, liferay are running fairly well in 2 separate GF domains. So I don't think setting the JAVA_OPTS for the httpproxy is feasible or is even rational.

I also tried setting the doctype to reference the local dtd but it outputs more errors.

I have now opted to create a new domain using port 8080. But it's not picking the domains/ecm/lib/classes/alfresco/extension/alfresco-global.properties
where i've set the dir.root=/var/alfresco/alf_data w/c is empty.

In the logs, I'm now having this exception trace:
[#|2009-07-21T18:21:18.950+0800|SEVERE|sun-appserver9.1|org.springframework.web.context.ContextLoader|_ThreadID=16;_ThreadName=httpWorkerThre
ad-8180-0;_RequestID=2a8fd491-24bd-4ac3-b84e-f6f5e306cb05;|Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 06210000 Ensure that the 'dir.root' property is pointing to the correct data location.

Any assist?

Posted by far-easterner on July 21, 2009 at 04:37 AM BST #

What exact version of Glassfish and what OS are you running?

Mandy

Posted by Mandy Waite on July 21, 2009 at 04:48 AM BST #

gf v2ur2 over rhel 4

Posted by far-easterner on July 23, 2009 at 04:34 AM BST #

Hi far-easterner,
it seems that in my installation which is the same as Mandy but I use alfresco 3.2 community war, Alfresco is looking for the "alfresco-global.properties" at the top of the shared classes directory (i.e. <glassfish>/domains/domain1/shared/classes) and not under the "<glassfish>/domains/domain1/shared/classes/alfresco/extensions" or other place.

otherwise everything is perfect, thanks Mandy!

hope this help

Posted by bing on July 28, 2009 at 06:18 AM BST #

very nice post. but does not worked for W.XP.

Posted by rajesh on September 11, 2009 at 04:51 AM BST #

Hey Rajesh,

It did work on XP with the version of Alfresco that I used. At the time I wrote it I was running XP on my home PC. Maybe you can tell us about what failed and what version you were using. If time permits I might be able to update it to take in all the comments, I don't work with Alfresco at the moment but I could do it in my free time.

Thanks for the feedback.

Mandy

Posted by Amanda Waite on September 11, 2009 at 05:03 AM BST #

the mysql connector should be copy to the lib/ext folder
cp mysql-connector-java-5.1.6-bin.jar /var/appserver/domains/domain1/lib/
work on my GF2.1

Posted by Box on September 20, 2009 at 10:32 PM BST #

the mysql connector should be copy to the lib/ext folder
cp mysql-connector-java-5.1.6-bin.jar /var/appserver/domains/domain1/lib/ext
work on my GF2.1

Posted by Box on September 20, 2009 at 10:34 PM BST #

After succesfull build on Glassfish application dosen's start
I see the following warrnings
[#|2009-11-10T17:28:36.792-0500|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=15;_ThreadName=httpWorkerThread-4848-2;_RequestID=01dd3f4b-c5b9-4b12-89f2-fa4f22c5d709;|
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.|#]
and some more :
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentService' defined in class path resource [alfresco/content-services-context.xml]: Cannot resolve reference to bean 'nodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlPropertyInterceptor' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'multilingualContentService' while setting bean property 'multilingualContentService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multilingualContentService' defined in class path resource [alfresco/model-specific-services-context.xml]: Cannot resolve reference to bean 'permissionService' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionService' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'permissionsDaoComponent' while setting bean property 'permissionsDaoComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionsDaoComponent' defined in class path resource [alfresco/hibernate-context.xml]: Cannot resolve reference to bean 'dmPermissionsDaoComponent' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dmPermissionsDaoComponent' defined in class path resource [alfresco/hibernate-context.xml]: Cannot resolve reference to bean 'avmACLDAO' while setting bean property 'protocolToACLDAO' with key [TypedStringValue: value [avm], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmACLDAO' defined in class path resource [alfresco/hibernate-context.xml]: Cannot resolve reference to bean 'avmSnapShotTriggeredIndexingMethodInterceptor' while setting bean property 'avmSnapShotTriggeredIndexingMethodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmSnapShotTriggeredIndexingMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'avmLuceneIndexerAndSearcherFactory' while setting bean property 'indexerAndSearcher'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmLuceneIndexerAndSearcherFactory' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.alfresco.repo.search.MLAnalysisMode] for property 'defaultMLIndexAnalysisMode'; nested exception is java.lang.IllegalArgumentException: Unsupported value: EXACT_LANGUAGE_AND_ALL

Posted by yavor bachvarov on November 10, 2009 at 12:40 PM GMT #

How to deploy alfresco.war in Glassfish v2 Application Server.

Below error i got while deploying in Glashfish:

09:21:41,735 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter' defined in class path resource [alfresco/emailserver/email-service-context.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: Files/glassfish-v2ur2/domains/domain1/applications/j2ee-modules/alfresco/WEB-INF/classes/
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: Files/glassfish-v2ur2/domains/domain1/applications/j2ee-modules/alfresco/WEB-INF/classes/
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
.

Posted by Narasimman on December 20, 2009 at 08:44 PM GMT #

You need to use sun JDK not open JDK

Posted by ang3r on December 21, 2009 at 05:04 AM GMT #

Hi thanks for the post. It has been very helpful.
I've been trying to deploy alfresco.war in glassfish 2.1 and windows XP. The deployment process seems to be ok but when I try to run the application I get the following error:
11:42:27,140 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 00200000 Ensure that the 'dir.root' property is pointing to the correct data location.
at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:338)
at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:74)
at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:186)...................................

The alfresco-global.properties is in the C:\\Sun\\AppServer\\domains\\domain1\\lib folder and the alf_data folder is beeing created but I think is empty.

Thanks in advance for any help!!!

Posted by Olga on January 20, 2010 at 01:52 AM GMT #

It looks like it's picking up your alfresco-global.properties, otherwise it would use the default location. So this suggests that maybe it can't find the location that you've specified. I don't know if Alfresco creates the directory if it doesn't exist, I always create it beforehand. It could also be more to do with the data in the alf_data folder not matching the DB. When installing Afresco, if the inital setup works ok, but you find that it's used the incorrect alf_data folder (this happened to me when I first tried to work out where to put the alfresco-global.properties file), you can't just point Alfresco to look in a different folder as that folder won't have been initialized. See
http://wiki.alfresco.com/wiki/Linux_Installation_Troubleshooting

As I was only testing and had no live data, I was able to just drop the DB, make sure that dir.root was empty and then restart Alfresco. Of course if you have live data then you you'll need to look deeper into how to recover before taking any destructive steps.

This page has been updated, see:

http://blogs.sun.com/mandy/entry/alfresco_on_glassfish_revisited

Posted by guest on January 20, 2010 at 05:03 AM GMT #

It looks like it's picking up your alfresco-global.properties, otherwise it would use the default location. So this suggests that maybe it can't find the location that you've specified. I don't know if Alfresco creates the directory if it doesn't exist, I always create it beforehand. It could also be more to do with the data in the alf_data folder not matching the DB. When installing Afresco, if the inital setup works ok, but you find that it's used the incorrect alf_data folder (this happened to me when I first tried to work out where to put the alfresco-global.properties file), you can't just point Alfresco to look in a different folder as that folder won't have been initialized. See
http://wiki.alfresco.com/wiki/Linux_Installation_Troubleshooting

As I was only testing and had no live data, I was able to just drop the DB, make sure that dir.root was empty and then restart Alfresco. Of course if you have live data then you you'll need to look deeper into how to recover before taking any destructive steps.

This page has been updated, see:

http://blogs.sun.com/mandy/entry/alfresco_on_glassfish_revisited

Posted by Mandy Waite on January 20, 2010 at 05:04 AM GMT #

Hi thanks for the tip.
The problem is solved. I had to drop the db along with trying to redeploy again alfresco. I had the schema created by a previous full installation and I thought it might work but in fact that was causing the problem.
Thanks again!

Posted by Olga on January 20, 2010 at 11:34 PM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Bloggity, blog

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today