We are trying to get the HCA poll on our frontend, for now only the poll. It 
works as stand alone, (cocoon:install) but not for our war deployment. As far 
as I can see it is a JNDI issue, but I think I've got the configuration right.

After consulting with Barthosz of Hippo, he advised me to upgrade the jms 
bridge, but this didn't help.

The relevant parts:

oracle-cms-ds.xml

<datasources>
  <local-tx-datasource>
    <jndi-name>hippocmsPollDS</jndi-name>
<!-- snip -->
  </local-tx-datasource>
</datasources>

server.log:
2008-01-09 15:02:46,267 INFO  
[org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound 
ConnectionManager 'jboss.jca:service=DataSourceBinding,name=hippocmsPollDS' to 
JNDI name 'java:hippocmsPollDS'

jboss-web.xml:
    <resource-ref>
        <res-ref-name>jdbc/PollData</res-ref-name>
        <jndi-name>java:hippocmsPollDS</jndi-name>
    </resource-ref>

web.xml:
    <resource-ref>
        <description>CMS-Poll-JDBC-Datasource</description>
        <res-ref-name>jdbc/PollData</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
persistenceApplicationContext.xml:
  <bean id="persistenceManagerFactory" 
class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
    <property name="jdoProperties">
      <props>
        <prop 
key="javax.jdo.PersistenceManagerFactoryClass">org.jpox.PersistenceManagerFactoryImpl</prop>

        <!-- database -->
        <prop 
key="javax.jdo.option.ConnectionFactoryName">java:jdbc/PollData</prop>
<!-- SNIP -->
      </props>
    </property>
  </bean>

server.log:
2008-01-09 15:02:54,483 ERROR 
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/]] Exception 
sending context initialized event to listener instance of class 
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'persistenceManagerFactory' defined in ServletContext resource 
[/WEB-INF/spring/persistenceApplicationContext.xml]: Invocation of init method 
failed; nested exception is 
org.jpox.exceptions.ConnectionFactoryNotFoundException: Connection Factory 
"java:/jdbc/PollData" not found
NestedThrowables:
javax.naming.NameNotFoundException: jdbc not bound
Caused by:
org.jpox.exceptions.ConnectionFactoryNotFoundException: Connection Factory 
"java:jdbc/PollData" not found
        at 
org.jpox.AbstractPersistenceManagerFactory.lookupDataSource(AbstractPersistenceManagerFactory.java:163)
        at 
org.jpox.AbstractPersistenceManagerFactory.freezeConfiguration(AbstractPersistenceManagerFactory.java:200)
        at 
org.jpox.PersistenceManagerFactoryImpl.getPersistenceManagerFactory(PersistenceManagerFactoryImpl.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:534)
        at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:478)
        at 
org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean.newPersistenceManagerFactory(LocalPersistenceManagerFactoryBean.java:233)

I've tried differen JNDI names in the persistenceApplicationContext.xml:
jdbc/PollData
/jdbc/PollData
java:jdbc/PollData
java:/jdbc/PollData

But all with the same result.

Does someone see what I'm doing wrong?

With regards,

Nick Stolwijk
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to