geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Jain" <ashja...@gmail.com>
Subject Re: Unclear steps in tutorial "Stateless Session Bean"
Date Tue, 18 Mar 2008 14:56:02 GMT
Hi,
Ans1: openejb-jar.xml seems to be correct. openejb-jar.xml for the
application should look like this
*openejb-jar.xml*
<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.2"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:pkgen="
http://www.openejb.org/xml/ns/pkgen-2.0" xmlns:sec="
http://geronimo.apache.org/xml/ns/security-1.2" xmlns:sys="
http://geronimo.apache.org/xml/ns/deployment-1.2">
  <sys:environment>
  <sys:dependencies>
            <sys:dependency>
                <sys:groupId>console.dbpool</sys:groupId>
                <sys:artifactId>jdbc%2Fuserds</sys:artifactId>
            </sys:dependency>
</sys:dependencies>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>StatelessSessionEJB</sys:artifactId>
      <sys:version>1.0</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
    </sys:environment>
  <enterprise-beans/>
</openejb-jar>
I hope you have followed all the steps and created a datasource as suggested
by the tutorial.

Ans2: geronimo-web.xml is automatically created once you have your
environment set up with geronimo eclipse plugin. You need not create one.

*geronimo-web.xml*
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:nam="
http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="
http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="
http://geronimo.apache.org/xml/ns/deployment-1.1">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>ApplicationClient</sys:artifactId>
      <sys:version>1.0</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
    <sys:dependencies>
       <sys:dependency>
            <sys:groupId>default</sys:groupId>
              <sys:artifactId>StatelessSessionEJB</sys:artifactId>
              <sys:version>1.0</sys:version>
              <sys:type>car</sys:type>
       </sys:dependency>
</sys:dependencies>
  </sys:environment>
  <context-root>/ApplicationClient</context-root>
</web-app>

On Tue, Mar 18, 2008 at 5:55 PM, CG <learn.koa@gmail.com> wrote:

> Hi,
>  I am now trying the tutorial  "Stateless Session Bean"
>
> http://cwiki.apache.org/GMOxDOC21/stateless-session-bean.html#StatelessSessionBean-DeployandRun
>
> And I am stuck at section  "Few more configurations", where need to
> configure dependencies because the steps are a bit unclear.
> I try to follow but get the following error which seems like is caused
> by the dependecies configuration
> Hope that somebody can help . thanks.
>
> [error]
> Caused by:
> org.apache.geronimo.kernel.repository.MissingDependencyException:
> Missing dependency: console.dbpool/jdbc%2Fuserds//
>        at
> org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveInClassLoader
> (DefaultArtifactResolver.java:111)
>        at
> org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveInClassLoader
> (DefaultArtifactResolver.java:104)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.resolveParentIds
> (SimpleConfigurationManager.java:473)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadDepthFirst
> (SimpleConfigurationManager.java:431)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration
> (SimpleConfigurationManager.java:296)
>        ... 21 more
>
> [/error]:
>
>
> Below are my questions:
>
> Question 1 : At which part of openejb-jar.xml, the following
> datasource dependency should be inserted ?
> <sys:dependencies>
>            <sys:dependency>
>                <sys:groupId>console.dbpool</sys:groupId>
>                <sys:artifactId>jdbc%2Fuserds</sys:artifactId>
>            </sys:dependency>
> </sys:dependencies>
>
> This is how I do
>
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.2"
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
>  <sys:environment>
>      <sys:dependencies>
>        <sys:dependency>
>          <sys:groupId>console.dbpool</sys:groupId>
>          <sys:artifactId>jdbc%2Fuserds</sys:artifactId>
>        </sys:dependency>
>          </sys:dependencies>
>    <sys:moduleId>
>      <sys:groupId>default</sys:groupId>
>      <sys:artifactId>StatelessSessionEJB</sys:artifactId>
>      <sys:version>1.0</sys:version>
>      <sys:type>car</sys:type>
>    </sys:moduleId>
>  </sys:environment>
>  <enterprise-beans/>
> </openejb-jar>
>
> Question 2:  There is no geronimo-web.xml(there is only web.xml) under
> WEB-INF , should I create a new one ?
>
> <sys:dependencies>
>       <sys:dependency>
>            <sys:groupId>default</sys:groupId>
>                <sys:artifactId>StatelessSessionEJB</sys:artifactId>
>                <sys:version>1.0</sys:version>
>                <sys:type>car</sys:type>
>       </sys:dependency>
> </sys:dependencies>
>
>
>
> Thanks.
>

Mime
View raw message