JBoss Community

Re: JNDI binding and NameNotFoundException

created by David Bailey in JNDI and Naming - View the full discussion

@Wolf-Dieter: I know my .ear is deployed, because I can access the HTML pages I put in it.  When I make changes and redeploy, I see the changes.  User interaction is as expected until execution hits the point where I'm trying to access the ScoreComputer bean.  I know the JNDI binding is not correct because I don't see my bean listed anywhere in the JMX console.

 

@jaikiran: Here is the directory structure in my development directory:

 

${basedir}

  |--src (standard Java source directory structure)

  |--build

  |--dist

  |--lib

  |--webinf

      |--static (contains .css, .js)

      |--velocity (contains Velocity .vm templates)

      |--application.xml

      |--scpoc-servlet.xml

      |--web.xml

  |--build.xml

 

And here is my build.xml file:

 

{code:xml}<?xml version="1.0"?>

<project name="scpoc" basedir="." default="ear">

 

    <property name="build" value="${basedir}/build" />

    <property name="content" value="${basedir}/content" />

    <property name="deployDir" value="D:/Applications/jboss-5.1.0.GA/server/default/deploy" />

    <property name="dist" value="${basedir}/dist" />

    <property name="jboss_lib" value="D:/Applications/jboss-5.1.0.GA/common/lib" />

    <property name="lib" value="${basedir}/lib" />

    <property name="src" value="${basedir}/src" />

    <property name="webinf" value="${basedir}/webinf" />

    <property name="version" value="0.1" />

   

    <path id="build.classpath">

        <fileset dir="${jboss_lib}" includes="**/*.jar" />

        <fileset dir="${lib}" includes="**/*.jar" />

    </path>

   

    <target name="clean">

        <delete dir="${build}" />

        <delete dir="${dist}" />

    </target>

   

    <target name="init">

       <tstamp />

        <mkdir dir="${build}" />

        <mkdir dir="${dist}" />

    </target>

   

    <target name="compile" depends="init">

        <javac srcdir="${src}" destdir="${build}" optimize="on">

            <classpath refid="build.classpath" />

        </javac>

    </target>

   

    <target name="war" depends="compile">

        <war destfile="${dist}/${ant.project.name}.war" webxml="${webinf}/web.xml">

            <lib dir="${lib}" />

            <classes dir="${build}" />

            <webinf dir="${webinf}">

                <exclude name="web.xml" />

                <exclude name="application.xml" />

            </webinf>

        </war>

    </target>

   

    <target name="ear" depends="war">

        <ear destfile="${dist}/${ant.project.name}-${version}.ear" appxml="${webinf}/application.xml">

            <fileset dir="${dist}" includes="*.war" />

        </ear>

    </target>

   

    <target name="deploy" depends="ear">

        <copy todir="${deployDir}">

            <fileset dir="${dist}" includes="*.ear" />

        </copy>

    </target>

</project>{code}

 

Thanks.

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community