2 Replies Latest reply on Mar 30, 2010 3:26 AM by Ignacio de Cordoba

    CDI JSF @Named classes not working in lib jar but ok in classes

    Ignacio de Cordoba Novice
      Hi there,
      i have a strange situation using Glassfish V3. If I put my JSF classes (I annotate the with @Named and @RequestScoped) they are not recognized in JSF pages... null. I get the following empty message in log (I should get the [] full of @Named classnames):

      [#|2010-03-23T01:00:26.911+0100|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=28;_ThreadName=Thread-1;|nullID: /Users/icordoba/Sites/cervatOH2Web/ CLASSES: []

      The weird thing is that if I unpack /WEB-INF/lib/archive.jar into /WEB-INF/classes/ dir (and rebook the app) they are recognized and they work OK in my JSF2 pages. Not if I leave them in /WEB-INF/lib/archive.jar

      The rest of the classes (EJBs, SessionBeans, etc...) work fine in jars and I only have to unpack the @Named classes to be able to use them directly in my JSFs.

      I am sure I must be missing something. Any idea on what's going on? Could anybody confirm me that as I suppouse, there should be no difference in packing the CDI classes in a jar or leave them unpaccked in /classes dir?


      Thanks
      Ignacio