4

I'm getting the error listed below from a DD4T-enabled site I'm trying to work. I've verifed my DB connection info & it looks correct. Is this a license issue? Is the "Cannot open connection" error really causing this?

    2013-09-10 14:46:06,534 ERROR SessionsCleanerMonitor - Could not perform sessions clean-up. Will retry in 120000 milliseconds.
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Cannot open connection
    at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) ~[hibernate-entitymanager.jar:3.4.0.GA]
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) ~[hibernate-entitymanager.jar:3.4.0.GA]
    at com.tridion.storage.persistence.JPABaseDAO.executeQueryListResult(JPABaseDAO.java:266) ~[cd_datalayer.jar:na]
    at com.tridion.storage.persistence.JPABaseDAO.executeQueryListResult(JPABaseDAO.java:234) ~[cd_datalayer.jar:na]
    at com.tridion.storage.persistence.JPABaseDAO.executeQueryListResult(JPABaseDAO.java:217) ~[cd_datalayer.jar:na]
    at com.tridion.storage.session.persistence.JPAPreviewSessionDAO.getExpiredSessions(JPAPreviewSessionDAO.java:84) ~[cd_session.jar:na]
    at com.tridion.storage.session.SessionServiceImpl.getExpiredSessions(SessionServiceImpl.java:75) ~[cd_session.jar:na]
    at com.tridion.storage.session.SessionManagerImpl.performCleanup(SessionManagerImpl.java:227) ~[cd_session.jar:na]
    at com.tridion.storage.persistence.session.SessionsCleanerMonitor.run(SessionsCleanerMonitor.java:54) ~[cd_session.jar:na]
2
  • You most likely have the sessionwrapper enabled which is only need if you are using XPM/UI 2012. Try commenting out the session wrapper in your storage conf.
    – Ram G
    Sep 10 '13 at 20:29
  • I made some changes & now I am getting a "Page Not Found" error from the base.Page(pageId) message. It looks like the page is in tridion & has the View metadata item filled in. How do I determine the issue with this error?
    – Mr Smith
    Sep 10 '13 at 22:17
3

In my experience, the message "Cannot open connection" is usually accurate: the database server cannot be reached. Have you tried to connect (e.g. using telnet) to the specified server & port from the machine which runs the web application? Be aware that with DD4T, this could well be the PC of the individual developer!

1
2

The content delivery license is specific to a machine. Steps to ensure valid installation is given HERE.

Can you also check connectivity from content delivery machine to the database server using telnet databaseserver port?

If the database connectivity and authentication works (as you have highlighted above), this looks to be more of an issue with your storage configuration. I suspect that you are modifying the wrapper for SessionPreview. Can you update your question with the storage configuration settings from cd_storage.xml?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.