You shouldn't need to do this. Just add the hibernate.jar to the classpath
of your container.

What about using Spring for the injection:

http://ws.apache.org/axis2/1_1_1/spring.html

The Axis2 classloader strategy by default does not permit Spring to run
inside the AAR. To allow Spring to run inside the AAR, the 'composite'
parameter is used in the services.xml as shown in the example above. The
behavior of 'composite' was the default in the development cycle in between
1.0 and 1.1, but it resulted in the JIRA issue AXIS2-1214 - essentially
problems with getting an initContext.lookup() handle inside the AAR. Spring
users typically have little desire to use initContext.lookup() however, as
they get their Datasources via
org.springframework.jdbc.datasource.DriverManagerDataSource in an xml file
or with annotations. For ejb home references and the like, Spring provides
JndiObjectFactoryBean. While fully testing JndiObjectFactoryBean with ejb
has not been done yet - if you do, please send a message to the axis users
list - Datasources via Spring inside the AAR have been tested. Basically it
works as typically done with Spring, though if you are passing Hibernate XML
files you need to put them in a place where Spring will find them. The most
flexible way is as follows, using logging in DEBUG mode to see where Spring
will look in your jar / class locations:

<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
                <property name="mappingLocations">
                   <value>classpath*:**/MyEntity.hbm.xml</value>
                </property>
                ...
    </bean> 
 

-----Original Message-----
From: jnedzel [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 27, 2007 9:29 AM
To: axis-user@ws.apache.org
Subject: axis2: classpath and jars in an aar?

Could someone point me towards documentation that explains where to put
third-party jars in an aar file and how to put them on the service's
classpath?

I'm trying to build an axis2 service that uses hibernate, but I don't know
where to put the hibernate jar files inside the aar ( /lib? root? 
META-INF/lib?).  I've tried putting them in various places, but still get
NoClassDefFound errors.

I've looked through the Axis2 documentation, but haven't been able to find
where this is explained.

Thanks,

Jared Nedzel


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

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

Reply via email to