Re: [jetty-user] Jetty jndi env javax.naming.NameNotFoundException

Jesse McConnell <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
First off I would recommend using jetty7 if your just starting out, no
reason to start out on the deprecated release.

http://www.eclipse.org/jetty/

http://wiki.eclipse.org/Jetty

if you have issues on jetty7 do come back and we'll help you get it sorted out.

if there is a compelling reason your using jetty6 lemme know

cheers,
jesse



--
jesse mcconnell
[email protected]



On Fri, Jan 14, 2011 at 07:48, Joe Greenawalt <[email protected]> wrote:
> Hi I'm trying to migrate from Tomcat to Jetty. We have environment setting
> in jndi that i can't seem to get to work as a deployed app, even though the
> maven jetty plugin works for the same app.
> ERROR:
>     Invocation of init method failed; nested exception is
> javax.naming.NameNotFoundException; remaining name
> 'env/rimPropertiesLocation':
>     jvm 1    | javax.naming.NameNotFoundException; remaining name
> 'env/rimPropertiesLocation'
> After reading the docs my set up is like this:
> context name = my
> JETTY_HOME/contexts/my.xml
> environment variable like so (summarized):
> ...
>        <Set name="contextPath">/my</Set>
>       <Set name="war"><SystemProperty name="jetty.home"
> default="."/>/webapps/my.war</Set>
>       <Set name="extractWAR">false</Set>
>       <Set name="copyWebDir">false</Set>
>     <New id="rimPropertiesLocation"
> class="org.mortbay.jetty.plus.naming.EnvEntry">
>           <Arg>rimPropertiesLocation</Arg>
>           <Arg type="java.lang.String">file:///path/to/MY.properties</Arg>
>          <Arg type="boolean">true</Arg>
>          </New>
> ...
> JETTY_HOME/etc/jetty.xml (summarized):
> ...
>      <Array id="plusConfig" type="java.lang.String">
>         <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
>         <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
>         <Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
>         <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
>         <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
>       </Array>
>
>       <Call name="addLifeCycle">
>           <Arg>
>             <New class="org.mortbay.jetty.deployer.WebAppDeployer">
>               <Set name="contexts"><Ref id="Contexts"/></Set>
>               <Set name="webAppDir"><SystemProperty name="jetty.home"
> default="."/>/webapps</Set>
>               <Set name="parentLoaderPriority">false</Set>
>               <Set name="extract">true</Set>
>               <Set name="allowDuplicates">false</Set>
>               <Set name="defaultsDescriptor"><SystemProperty
> name="jetty.home" default="."/>/etc/webdefault.xml</Set>
>               <Set name="configurationClasses"><Ref id="plusConfig"/></Set>
>             </New>
>           </Arg>
>     </Call>
> ...
> I have the war in JETTY_HOME/webapps/my.war
>
> However when i start jetty, the app looks like its starting up correctly (as
> in initial config is working) then i get the above mentioned error.  The
> lookup for the env/rimPropertiesLocation is set in a spring
> applicationContext.xml.
>
> In some examples I have seen an additional < Arg > in the environment
> definition, sometimes blank and sometimes with and 'id' or a 'server'.  I
> believe I understand their meaning and have tried them all.
>
> Running: latest 6 jetty, on WindowsXP with latest java.
> Thanks in advance
> j
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.