• Cannot create or use example extensions

  • He we will discuss about how to make customization and improvement to the OpenKM source code.
He we will discuss about how to make customization and improvement to the OpenKM source code.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #11862  by kenwalter
 
OpenKM 5.0 - Linux Mint (Ubuntu) - Eclipse

I am trying to run the HelloWorld Extension. I have followed the guide from the Wiki and enabled the extension examples via JDBC SQL insert statements.

Side note: for 5.0 these Extension Enabling SQL statements are inaccurate. The field names should be EXT_UUID and EXT_NAME, removing them from the query solves the issue.

Even though I enable them, I cannot see any extensions in OpenKM. Also, every time I restart OpenKM, the OKM_Extension table is empty. It never saves my data update.
 #11899  by pavila
 
Thanks for the tip. I have fixed the wiki page.

You also need to enable the extensions in the user profile.
 #11933  by jllort
 
You can generate your own UUID, and add to Customization.java ( that's the best way ) and obviously inserting in database ( then with profiles can allow some users - profile access )
 #11939  by kenwalter
 
I seem to be having an issue building the Maven project. I created a new extension by following the guides, created my own UUID, added it to the database, and nothing changes.

I have even tried editing the HelloWorld example extension and then doing Maven clean, Maven Install, Maven Package, then Run on server. Nothing changes. I have tried 'mvn compile' from the terminal and it does nothing. Even though I completely changed the original HelloWorld example extension, my changes are not reflected in the build.

There must be a step I am missing if it refuses to compile and run the new version.

Please help.
 #11956  by jllort
 
What you're talking it's really strange. Ensure GWT is compiling, and put some Window.alert on code ( or better if you can configure debug mode on GWT ) to ensure the code you're deplying if the code you think you've changed.
 #11973  by kenwalter
 
I tried to do what you said by performing the steps in the developer guide.
http://wiki.openkm.com/index.php/Debugging_with_GWT
I followed all the instructions, but I am missing com.google.gwt.dev.DevMode
Shouldn't this dependency already be in my build?

Update:
GWT says that this dependency should be included by Maven in a jar called gwt-dev.jar. I checked my workspace with...
Code: Select all
~/workspace $ find . * | grep gwt-dev
... and it gave me no results.
This tells me that Maven is not including everything it is supposed to.

How do I resolve this problem?
 #11984  by pavila
 
Edit the pom.xml file and uncomment this section:
Code: Select all
<!-- Only for development 
    <dependency> 
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>${gwt.version}</version>
      <scope>provided</scope>
    </dependency>-->
 #12012  by jllort
 
You're on linux ? you must create an alias target/OpenKM as OpenKM.war into jboss deploy folder ( that's the easiest way for developing ), if not you'll must copy each time the OpenKM.war file into deploy folder ( tedious , I suggest create link to that folder into deploy jboss folder ).
 #12013  by kenwalter
 
OK. I'll keep that in mind. I'm trying to create a set of instructions for developers who don't understand a lot of Linux Terminal commands. I have a script that copies the WAR file to the JBoss folder. For me, it's easier to require that users run a script than to make them link the WAR files.

If a build is attempted, then the previous WAR gets deleted during the Maven clean. Using the script is a good way to ensure that you still retain a working build while developing.
 #12042  by kenwalter
 
This is a modification of the current file build.sh found in the root directory of the project. Simple, but effective.
Code: Select all
#!/bin/bash

#Kenneth Walter

#Cleans and re-compiles the source files
mvn -Dmaven.test.skip=true clean gwt:compile install $*


#Set the TARGET_DIRECTORY to the path of your JBoss installation
TARGET_DIRECTORY=~/Downloads/jboss-4.2.3.GA/
FILE_TO_MOVE=target/OpenKM.war
#This will only attempt to replace the existing WAR if the new WAR exists
if [ -f $FILE_TO_MOVE ]
then
	echo 'Deploying WAR to JBoss Directory'
	cp -v $FILE_TO_MOVE $TARGET_DIRECTORY/server/default/deploy/.
	echo 'Done'
fi

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.