Page 1 of 1

SOLVED OpenKM Portable Run Error

PostPosted:Fri Oct 28, 2016 7:33 pm
by alexwgordon
Hi all,

I've been working in my Portable OpenKM and now for some reason I'm getting an error when it loads or does anything really. Catalina.log shows:
Code: Select all
2016-10-28 12:29:43,640 [http-bio-127.0.0.1-8080-exec-6] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.openkm.frontend.client.service.OKMDashboardService.getLastModifiedDocuments() throws com.openkm.frontend.client.OKMException' threw an unexpected exception: java.lang.OutOfMemoryError: Java heap space
	at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2367)
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:535)
	at java.lang.StringBuilder.append(StringBuilder.java:204)
	at org.hibernate.type.StringClobType.nullSafeGet(StringClobType.java:69)
	at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:109)
	at org.hibernate.type.AbstractType.hydrate(AbstractType.java:104)
	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
	at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
	at org.hibernate.loader.Loader.getRow(Loader.java:1355)
	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
	at org.hibernate.loader.Loader.doQuery(Loader.java:829)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
	at org.hibernate.loader.Loader.doList(Loader.java:2542)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
	at org.hibernate.loader.Loader.list(Loader.java:2271)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)
	at com.openkm.dao.NodeDocumentDAO.findByPk(NodeDocumentDAO.java:258)
	at com.openkm.dao.NodeDocumentDAO.findByPk(NodeDocumentDAO.java:243)
	at com.openkm.module.db.DbDashboardModule.getTopDocuments(DbDashboardModule.java:1045)
	at com.openkm.module.db.DbDashboardModule.getLastModifiedDocumentsSrv(DbDashboardModule.java:965)
	at com.openkm.module.db.DbDashboardModule.getLastModifiedDocuments(DbDashboardModule.java:943)
	at com.openkm.api.OKMDashboard.getLastModifiedDocuments(OKMDashboard.java:218)
	at com.openkm.servlet.frontend.DashboardServlet.getLastModifiedDocuments(DashboardServlet.java:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Anybody know what causes this?

Re: OpenKM Portable Run Error

PostPosted:Sat Oct 29, 2016 8:26 am
by jllort
You are starting OpenKM from eclipse ? Take a look at your launch parameters ( https://wiki.openkm.com/index.php/Confi ... in_Eclipse ) should have something like it : -Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dfile.encoding=utf-8 ( otherwise you will get a heap error ).

Also I suggest installing JDK 1.7 ( 64 bits ) there's a restriction with eclipse portable which must being executed by jdk 32 bits ( it comes embeded with portable edition, but later will cause new problems while starting server from eclipse ).

We are now working with OVA ( VM snapshot ) for new development environment what will be more easy to start up and get all configured in an easiest way ( still we have not finished working with it ).

Re: OpenKM Portable Run Error

PostPosted:Tue Nov 01, 2016 9:54 pm
by alexwgordon
Perfect. Thanks jllort.

I had this
Code: Select all
-Dcatalina.base="C:\openkm-dev\tomcat-7.0.27" -Dcatalina.home="C:\openkm-dev\tomcat-7.0.27" -Dwtp.deploy="C:\openkm-dev\tomcat-7.0.27\webapps" -Djava.endorsed.dirs="C:\openkm-dev\tomcat-7.0.27\endorsed" -Djava.library.path=C:\openkm-dev\tomcat-7.0.27\lib\sigar" -Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dfile.encoding=utf-8
Instead of this somehow:
Code: Select all
-Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dfile.encoding=utf-8

Re: SOLVED OpenKM Portable Run Error

PostPosted:Thu Nov 10, 2016 2:37 pm
by hfceliss
Good Morning, I have the same problem and do the configuration in the .bat file. But I still get the error, I also check the Java version and it is in 64 bit as recommended.

If anyone can help me, I would appreciate it

Re: SOLVED OpenKM Portable Run Error

PostPosted:Thu Nov 10, 2016 3:18 pm
by alexwgordon
Are you using the portable edition of OKM?

Re: SOLVED OpenKM Portable Run Error

PostPosted:Thu Nov 10, 2016 3:20 pm
by alexwgordon
@jllort, also super excited to see that new environment! Any release date on that?

Re: SOLVED OpenKM Portable Run Error

PostPosted:Fri Nov 11, 2016 7:14 am
by jllort
We had been working with VM snapshot ( OVA ) which will come with all OS software installed etc... Actually we only have released it in professional edition and we are working on making the same with community one. I think until the ends of december of begining january will not be released.