You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Stephen Connolly <st...@gmail.com> on 2010/03/09 12:58:09 UTC

Re: Maven + Jetty: Unknown JNDI name prefix

might be no harm to replace the \'s as well while we are at it

On 25 January 2010 19:51, Stephen Davidson <st...@etcc.com>wrote:

> Might I suggest;
>  str = str.replaceAll("(\\/)|(\\p{Blank})|(\\:)","_");
>
> This was also suggested;
> str = str.replaceAll("[\\/\\p{Blank}\\:]","_");
>
> I would recommend testing/double checking the above expression(s).
>
> Regards,
> Steve
>
> -----Original Message-----
> From: Jonathan Gallimore [mailto:jonathan.gallimore@gmail.com]
> Sent: Friday, January 22, 2010 6:38 PM
> To: users@openejb.apache.org
> Subject: Re: Maven + Jetty: Unknown JNDI name prefix
>
> Hi,
>
> I think I've got to the bottom of this, and now have something that
> starts
> without error. A change was made in Jetty, which causes a context
> created
> from the applications path name to be bound in JNDI. This seems to be an
> issue on Windows, as the path has a colon in it after the drive letter,
> which OpenEJB is rightly treating as a prefix in IvmContext.lookup() - I
> grabbed your updated POM and ran it on my Linux machine, and it worked
> straight away, which caused me to look again at the stacktrace, and I
> realised what was happening.
>
> I'm not sure if we can fix this on the OpenEJB side of things (I had a
> go,
> but because we look for a : to identify a prefix, it was getting a bit
> nasty) - perhaps someone else has some ideas? Anyway, I did manage to
> fix my
> jetty-plus.jar - the fix is pretty straightforward:
>
> http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/modules/plus/src/
> main/java/org/mortbay/jetty/plus/naming/NamingEntryUtil.java<http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/modules/plus/src/%0Amain/java/org/mortbay/jetty/plus/naming/NamingEntryUtil.java>
>
> just change the line just up from the bottom from:
>
> str=str.replace('/', '_').replace(' ', '_');
>
> to:
>
> str=str.replace('/', '_').replace(' ', '_').replace(':','_');
>
> I compiled up a version of jetty-plus-6.1.22 with this change, and put
> it
> here: http://jrg.me.uk/jetty-plus-6.1.22.jar, if you want to copy it to
> your
> local Maven repository to try it out.
>
> I think its probably a good idea to follow this up on the Jetty mailing
> list, but before I do, does anyone have any other thoughts?
>
> Cheers,
>
> Jon
>