Page 1 of 1
Cannot create or use example extensions
PostPosted:Fri Aug 19, 2011 10:32 pm
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.
Re: Cannot create or use example extensions
PostPosted:Wed Aug 24, 2011 8:58 am
by pavila
Thanks for the tip. I have fixed the wiki page.
You also need to enable the extensions in the user profile.
Re: Cannot create or use example extensions
PostPosted:Wed Aug 24, 2011 3:15 pm
by kenwalter
Thank you for the help. That solved my issue with enabling example extensions.
If I wanted to create my own extension, I would need a unique UUID. Do these have to be generated by a utility or can I make one up?
Re: Cannot create or use example extensions
PostPosted:Fri Aug 26, 2011 8:19 am
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 )
Re: Cannot create or use example extensions
PostPosted:Fri Aug 26, 2011 1:25 pm
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.
Re: Cannot create or use example extensions
PostPosted:Sun Aug 28, 2011 2:54 pm
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.
Re: Cannot create or use example extensions
PostPosted:Mon Aug 29, 2011 12:48 pm
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?
Re: Cannot create or use example extensions
PostPosted:Tue Aug 30, 2011 9:51 am
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>-->
Re: Cannot create or use example extensions
PostPosted:Tue Aug 30, 2011 4:12 pm
by kenwalter
Thank you very much. That was my issue. I also noticed that Eclipse was not deploying my OpenKM.war file to my JBoss server automatically, which was also an issue I was having.
Re: Cannot create or use example extensions
PostPosted:Wed Aug 31, 2011 3:40 pm
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 ).
Re: Cannot create or use example extensions
PostPosted:Wed Aug 31, 2011 3:47 pm
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.
Re: Cannot create or use example extensions
PostPosted:Fri Sep 02, 2011 6:49 am
by pavila
Please, share your script with us and will be added to the documentation wiki.
Re: Cannot create or use example extensions
PostPosted:Fri Sep 02, 2011 8:31 pm
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
Re: Cannot create or use example extensions
PostPosted:Tue Sep 06, 2011 6:50 am
by pavila