Foros de discusión
Customize CMIS for D and M portlet
Rishi Dev Gupta, modificado hace 11 años.
Customize CMIS for D and M portlet
Expert Mensajes: 255 Fecha de incorporación: 23/11/08 Mensajes recientes
Hi
I am working with LFR 6.1.1 GA2.
I want to customize the CMIS repository code that comes with portal and it as another repository. This can be done via adding my custom class as comma separated value like below
For this I have created a new hook and added the implementation of my custom class MyCMISAtomPubRepository. The compilation is with no errors.
Now after the successful deployment when i click on "Add repository" option under Document and Media portlet, i get an error like below
Which clearly states that the class com.liferay.portal.repository.cmis.CMISAtomPubRepository is not available to the hook, The class is in portal-impl.jar . I am not sure why this is happening because I check the schema for hook plugins and dl.repository.impl property is customizable in hook.
Although I can easily do this with ext plugins, but i do not want to directly jump onto ext as it has its certain limitation with multiple ext plugins.
Can you please tell me what i am doing wrong here with hook?
I am working with LFR 6.1.1 GA2.
I want to customize the CMIS repository code that comes with portal and it as another repository. This can be done via adding my custom class as comma separated value like below
dl.repository.impl=com.liferay.portal.repository.cmis.CMISAtomPubRepository,com.liferay.portal.repository.cmis.CMISWebServicesRepository,com.portal.repository.cmis.MyCMISAtomPubRepository
For this I have created a new hook and added the implementation of my custom class MyCMISAtomPubRepository. The compilation is with no errors.
Now after the successful deployment when i click on "Add repository" option under Document and Media portlet, i get an error like below
Nov 7, 2012 12:20:31 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: com.liferay.portal.repository.cmis.CMISAtomPubRepository
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:52)
at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:27)
at com.liferay.portal.kernel.util.ProxyFactory.newInstance(ProxyFactory.java:38)
at com.liferay.portal.kernel.util.ProxyFactory.newInstance(ProxyFactory.java:29)
at com.liferay.portal.repository.util.RepositoryFactoryImpl.getInstance(RepositoryFactoryImpl.java:42)
at com.liferay.portal.repository.util.RepositoryFactoryUtil.getInstance(RepositoryFactoryUtil.java:38)
at com.liferay.portal.service.impl.RepositoryServiceImpl.getSupportedConfigurations(RepositoryServiceI
mpl.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Which clearly states that the class com.liferay.portal.repository.cmis.CMISAtomPubRepository is not available to the hook, The class is in portal-impl.jar . I am not sure why this is happening because I check the schema for hook plugins and dl.repository.impl property is customizable in hook.
Although I can easily do this with ext plugins, but i do not want to directly jump onto ext as it has its certain limitation with multiple ext plugins.
Can you please tell me what i am doing wrong here with hook?
Mika Koivisto, modificado hace 11 años.
RE: Customize CMIS for D and M portlet
Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
You can new repository implementations from hook but don't include the original values in it as the hook deployer will automatically append your hook into the list of all repository implementations. When you specify it like that it expects the CMISAtomPubRepository class to be found inside your hook plugin.