<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sheila&#039;s Blog &#187; alfresco</title>
	<atom:link href="http://sheilapollard.com/category/alfresco-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://sheilapollard.com</link>
	<description>Software Development</description>
	<lastBuildDate>Wed, 24 Mar 2010 17:19:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Accessing remote Alfresco web services</title>
		<link>http://sheilapollard.com/2009/04/08/accessing-remote-alfresco-web-services/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/04/08/accessing-remote-alfresco-web-services/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 10:38:58 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=280</guid>
		<description><![CDATA[You can check that the alfresco webservices are accessible on a remote machine by accessing the url http://hostname:8080/alfresco/api.  You should get the following message.
Axis HTTP Servlet
Hi, you have reached the AXIS HTTP Servlet. Normally you would be hitting this URL with a SOAP client rather than a browser.

In case you are interested, my AXIS transport [...]]]></description>
			<content:encoded><![CDATA[<p>You can check that the alfresco webservices are accessible on a remote machine by accessing the url http://hostname:8080/alfresco/api.  You should get the following message.
<code>Axis HTTP Servlet
Hi, you have reached the AXIS HTTP Servlet. Normally you would be hitting this URL with a SOAP client rather than a browser.

In case you are interested, my AXIS transport name appears to be 'http'</code></p>
<p>To access a remote web service instead of a local one in your code you need to add a file called webserviceclient.properties to the classpath</p>
<p>webserviceclient.properties<code&gt;repository.location=http://hostname:8080/alfresco/api&lt;/code></p>
<p>If you're accessing the web service from your own web application then you need to place webserviceclient.properties in WEB-INF/classes/alfresco/webserviceclient.properties for it to be picked up properly.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0yODAjY29tbWVudHM=" title=\"Comments on &quot;Accessing remote Alfresco web services&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?280" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=280" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/04/08/accessing-remote-alfresco-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco &#8211; Create User</title>
		<link>http://sheilapollard.com/2009/04/06/alfresco-create-user/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/04/06/alfresco-create-user/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:34:24 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=264</guid>
		<description><![CDATA[Creating a new alfresco user using a web service call requires the following jar files in your classpath:
alfresco-web-service-client.jar
axis-1.4.jar
commons-discovery-0.4.jar
commons-logging-1.1.jar
jaxrpc.jar
opensaml-1.1.jar
wsdl4j-1.6.2.jar
wss4j.jar
xmlsec-1.4.1.jar
Create a java class called AlfrescoCreateUser with a main method
public static void main(String[] args) throws Exception {
  AlfrescoCreateUser alfTest = new AlfrescoCreateUser();
  alfTest.createUser();
}
Copy the createPersonProperties method from the AdministrationServiceSystemTest in the web service client code
/**
* Taken [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a new alfresco user using a web service call requires the following jar files in your classpath:
<code>alfresco-web-service-client.jar
axis-1.4.jar
commons-discovery-0.4.jar
commons-logging-1.1.jar
jaxrpc.jar
opensaml-1.1.jar
wsdl4j-1.6.2.jar
wss4j.jar
xmlsec-1.4.1.jar</code></p>
<p>Create a java class called AlfrescoCreateUser with a main method
<code>public static void main(String[] args) throws Exception {
  AlfrescoCreateUser alfTest = new AlfrescoCreateUser();
  alfTest.createUser();
}</code></p>
<p>Copy the createPersonProperties method from the AdministrationServiceSystemTest in the web service client code
<code>/**
* Taken from AdministrationServiceSystemTest in the web service client.
*/
private NamedValue[] createPersonProperties(String homeFolder,
  String firstName,
  String middleName,
  String lastName,
  String email,
  String orgId)

{
   // Create the new user objects
   return new NamedValue[] {
    new NamedValue(Constants.PROP_USER_HOMEFOLDER, false, homeFolder, null),
    new NamedValue(Constants.PROP_USER_FIRSTNAME, false, firstName, null),
    new NamedValue(Constants.PROP_USER_MIDDLENAME, false, middleName, null),
    new NamedValue(Constants.PROP_USER_LASTNAME, false, lastName, null),
    new NamedValue(Constants.PROP_USER_EMAIL, false, email, null),
    new NamedValue(Constants.PROP_USER_ORGID, false, orgId, null)};
}</code></p>
<p>You need to set the user properties and get an authentication token using the admin access details. The code below creates a user called test with a home space also called test under Company Home -&gt; User Homes
<code>/**
* Creates the user test with a home space in Company Home.
*/
public void createUser() {
  String login = "test";
  String password = "password";
  String homeFolder = "://app:company_home/cm:" + login;
  String userName = "test";
  String userMiddlename = "";
  String userSurname = "Test";
  String userEmail = "test";
  String userOrg = "";

    try {
       AuthenticationUtils.startSession("admin", "admin");
      AdministrationServiceSoapBindingStub administrationService = WebServiceFactory.getAdministrationService();
      NewUserDetails newUser = new NewUserDetails(login, password, createPersonProperties(homeFolder, userName,
        userMiddlename, userSurname, userEmail, userOrg));
      administrationService.createUsers(new NewUserDetails[] { newUser });
    }
    catch (AuthenticationFault f) {
      System.out.println("Administration Fault");
      f.printStackTrace();
    }
    catch (RemoteException e) {
      System.out.println("RemoteException");
      e.printStackTrace();
    }
    finally {
      AuthenticationUtils.endSession();&gt;
    }
    System.out.println("User created successfully");
}</code></p>
<p>Run the class and check that the user has been created successfully.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0yNjQjY29tbWVudHM=" title=\"Comments on &quot;Alfresco &#8211; Create User&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?264" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=264" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/04/06/alfresco-create-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco errors</title>
		<link>http://sheilapollard.com/2009/04/01/alfresco-errors/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/04/01/alfresco-errors/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 14:38:30 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=239</guid>
		<description><![CDATA[Index Errors or The store &#8216;avm://sitestore&#8217; has a duplicate root node entry:
Whoops, you&#8217;ve inadvertently done something Very Bad to your Alfresco install and the application throws a fit about the indexes when you try to start it up.  There&#8217;s a problem with the database data and the lucene indexes being out of synch.
To solve this [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Index Errors or The store &#8216;avm://sitestore&#8217; has a duplicate root node entry:</strong></p>
<p>Whoops, you&#8217;ve inadvertently done something Very Bad to your Alfresco install and the application throws a fit about the indexes when you try to start it up.  There&#8217;s a problem with the database data and the lucene indexes being out of synch.</p>
<p>To solve this error you need to rebuild the lucene indexes.  To do this:<br />
1.  Stop Alfresco.<br />
2.  Delete everything under /alf_data/lucene-indexes<br />
3.  Edit C:/Alfresco/tomcat/shared/classes/alfresco/extension/custom-repository.properties or<br />
alfresco.war/WEB-INF/classes/alfresco/extension/customer-repository.properties to set the property index mode to AUTO instead of validate<br />
4. Start Alfresco again.</p>
<p>customer-repository.properties:<code&gt;index.recovery.mode=AUTO&lt;/code><br />
Now instead of validating the indexes and failing, the indexes will be rebuilt if a problem is found.</p>
<p><strong>java.lang.UnsatisfiedLinkError: no Win32NetBIOS in java.library.path:</strong></p>
<p>You need to add the folder containing the Win32NetBIOS.dll and Win32Utils.dll to the java.library.path of your application server.  For JBoss make an entry in run.bat<code&gt;set JAVA_OPTS=%JAVA_OPTS%  -Djava.library.path="C:\Alfresco\bin"&lt;/code></p>
<p>The server should now be able to find the files.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0yMzkjY29tbWVudHM=" title=\"Comments on &quot;Alfresco errors&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?239" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=239" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/04/01/alfresco-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Alfresco Part Four &#8211; Accessing Alfresco webclient from a url</title>
		<link>http://sheilapollard.com/2009/03/20/alfresco-part-four-accessing-alfresco-webclient-from-a-url/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/03/20/alfresco-part-four-accessing-alfresco-webclient-from-a-url/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 09:30:35 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=160</guid>
		<description><![CDATA[Having created a space in Part Three, we now want to access it from our web application.  The Alfresco web-client provides some servlets to allow URL-based access to pages within the client.  To use these servlets without having to log in you have to request an authentication ticket via a web services call [...]]]></description>
			<content:encoded><![CDATA[<p>Having created a space in Part Three, we now want to access it from our web application.  The Alfresco web-client provides some servlets to allow URL-based access to pages within the client.  To use these servlets without having to log in you have to request an authentication ticket via a web services call and append it to the url.</p>
<p>We want to access the node 066a443a-a43f-4911-9ef2-56cd96a3392e in this example which is the reference for the space we created. The url is</p>
<p>http://localhost:8080/alfresco/n/browse/workspace/SpacesStore/066a443a-a43f-4911-9ef2-56cd96a3392e</p>
<p>We will be using the browse outcome of the ExternalAccessServlet which takes a node reference of the folder to display.</p>
<p>First we get an authentication ticket:
<code>String userName = "admin";
String password = "admin";
String ticket = "";

// Start the session and get a ticket
try {
  AuthenticationServiceSoapBindingStub authenticationService = (AuthenticationServiceSoapBindingStub) new AuthenticationServiceLocator().getAuthenticationService();
        AuthenticationResult result = authenticationService.startSession(userName, password);
        ticket = result.getTicket();
}
catch (ServiceException serviceEx) {
  System.out.println("javax.xml.rpc.ServiceException: " + serviceEx);
}
catch (RemoteException remoteEx) {
  System.out.println("java.rmi.RemoteException: " + remoteEx);
}
System.out.println("Ticket is: " + ticket);</code></p>
<p>Now we append the ticket to the url:
<code>String BROWSE_SPACE = "http://localhost:8080/alfresco/n/browse/workspace/SpacesStore/";
String nodeReference = "066a443a-a43f-4911-9ef2-56cd96a3392e";
String APPEND_TICKET = "?ticket=";
String url = BROWSE_SPACE + nodeReference + APPEND_TICKET + ticket;</code></p>
<p>You can then access the workspace page directly by opening up a url similar to this:</p>
<p>http://localhost:8080/alfresco/n/browse/workspace/SpacesStore/066a443a-a43f-4911-9ef2-56cd96a3392e?ticket=TICKET_c02f49a5cb8db3f59e4b538d25deaa202f4de493</p>
<p>You can get more information about accessing the web client using urls <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3dpa2kuYWxmcmVzY28uY29tL3dpa2kvVVJMX0FkZHJlc3NhYmlsaXR5">here</a>.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0xNjAjY29tbWVudHM=" title=\"Comments on &quot;Alfresco Part Four &#8211; Accessing Alfresco webclient from a url&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?160" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=160" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/03/20/alfresco-part-four-accessing-alfresco-webclient-from-a-url/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Alfresco Part Three &#8211; Create a new workspace using a web service call</title>
		<link>http://sheilapollard.com/2009/03/19/alfresco-part-three-create-a-new-workspace-using-a-web-service-call/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/03/19/alfresco-part-three-create-a-new-workspace-using-a-web-service-call/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 17:15:34 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=114</guid>
		<description><![CDATA[How to access create a new workspace in Alfresco using a web service API.]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzAzLzE2L2FsZnJlc2NvLXBhcnQtb25lLXVzaW5nLWFsZnJlc2NvLWZvci1kb2N1bWVudC1tYW5hZ2VtZW50Lw==">Part One</a> we covered the default installation of Alfresco and in <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8yMDA5LzAzLzE4L2FsZnJlc2NvLXBhcnQtdHdvLWRlcGxveWluZy1hbGZyZXNjby1vbi1qYm9zcy8=">Part Two</a> we covered a JBoss installation.  Now we&#8217;re going to look at how you would handle linking up your own web application with Alfresco web client.</p>
<p>The structure of the Alfresco repository is similar to that of nested folders or nodes.  You start with a root folder and then add sub folders that can contain content or more folders.  In Alfresco these folders are called spaces.  Each space or piece of content has its own node reference.</p>
<p>In our scenario you have a standalone web application and want to be able to link to Alfresco&#8217;s Web Client from it.  Alfresco will then handle all the content management functionality.  You have objects in your web application for which you want a corresponding workspace in Alfresco to contain any content for that object.  The functionality you need to add to your web application is:</p>
<p>1. When an object is created, create a corresponding workspace for that object in Alfresoc and retrieve the node reference for that workspace.<br />
2. Store the objects and matching node references (you will need to do this yourself).<br />
3. Select an object in your web application, get the node reference for the workspace in Alfresco, and open a new tab/window to view/update that workspace in Alfresco.<br />
4. You also want to bypass the Alfresco login page / authentication in all these scenarios so the user doesn&#8217;t have to enter login details.</p>
<p>At a minimum you will need the following jars in your web application:</p>
<blockquote><p>alfresco-web-service-client.jar<br />
axis-1.4.jar<br />
commons-discovery-0.2.jar<br />
wsdl4j-1.6.2.jar<br />
(jaxrpc.jar should already be available in a jboss application)<br />
commons-logging-1.1.jar<br />
wss4j.jar<br />
opensaml-1.0.1.jar<br />
xmlsec-1.4.1.jar</p></blockquote>
<p>Depending on the jar files already included in your application you may need to add some more jars.</p>
<p>We&#8217;ll start with authenticating a web service call that will create a new space.  To use a web service api you need to authenticate your session.</p>
<p>Authentication for web service API:</p>
<blockquote><p>// Start the session<br />
AuthenticationUtils.startSession(&#8220;admin&#8221;, &#8220;admin&#8221;);</p>
<p>try {<br />
	// Make your web service call in here<br />
}<br />
catch (Throwable e) {<br />
	System.out.println(e.toString());<br />
	e.printStackTrace();<br />
}<br />
finally {<br />
	// End the session<br />
        AuthenticationUtils.endSession();<br />
}
</p></blockquote>
<p>To create a workspace called &#8220;child&#8221; in the &#8220;parent&#8221; workspace using a web service call:</p>
<blockquote><p>// The default workspace store is SpacesStore<br />
Store storeRefence = new Store(Constants.WORKSPACE_STORE, &#8220;SpacesStore&#8221;);</p>
<p>// We want to create a new folder or workspace called child in the parent folder under company home<br />
// Create parent reference to the parent space in company home<br />
ParentReference parentReference = new ParentReference(storeReference, null, &#8220;/app:company_home/cm:parent&#8221;,<br />
        Constants.ASSOC_CONTAINS, Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, &#8220;sample_folder&#8221;));</p>
<p>// Create the child folder<br />
NamedValue[] properties = new NamedValue[] { Utils.createNamedValue(Constants.PROP_NAME, &#8220;Child Folder&#8221;) };<br />
CMLCreate create = new CMLCreate(&#8220;1&#8243;, parentReference, null, null, null, Constants.TYPE_FOLDER, properties);<br />
CML cml = new CML();<br />
cml.setCreate(new CMLCreate[] { create });<br />
UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);</p>
<p>// From the result of the web service call we want to retrieve the node reference for the child folder so we can access it later<br />
String childReference = results[0].getDestination().getUuid();<br />
System.out.println(&#8220;Created a new workspace, node is: &#8221; + childReference);</p></blockquote>
<p>In Part Four we will handle generating a url to access the space we have just created and bypassing the login page when accessing the url.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0xMTQjY29tbWVudHM=" title=\"Comments on &quot;Alfresco Part Three &#8211; Create a new workspace using a web service call&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?114" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=114" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/03/19/alfresco-part-three-create-a-new-workspace-using-a-web-service-call/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Alfresco Part Two &#8211; Deploying Alfresco on JBoss</title>
		<link>http://sheilapollard.com/2009/03/18/alfresco-part-two-deploying-alfresco-on-jboss/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/03/18/alfresco-part-two-deploying-alfresco-on-jboss/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:30:33 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=100</guid>
		<description><![CDATA[Steps for deploying Alfresco on a JBoss server.]]></description>
			<content:encoded><![CDATA[<p>First we need to get the war version of alfresco from a download site.   The one I used was alfresco-labs-war-3Stable.zip.  Extract the contents to a temporary folder.</p>
<p>The next step is to set up the database.   If you&#8217;ve already installed the default version of Alfresco you&#8217;ll need to drop the database and recreate it.  Either way, you&#8217;ll find mysql scripts in extra/databases/mysql for setting up or dropping the schema.    See <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLzIwMDkvMDMvMTYvYWxmcmVzY28tcGFydC1vbmUtdXNpbmctYWxmcmVzY28tZm9yLWRvY3VtZW50LW1hbmFnZW1lbnQvP3V0bV9jYW1wYWlnbj1mZWVkJnV0bV9tZWRpdW09ZmVlZCZ1dG1fc291cmNlPWJsb2c=">Using Alfresco for document management Part One</a> for details on how to do a default install of Alfresco and for configuring Open Office.</p>
<p>You now need to extract alfresco.war to edit the contents.  I expanded it into exploded/alfresco.war so I can copy the alfresco.war folder directly into my jboss application when I&#8217;m ready to deploy.</p>
<p>We need to configure the war for deployment in JBoss.  You&#8217;ll find the config files needed in the extensions/extension folder.  The ones we want are:<br />
custom-hibernate-dialect.properties<br />
custom-repository.properties<br />
custom-repository-context.xml</p>
<p>Copy these to exploded/alfresco.war/WEB-INF/classes/alfresco/extension</p>
<p>In custom-repository.properties you need to set the dir.root to point to where you want to store your alfresco data.  Also uncomment and set the database values &#8211; don&#8217;t forget to disable the derby settings also.</p>
<p>Finally you need to set the external executable locations.  What I did here was copy the ImageMagick and bin folders from the default Alfresco install into my root folder containing alf_data.   Otherwise you will need to install missing executables yourself.</p>
<p>custom-repository.properties:
<code>dir.root=C:/Alfresco/alf_data

db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100

ooo.exe=C:/Program Files/OpenOffice.org 3/program/soffice
ooo.user=${dir.root}/oouser
img.root=C:/Alfresco/ImageMagick
swf.exe=C:/Alfresco/bin/pdf2swf

db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco</code></p>
<p>Now update the hibernate dialect in custom-hibernate-dialect.properties<code&gt;# MySQL dialect (default) hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect&lt;/code></p>
<p>I used JBoss 4.2.2 as my application server.  Before deploying you should edit jboss-4.2.2.GA/server/default/deploy/ejb3.deployer/META-INF/persistence.properties to change hibernate.bytecode.provider from javassist to cglib.<code&gt;hibernate.bytecode.provider=cglib&lt;/code></p>
<p>To avoid getting permgen out of memory errors you will probably need to configure your JBOSS_HOME/bin/run.bat to increase the memory size.<code&gt;set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512&lt;/code></p>
<p>You can now try coping alfresco.war into your jboss application.  Assuming this doesn't cause a spectacular display of stack traces, when the server finally starts up you can try accessing the application at http://localhost:8080/alfresco.</p>
<p>You're now ready to start figuring out how to use alfresco as it is, or integrate it with other applications.</p>
<p>Next - <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLzIwMDkvMDMvMTkvYWxmcmVzY28tcGFydC10aHJlZS1jcmVhdGUtYS1uZXctd29ya3NwYWNlLXVzaW5nLWEtd2ViLXNlcnZpY2UtY2FsbC8/dXRtX2NhbXBhaWduPWZlZWQmdXRtX21lZGl1bT1mZWVkJnV0bV9zb3VyY2U9YmxvZw==">Creating a workspace using a web service API</a></p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0xMDAjY29tbWVudHM=" title=\"Comments on &quot;Alfresco Part Two &#8211; Deploying Alfresco on JBoss&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?100" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=100" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/03/18/alfresco-part-two-deploying-alfresco-on-jboss/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Alfresco Part One &#8211; Using Alfresco for document management</title>
		<link>http://sheilapollard.com/2009/03/16/alfresco-part-one-using-alfresco-for-document-management/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/03/16/alfresco-part-one-using-alfresco-for-document-management/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 09:45:01 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>
		<category><![CDATA[document management]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=82</guid>
		<description><![CDATA[We'd like to use an open source document management tool in conjunction with our web application.  I looked at configuring Alfresco for the task, how to integrate it with the external data and reuse as much as possible of the document management features available in Alfresco.

The first steps were to download, install, configure and explore the Alfresco application...]]></description>
			<content:encoded><![CDATA[<p>Alfresco is a content management system that comes in two flavours &#8211; the open source Alfresco Labs and Alfresco Enterprise Edition.  I only looked at the open source version.  There&#8217;s quite a lot to look at, and unfortunately (as is too often the case) the documentation leaves a lot to be desired.  I was soon lost in a sea of versions of the applications and various ways of accessing content.  I was still none too clear how, or if it could be linked in with our existing application without significant work.</p>
<p>The first step was to install Alfresco&#8230; but which version?  The easiest thing to do is install the fully featured Alfresco Labs 3 and run that initially to investigate what Alfresco can do.  Eventually I would need to deploy it in JBoss, but first things first&#8230;  This also gives you the option of cheating later and using some of the programs installed by default when they&#8217;re missing in a more customised deployment.</p>
<p><strong>The installation:</strong><br />
Prior to installation I already had a local mysql database installed.  I downloaded Alfresco Labs 3 and ran the setup file.  I chose a custom install.  I deselected the jdk and open office and installed the remainder into C:/Alfresco.  I set my data to be stored in C:/Alfresco/alf_data and part of the installation included setting up the alfresco database using the mysql details I provided.</p>
<p><strong><br />
The configuration:</strong><br />
On the default install, extension files are stored in C:/Alfresco/tomcat/shared/classes/alfresco/extension.   Most of the settings will have been set correctly in the default install.</p>
<p>To configure my open office installation I edited custom-repository.properties which overrides the default values.<code&gt;ooo.exe=C:/Program Files/OpenOffice.org 3/program/soffice&lt;/code><br />
You start the server by accessing Start -&gt; Programs -&gt; Alfresco Labs -&gt; Start Alfresco Server.  Unfortunately if there are any problems at all the window closes leaving you to search the logs or run the batch scripts manually to see what's going on.</p>
<p><strong><br />
Exploring the application:</strong><br />
Assuming your server starts up successfully, open up the Alfresco Explorer in the same menu location.  You can log in here as admin/admin.  This is the web client program which you can use to create users, assign spaces and edit content.  There's also Alfresco Share as an alternative which is more geared towards setting up collaborative sites.  It takes a bit of time to get familiar with the interface, but there's nothing too difficult to figure out.</p>
<p>You can explore the database schema.  The main tables to note are:<br />
alf_authority which lists the user details<br />
alf_node which gives you the node ids for the documents<br />
avm_modes gives more details about the document nodes</p>
<p>The real fun and games start when you try to deploy a version other than the default install or access the repository or web client remotely.  Details on those to follow later...</p>
<p>Next - <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLzIwMDkvMDMvMTgvYWxmcmVzY28tcGFydC10d28tZGVwbG95aW5nLWFsZnJlc2NvLW9uLWpib3NzLz91dG1fY2FtcGFpZ249ZmVlZCZ1dG1fbWVkaXVtPWZlZWQmdXRtX3NvdXJjZT1ibG9n">Deploying Alfresco Web Client in JBoss</a></p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD04MiNjb21tZW50cw==" title=\"Comments on &quot;Alfresco Part One &#8211; Using Alfresco for document management&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?82" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=82" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/03/16/alfresco-part-one-using-alfresco-for-document-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
