liferay tutorial

Wednesday, February 23, 2011

Class not Found exception in liferay plugin sdk, liferay service, impl, local service, spring, framework, parsing, bean definition, portlet libraty



yan paing : i found the class in the specific derectory(com.ext.portlet.library.service.impl.BookLocalServiceImpl).What i mean is there is a real .class file in com.ext.portlet.library.service.impl.BookLocalServiceImpl.





but the exception is








16:56:13,290 ERROR [PortletApplicationContext:81] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Class that bean class [com.ext.portlet.library.service.impl.BookLocalServiceImpl] depends on not found








Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]

Bean 'com.ext.portlet.library.service.BookLocalService.impl'; nested exception is java.lang.NoClassDefFoundError: com/ext/portlet/library/service/BookLocalService








org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Class that bean class [com.ext.portlet.library.service.impl.BookLocalServiceImpl] depends on not found








Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]

Bean 'com.ext.portlet.library.service.BookLocalService.impl'; nested exception is java.lang.NoClassDefFoundError: com/ext/portlet/library/service/BookLocalService





'''








... 46 more








Caused by: org.hibernate.MappingException: entity class not found: com.ext.portlet.library.model.impl.BookImpl





at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:122)





at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:191)





at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:67)





at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:147)





at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:457)





at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)






Mazhar Anwar : Are you building Services in Plugins sdk?








Please check the package path for your services. for example "com/ext/portlet/library/service/BookLocalService" in your log.






Savas Ozdogan :
I had a similar problem. Liferay was complaining about one of the implementation classes. I checked my portlet-spring.xml and I saw that same class defined couple times. I have deleted portlet/docroot/WEB-INF/src/Meta-INF folder and rerun the service builder. Problem fixed.

1 comment:

  1. i am facing the same problem kindly tell me how to solve it ?

    ReplyDelete