Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Are my "cant find type" messages anything to worry about?

The "can't find type" messages that you're seeing are warnings.  The only way to turn them off is to provide the appropriate libraries to ajc on the classpath.  I'd recommend this as the best approach if it's possible.

The bytecode weaver often needs to load unexpected types in order to determine if advice might apply to a particular join point.  For example, if you have the following before advice:

  before(): target(Mumble) && call(* *(..)) { ... }

This advice should be applied to every call where the target is an instance of the Mumble class.  To implement this, the bytecode weaver needs to insert some code before every call where the target could be an instance of the Mumble class.  This will require looking at the type hierarchies of all classes that are used as that target of a call -- which will require loading those classes.  There are many other situations where types might need to be loaded for non-obvious reasons.

This situation is clearly not the ideal.  Java's late binding makes it easy to use jar files with unresolved external dependencies so long as you don't call any of the methods that actual need those dependencies.  I hope contributors will help to improve this situation after 1.1.0.

-Jim


-----Original Message-----
From: Andrew Clement [mailto:CLEMAS@xxxxxxxxxx] 
Sent: Tuesday, February 18, 2003 6:28 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Are my "cant find type" messages anything to worry about?


Hi, 

I'm using aspectj1.1, I'm using the -injars and -aspectpath options.  I want to weave a tracing aspect library into an existing jar file. 

When I try this, it seems to work ok but I get lots of these messages: 

 can't find type javax.wsdl.xml.WSDLLocator 
 can't find type javax.jms.ExceptionListener 
 can't find type javax.jms.MessageListener 
 can't find type javax.jms.JMSException 
 can't find type javax.jms.Queue 
 can't find type javax.jms.Session 
 can't find type javax.jms.QueueConnectionFactory 
 can't find type javax.jms.Destination 
 can't find type javax.jms.MessageProducer 
 can't find type javax.wsdl.Part 

Which I imagine are due to the fact that the classpath I'm using when calling ajc doesn't include everything that was originally used to build my 'non-aspect' jar file. 
They don't say whether they are warnings/errors/info - and I don't know if I can stop them coming out?  Help!  Do I need to worry? 

cheers, 
Andy. 


Andy Clement 
AJDT Development


Back to the top