David,

On 5/23/05, David J. M. Karlsen <[EMAIL PROTECTED]> wrote:
> Knut Wannheden wrote:
> 
> 
> Hi - I took the javassist approach now, the code follows.
> I get an exception at classFab.addField("_delegate", topClass); in the
> createInfrastructure method.
> 
> The error is: Unable to process content of element construct/service:
> Unable to lookup $PooledProxy_1040a2b0b42_32:
> $PooledProxy_1040a2b0b42_32 (DefaultErrorHandler.java:37)
> 
> 
> Can you see why?
> 

The problem is a class loader issue. You're creating your own
ClassFactory instance, which in turn uses its own Javassist ClassPool,
which can't find the PooledProxy class HiveMind created using its own
ClassPool. You'll have to use HiveMind's ClassFactory.

For this you should define a setFactory(ClassFactory) method on your
interceptor factory and then add a line like this to the <construct>
of your interceptor factory service:

 <set-service property="factory" service-id="hivemind.ClassFactory"/>

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to