[opencms-dev] Alpha 1 error finding custom resource type
Frank Febbraro
frankfebbraro at gmail.com
Wed Sep 22 22:25:56 CEST 2004
Alexander,
Thanks, I will try that. I thought I was doing it earlier, but I will
make sure everything was setup properly.
I was also wondering how people have been builing modules that contain
templates and custom java classes? Do people handle this all
externally and build a ZIP file with the appropriate manifest.xml? Or
do you tend to build the module in OpenCMS for template and content
creations/edits and then upload a jar file with the classes into the
lib/ directory after making changes? Or if a jar changes must you
RE-import the entire module to get the changes?
Thanks,
Frank
On Wed, 22 Sep 2004 19:09:32 +0200, Alexander Kandzior <alex at opencms.org>
wrote:
> You are probably missing the module /lib export point.
>
> In fact, if a .jar is part of the module /lib, it's just written to the
> tomcat/webapps/opencms/WEB-INF/lib when the module is imported. This
> requires the export point is configured. There's a checkbox for this
during
> module creation. If you need to add this later you must add the export
point
> manually in the opencms-modules.xml. The syntax of the XML file has
changed
> in version 6, but this has been so since version 5.
>
> Best Regards,
> Alex.
>
> Alexander Kandzior
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com
>
>
>
>
> > -----Original Message-----
> > From: opencms-dev-bounces at opencms.org
> > [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Frank Febbraro
> > Sent: Wednesday, September 22, 2004 6:57 PM
> > To: opencms
> > Subject: [opencms-dev] Alpha 1 error finding custom resource type
> >
> > I have a resource type that I have defined, that I hoped to
> > put in a module.
> >
> > I added the definition in opencms-vfs.xml as such:
> > <type class="org.p2.opencms.types.CmsResourceTypeStory" />
> >
> > I also added the appropriate entries in opencms-workspace.xml
> >
> > However if I define a module and put
> > org.p2.opencms.types.CmsResourceTypeStory in a jar file in
> > the module/lib directory, when starting Tomcat I get a
> > ClassNotFoundException. If I put the same jar file in
> > tomcat/webapps/opencms/WEB-INF/lib everything works fine and
> > no errors.
> >
> > I looks like the VFS config gets loaded before the modules
> > and thus cannot find any classes in a module.
> >
> > I though it was allowed to put a jar with classes to define
> > new resource types in a module, but this does not seem to be
> > the case. The OpenCMS book (I know it is only version 5)
> > talks about unpacking and repacking the opencms.jar to do
> > this, but also claims it could be done in a module, but I
> > think that was because it had to be in the com.opencms.file package)
> >
> > Has something changed in 6.0 that would require it be in the
> > WAR lib instead of in a module lib?
> >
> > I would apperciate any insight as I am starting a fairly
> > large project that will deal with what could be large
> > customizations of OpenCMS and want to get started off on the
> > right foot.
> >
> > Thanks,
> > Frank
> >
> >
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list To
> > change your list options, or to unsubscribe from the list,
> > please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> >
> >
>
>
More information about the opencms-dev
mailing list