[opencms-dev] Problem in CmsCommentAccess with OpenCms 7.5.1

Deiverson Silveira deiverson at solutioncms.com
Mon Feb 8 13:40:50 CET 2010


I have problem alkacon comment for work in OpenCms 7.5.1.... The problem in
NullPointerException in CmsCommentAccess!

Something to solve the opencms 7.5.1?

Im debug, and the problem here:
        try {
            *m_uri = "/demo_en/intro.html";//req.getParameter(PARAM_URI); <<
the value PARAM_URI return /sites/default/ in 7.5.0 return ok
/sites/default/intro.html,              then for work I try static path....
ok, dont shot more exception VfsNotFoundException*
            System.out.println("m_resource" + m_resource + "\n");
            m_resource = getCmsObject().readResource(m_uri);

            System.out.println("m_resource" + m_resource + "\n");
            getCmsObject().getRequestContext().setUri(m_uri);
            String configUri = readConfigUri();
            System.out.println("=====config: " + configUri +"\n");
            String cacheKey =
getCmsObject().getRequestContext().addSiteRoot(configUri)
                +
(getCmsObject().getRequestContext().currentProject().isOnlineProject() ? "+"
: "-");
            System.out.println("cacheKey: " + cacheKey + "\n");
            *m_config =
(CmsCommentConfiguration)m_configs.get(cacheKey); //Here is null, I dont
know the why =/ in 7.5.0 work, but dont work 7.5.1*
            System.out.println("m_config: " + m_config + "\n");
            if (m_config == null) {
            System.out.println("m_config é nulo\n");
                m_config = new CmsCommentConfiguration(this, configUri);
                m_configs.put(cacheKey, m_config);
            }
            if (LOG.isDebugEnabled()) {

 LOG.debug(Messages.get().getBundle().key(Messages.LOG_INIT_CONFIG_1,
configUri));
                LOG.debug(Messages.get().getBundle().key(
                    Messages.LOG_INIT_PROJECT_1,

 getCmsObject().getRequestContext().currentProject().getName()));
                LOG.debug(Messages.get().getBundle().key(
                    Messages.LOG_INIT_SITE_1,
                    getCmsObject().getRequestContext().getSiteRoot()));

 LOG.debug(Messages.get().getBundle().key(Messages.LOG_INIT_RESOURCE_1,
m_resource));
            }
        } catch (Exception e) {
*           //And shoot the exception here*
*           // org.opencms.main.CmsIllegalArgumentException: The given
organization unit test does not exist*
            System.out.println("entrou no 1 catch do init + " + e + "\n");
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage());
            }
        }


Thank you somebody for help!

Deiverson Silveira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100208/0765db65/attachment.htm>


More information about the opencms-dev mailing list