I'm trying to run a portlet in Jahia 5.0.1 that uses a tomcat container managed datasource to MySQL 5. When I add the <Context> tags (see example below) to tomcat's server.xml and start Jahia I get following exception trace:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.jetspeed.request.RequestContextComponent' defined in ServletC ontext resource [/WEB-INF/etc/jetspeed/conf/assembly/jetspeed-spring.xml]: Can't resolve reference to bean 'org.apache.jetspeed.userinfo.UserInfoManager' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache. jetspeed.userinfo.UserInfoManager' defined in ServletContext resource [/WEB-INF/etc/jetspeed/conf/assembly/userinfo.xml]: Can't resolve reference to bean 'org.a pache.jetspeed.components.portletregistry.PortletRegistry' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory. BeanCreationException: Error creating bean with name 'org.apache.jetspeed.components.portletregistry.PortletRegistry' defined in ServletContext resource [/WEB-I NF/etc/jetspeed/conf/assembly/registry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantia te class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]; constructor threw exception; nested exception is java.lang.ExceptionInInitia
lizerError: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.jetspeed.userinfo.UserInfoManager' defined in ServletContext resource [/WEB-INF/etc/jetspeed/conf/assembly/userinfo.xml]: Can't resolve reference to bean 'org.apache.jetspeed.components.portletregistry.PortletRegistry' wh ile setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apa che.jetspeed.components.portletregistry.PortletRegistry' defined in ServletContext resource [/WEB-INF/etc/jetspeed/conf/assembly/registry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.transaction.interceptor.Transac tionProxyFactoryBean]; constructor threw exception; nested exception is java.lang.ExceptionInInitializerError: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.jetspeed.components.portletregistry.PortletRegistry' defined in ServletContext resource [/WEB-INF/etc/jetspeed/conf/assembly/registry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.Fatal BeanException: Could not instantiate class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]; constructor threw exception; nested except
ion is java.lang.ExceptionInInitializerError: null
org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]; constructor threw exception; nested exception is java.lang.ExceptionInInitializerError: null
java.lang.ExceptionInInitializerError
       at java.lang.Class.forName0(Native Method)
....

If I remove the <Context> section from the server.xml Jahia starts and is happy however the portlet is not using a container managed datasource.

When the <Context> tags are in the server.xml I can run the portlet with Tomcat using http://localhost:8080/Locator/partner_search_load_action.do?zipcode=17110&distance=50&type=I&pagePid=49 and the portlet connects using the Tomcat polled connection datasource and runs. So I know that the syntax and mechanics are correct for tomcat but why is this causing Jahia issues?


-----------------------------------------------------------------------------------------------------------
<Context path="/Locator" docBase="Locator" debug="5" reloadable="true" crossContext="true"> <Resource name="jdbc/crm" auth="Container" type="javax.sql.DataSource"
              maxActive="100" maxIdle="30" maxWait="10000"
username="user" password="pwd" driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/db1?autoReconnect=true"/>
</Context>

--
Daryl Gerlach
Consultant
Collective Intelligence, Inc.
Phone: 717-545-9234
Fax: 717-545-9232
Cell: 717-649-3499

Reply via email to