cancel
Showing results for 
Search instead for 
Did you mean: 

Viability Study - WORKDESK

dmralfing
Champ in-the-making
Champ in-the-making
I have installed workdesk in my machine and I´m trying to do a demo in order to evaluate if it can cover most of the requirements for a big project.
The problem is that I only have seen a document called "Alfresco_Workdesk_Configuration_Guide_4.1.1.pdf", but it´s far from complete. Can I find any other document, samples, demos.. that explains everything I can configurate with workdesk?. It´s very important the fact that I can show different elements in the user interface depending on the role user I choose in the combo. But I don´t see this combo in my workdesk I have installed!!
Thanks!
16 REPLIES 16

dmralfing
Champ in-the-making
Champ in-the-making
I´m gonna copy/paste  what I have configured for the databases. The port isn´t locked, neither the port
nor the server, that won´t be a problem. If it´s something wrong, anyway I hope that the log file tell me
what´s the matter, no?. This are the files I have modified:

1. This is the context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/workdesk" debug="100" privileged="true" reloadable="true">   
    <Resource name="java:/MySQLDS"
        auth="Container"
        type="javax.sql.DataSource"
        factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
        username="owd"
        password="abs"
        driverClassName="org.gjt.mm.mysql.Driver"
        url="jdbc:mysql://localhost:5432/alfresco?autoReconnect=true"
        maxWait="1000"
        removeAbandoned="true"
        maxActive="30"
        maxIdle="10"
        removeAbandonedTimeout="60"
        logAbandoned="true"
        validationQuery="select 1"/>
</Context>


2. In the owbootstrap.xml I put:

   <DefaultDataSource>
      <JNDIName>java:/MySQLDS</JNDIName>
   </DefaultDataSource>


3. The JAR files: I have the JARs in the lib inside the WAR and also in the Tomcat Lib, in both.
This files are:

commons-collections-3.2.1.jar
mysql-connector-java-5.1.25-bin.jar
commons-pool-1.5.4.jar
commons-dbcp-1.3.jar



And this is the script I have executed for mysql - copied from the documentation -

drop schema owdemo;
== This lines I have done myself, I don´t know if there is necessary to give all privileges but I don´t mind because it´s a demo ==
create database owdemo default character set utf8 collate utf8_bin;
grant all on owdemo.* to 'owdemo'@'localhost' identified by 'owdemo' with grant option;
grant all on owdemo.* to 'owdemo'@'localhost.localdomain' identified by 'owdemo' with grant option;


== Create_MySQL_Database.sql ==
GRANT USAGE ON *.* TO 'owdemo'@'localhost';
DROP USER 'owdemo'@'localhost';
DROP DATABASE IF EXISTS owd;
CREATE USER 'owdemo'@'localhost' IDENTIFIED BY 'owdemo';
GRANT ALL PRIVILEGES ON *.* TO 'owdemo'@'localhost' WITH GRANT OPTION;
CREATE DATABASE owd;

== OwMySQL_CreateAttributeBagTable.sql ==
DROP TABLE IF EXISTS `owd`.`OW_ATTRIBUTE_BAG`;
CREATE TABLE  `owd`.`OW_ATTRIBUTE_BAG` (
  `UserName` varchar(128) NOT NULL,
  `BagName` varchar(128) NOT NULL,
  `AttributeName` varchar(256) NOT NULL,
  `AttributeValue` varchar(1024) NOT NULL,
  PRIMARY KEY (`UserName`,`BagName`,`AttributeName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

== OwMySQL_CreateDBHistoryManagerTable.sql==
DROP TABLE IF EXISTS `owd`.`OW_HISTORY`;
CREATE TABLE  `owd`.`OW_HISTORY` (
  `EventIndex` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `OW_HIST_Type` int(10) unsigned NOT NULL,
  `OW_HIST_ID` varchar(128) NOT NULL,
  `OW_HIST_Status` int(10) unsigned DEFAULT NULL,
  `OW_HIST_Time` datetime DEFAULT NULL,
  `OW_HIST_User` varchar(255) NOT NULL,
  `OW_HIST_Summary` varchar(2048) DEFAULT NULL,
  `ObjectDMSID` varchar(255) DEFAULT NULL,
  `ObjectName` varchar(1024) DEFAULT NULL,
  `ParentDMSID` varchar(255) DEFAULT NULL,
  `ParentName` varchar(1024) DEFAULT NULL,
  `Custom1` varchar(2048) DEFAULT NULL,
  `Custom2` varchar(2048) DEFAULT NULL,
  `Custom3` varchar(2048) DEFAULT NULL,
  PRIMARY KEY (`EventIndex`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

== OwMySQL_CreateDBRoleManagerTable.sql
DROP TABLE IF EXISTS `owd`.`OW_ROLE`;
CREATE TABLE  `owd`.`OW_ROLE` (
  `ROLE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ROLE_NAME` varchar(255) NOT NULL,
  `ROLE_RESOURCE` varchar(255) NOT NULL,
  `ROLE_ACCESS` int(11) NOT NULL DEFAULT '-1',
  `ROLE_ACCESS_MASK` int(11) NOT NULL DEFAULT '-1',
  `CATEGORY` int(10) unsigned NOT NULL,
  PRIMARY KEY (`ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

d_evil
Champ in-the-making
Champ in-the-making
Hi dmralfing,

you are showing a lot of configuration,
but compare your JDBC definition to the inforamtion you posted:

url="jdbc:mysql://localhost:5432/alfresco?autoReconnect=true"<— DB connection to "alfresco"


GRANT USAGE ON *.* TO 'owdemo'@'localhost';
DROP USER 'owdemo'@'localhost';

DROP DATABASE IF EXISTS owd;<— DB of script is "owd"


CREATE USER 'owdemo'@'localhost' IDENTIFIED BY 'owdemo';<— look also on the user name

GRANT ALL PRIVILEGES ON *.* TO 'owdemo'@'localhost' WITH GRANT OPTION;

CREATE DATABASE owd;


Are you really accessing the right Database?
Look closely where you have create the tables for workdesk, and configure it the right Database in JDBC definition.
Also there is no need to duplicate the jdbc-driver libraries in Tomcat/lib and Application-War, if you have jdbc-driver already placed into Tomcat/lib the War-JDBC lib will be ignored.

Regarding logging, Workdesk contains in WEB-INF/conf/&lt;configurationLabel&gt;/log4j.properties
look into that files, it will overwrite the WEB-INF/classes configuration of Log4j when starting the application.

Regards,
D.evil

deko
Star Contributor
Star Contributor
Hi dmralfing,

As D.evil mentioned correctly you have some misconfigured files:

1. You used the original DB scripts that create a DB named "owd" and a user "owdemo" (see script content). In your context.xml file I can see that your URL points to a database named "alfresco" and your user is "owd". You need to fix it by using correct values in your context.xml.

2. I guess you are using Workdesk to connect against an Alfresco system. Why are you using the log4j.properties file from "Filenet" (see category in your config file)? You do not have to copy anything from the guides, but there is a log4j.properties file in every configuration folder under workdesk/WEB-INF/conf/configurationFolder/ that can be used out of the box, only that File appender, log level and log file location need to be configured correctly. The two log lines you see so far are OK and just show that the Workdesk application started fine. As soon as you log in to Workdesk with a user, you should see much more lines.

3. As D.evil also already mentioned, there is no need to have duplicate versions of the JDBC driver. Please locate it under Tomcat/libs and you are fine.

After having corrected the steps above you should be fine and DB connection with Workdesk should be running.

Best regards,
Dennis

dmralfing
Champ in-the-making
Champ in-the-making
Ok, you are right about the schema name, it was wrong.
But I can´t configurate the log4j.properties. It´s for opencmis, can you tell me what´s wrong?. I can´t see the traces!

log4j.rootLogger=ERROR,workdesk_console,workdesk_file_rolling

log4j.appender.workdesk_console=org.apache.log4j.ConsoleAppender
log4j.appender.workdesk_console.layout=org.apache.log4j.PatternLayout
log4j.appender.workdesk_console.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c [%x] - %m%n
log4j.appender.workdesk_console_detailed=org.apache.log4j.ConsoleAppender
log4j.appender.workdesk_console_detailed.layout=org.apache.log4j.PatternLayout
log4j.appender.workdesk_console_detailed.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c [%x] {%C{2}.%M} - %m%n

log4j.appender.workdesk_file.File=C:/DN/ALFRESCO-SHARE/logs/workdesk/workdesk-opencmis.log
log4j.appender.workdesk_file.layout=org.apache.log4j.PatternLayout
log4j.appender.workdesk_file.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c [%x] - %m%n

log4j.appender.workdesk_file_rolling.File=C:/DN/ALFRESCO-SHARE/logs/workdesk/workdesk-opencmis-rolling.log
log4j.appender.workdesk_file_rolling.MaxFileSize=8KB
log4j.appender.workdesk_file_rolling.MaxBackupIndex=4
log4j.appender.workdesk_file_rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.workdesk_file_rolling.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c [%x] - %m%n

log4j.category.org.perf4j.TimingLogger=OFF
log4j.category.org.apache=WARN
log4j.category.org.springframework=WARN

dmralfing
Champ in-the-making
Champ in-the-making
SorrY, I forgot to add the FileAppender as you said, the log4j is already working!

dmralfing
Champ in-the-making
Champ in-the-making
It appears a javax.naming.NameNotFoundException telling that the JNDI name is not associated to the context. But you can see that I have the same name "java:/MySQLDS" in both (context.xml and owbootstram.xml), so It should associate it right. Moreover I think I´m using the opencmis due to I set it in the web.xml. I copy/paste you the relevant files:


   <DefaultDataSource>
      <JNDIName>java:/MySQLDS</JNDIName>
   </DefaultDataSource>


In the file "WORK-DESK/WEB-INF/conf/opencmis/owbootstrap.xml" I have:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/workdesk" debug="100" privileged="true" reloadable="true">  
    <Resource name="java:/MySQLDS"
        auth="Container"
        type="javax.sql.DataSource"
        factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
        username="owd"
        password="abs"
        driverClassName="org.gjt.mm.mysql.Driver"
        url="jdbc:mysql://localhost:5432/owd?autoReconnect=true"
        maxWait="1000"
        removeAbandoned="true"
        maxActive="30"
        maxIdle="10"
        removeAbandonedTimeout="60"
        logAbandoned="true"
        validationQuery="select 1"/>
</Context>



In the web.xml I have:

        <param-value>deploy#WEB-INF/conf/opencmis</param-value>


deko
Star Contributor
Star Contributor
Hi again,

This might be a caching issue now:

Please check (TOMCAT)/conf/Catalina/localhost and delete cached versions of a workdesk.xml file there, so that it will be redeployed from META-INF/context.xml. In addition you might even clear other cached files under (TOMCAT)/work/Catalina/localhost/workdesk

Best regards,
Dennis
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.