Thanks,
It almost works, there is only exception in class from cglib.jar (used by
hibernate), it is included in classpath but merlin cannot find it.
Other classes from jar included in block classloader are loaded
succesfully.I think it's problem with running this test case from ant. Any
ideas?

    [junit] ---- exception
report ----------------------------------------------
------------
    [junit] Exception: org.apache.avalon.merlin.KernelException
    [junit] Message: Kernel startup failure.
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception: org.apache.avalon.merlin.KernelException
    [junit] Message: Application deployment failure.
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception:
org.apache.avalon.activation.appliance.DeploymentExceptio
n
    [junit] Message: Composite deployment failure in block:
[block:/mrt-vend-cli
ent]
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception:
org.apache.avalon.activation.lifecycle.LifecycleException

    [junit] Message: Unable to create a new component instance in appliance
[/mr
t-vend-client/hibernate-service] due to a component deployment failure.
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception:
org.apache.avalon.activation.lifecycle.LifecycleException

    [junit] Message: Component initiated initialization failure.
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception: net.sf.cglib.core.CodeGenerationException
    [junit] Message: java.lang.reflect.InvocationTargetException-->null
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception: java.lang.reflect.InvocationTargetException
    [junit] Message: null
    [junit] ---- 
cause ---------------------------------------------------------
------------
    [junit] Exception: java.lang.NoClassDefFoundError
    [junit] Message: net/sf/cglib/reflect/FastClass
    [junit] ---- stack
trace ---------------------------------------------------
------------
    [junit] java.lang.NoClassDefFoundError: net/sf/cglib/reflect/FastClass
    [junit] java.lang.ClassLoader.defineClass0(Native Method)
    [junit] java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    [junit] java.lang.ClassLoader.defineClass(ClassLoader.java:382)
    [junit] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
.java:39)
    [junit]
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
ssorImpl.java:25)
    [junit] java.lang.reflect.Method.invoke(Method.java:324)
    [junit]
net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:373)
    [junit]
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerat
or.java:193)
    [junit]
net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:92)
    [junit] net.sf.cglib.reflect.FastClass.create(FastClass.java:74)
    [junit]
net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEn
tityPersister.java:757)
    [junit]
net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.ja
va:715)
    [junit]
net.sf.hibernate.persister.PersisterFactory.createClassPersister(Per
sisterFactory.java:41)
    [junit]
net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.j
ava:137)
    [junit]
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration
.java:750)
    [junit]
com.mrt.service.hibernate.HibernateServiceImpl.initialize(HibernateS
erviceImpl.java:83)
    [junit]
org.apache.avalon.activation.appliance.impl.DefaultAppliance.applyIn
itialization(DefaultAppliance.java:991)
    [junit]
org.apache.avalon.activation.appliance.impl.DefaultAppliance.access$
1300(DefaultAppliance.java:109)
    [junit]
org.apache.avalon.activation.appliance.impl.DefaultAppliance$Standar
dFactory.newInstance(DefaultAppliance.java:1326)
    [junit]
org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandle
r.refreshReference(SingletonLifestyleHandler.java:138)
    [junit]
org.apache.avalon.activation.lifestyle.impl.SingletonLifestyleHandle
r.resolve(SingletonLifestyleHandler.java:88)
    [junit]
org.apache.avalon.activation.appliance.impl.DefaultAppliance.resolve
(DefaultAppliance.java:583)
    [junit]
org.apache.avalon.activation.appliance.impl.DefaultAppliance.deploy(
DefaultAppliance.java:519)
    [junit]
org.apache.avalon.activation.appliance.impl.AbstractBlock.deploy(Abs
tractBlock.java:712)
    [junit]
org.apache.avalon.activation.appliance.impl.BlockThread.run(BlockThr
ead.java:111)




[junit] --------------------------------------------------------------------
------------

    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 9,938 sec
    [junit] [DEBUG  ] (kernel): shutdown event
    [junit] TEST com.mrt.vend.impl.tests.LocationDAOServiceTest FAILED
----- Original Message ----- 
From: "Stephen McConnell" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 4:49 PM
Subject: Re: Ant,JUnit and AbstractMerlinTestCase


Jarosław Pałka wrote:

>
>>A couple of approaches.  Either put the block descriptor into you
>>test-classes directory under the path
>><test-classes>/BLOCK-INF/block.xml, or alternatively, create a
>>standalone block defintion that references the test-classes directory in
>>a fileset include.
>
> when I include test-classes directory(build/classes), which in fact
includes
> service classes and component descriptions, can I put block.xml in
different
> directory in example src/conf/block.xml?

Yes.  You can do this by declaring an explicit block using the property
merlin.deployment. The merlin.deployment property can hold a comma
seperated list of block descriptors.  Each block descriptor must be
standalone.

Stephen.

-- 

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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


----------------------------------------------------------------------
Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f17cb







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

Reply via email to