• Running 2 versions of OpenKM on one Jboss

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
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.
 #5530  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
 #5538  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 !
 #5548  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
 #5554  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?
 #5555  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
 #5563  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
 #5564  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
 #5569  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
 #5574  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>
 #5581  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
 #5584  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
 #5588  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
 #5620  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.

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.