Page 1 of 1
Can't use postgresql with OpenKM 3
PostPosted:Wed Jul 29, 2009 10:54 am
by Eedoh
Hello!
I know that some time ago, somebody already had problems with using Postgresql instead of default Derby database, but that thread didn\'t help me at all.
My server is running Ubuntu Server 8.04 with latest updates, and I installed postgresql. OpenKM also works great with default settings. Howewer when I change repository.xml, using FAQ as a reference, nothing happens. There\'s nothing new in the postgres database.
I even tried to erase repository.xml, and restart jboss, but openkm started like a charm, although with original settings.
I have no new ideas and I need this working, badly. If anyone can tell me what to do... Btw, don\'t hesitate to write answer like you\'re talking to total dummy, I like that kind :D
Oh yes, and I tried uncommenting lines in OpenKM.cfg, hopeing that I\'ll force it to read my changed repository.xml. That also didn\'t work.
Re:Can't use postgresql with OpenKM 3
PostPosted:Sat Aug 01, 2009 8:13 am
by Eedoh
OK, i figured out some things since I\'ve posted the first message.
First, I was not bright enough to realize that I have to configure JBOSS. Afterward, I managed to configure JBOSS to use PostgreSQL, tables have been created successfully... Howewer, now I can\'t login to OpenKM. I tried several settings in openkm-ds.xml, but none of them worked.
Here\'s mine openkm-ds.xml:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<datasources>
<!-- OpenKM User Activity -->
<local-tx-datasource>
<jndi-name>>OKMActivityDS</jndi-name>
<connection-url>jdbc:postgresql://localhost/OKMActivity</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>postgres</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>PostgreSQL 8.0</type-mapping>
</metadata>
<depends>jboss:service=Postgres,database=OKMActivity</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode
<mbean code=\"org.postgresql\"
name=\"jboss:service=Postgres,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:postgresql://localhost/OKMAuth</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>postgres</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>PostgreSQL 8.0</type-mapping>
</metadata>
<depends>jboss:service=Postgres,database=OKMAuth</depends>
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode
<mbean code=\"org.postgresql\"
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:postgresql://localhost/OKMDashboardStats</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>postgres</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>PostgreSQL 8.0</type-mapping>
</metadata>
<depends>jboss:service=Postgres,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> -->
</datasources>
And here\'s exception that JBOSS report while booting:
10:10:50,026 ERROR [MainDeployer] Could not initialise deployment: file:/home/openkm/OpenKM-3.0_JBoss-4.2.2.GA/server/default/deploy/openkm-ds.xml
org.jboss.deployment.DeploymentException: Could not parse dd; - nested throwable: (org.xml.sax.SAXParseException: The processing instruction target matching \"[xX][mM][lL]\" is not allowed.)
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:231)
at org.jboss.deployment.XSLSubDeployer.init(XSLSubDeployer.java:161)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: The processing instruction target matching \"[xX][mM][lL]\" is not allowed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:227)
... 68 more
Hope that now somebody can help me :)
Re:Can't use postgresql with OpenKM 3
PostPosted:Tue Aug 04, 2009 9:16 am
by jllort
For what you want to use postgres to autenticate users ? or to save data ?
If you want for autenticating purpose you might create a postgres tables structure as has in derby, when you change openkm-ds.xml you\'re changing for it purpose.
If you change repository.xml you change where data is saved in OpenKM. It\'s only valid for first time running OpenKM, not second, becasuse repository is configured on first running process and cannot be changed then.
Re:Can't use postgresql with OpenKM 3
PostPosted:Tue Aug 04, 2009 10:31 am
by Eedoh
For both, I want postgres for everything. I\'ve managed to configure PersistenceManager and FileSystem, now all data is in database, but I still can\'t use database for login.
Btw, I\'ve encountered another problem. Email notifications doesn\'t work :(. I edited mail-service.xml according to FAQ, created emails.properties also, inserted application URL in OpenKM.cfg, but it still doesn\'t work. I\'ve looked in server.log, and couldn\'t find any clue, or trace of handling mails whatsoever :S.
Help, please!
Re:Can't use postgresql with OpenKM 3
PostPosted:Mon Aug 17, 2009 10:17 am
by jllort
No,
If you\'re using postgres for user must set there the mail data, not on properties file. You must extend PrincipalAdapter class for total user integration with Postgres database.