Installing Alfresco Ent 3.1 (WAR) on Weblogic 10 using Oracle 10g database

cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Alfresco Ent 3.1 (WAR) on Weblogic 10 using Oracle 10g database

resplin
Intermediate
0 0 1,552

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com




Introduction


This article explains steps how to install Alfresco Enterprise 3.1 WAR on WebLogic 10.0.1 (aka 10.0 MP1) server and using Oracle 10g XE DBMS. Here are exact versions that I have used for this article, but perhaps other versions will work as well (for Weblogic 10.0.0 I didn't need step 8). Operating system is clean Windows XP SP2 (no java installed, no JAVA_HOME at this moment).

In this article note that we use / instead of backslash \ in config files. Also use ~ notation if not using default directories which have space (e.g. c:\Program Files becomes c:/Progra~1/. Use dir /x in dos box to get a short name).

All products are installed in their default directory, except minor changes in WebLogic.


Optional steps and tools


If you don't install oracle on this PC and already having it on another one, then Oracle lite basic client is necessary and ORACLE_HOME must point to that directory (usually c:\instantclient_10_2).

Other handy tools: Toad freeware for Oracle, Winrar (it can open jar file and delete directories without extracting, very convenient for later).

For using toad we need:  TNS_NAMES pointing to directory where tnsnames.ora resides (usually c:\instantclient_10_2).

Here is example of tnsnames.ora for this wiki (optional for toad):



ORACLE_VIRTUAL_PC =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = localhost)
      (PORT = 1521)
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )


Pre-requisites


Steps


Install Oracle


Here we need to Install Oracle with default settings. For system password I used 'test'. We need to create user alfresco with password test and give it all priviledges. Ask oracle admin to do that if oracle is not on local pc.


  • Make sure that it's running (Start Database).
  • Goto: http://127.0.0.1:8080/apex and login as sys/test, click: Administration, Manage Database Users. Now Create user: alfresco/test. Give the User all privileges.

Install WebLogic


Here we install weblogic.


  • Default root bea home is c:\bea\. 
  • Select custom installation. Uncheck all un-necessary features, keep only one check box checked: 'server' (JDBC is included).
  • Instead of default product home location (wlserver_10.0) I used user_projects as default in Linux.
  • Wait until install finished. Start configuration wizard
  • Create domain e.g. EURES-domain. It should be located here if all went ok C:\bea\user_projects\domains\EURES-domain. (if you choose different domain, e.g. alf_domain, watch out for directories in following shapters.)

Unzip alfresco-enterprise-war-3.1.zip


  • We need to unpack this zip file. Right click on zip and select unpack to alfresco-enterprise-war-3.1. E.g. C:\TEMP\alfresco-enterprise-war-3.1.
  • Go inside that dir, rename alfresco.war to alfresco.war.rar
  • Extract content to alfresco.war

Modification of alfresco.war extracted content



  1. Add weblogic.xml to the C:\TEMP\alfresco-enterprise-war-3.1\WEB-INF directory

    <weblogic-web-app
    xmlns='http://www.bea.com/ns/weblogic/90'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation='http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd'>
         <container-descriptor>
             <prefer-web-inf-classes>true</prefer-web-inf-classes>
          </container-descriptor>
    </weblogic-web-app>

    (For other versions of WebLogic namespaces are here oracle namespaces)


  2. We will not touch pattern matching for loading context xml-s with beans as done in other articles. This will work if classpath is set properly. Learn more: spring context loading and Spring Application Context Loading Tricks. So, don't touch following config items.

    Above (classpath) URI 'protocol' is correct.


  3. Copy contents (3 folders) of the C:\TEMP\alfresco-enterprise-war-3.1\extensions folder into the C:\bea\user_projects\domains\EURES-domain\lib\alfresco folder.

  4. Edit c:\bea\user_projects\domains\EURES-domain\lib\alfresco\extension\custom-hibernate-dialect.properties. Here we use dialect from alfresco so add following line to the property file:


    hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect

    Learn more: supported dialects.


  5. Edit c:\bea\user_projects\domains\EURES-domain\lib\alfresco\extension\custom-repository.properties.
    • Set your preferences for alf_data directory (e.g. dir.root=c:/alf_data ) directory or leave default dir.root=./alf_data so it will be located in domain root directory.
    • Add following:

    #
    # Sample database connection properties
    #
    db.username=alfresco
    db.password=test
    db.pool.initial=1
    db.pool.max=100
    db.url=jdbc:oracle:thin:@localhost:1521:xe
    db.driver=oracle.jdbc.xa.client.OracleXADataSource

    Make sure that other settings are commented out. If not using Oracle XE, then ask admin for oracle SID. Oracle driver is already inside weblogic so we don't install anything. Tip: to find out other available drivers open weblogic console and check which ones are available when creating data source.


  6. Put license file into c:\bea\user_projects\domains\EURES-domain\lib\alfresco\extension\license folder.

  7. Move the following libraries from C:\TEMP\alfresco-enterprise-war-3.1\alfresco.war\WEB-INF\lib folder to C:\bea\user_projects\domains\EURES-domain\lib\
    1. xercesImpl-2.8.0.jar
    2. xml-apis.jar

  8. Edit file: C:\bea\user_projects\domains\EURES-domain\bin\setDomainEnv.cmd and add below the line
    set PRE_CLASSPATH=

    following:



    set PRE_CLASSPATH=%PRE_CLASSPATH%;C:\bea\user_projects\domains\EURES-domain\lib\xercesImpl-2.8.0.jar
    set PRE_CLASSPATH=%PRE_CLASSPATH%;C:\bea\user_projects\domains\EURES-domain\lib\xml-apis.jar
    set PRE_CLASSPATH=%PRE_CLASSPATH%;C:\bea\user_projects\domains\EURES-domain\lib\rhino-js-1.6R7.jar
    set PRE_CLASSPATH=%PRE_CLASSPATH%;c:\bea\user_projects\domains\EURES-domain\lib

  9. Copy below 4 dll(s) from c:\temp\alfresco-enterprise-war-3.1\commands\bin to c:\windows\system32:
    1. Win32NetBIOS.dll
    2. Win32NetBIOSx64.dll
    3. Win32Utils.dll
    4. Win32Utilsx64.dll

Installing modified alfresco from folder


  • Move C:\TEMP\alfresco-enterprise-war-3.1\alfresco.war to c:\alfresco.war or your favorite location.
  • Start weblogic (e.g. C:\bea\user_projects\domains\EURES-domain\startWebLogic.cmd)
  • Go to: http://127.0.0.1:7001/console
  1. In the left pane of the Administration Console, click Deployments.
  2. Click Lock & Edit
  3. In the right pane, click Install.
  4. Navigate to: Location: localhost \ C: \
  5. Click on radio button in front of alfresco.war folder (not the war file itself). Click Next.
  6. Click Finish. Click Activate Changes.
  7. Select alfresco from table and click 'Start'

Test if alfresco is happily running


  1. go to: http://localhost:7001/alfresco and you should see familiar yellow page.
  2. login with admin/admin.
  3. click on link 'Browse items in your home space' to see if beans are loaded and working.










References:


Credits:

Disclaimer:


  • Instructions are provided to you on the basis of 'AS IS', without warranties or conditions of any kind, whether oral or written, express or implied.

3.1
Installation
Weblogic
Oracle