Chris, Is it possible that your are getting a collision? I'm deploying an appfuse (2.x) project to JBoss Portal. I think by default:
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider We actually had to change our hibernate version to the version provided by our portal container. Everything hibernate still seems to be working including the appfuse:gen and appfuse:gen-model which are getting tons of mileage for us. erolagnab wrote: > > Hi all, > > I am trying to migrate a simple appfuse application to liferay > portlet. The AppFuse application uses JSF with MyFaces Implementation. > Consulting JSF Portlet tutorial from > http://raibledesigns.com/wiki/Wiki.jsp?page=JSFPortlet and JSF_PORTLET > sample from Liferay, I've done the following steps: > > 1. Add PorletContextListener in /metadata/web/listener.xml > > <listener> > > <listener-class>com.liferay.portal.servlet.PortletContextListener</listener-class> > </listener> > > 2. Modify /metadata/web/filter-mappings.xml to use .jsf instead of .html > 3. Add new servlet configuration in /metadata/web/servlets.xml > > <servlet> > <servlet-name>mypetstore_portlet_servlet</servlet-name> > <servlet-class>com.liferay.portal.servlet.PortletServlet</servlet-class> > <init-param> > <param-name>portlet-class</param-name> > > <param-value>org.apache.myfaces.portlet.MyFacesGenericPortlet</param-value> > </init-param> > <load-on-startup>0</load-on-startup> > </servlet> > > 4. Modify the existing servlet mapping for faces servlet in > /metadata/web/servlet-mappings.xml > > <servlet-mapping> > <servlet-name>mypetstore_portlet_servlet</servlet-name> > <url-pattern>/mypetstore_portlet/*</url-pattern> > </servlet-mapping> > > 5. Create portlet.xml file in /web/WEB-INF directory > > <?xml version="1.0"?> > > <portlet-app > xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" > version="1.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd > http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"> > <portlet> > <portlet-name>mypetstore_portlet</portlet-name> > <display-name>MyPetStore Portlet</display-name> > > <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class> > <init-param> > <name>default-view</name> > <value>/index.jsp</value> > </init-param> > <supports> > <mime-type>text/html</mime-type> > </supports> > <portlet-info> > <title>MyPetStore Portlet</title> > <short-title>MyPetStore Portlet</short-title> > <keywords>MyPetStore Portlet</keywords> > </portlet-info> > <security-role-ref> > <role-name>guest</role-name> > </security-role-ref> > <security-role-ref> > <role-name>power-user</role-name> > </security-role-ref> > <security-role-ref> > <role-name>user</role-name> > </security-role-ref> > </portlet> > </portlet-app> > > 6. Create liferay-portlet.xml file and liferay-display.xml file in > /web/WEB-INF directory > > Liferay-portlet.xml > <?xml version="1.0"?> > <!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet > Application 3.5.0//EN" > "http://www.liferay.com/dtd/liferay-portlet-app_3_5_0.dtd"> > > <liferay-portlet-app> > <portlet> > <portlet-name>mypetstore_portlet</portlet-name> > <struts-path>mypetstore_portlet</struts-path> > </portlet> > <role-mapper> > <role-name>administrator</role-name> > <role-link>Administrator</role-link> > </role-mapper> > <role-mapper> > <role-name>guest</role-name> > <role-link>Guest</role-link> > </role-mapper> > <role-mapper> > <role-name>power-user</role-name> > <role-link>Power User</role-link> > </role-mapper> > <role-mapper> > <role-name>user</role-name> > <role-link>User</role-link> > </role-mapper> > </liferay-portlet-app> > > Liferay-display.xml > <?xml version="1.0"?> > <!DOCTYPE display PUBLIC "-//Liferay//DTD Display 3.5.0//EN" > "http://www.liferay.com/dtd/liferay-display_3_5_0.dtd"> > > <display> > <category name="category.test"> > <portlet id="sample_jsf_myfaces_portlet" /> > </category> > </display> > > 7. Add MyFacesContextFactoryImpl in /web/WEB-INF/faces-config.xml file > (you may want to remove <factory/> tag that exists at the end of > faces-config.xml file to avoid duplication) > > <factory> > <faces-context-factory> > org.apache.myfaces.context.MyFacesContextFactoryImpl</faces-context-factory> > </factory> > > 8. Modify path attribute in /metadata/conf/tomcat-context.xml file > (also in /metadata/conf/tomcat-context-5.5.xml file if necessary) > > <Context path="/mypetstore_portlet" ????? > > 9. Create file commons-logging.properties in /web/WEB-INF/classes > > org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger > > 10. Copy context.xml after packaging war to > $tomcat_home/conf/catalina/localhost > > However, the migrated portlet can not start correctly, the following > error was thrown during server startup: > > [mypetstore] ERROR [main] ContextLoader.initWebApplicationContext(177) > | Context initialization failed > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'sessionFactory' defined in URL > [jar:file:/D:/liferay3.6.1-tomcat/webapps/mypetstore/WEB-INF/lib/mypetstore-dao.jar!/META-INF/applicationContext-hibernate.xml]: > Initialization of bean failed; nested exception is > org.hibernate.HibernateException: could not instantiate CacheProvider: > com.liferay.util.dao.hibernate.OSCacheProvider > org.hibernate.HibernateException: could not instantiate CacheProvider: > com.liferay.util.dao.hibernate.OSCacheProvider > at > org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:326) > > Any advice is welcomed and suggestion is highly appreciated. > > Cheers, > > Trung > > > ____________________________________ > .: Message sent using GmailClipse :. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-appfuse-user--Migrating-AppFuse-to-Portlet-tf414778s2369.html#a13534190 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]