Thanks Ioannis for the help. It resolved the issue " Invalid content was found 
starting with element 'bean'."

I have  following jar files copied to lib folder of servicemix installation  
directory 
commons-dbcp-1.2.2.jar commons-pool-1.4.jar ojdbc14.jar oraclexsql.jar
Do I need to do anything more to make these jars available to servicemix 
instance?
I am getting the following error
 java.lang.Exception: Could not start bundle 
spring:file:etc/activemq-broker.xml in feature(s) activemq-broker-4.2.0: 
Unresolved constraint in bundle activemq-broker.xml [367]: package; 
(package=org.apache.commons.dbcp)
        at 
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:302)
        at 
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:230)
        at 
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:226)
        at 
org.apache.felix.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:51)
        at 
org.apache.felix.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)
        at 
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:41)
        at 
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:34)
        at 
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:45)
        at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)
        at 
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:146)
        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)
        at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)
        at 
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
        at 
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:174)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle 
activemq-broker.xml [367]: package; (package=org.apache.commons.dbcp)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3295)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1653)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
        at 
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:294)
        ... 14 more

Regarding xsiSchemaLocation pointing  to 
http://activemq.apache.org/schema/core/activemq-core.xsd,
Smx 4.2 installation has activemq-broker.xml and was originally pointing to 
this xsd. Please let me know what is the correct xsd for this.

Thanks & regards
Gita

-----Original Message-----
From: iocanel [mailto:[email protected]] 
Sent: Wednesday, May 26, 2010 4:22 AM
To: [email protected]
Subject: Re: smx 4.2, activemq with oracle persistency



I gorgot to attach my activemq-broker.xml in my last post. Here it is.

gnanda wrote:
> 
> Hi All,
> I am trying to configure activemq with databse persistence as oracle.
> I have setup following in my activemq-broker.xml file
> 
>   <persistenceAdapter>
>             <jdbcPersistenceAdapter dataSource="#oracle-ds"/>
>         </persistenceAdapter>
> 
>   <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>   
>     <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
>     <property name="url"
> value="jdbc:oracle:thin:@rdsynergy003.north.pf.com:1521:synergy"/>
>     <property name="username" value="bus"/>
>     <property name="password" value="bus"/>
>      <property name="poolPreparedStatements" value="true"/>
>     
>   </bean>
> 

Hi granda!

I downloaded your configuration file, which had both the persistence adapter
and the datasource commented out and I noticed 2 things:

When I removed the comments the oracle-ds bean was declared inside the
broker element, which is wrong. You can move that bean outside the broker
element and it will work fine:

<broker xmlns="http://activemq.apache.org/schema/core"; ...>
<!-- Don't declare spring beans inside this -->
...
</broker>
<!-- Here is the place it should go -->
  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
  
    <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
    <property name="url"
value="jdbc:oracle:thin:@rdsynergy003.north.pf.com:1521:synergy"/>
    <property name="username" value="bus"/>
    <property name="password" value="bus"/>
     <property name="poolPreparedStatements" value="true"/>    
  </bean>

One other minor issue is that in your xsiSchemaLocation you are refering to
http://activemq.apache.org/schema/core/activemq-core.xsd   which does not
exists. This doesn't have to do with your problem but it would be good to
fix it so that you can validate your configuration and catch errors like the
one above before you deploy.

I hope that helps.




-----
Ioannis Canellos
http://iocanel.blogspot.com/ http://iocanel.blogspot.com/ 
-- 
View this message in context: 
http://old.nabble.com/smx-4.2%2C-activemq-with-oracle-persistency-tp28672822p28677771.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to