title: Eclipse with Websphere 7.0.0.17: EJB project does not work with resources within the workspace, but works with resources on Server
body: <p>My application works with Maven and has three modules:</p>
  
  <ul>
  <li>ear-module </li>
  <li>web-module </li>
  <li>ejb-module</li>
  </ul>
  
  <p>EJB Version is 3.0.</p>
  
  <p>Deployment works in both ways without error messages.</p>
  
  <p>When I try to run the application with the Publishing settings for Websphere "Run server with resources on Server" it works fine.</p>
  
  <p>When I try do the same with "Run server with resources within the workspace" and open the application in my Browser it fails with this error message:</p>
  
  <blockquote>
    <p>A resource reference binding could not be found for the following resource references [jdbc/nust], defined for the NustService component.</p>
  </blockquote>
  
  <p>I am new in JEE5, but it seems to me that local the websphere cant find the ejb-jar.xml.</p>
  
  <p>Here the pom for ejb modul:</p>
  
  <pre><code>&lt;project
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
      xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;mycomp-nust-frontend-app&lt;/artifactId&gt;
          &lt;groupId&gt;mycomp.app&lt;/groupId&gt;
          &lt;version&gt;0.1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;artifactId&gt;mycomp-nust-frontend-svc&lt;/artifactId&gt;
      &lt;name&gt;mycomp-nust-frontend-svc&lt;/name&gt;
      &lt;packaging&gt;ejb&lt;/packaging&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.ejb&lt;/groupId&gt;
              &lt;artifactId&gt;ejb-api&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mycomp.service&lt;/groupId&gt;
              &lt;artifactId&gt;mycomp-service-utils&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/java&lt;/directory&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-ejb-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;ejbVersion&gt;3.0&lt;/ejbVersion&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- Add classpath container for Websphere Application Server 7 to the 
                  Eclipse project. --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;classpathContainers&gt;
                          &lt;classpathContainer&gt;org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v70/was.base.v7&lt;/classpathContainer&gt;
                          &lt;classpathContainer&gt;org.eclipse.jst.j2ee.internal.module.container&lt;/classpathContainer&gt;
                      &lt;/classpathContainers&gt;
                      &lt;projectNameTemplate&gt;${project.name}&lt;/projectNameTemplate&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Any suggestions, more info needed?</p>
  
  <p>thx</p>