0 Replies Latest reply on Oct 31, 2010 11:34 AM by Jakub K

    Stateless Stereotype - is this possible?

    Jakub K Newbie
      Hi

      Is this possible to define a stereotype that is marked as a stateless? I am asking becouse I cannot find an answer in spec. and proof of concept throws some exceptipons



      `@Named
      @Stereotype
      @Target({ElementType.TYPE,ElementType.FIELD,ElementType.METHOD})
      @Retention(RetentionPolicy.RUNTIME)
      @Stateless
      public @interface Action {

      }`

      when I deploy any bean marked with this stereotype on glassfish I see exception that is attached in the end of this post. App is deployed as war archive.
      When I move the @Stateless from stereotype directly to bean it works ok.

      I would be grateful for any hints.




      "[#|2010-10-29T10:53:25.171+0200|SEVERE|glassfish3.0.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=23;_ThreadName=Thread-1;|Exception while loading the app
      org.glassfish.deployment.common.DeploymentException
              at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:167)
              at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
              at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
              at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
              at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
              at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
              at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
              at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
              at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
              at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
              at java.util.TimerThread.mainLoop(Timer.java:512)
              at java.util.TimerThread.run(Timer.java:462)
      Caused by: java.lang.NullPointerException
              at org.jboss.weld.util.Beans.getInitializerMethods(Beans.java:395)
              at org.jboss.weld.bean.AbstractClassBean.initInitializerMethods(AbstractClassBean.java:252)
              at org.jboss.weld.bean.AbstractClassBean.<init>(AbstractClassBean.java:164)
              at org.jboss.weld.bean.SessionBean.<init>(SessionBean.java:125)
              at org.jboss.weld.bean.SessionBean.of(SessionBean.java:109)
              at org.jboss.weld.bootstrap.AbstractBeanDeployer.createSessionBean(AbstractBeanDeployer.java:262)
              at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:117)
              at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:151)
              at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:377)
              at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:165)
              ... 18 more
      |#]
      "