In addition to what Samuel said.

Try packaging the working class files into a JAR and remove them from your "classes" output folder and add the JAR to your lib folder.

That way you are directly testing the same thing.
I too don't see why this would be an issue but the above should make it clear.

I suspect the classes in your JAR and the classes you are testing outside your JAR are not the same classes and you may perhaps be doing something unintentional like not configuring your web.xml appropriately i.e. still say pointing to the test classes outside the JAR.

If you still can't figure it out then posting an ActionBean class from your JAR and one outside as well as your web.xml might help.

--Nikolaos



samuel baudouin wrote:
Damien,

Normally, there is no difference between the jar and source/classes
folder since, as you may know, a jar is simply a zip file of the
.class files with some additional metadata.

If you are sure that the jar is indeed in the classpath, and one of
its class is available to another class in the source/classes folder
(ie: try to construct an object of the jar out of the jar) at runtime,
then maybe the problem comes from the way you build the jar.

If I were you that's where I would try to investigate!

Cheers,

Sam

On 4/29/11, Damien Chen <damien.c...@arcs.org.au> wrote:
Thanks for the reply.

I've done some tests and it seems like these is no problem with scanning the
beans, the problem is the annotations in the beans are not processed.

The annotations like
@UrlBinding("/user/manager/groups.html")
@Table(name="group_info")

do not work.

If I add all these java files to the source tree directly, then the
annotations work all well.

Does the jar do something special to the annotation? Is this a common issue?

On Thu, Apr 28, 2011 at 12:20 AM, Hussachai Puripunpinyo <
hussac...@gmail.com> wrote:

Hi Damien

If you put the jar that contains you ActionBean classes to classpath such
as WEB-INF/lib directory in Tomcat,
it should be in classpath, otherwise it's serious bug in Tomcat.
I think the problem is not classpath problem but it's URL mapping problem.
You have to examine Stripes debug log to see what happen or you just use
@UrlBinding annotation
to override default generated URL mapping and try again.

Hope this help. Good luck!

--
Sincerely Yours
Hussachai Puripunpinyo
http://www.siberhus.com/

On Wed, Apr 27, 2011 at 3:01 AM, Damien Chen
<damien.c...@arcs.org.au>wrote:

Hi,

I have action beans which are in a jar package. I have
configured ActionResolver.Packages in web.xml like normal way. The action
beans couldn't be found. Is there a way to handle the action bean in jar?
 I'm using striptes 1.5.6 and tomcat 6.

Any help would be much appreciated.

Damien


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users






------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users






--
Nikolaos Giannopoulos
Director, Information Technology
BrightMinds Software Inc.
e. nikol...@brightminds.org
w. www.brightminds.org
t. 1.613.822.1700
c. 1.613.797.0036
f. 1.613.822.1915

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to