You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ne...@yahoo.com.tw on 2007/10/20 19:07:59 UTC

maven compile ejb example error

I follow the example from http://cwiki.apache.org/GMOxDOC20/very-simple-entity-ejb-example.html. Whilst compiling the source, the maven issues error with 

cannot find symbol
symbol  : class Stateless
location: package javax.ejb

I think that is because the bean class import the javax.ejb.Stateless class which can not be found even by including dependency as follow:

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee_1.4_spec</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

The unzipped jar shows no Stateless class file in the geronimo-j2ee_1.4_spec.jar

What should I do in order to get the source compiled correctly?

Thank you very much


       杜絕網路駭客,保障帳號安全 - 馬上設定 Yahoo!奇摩安全圖章!

Re: maven compile ejb example error

Posted by ne...@yahoo.com.tw.
According to your suggestion the problem is solved now.

Thank you very much.

Tim Kettler <ti...@udo.edu> 說: Hi,

the Stateless annotation is part of the ejb api. You need this artifact:

  
    org.apache.geronimo.specs
    geronimo-ejb_3.0_spec
    1.0
  

-Tim

newbie_tw@yahoo.com.tw schrieb:
> I follow the example from http://cwiki.apache.org/GMOxDOC20/very-simple-entity-ejb-example.html. Whilst compiling the source, the maven issues error with 
> 
> cannot find symbol
> symbol  : class Stateless
> location: package javax.ejb
> 
> I think that is because the bean class import the javax.ejb.Stateless class which can not be found even by including dependency as follow:
> 
>         
>             org.apache.geronimo.specs
>             geronimo-j2ee_1.4_spec
>             1.0
>             provided
>         
> 
> The unzipped jar shows no Stateless class file in the geronimo-j2ee_1.4_spec.jar
> 
> What should I do in order to get the source compiled correctly?
> 
> Thank you very much
> 
> 
>        杜絕網路駭客,保障帳號安全 - 馬上設定 Yahoo!奇摩安全圖章!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



       杜絕網路駭客,保障帳號安全 - 馬上設定 Yahoo!奇摩安全圖章!

Re: maven compile ejb example error

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

the Stateless annotation is part of the ejb api. You need this artifact:

  <dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-ejb_3.0_spec</artifactId>
    <version>1.0</version>
  </dependency>

-Tim

newbie_tw@yahoo.com.tw schrieb:
> I follow the example from http://cwiki.apache.org/GMOxDOC20/very-simple-entity-ejb-example.html. Whilst compiling the source, the maven issues error with 
> 
> cannot find symbol
> symbol  : class Stateless
> location: package javax.ejb
> 
> I think that is because the bean class import the javax.ejb.Stateless class which can not be found even by including dependency as follow:
> 
>         <dependency>
>             <groupId>org.apache.geronimo.specs</groupId>
>             <artifactId>geronimo-j2ee_1.4_spec</artifactId>
>             <version>1.0</version>
>             <scope>provided</scope>
>         </dependency>
> 
> The unzipped jar shows no Stateless class file in the geronimo-j2ee_1.4_spec.jar
> 
> What should I do in order to get the source compiled correctly?
> 
> Thank you very much
> 
> 
>        杜絕網路駭客,保障帳號安全 - 馬上設定 Yahoo!奇摩安全圖章!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org