[opencms-dev] Re: opencms-dev Digest, Vol 74, Issue 4

Vishal Matapurkar vishal.techno at gmail.com
Thu Jan 5 14:17:18 CET 2006


Great. My wish has come true!

Now, I have another wish... hope it comes true as well.

I am trying to write a Java application to access OpenCms. This is what I
have written:
        ........imports....;
       ....class definition........
{
        ...... main method ()......
        {
         System.out.println("OpenCms run level is: "+OpenCms.getRunLevel());

          System.out.println("OpenCms.initCmsObject(cdu.getUserGuest())");
Fails Here >>>    CmsObject cmsObject = OpenCms.initCmsObject(
cdu.getUserGuest());//cdu.getUserGuest() returns Guest
          cmsObject.loginUser("Admin", "password");
         }
}

*OpenCms.initCmsObject("Guest")* *fails* at runtime throwing a
NullPointerException.

OpenCms.getRunLevel() method returns a value of  '1'.

I do not know how to get the handle for the following classes:
1. CmsObject object,
2. CmsConfigurationManager
3.CmsSecurityManager

I wish to connect to get an OpenCms database connection using Java
Application source file.

Please help!


Regards,

Vishal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060105/165f7434/attachment.htm>


More information about the opencms-dev mailing list