Page 1 of 3
Running 2 versions of OpenKM on one Jboss
PostPosted:Wed Jun 23, 2010 10:23 am
by weezer316
Hi,
Back again!
Right I have my OpenKm compiled finally (lll post how to fix that error no one seems to know anything about later) but im now having trouble trying to get 2 versions running on the same server.
I have followed the installation guide on the wiki, and the part about running 2 versions on the same jBoss, but im still having trouble. Here is whats wrong.
1: * server/default/deploy/openkm-ds.xml -> Duplicate OpenKM datasource configuration to meet the new context.
What bit should I duoplicate? All of it? some of it? Do need to change any settings in here?
2: Remove jcr-1.0.jar from OpenKM.war and copy to server/default/lib
I dont follow this at all.l OpenKM.war is a file, how do i do this?
3: * rc/main/java/com/openkm/ws -> Disable WS deleting this folder.
I cant find this path at all. has it changed for version 4.1? If I find it, do I delete the whole folder?
Sorry about the many questions, but im sure once i get one version working I can get more!
Many thanks
Wheeler
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Wed Jun 23, 2010 9:41 pm
by jllort
1- Duplicate the poll ( definitions ) in openkm-ds.xml
2- You can edit OpenKM.war file with winrar for example
3- Go to WEB-INF/classes/es/git/openkm and remove here the folder ws
Pay attention that you must build two OpenKM from source code to doing it !
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Thu Jun 24, 2010 1:44 pm
by weezer316
Hi,
Sorry Jillort, the poll definitions? I cant find that anywhere. Can you tell me what bits to copy? Do i need to create a new file of copy it within that same .xml file?
Also, the two openkm.war files, do i need to comile 2 versions, or will 1 compiled version work with a default OpenKM.war file thats there form a previous installation?
Thanks
Wheeler
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Thu Jun 24, 2010 5:04 pm
by jllort
Each XML poll database definition in openkm-ds.xml
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Fri Jun 25, 2010 8:33 am
by weezer316
Hi,
Sorry this is still making no sense. Its likely my understanding. I have copied my xml file below. What bits do i copy and do i need to edit each part?
Code: Select all<datasources>
<!-- OpenKM User Activity -->
<local-tx-datasource>
<jndi-name>OKMActivityDS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMActivity</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMActivity</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMActivity">
<attribute name="Database">OKMActivity</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
<!-- OpenKM User Auth -->
<local-tx-datasource>
<jndi-name>OKMAuthDS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMAuth</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMAuth</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMAuth">
<attribute name="Database">OKMAuth</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
<!-- OpenKM Dashboard Stats -->
<local-tx-datasource>
<jndi-name>OKMDashboardStatsDS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMDashboardStats</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMDashboardStats</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMDashboardStats">
<attribute name="Database">OKMDashboardStats</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
<!-- OpenKM Workflow -->
<local-tx-datasource>
<jndi-name>OKMWorkflowDS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMWorkflow</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMWorkflow</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMWorkflow">
<attribute name="Database">OKMWorkflow</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
</datasources>
Again sorry, but im not followiing you.
When i copied my openKM.war file over and did everything esle in the installtion guide, I get an error logging in telling me that user documents etc cant be retrieved. Is this the reason why?
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Fri Jun 25, 2010 11:40 am
by jllort
You must duplicate the polls
Code: Select all <!-- OpenKM User Auth -->
<local-tx-datasource>
<jndi-name>OKMAuthDS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMAuth</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMAuth</depends>
</local-tx-datasource>
duplicate with String INSTALL = "Something"
Code: Select all <!-- OpenKM User Auth -->
<local-tx-datasource>
<jndi-name>OKMAuthDSSomething</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMAuthSomething</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMAuth</depends>
</local-tx-datasource>
That's the idea.
You must modify login-config.xml and into OpenKM the jboss.xml file to point new login auth
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Sat Jun 26, 2010 7:17 pm
by hans_hofman
Hi,
I try to do the same I read the wiki but 2 things not clear to me:
where to find
Files located at $OPENKM_PRJ
and
src/main/java/com/openkm/core/Config.java
I use Linux Ubuntu and my jboss path = /opt/jboss.
Hans
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Sat Jun 26, 2010 9:11 pm
by jllort
if you're compiling version 4.X then root package is es.git.openkm if you're in 5.X is com.openkm
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Mon Jun 28, 2010 11:59 am
by weezer316
Hi,
Still having probelems. Modigying it as you say doenst work,. I get an auth error when trying to log in. if I set that bit of the xml to as it shows below, i can login but i et all sort of errors on login. My install string is TDPTEST001
Code: Select all
<local-tx-datasource>
<jndi-name>OKMAuthDSTDPTEST001</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMAuth</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMAuth</depends>
</local-tx-datasource>
I get the follwing errors on login:
OKM-022001 - repository internal error
or.hibernate.exception: could not find datasource
PLus a howl heap f other simalair ones? is there any other changes I need to make to openkmkm-ds.xml??
Wheeler
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Mon Jun 28, 2010 7:41 pm
by jllort
hibernate is used by jbpm, take a look at definition into OpenKM.war at WEB-INF/classes/hibernate.cfg.xml
It might be changed too
<property name="hibernate.connection.datasource">java:/OKMWorkflowDS</property>
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Tue Jun 29, 2010 1:37 pm
by weezer316
Hi,
Right, still having big issues here!
Basically what i have now done is deleted openKM.war from the installation folder. I have now 2 compiled war files (OpenKMTDPTEST001 and OpenKMTDPTEST002) along with repositorys named after each and a config file,
Now, I can log into TDPTEST001 fine and everything seems ok, but the administartion tab just says loading. And I am using firefox. Any ideas?
Secondly, I cannot get into TDPTEST002 at all. i try and log in, i gte a white screen once i click login and it says done. Thats all. Any ideas?
Here is my openkm-ds.xml
Code: Select all<datasources>
<!-- OpenKM User Activity -->
<local-tx-datasource>
<jndi-name>OKMActivityTDPTEST001DS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMActivityTDPTEST001</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMActivity</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMActivity">
<attribute name="Database">OKMActivity</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
<!-- OpenKM User Auth -->
<local-tx-datasource>
<jndi-name>OKMAuthTDPTEST001DS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMAuthTDPTEST001</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMAuth</depends>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>OKMAuthTDPTEST002DS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMAuthTDPTEST002</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMAuth</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMAuth">
<attribute name="Database">OKMAuth</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
<!-- OpenKM Dashboard Stats -->
<local-tx-datasource>
<jndi-name>OKMDashboardStatsTDPTEST001DS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMDashboardStatsTDPTEST001</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMDashboardStats</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMDashboardStats">
<attribute name="Database">OKMDashboardStats</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
<!-- OpenKM Workflow -->
<local-tx-datasource>
<jndi-name>OKMWorkflowTDPTEST001DS</jndi-name>
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}OKMWorkflowTDPTEST001</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!--<security-domain>HsqlDbRealm</security-domain>-->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
<depends>jboss:service=Hypersonic,database=OKMWorkflow</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=OKMWorkflow">
<attribute name="Database">OKMWorkflow</attribute>
<attribute name="InProcessMode">true</attribute>
</mbean>
</datasources>
Now, when it coems to TDPTEST002, how should i copy the datasources? i tried to copy each one adn adjust the relevant properties but it deosnt work. Any ideas?
Thank again.
Wheeler
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Tue Jun 29, 2010 9:15 pm
by jllort
1- Try directly with /OpenKM/admin
2- About login problem, you could enable in log4j, debug to login class to know what happens and revise login-config.xml, must be defined other jass in jboss-web.xml that must be present in login-config.xml
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Wed Jun 30, 2010 8:10 am
by weezer316
Jilort,
Tried to access OpenKMTDPTEST001/admin but nothing. I get the login screen but after i log in it just goes to a white screen!
Also, your second point. Im not sure what jboss-web.xml you mean. I can see a few of them when i do a search. What one and what do i need to out in becuase none of them seem to make any sense.
Wheeler
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Thu Jul 01, 2010 3:12 pm
by weezer316
I am also getting alot of 'out of memeory' errors when I log in. These show on the console in Eclipse. Any idea how i can expand the amount of memory?
Re: Running 2 versions of OpenKM on one Jboss
PostPosted:Thu Jul 01, 2010 9:09 pm
by jllort
Don't you thing it's more expensive losing time that contract technical supporting ?
Althought we're trying helping you by forum, that configuration is not trivial, and sometimes we must be seen server to understand what happens ... sorry if I'm so direct with you ... but I'm feeling we're in a deep hole in this post.
Other option that you could attemp ( I don't understand the reason why do you want to make several OpenKM instances in same jboss ) is virtualization the server.