axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kates <bka...@ca.ibm.com>
Subject Re: [Axis2] Spring datasource inside AAR
Date Wed, 11 Jul 2007 23:47:40 GMT

<br><font size=2 face="sans-serif">Yeah, the problem was that I didn't
have the oracle jar in my tomcat common/lib. &nbsp;</font>
<br>
<br><font size=2 face="sans-serif">On to the next problem: &nbsp;how to
get it to load my Hibernate mapping files... :)</font>
<br>
<br><font size=2 face="sans-serif">Thanks.</font>
<br>
<br><font size=2 face="sans-serif">-Brian</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;robert lazarski&quot;
&lt;robertlazarski@gmail.com&gt;</b> </font>
<p><font size=1 face="sans-serif">07/11/2007 03:01 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
axis-dev@ws.apache.org</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">axis-dev@ws.apache.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Axis2] Spring datasource inside
AAR</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>Are you saying the same exact AAR worked in axis 1.1 but
doesn't in axis2 1.2 ? If so, can you try axis2 1.3 RC1 ? <br>
<br>
Robert <br>
</font>
<br><font size=3>On 7/11/07, <b>Brian Kates </b>&lt;</font><a
href=mailto:bkates@ca.ibm.com><font size=3 color=blue><u>bkates@ca.ibm.com</u></font></a><font
size=3>&gt;
wrote:</font>
<br><font size=2 face="sans-serif"><br>
I know that datasource with that driver works because I copied it directly
from an Axis 1.1 project. &nbsp;I'm not entirely sure how to package an
axis deployment outside of an AAR. &nbsp;I'll have to poke around for an
example. &nbsp;I'll let you know if I can run the project outside of an
AAR...</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Thanks.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
-Brian</font><font size=3> <br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=52%><font size=1 face="sans-serif"><b>&quot;robert lazarski&quot;
&lt;</b></font><a href=mailto:robertlazarski@gmail.com target=_blank><font
size=1 color=blue face="sans-serif"><b><u>robertlazarski@gmail.com</u></b></font></a><font
size=1 face="sans-serif"><b>&gt;</b>
</font>
<p><font size=1 face="sans-serif">07/11/2007 11:10 AM</font><font size=3>
</font>
<br>
<table border=4 width=100%>
<tr valign=top>
<td width=100% bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to</font><font
size=1 color=blue face="sans-serif"><u><br>
</u></font><a href="mailto:axis-dev@ws.apache.org" target=_blank><font
size=1 color=blue face="sans-serif"><u>axis-dev@ws.apache.org</u></font></a></div></table>
<p>
<td width=47%>
<br>
<table width=100%>
<tr valign=top>
<td width=16%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=83%><a href="mailto:axis-dev@ws.apache.org" target=_blank><font size=1
color=blue face="sans-serif"><u>axis-dev@ws.apache.org</u></font></a><font
size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Axis2] Spring datasource inside
AAR</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
</font><tt><font size=2><br>
It looks like your oracle driver doesn't accept those properties. I<br>
think you need to use the 10i drivers, even with 9i. That's what I<br>
did. My version looks identical at first glance.<br>
<br>
 &nbsp; &lt;bean id=&quot;myDataSource&quot;<br>
class=&quot;org.springframework.jdbc.datasource.DriverManagerDataSource&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;property name=&quot;driverClassName&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br>
<br>
 &nbsp; &nbsp; &nbsp; &lt;property name=&quot;url&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;value&gt;</font></tt><a
href=http://jdbc:oracle:thin:@luke.copperkey.com:1521/ target=_blank><tt><font
size=2 color=blue><u>jdbc:oracle:thin:@luke.copperkey.com:1521</u></font></tt></a><tt><font
size=2>:zion&lt;/value&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br>
<br>
 &nbsp; &nbsp; &nbsp; &lt;property name=&quot;username&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;value&gt;SMBDEMOGUSER&lt;/value&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br>
<br>
 &nbsp; &nbsp; &nbsp; &lt;property name=&quot;password&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;value&gt;SMBDEMOGUSER&lt;/value&gt;<br>
 &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br>
<br>
 &nbsp; &lt;/bean&gt;<br>
<br>
I know that works with axis2 1.2 and a recent svn. Note, I didn't<br>
deploy inside the AAR though. You might try outside the AAR first, and<br>
then let us know as it may be a bug. I do know I tested axis2 1.1 with<br>
mysql inside the AAR. There has been a few classloader issues with<br>
jdbc at certain points but until now those all seemed flushed out.<br>
<br>
HTH,<br>
Robert<br>
<br>
On 7/11/07, Brian Kates &lt;</font></tt><a href=mailto:bkates@ca.ibm.com
target=_blank><tt><font size=2 color=blue><u>bkates@ca.ibm.com</u></font></tt></a><tt><font
size=2>&gt;
wrote:<br>
&gt;<br>
&gt; I'm trying to setup a datasource to run inside an AAR. &nbsp;I'm using
the<br>
&gt; SpringInit class from the Axis 2 documentation. &nbsp;I have not modified
the<br>
&gt; class. &nbsp;My datasource defined in the application context is as
follows:<br>
&gt;<br>
&gt; &lt;bean id=&quot;dataSource&quot;<br>
&gt; class=&quot;org.springframework.jdbc.datasource.DriverManagerDataSource&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property<br>
&gt; name=&quot;driverClassName&quot;&gt;&lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;&lt;/property&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;url&quot;&gt;&lt;value&gt;URL&lt;/value&gt;&lt;/property&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;username&quot;&gt;&lt;value&gt;USER&lt;/value&gt;&lt;/property&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;password&quot;&gt;&lt;value&gt;PASSWORD&lt;/value&gt;&lt;/property&gt;<br>
&gt; &lt;/bean&gt;<br>
&gt;<br>
&gt; The big long stack trace is below. &nbsp;Any ideas?<br>
&gt;<br>
&gt; org.apache.axis2.deployment.DeploymentException: Processing<br>
&gt; Operations Modules with an error of Error creating bean with name<br>
&gt; 'dataSource' defined in class path resource [applicationContext.xml]:
Error<br>
&gt; setting property values; nested exception is<br>
&gt; PropertyAccessExceptionsException (1 errors)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:147)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:79)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:582)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:201)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:271)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:189)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:110)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:257)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:74)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:486)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:406)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardHost.start(StandardHost.java:736)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardService.start(StandardService.java:448)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.core.StandardServer.start(StandardServer.java:700)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.Catalina.start(Catalina.java:552)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Method.java:585)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)<br>
&gt; Caused by: org.apache.axis2.deployment.DeploymentException:<br>
&gt; Processing Operations Modules with an error of Error creating bean
with name<br>
&gt; 'dataSource' defined in class path resource [applicationContext.xml]:
Error<br>
&gt; setting property values; nested exception is<br>
&gt; PropertyAccessExceptionsException (1 errors)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:103)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:106)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:140)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 36 more<br>
&gt; Caused by: org.apache.axis2.deployment.DeploymentException:<br>
&gt; Processing Operations Modules with an error of Error creating bean
with name<br>
&gt; 'dataSource' defined in class path resource [applicationContext.xml]:
Error<br>
&gt; setting property values; nested exception is<br>
&gt; PropertyAccessExceptionsException (1 errors)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:381)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:98)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 38 more<br>
&gt; Caused by: org.apache.axis2.deployment.DeploymentException:<br>
&gt; Error creating bean with name 'dataSource' defined in class path resource<br>
&gt; [applicationContext.xml]: Error setting property values; nested exception
is<br>
&gt; PropertyAccessExceptionsException (1 errors)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:458)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:176)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 39 more<br>
&gt; Caused by:<br>
&gt; org.springframework.beans.factory.BeanCreationException:<br>
&gt; Error creating bean with name 'dataSource' defined in class path resource<br>
&gt; [applicationContext.xml]: Error setting property values; nested exception
is<br>
&gt; PropertyAccessExceptionsException (1 errors)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1066)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at service.SpringInit.startUp(SpringInit.java:35)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:454)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 40 more<br>
&gt; Caused by: PropertyAccessExceptionsException (1 errors)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:781)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:753)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1057)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 48 more<br>
&gt; ---------------------------------------------------------------------<br>
&gt; To unsubscribe, e-mail: </font></tt><a href="mailto:axis-dev-unsubscribe@ws.apache.org"
target=_blank><tt><font size=2 color=blue><u>axis-dev-unsubscribe@ws.apache.org</u></font></tt></a><tt><font
size=2><br>
&gt; For additional commands, e-mail: </font></tt><a href="mailto:axis-dev-help@ws.apache.org"
target=_blank><tt><font size=2 color=blue><u>axis-dev-help@ws.apache.org</u></font></tt></a><tt><font
size=2><br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe, e-mail: </font></tt><a href="mailto:axis-dev-unsubscribe@ws.apache.org"
target=_blank><tt><font size=2 color=blue><u>axis-dev-unsubscribe@ws.apache.org</u></font></tt></a><tt><font
size=2><br>
For additional commands, e-mail: </font></tt><a href="mailto:axis-dev-help@ws.apache.org"
target=_blank><tt><font size=2 color=blue><u>axis-dev-help@ws.apache.org</u></font></tt></a><tt><font
size=2><br>
</font></tt><font size=3><br>
<br>
--------------------------------------------------------------------- To
unsubscribe, e-mail: </font><a href="mailto:axis-dev-unsubscribe@ws.apache.org" target=_blank><font
size=3 color=blue><u>axis-dev-unsubscribe@ws.apache.org</u></font></a><font
size=3>
For additional commands, e-mail: </font><a href="mailto:axis-dev-help@ws.apache.org"
target=_blank><font size=3 color=blue><u>axis-dev-help@ws.apache.org</u></font></a><font
size=3>
</font>
<br>
<br>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message