jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Seiber" <todd.sei...@gmail.com>
Subject Re: ocm: is not a registered namespace prefix.
Date Fri, 02 Jan 2009 19:09:01 GMT
You only have to register the namespace once. Perhaps this exception was
thrown on a second run?

On Fri, Jan 2, 2009 at 1:57 PM, Cheng Zhang <zhangyongjiang@yahoo.com>wrote:

> Hi Todd,
>
> I added your code but got exception
>
> javax.jcr.NamespaceException: failed to register namespace ocm -&gt;
> http://jackrabbit.apache.org/ocm: mapping already exists
>
> Any idea?
>
> Thanks a lot,
> Kevin
>
>
> ----- Original Message ----
> From: Todd Seiber <todd.seiber@gmail.com>
> To: users@jackrabbit.apache.org
> Sent: Friday, January 2, 2009 5:36:19 AM
> Subject: Re: ocm: is not a registered namespace prefix.
>
> Try
>
> workspace.getNamespaceRegistry().registerNamespace("ocm", "
> http://jackrabbit.apache.org/ocm");
>
> On Fri, Jan 2, 2009 at 12:21 AM, Cheng Zhang <zhangyongjiang@yahoo.com
> >wrote:
>
> > Hi,
> >
> > I started to use OCM to save object to repository today and got an
> > exception below. It seems that I need to register a namespace ocm. Can
> > anybody please tell me how to fix it?
> >
> > org.apache.jackrabbit.ocm.exception.ObjectContentManagerException: Cannot
> > create new node of type nt:folder from mapped class class
> > com.openandgreen.service.system.Folder; nested exception is
> > javax.jcr.NamespaceException: ocm: is not a registered namespace prefix.
> > javax.jcr.NamespaceException: ocm: is not a registered namespace prefix.
> >
> > Thanks a lot,
> > Kevin
> >
> >
>
>
> --
> Todd Seiber
> 830 Fishing Creek Rd.
> New Cumberland, PA 17070
>
> h. 717-938-5778
> c. 717-497-1742
> e. todd.seiber@gmail.com
>
>


-- 
Todd Seiber
830 Fishing Creek Rd.
New Cumberland, PA 17070

h. 717-938-5778
c. 717-497-1742
e. todd.seiber@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message