Forums de discussion
error in a service builder with security manager enabled
Dmitry Kovalev, modifié il y a 7 années.
error in a service builder with security manager enabled
New Member Publications: 12 Date d'inscription: 01/04/15 Publications récentes
Hi all!
Please, help me. After a couple of days of researching I have no Idea what I have to do and I'm ready to resign first time in my life :-)
I have a small application on a liferay 6.2ga5ce+tomcat bundle with service builder, which connects to non-liferay database usual way through ext-spring.xml. Everything worked fine until I enabled security manager with generate key in liferay-plugin-package.properties.
Something bad happened with my service. A minor question why liferay's notificaton-portlet doesn't work with security manager enabled, but my service builder fails with a following log:
01:03:34,095 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.shard.advice.ShardParameterAdvice] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'com.liferay.portal.dao.shard.advice.ShardParameterAdvice'; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.shard.advice.ShardParameterAdvice
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.shard.advice.ShardParameterAdvice] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'com.liferay.portal.dao.shard.advice.ShardParameterAdvice'; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.shard.advice.ShardParameterAdvice
01:03:41,361 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'mosExpDataSource'; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Please, who knows how to repair this?
Please, help me. After a couple of days of researching I have no Idea what I have to do and I'm ready to resign first time in my life :-)
I have a small application on a liferay 6.2ga5ce+tomcat bundle with service builder, which connects to non-liferay database usual way through ext-spring.xml. Everything worked fine until I enabled security manager with generate key in liferay-plugin-package.properties.
Something bad happened with my service. A minor question why liferay's notificaton-portlet doesn't work with security manager enabled, but my service builder fails with a following log:
01:03:34,095 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.shard.advice.ShardParameterAdvice] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'com.liferay.portal.dao.shard.advice.ShardParameterAdvice'; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.shard.advice.ShardParameterAdvice
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.shard.advice.ShardParameterAdvice] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'com.liferay.portal.dao.shard.advice.ShardParameterAdvice'; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.shard.advice.ShardParameterAdvice
01:03:41,361 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'mosExpDataSource'; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Please, who knows how to repair this?
Dmitry Kovalev, modifié il y a 7 années.
RE: error in a service builder with security manager enabled
New Member Publications: 12 Date d'inscription: 01/04/15 Publications récentes
After one more day of research situation has changed a bit
I've consistentlty added dependency jars (spring-core.jar, spring-bean.jar, spring-jdbc.jar) in my application, and now my log is:
What i'm doing wrong?
By the way, this is a log from the kaleo-web portlet:
and the notifications-portlet did not start at all.
It seems to me that bread goes off. Liferay portal 6.2ga5 doesn't support security correctly, but make us implement it in our application
I've consistentlty added dependency jars (spring-core.jar, spring-bean.jar, spring-jdbc.jar) in my application, and now my log is:
05:20:02,366 DEBUG [localhost-startStop-1][GeneratingPACLPolicy:230] mos.exp.dbservice-portlet generated authorization property {key=security-manager-properties-read, value=portal:velocity.engine.logger.category}
05:20:02,366 DEBUG [localhost-startStop-1][GeneratingPACLPolicy:230] mos.exp.dbservice-portlet generated authorization property {key=security-manager-files-read, value=C:\liferay-portal-6.2-ce-ga5\tomcat-7.0.62\webapps\ROOT\WEB-INF\lib\velocity.jar}
05:20:02,366 DEBUG [localhost-startStop-1][GeneratingPACLPolicy:230] mos.exp.dbservice-portlet generated authorization property {key=security-manager-files-read, value=.\VM_global_library.vm}
05:20:02,491 DEBUG [localhost-startStop-1][GeneratingPACLPolicy:230] mos.exp.dbservice-portlet generated authorization property {key=security-manager-sql-tables-create, value=mosexp_Contacts}
05:20:02,506 DEBUG [localhost-startStop-1][GeneratingPACLPolicy:230] mos.exp.dbservice-portlet generated authorization property {key=security-manager-sql-tables-index-create, value=mosexp_Contacts}
05:20:03,913 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'mosExpDataSource'; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'mosExpDataSource'
-> Property 'targetDataSource'
-> Bean ''; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'mosExpDataSource'; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'mosExpDataSource'
-> Property 'targetDataSource'
-> Bean ''; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean
........
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:276)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:273)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:308)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:168)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:122)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1272)
What i'm doing wrong?
By the way, this is a log from the kaleo-web portlet:
05:19:55,944 INFO [localhost-startStop-1][ServiceComponentLocalServiceImpl:323] Running Kaleo SQL scripts
05:19:56,694 ERROR [localhost-startStop-1][PortletApplicationContext:138] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.shard.advice.ShardParameterAdvice] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'com.liferay.portal.dao.shard.advice.ShardParameterAdvice'; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.shard.advice.ShardParameterAdvice
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class [com.liferay.portal.dao.shard.advice.ShardParameterAdvice] not found
Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/ext-spring.xml]
Bean 'com.liferay.portal.dao.shard.advice.ShardParameterAdvice'; nested exception is java.lang.ClassNotFoundException: com.liferay.portal.dao.shard.advice.ShardParameterAdvice
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:291)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:491)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:396)
......
at java.lang.reflect.Method.invoke(Unknown Source)
at com.liferay.portal.security.lang.DoPrivilegedHandler$InvokePrivilegedExceptionAction.run(DoPrivilegedHandler.java:167)
at java.security.AccessController.doPrivileged(Native Method)
at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:100)
at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
at com.sun.proxy.$Proxy37.fireDeployEvent(Unknown Source)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
and the notifications-portlet did not start at all.
It seems to me that bread goes off. Liferay portal 6.2ga5 doesn't support security correctly, but make us implement it in our application