Page 1 of 1

OpenKM-6.3.4-community could not load an entity

PostPosted:Fri Jun 02, 2017 8:45 am
by SuperLala
Hello,
After I login success,occur the picture error
THANKS
Code: Select all
2017-06-02 16:14:42,581 [main] INFO  org.apache.catalina.core.AprLifecycleListener- The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\openkm-dev\tools\EclipsePortable\App\Java\64\jdk1.7.0_75\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\openkm-dev\tools\EclipsePortable\App\Java\64\jdk1.7.0_75\bin;D:\RailsInstaller\Git\cmd;D:\RailsInstaller\Ruby2.2.0\bin;C:\ProgramData\Oracle\Java\javapath;D:\jode;E:\oracle11\product\11.2.0\dbhome_1\bin;E:\oracle\product\10.2.0\client_1\bin;C:\Program Files (x86)\Common Files\NetSarang;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\PROGRA~2\Borland\Delphi6\Bin;C:\PROGRA~2\Borland\Delphi6\Projects\Bpl;D:\Program Files (x86)\Subversion\bin;D:\Program Files\TortoiseSVN\bin;D:\Program Files\VisualSVN Server\bin;E:\apache-maven-3.3.9\bin;E:\apache-ant-1.9.4\bin;C:\Python27(64)\Scripts\;C:\Python27(64)\;D:\Program Files\Django-1.9.2;C:\openkm-dev\tomcat-7.0.27\lib\sigar;.
2017-06-02 16:14:42,742 [main] INFO  org.apache.coyote.http11.Http11Protocol- Initializing ProtocolHandler ["http-bio-127.0.0.1-8080"]
2017-06-02 16:14:42,753 [main] INFO  org.apache.coyote.ajp.AjpProtocol- Initializing ProtocolHandler ["ajp-bio-127.0.0.1-8009"]
2017-06-02 16:14:42,756 [main] INFO  org.apache.catalina.startup.Catalina- Initialization processed in 389 ms
2017-06-02 16:14:42,794 [main] INFO  org.apache.catalina.core.StandardService- Starting service Catalina
2017-06-02 16:14:42,794 [main] INFO  org.apache.catalina.core.StandardEngine- Starting Servlet Engine: Apache Tomcat/7.0.53
2017-06-02 16:14:42,801 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM
2017-06-02 16:14:43,085 [localhost-startStop-1] INFO  org.apache.catalina.loader.WebappClassLoader- validateJarFile(C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\lib\servlet-api-2.5-20081211.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2017-06-02 16:14:43,086 [localhost-startStop-1] INFO  org.apache.catalina.loader.WebappClassLoader- validateJarFile(C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\lib\servlet-api-6.0.36.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2017-06-02 16:14:54,877 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
2017-06-02 16:14:54,884 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/core is already defined
2017-06-02 16:14:54,890 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
2017-06-02 16:14:54,893 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
2017-06-02 16:14:54,900 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
2017-06-02 16:14:54,905 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
2017-06-02 16:14:54,908 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
2017-06-02 16:14:54,909 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
2017-06-02 16:14:54,910 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
2017-06-02 16:14:54,912 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
2017-06-02 16:14:54,916 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
2017-06-02 16:14:54,919 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
2017-06-02 16:14:54,922 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
2017-06-02 16:14:54,927 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
2017-06-02 16:14:54,930 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
2017-06-02 16:14:54,963 [localhost-startStop-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- No Spring WebApplicationInitializer types detected on classpath
2017-06-02 16:14:55,303 [localhost-startStop-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- Initializing Spring root WebApplicationContext
2017-06-02 16:15:11,176 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory C:\openkm-dev\tomcat-7.0.27\webapps\ROOT
2017-06-02 16:15:12,354 [main] INFO  org.apache.coyote.http11.Http11Protocol- Starting ProtocolHandler ["http-bio-127.0.0.1-8080"]
2017-06-02 16:15:12,359 [main] INFO  org.apache.coyote.ajp.AjpProtocol- Starting ProtocolHandler ["ajp-bio-127.0.0.1-8009"]
2017-06-02 16:15:12,360 [main] INFO  org.apache.catalina.startup.Catalina- Server startup in 29602 ms
 


Environment:
* VMWare 12.5.2 8GB RAM, 4 processors
* MS Windows 7 Professional Service Pack 1
* java.version=1.8.0_111
* OpenKM-6.3.4-community with no customizations

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Sat Jun 03, 2017 7:41 am
by SuperLala
Although I do not know the specific reasons but after the replace C:\openkm-dev\tomcat-7.0.27 to tomcat-7.0.61(OKMInstaller.jar installed)
login is normal :mrgreen:

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Sun Jun 04, 2017 7:23 am
by jllort
With tomcat 7 you must use JDK 1.7, JDK 1.8 does not going right from there. That might be the reason why after changing to latest tomcat 7.0.61 it's going right.

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Fri Oct 06, 2017 2:54 pm
by creya
I am getting the exact same error as above when logging in (screenshot attached)...
after i put user/password i get: "COULD NOT LOAD AN ENTITY..."

I built Opekm from source that's in github. no errors building (mvn clean package).

I tried various combinations of tomcat versions (7, 8, 9) and java (7, 8)... always same error.

here's the error I get when i start OpenKM on tomcat... not sure if it has anything to do with the error in the screenshot:
Code: Select all
2017-10-06 10:42:49,194 [main] INFO  org.apache.catalina.startup.Catalina- Server startup in 47231 ms
2017-10-06 10:43:04,393 [http-bio-0.0.0.0-8080-exec-2] INFO  org.apache.jasper.compiler.TldLocationsCache- At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logg
ing for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation tim
e.
2017-10-06 10:43:14,964 [http-bio-0.0.0.0-8080-exec-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- DashboardServlet: ERROR: The serialization policy f
ile '/frontend/7706FBF6BF81FA3FAE5A043BB4A08EB4.gwt.rpc' was not found; did you forget to include it in this deployment?
2017-10-06 10:43:15,011 [http-bio-0.0.0.0-8080-exec-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- DashboardServlet: WARNING: Failed to get the Serial
izationPolicy '7706FBF6BF81FA3FAE5A043BB4A08EB4' for module 'http://localhost:8080/OpenKM/frontend/'; a legacy, 1.3.3 compatible, serialization policy will be used.  You may experience
SerializationExceptions as a result.
2017-10-06 10:43:15,214 [http-bio-0.0.0.0-8080-exec-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- WorkspaceServlet: ERROR: The serialization policy f
ile '/frontend/1B32D99D1E311A39A7921BEE96A870DA.gwt.rpc' was not found; did you forget to include it in this deployment?
2017-10-06 10:43:15,216 [http-bio-0.0.0.0-8080-exec-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- WorkspaceServlet: WARNING: Failed to get the Serial
izationPolicy '1B32D99D1E311A39A7921BEE96A870DA' for module 'http://localhost:8080/OpenKM/frontend/'; a legacy, 1.3.3 compatible, serialization policy will be used.  You may experience
SerializationExceptions as a result.
2017-10-06 10:43:15,804 [http-bio-0.0.0.0-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 'com.openkm.frontend.client.OKMException' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not h
ave a custom field serializer.For security purposes, this type will not be serialized.: instance = com.openkm.frontend.client.OKMException: could not load an entity: [com.openkm.dao.bean.Profile#1]
        at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:619)
        at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
        at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
        at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:539)
        at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:616)
        at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:390)
        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:650)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        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:330)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        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:505)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        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:423)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Mon Oct 09, 2017 10:44 am
by jllort
Two suggestions
- set hibernate.hbmdl=update in your OpenKM.cfg
- refresh browser ( clean cache at least for the application URL -> set url , click SHIFT + F5 or SHIFT + reload button , I'm not 100% sure of keyword combination to only clean cache of url you are using )

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Tue Oct 10, 2017 11:53 am
by creya
The set hibernate.hbmdl=update made it go beyond the error I reported earlier, but gave a whole list of new errors.

So, I thought to give a try with set hibernate.hbmdl=create instead, and that worked with no error.
But of course, i have a clean repository/database now.

I guess the problem was a mismatch between the existing database schema and the new code.

Is there anything else I could have done with "set hibernate.hbmdl=update" so that I don't have to use "create" and start from scratch?

Thanks.

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Thu Oct 12, 2017 5:08 pm
by jllort
Hope you have set the repository to "create" with a testing repository, I understood this is the scenario, you should never do it on a production, otherwise as you says "it is created a new repository losing all previous data and without any possibility - rather than backup recovery - for getting old data.

In a normal scenario you should always apply upgrade when you are upgrading to new OpenKM version. In almost cases hibernate creates new columns etc... and does all for you, in some exceptional cases you must do something ( execute database queries etc... as part of the upgrade process ) extra what is explained in the migration guide. I suggest take the upgrade documentation section in consideration https://docs.openkm.com/kcenter/view/ok ... guide.html

Re: OpenKM-6.3.4-community could not load an entity

PostPosted:Mon Oct 16, 2017 6:50 am
by creya
Josep, I am not dealing with a production Openkm. I am just testing upgrades.
I was going from 6.3.3 which I had built from code found in sourceforge, to version 6.3.4 for which I got the code from github.
Setting hibernate to 'update' was not taking the error away, so i figured I try 'create', which fixed the problem.
I just looked at the migrate procedure in https://docs.openkm.com/kcenter/view/ok ... o-634.html and I see there are not additional steps for these versions.
However, the advice to delete "$TOMCAT_HOME/work/Catalina/localhost" has saved me from many weird errors in the past.
Thank you for your help.