You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by florian M <fl...@gmail.com> on 2008/12/31 11:53:37 UTC

error deploying an oracle pooling osgi:service

Hi,

I'm trying to deploy a osgi:service that exposes an oracle datasource with a
pool on servicemix 4 as treated in Ade's blog  http://trenaman.blogspot.com/
Ade On Middleware .

I have already wrapped my oracle driver, and installed the commons-dbcp
bundle without errors, but when I drop my spring file in servicemix I have a
saxParseException, like this : 

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
1 in XML document from URL [bundle://165.0:0/META-INF/spring/beans.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.

My spring file :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:osgi="http://www.springframework.org/schema/osgi"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi
  ">

<bean id="oraclePoolingDS" class="org.apache.commons.dbcp.BasicDataSource">
	<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
	<property name="url" value="jdbc:oracle:thin:@demo2003:1521:sisError"/>
	<property name="username" value="flmorello"/>
	<property name="password" value="brainless"/>
	<property name="maxActive" value="10"/>
	<property name="poolPreparedStatements" value="true"/>
</bean>

    <osgi:service id="oraclePoolingDSService" ref="oraclePoolingDS" 
      auto-export="all-classes"/>

</beans>


When I remove the osgi:service bean I don't have the error, so I think it's
not really a parsing exception, any idea would be greatly appreciated !!

Thanks,

Florian
-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21229772.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: RES: error deploying an oracle pooling osgi:service

Posted by gabspeck <ga...@datasul.com.br>.
Well, nevermind, we've found out that we needed the jt400 driver anyway,
which is open-source :)

Thanks for your reply anyway.
Regards,
Gabriel S

Adrian Trenaman-2 wrote:
> 
> Oooh. Now that's a difficult question. I think there are no lawyers on  
> this list, and, I'm confident that even if there was this might have  
> to be answered on a case-by-case basis.
> 
> The real question is "are we modifying the JAR?"
> 
> * If you unzip the JAR and add a MANIFEST.MF to OSGi-fy the bundle,  
> then you've made modification and so you may be in trouble.
> * If, however, you wrap the JAR (e.g. installing using the wrap:  
> prefix into the SMX4 runtime) then AFAIK you're wrapping the JAR, not  
> modifying it. So, you should be OK.
> 
> Does anyone else have any input on this?
> 
> /Ade
> 
> On 2 Jan 2009, at 10:57, gabspeck wrote:
> 
>>
>> Hello,
>>
>> I'm working with Anderson on a project that needs the JDBC driver  
>> for DB2,
>> which is not free software. Are there any legal restrictions for  
>> modifying
>> the driver's JAR in order to "osgify" it?
>>
>> Thanks in advance,
>>
>> Gabriel S
>>
>>
>>
>> florian M wrote:
>>>
>>>
>>> 1. Yes
>>> 2. Yes
>>>
>>> :) Simple !!
>>>
>>>
>>> Anderson Nielson wrote:
>>>>
>>>> So...
>>>> 1. Should I use the same postgress jar and just replace the  
>>>> "osgified"
>>>> manifest file?
>>>> 2. And how about deploying it? Just to put in the deploy folder?
>>>>
>>>> B.R.
>>>> - Anderson
>>>>
>>>>
>>>>
>>>> 2008/12/31 florian M <fl...@gmail.com>
>>>>
>>>>>
>>>>> You have to modify the MANIFEST file of the jar to make it a  
>>>>> bundle :
>>>>> more
>>>>> informations
>>>>> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
>>>>> here
>>>>>
>>>>>
>>>>>
>>>>> Anderson Nielson-3 wrote:
>>>>>>
>>>>>>
>>>>>> How to wrap and deploy the JDBC driver?
>>>>>> I would like to wrap postgres driver. Could you please provide  
>>>>>> some
>>>>> sample
>>>>>> or guidelines.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21250070.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
>   adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21369717.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: RES: error deploying an oracle pooling osgi:service

Posted by Guillaume Nodet <gn...@gmail.com>.
I think you're right.
Note that OSGi also allows a bundle to embed jars, so one may be able
to build a real OSGi bundle and embed the jar instead of repackaging
it.  This is done through the use of the Bundle-Classpath manifest
header iirc.

On Thu, Jan 8, 2009 at 20:52, Adrian Trenaman <tr...@progress.com> wrote:
> Oooh. Now that's a difficult question. I think there are no lawyers on this
> list, and, I'm confident that even if there was this might have to be
> answered on a case-by-case basis.
>
> The real question is "are we modifying the JAR?"
>
> * If you unzip the JAR and add a MANIFEST.MF to OSGi-fy the bundle, then
> you've made modification and so you may be in trouble.
> * If, however, you wrap the JAR (e.g. installing using the wrap: prefix into
> the SMX4 runtime) then AFAIK you're wrapping the JAR, not modifying it. So,
> you should be OK.
>
> Does anyone else have any input on this?
>
> /Ade
>
> On 2 Jan 2009, at 10:57, gabspeck wrote:
>
>>
>> Hello,
>>
>> I'm working with Anderson on a project that needs the JDBC driver for DB2,
>> which is not free software. Are there any legal restrictions for modifying
>> the driver's JAR in order to "osgify" it?
>>
>> Thanks in advance,
>>
>> Gabriel S
>>
>>
>>
>> florian M wrote:
>>>
>>>
>>> 1. Yes
>>> 2. Yes
>>>
>>> :) Simple !!
>>>
>>>
>>> Anderson Nielson wrote:
>>>>
>>>> So...
>>>> 1. Should I use the same postgress jar and just replace the "osgified"
>>>> manifest file?
>>>> 2. And how about deploying it? Just to put in the deploy folder?
>>>>
>>>> B.R.
>>>> - Anderson
>>>>
>>>>
>>>>
>>>> 2008/12/31 florian M <fl...@gmail.com>
>>>>
>>>>>
>>>>> You have to modify the MANIFEST file of the jar to make it a bundle :
>>>>> more
>>>>> informations
>>>>> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
>>>>> here
>>>>>
>>>>>
>>>>>
>>>>> Anderson Nielson-3 wrote:
>>>>>>
>>>>>>
>>>>>> How to wrap and deploy the JDBC driver?
>>>>>> I would like to wrap postgres driver. Could you please provide some
>>>>>
>>>>> sample
>>>>>>
>>>>>> or guidelines.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21250070.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
>  adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
>
>
>
>
>
>
>
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

RES: RES: error deploying an oracle pooling osgi:service

Posted by Anderson Nielson <an...@datasul.com.br>.
IANAL but, as I told Gabriel, I am building a way to access de DB2 DBMS. I am delegating to the "lib" the lib responsabilities using some wrapper. I did not change the jar just build some jar that use that one.   

B.R.
-Anderson


-----Mensagem original-----
De: Adrian Trenaman [mailto:trenaman@progress.com]
Enviada: qui 8/1/2009 17:52
Para: users@servicemix.apache.org
Assunto: Re: RES: error deploying an oracle pooling osgi:service
 
Oooh. Now that's a difficult question. I think there are no lawyers on  
this list, and, I'm confident that even if there was this might have  
to be answered on a case-by-case basis.

The real question is "are we modifying the JAR?"

* If you unzip the JAR and add a MANIFEST.MF to OSGi-fy the bundle,  
then you've made modification and so you may be in trouble.
* If, however, you wrap the JAR (e.g. installing using the wrap:  
prefix into the SMX4 runtime) then AFAIK you're wrapping the JAR, not  
modifying it. So, you should be OK.

Does anyone else have any input on this?

/Ade

On 2 Jan 2009, at 10:57, gabspeck wrote:

>
> Hello,
>
> I'm working with Anderson on a project that needs the JDBC driver  
> for DB2,
> which is not free software. Are there any legal restrictions for  
> modifying
> the driver's JAR in order to "osgify" it?
>
> Thanks in advance,
>
> Gabriel S
>
>
>
> florian M wrote:
>>
>>
>> 1. Yes
>> 2. Yes
>>
>> :) Simple !!
>>
>>
>> Anderson Nielson wrote:
>>>
>>> So...
>>> 1. Should I use the same postgress jar and just replace the  
>>> "osgified"
>>> manifest file?
>>> 2. And how about deploying it? Just to put in the deploy folder?
>>>
>>> B.R.
>>> - Anderson
>>>
>>>
>>>
>>> 2008/12/31 florian M <fl...@gmail.com>
>>>
>>>>
>>>> You have to modify the MANIFEST file of the jar to make it a  
>>>> bundle :
>>>> more
>>>> informations
>>>> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
>>>> here
>>>>
>>>>
>>>>
>>>> Anderson Nielson-3 wrote:
>>>>>
>>>>>
>>>>> How to wrap and deploy the JDBC driver?
>>>>> I would like to wrap postgres driver. Could you please provide  
>>>>> some
>>>> sample
>>>>> or guidelines.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21250070.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

---
Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
Progress Software Corp
Shelbourne Road, Dublin 4, Ireland
---
+353-1-637-2659 (Office)
+353-1-637-2882 (Fax)
+353-86-6051026 (Mobile)
  adrian.trenaman (Skype)
----
Blog: http://trenaman.blogspot.com










Re: RES: error deploying an oracle pooling osgi:service

Posted by Adrian Trenaman <tr...@progress.com>.
Oooh. Now that's a difficult question. I think there are no lawyers on  
this list, and, I'm confident that even if there was this might have  
to be answered on a case-by-case basis.

The real question is "are we modifying the JAR?"

* If you unzip the JAR and add a MANIFEST.MF to OSGi-fy the bundle,  
then you've made modification and so you may be in trouble.
* If, however, you wrap the JAR (e.g. installing using the wrap:  
prefix into the SMX4 runtime) then AFAIK you're wrapping the JAR, not  
modifying it. So, you should be OK.

Does anyone else have any input on this?

/Ade

On 2 Jan 2009, at 10:57, gabspeck wrote:

>
> Hello,
>
> I'm working with Anderson on a project that needs the JDBC driver  
> for DB2,
> which is not free software. Are there any legal restrictions for  
> modifying
> the driver's JAR in order to "osgify" it?
>
> Thanks in advance,
>
> Gabriel S
>
>
>
> florian M wrote:
>>
>>
>> 1. Yes
>> 2. Yes
>>
>> :) Simple !!
>>
>>
>> Anderson Nielson wrote:
>>>
>>> So...
>>> 1. Should I use the same postgress jar and just replace the  
>>> "osgified"
>>> manifest file?
>>> 2. And how about deploying it? Just to put in the deploy folder?
>>>
>>> B.R.
>>> - Anderson
>>>
>>>
>>>
>>> 2008/12/31 florian M <fl...@gmail.com>
>>>
>>>>
>>>> You have to modify the MANIFEST file of the jar to make it a  
>>>> bundle :
>>>> more
>>>> informations
>>>> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
>>>> here
>>>>
>>>>
>>>>
>>>> Anderson Nielson-3 wrote:
>>>>>
>>>>>
>>>>> How to wrap and deploy the JDBC driver?
>>>>> I would like to wrap postgres driver. Could you please provide  
>>>>> some
>>>> sample
>>>>> or guidelines.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21250070.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

---
Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
Progress Software Corp
Shelbourne Road, Dublin 4, Ireland
---
+353-1-637-2659 (Office)
+353-1-637-2882 (Fax)
+353-86-6051026 (Mobile)
  adrian.trenaman (Skype)
----
Blog: http://trenaman.blogspot.com









Re: RES: error deploying an oracle pooling osgi:service

Posted by gabspeck <ga...@datasul.com.br>.
Hello,

I'm working with Anderson on a project that needs the JDBC driver for DB2,
which is not free software. Are there any legal restrictions for modifying
the driver's JAR in order to "osgify" it?

Thanks in advance,

Gabriel S



florian M wrote:
> 
> 
> 1. Yes
> 2. Yes
> 
> :) Simple !!
> 
> 
> Anderson Nielson wrote:
>> 
>> So...
>> 1. Should I use the same postgress jar and just replace the "osgified"
>> manifest file?
>> 2. And how about deploying it? Just to put in the deploy folder?
>> 
>> B.R.
>> - Anderson
>> 
>> 
>> 
>> 2008/12/31 florian M <fl...@gmail.com>
>> 
>>>
>>> You have to modify the MANIFEST file of the jar to make it a bundle :
>>> more
>>> informations
>>> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
>>> here
>>>
>>>
>>>
>>> Anderson Nielson-3 wrote:
>>> >
>>> >
>>> > How to wrap and deploy the JDBC driver?
>>> > I would like to wrap postgres driver. Could you please provide some
>>> sample
>>> > or guidelines.
>>> >
>>> > Thanks
>>> >
>>> >
>>> --
>>> View this message in context:
>>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21250070.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: RES: error deploying an oracle pooling osgi:service

Posted by florian M <fl...@gmail.com>.

1. Yes
2. Yes

:) Simple !!


Anderson Nielson wrote:
> 
> So...
> 1. Should I use the same postgress jar and just replace the "osgified"
> manifest file?
> 2. And how about deploying it? Just to put in the deploy folder?
> 
> B.R.
> - Anderson
> 
> 
> 
> 2008/12/31 florian M <fl...@gmail.com>
> 
>>
>> You have to modify the MANIFEST file of the jar to make it a bundle :
>> more
>> informations
>> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
>> here
>>
>>
>>
>> Anderson Nielson-3 wrote:
>> >
>> >
>> > How to wrap and deploy the JDBC driver?
>> > I would like to wrap postgres driver. Could you please provide some
>> sample
>> > or guidelines.
>> >
>> > Thanks
>> >
>> >
>> --
>> View this message in context:
>> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231640.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: RES: error deploying an oracle pooling osgi:service

Posted by Anderson Nielson <an...@gmail.com>.
So...
1. Should I use the same postgress jar and just replace the "osgified"
manifest file?
2. And how about deploying it? Just to put in the deploy folder?

B.R.
- Anderson



2008/12/31 florian M <fl...@gmail.com>

>
> You have to modify the MANIFEST file of the jar to make it a bundle : more
> informations
> http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
> here
>
>
>
> Anderson Nielson-3 wrote:
> >
> >
> > How to wrap and deploy the JDBC driver?
> > I would like to wrap postgres driver. Could you please provide some
> sample
> > or guidelines.
> >
> > Thanks
> >
> >
> --
> View this message in context:
> http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: RES: error deploying an oracle pooling osgi:service

Posted by florian M <fl...@gmail.com>.
You have to modify the MANIFEST file of the jar to make it a bundle : more
informations  http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
here 



Anderson Nielson-3 wrote:
> 
> 
> How to wrap and deploy the JDBC driver?
> I would like to wrap postgres driver. Could you please provide some sample
> or guidelines.
> 
> Thanks
> 
> 
-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21231285.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RES: error deploying an oracle pooling osgi:service

Posted by Anderson Nielson <an...@datasul.com.br>.
How to wrap and deploy the JDBC driver?
I would like to wrap postgres driver. Could you please provide some sample or guidelines.

Thanks

-----Mensagem original-----
De: florian M [mailto:flmorello@gmail.com]
Enviada: qua 31/12/2008 09:37
Para: users@servicemix.apache.org
Assunto: Re: error deploying an oracle pooling osgi:service
 

That's right, it works, at least I don't have any error on deployment ! I use
this namespace for auto-completion with eclipse, I didn't have problems on
other projects. Thanks a lot !!!

Florian


Freeman Fang wrote:
> 
> Hi Florian,
> I think your xsi:schemaLocation  is incorrect.
> It should be
> xsi:schemaLocation="http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>                                     
> http://www.springframework.org/schema/osgi 
> http://www.springframework.org/schema/osgi/spring-osgi.xsd"
> Freeman
> florian M wrote:
>> Hi,
>>
>> I'm trying to deploy a osgi:service that exposes an oracle datasource
>> with a
>> pool on servicemix 4 as treated in Ade's blog 
>> http://trenaman.blogspot.com/
>> Ade On Middleware .
>>
>> I have already wrapped my oracle driver, and installed the commons-dbcp
>> bundle without errors, but when I drop my spring file in servicemix I
>> have a
>> saxParseException, like this : 
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>> Line
>> 1 in XML document from URL [bundle://165.0:0/META-INF/spring/beans.xml]
>> is
>> invalid; nested exception is org.xml.sax.SAXParseException: White spaces
>> are
>> required between publicId and systemId.
>>
>> My spring file :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>   xmlns:osgi="http://www.springframework.org/schema/osgi"
>>   xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>   http://www.springframework.org/schema/osgi
>> http://www.springframework.org/schema/osgi
>>   ">
>>
>> <bean id="oraclePoolingDS"
>> class="org.apache.commons.dbcp.BasicDataSource">
>> 	<property name="driverClassName"
>> value="oracle.jdbc.driver.OracleDriver"/>
>> 	<property name="url" value="jdbc:oracle:thin:@demo2003:1521:sisError"/>
>> 	<property name="username" value="flmorello"/>
>> 	<property name="password" value="brainless"/>
>> 	<property name="maxActive" value="10"/>
>> 	<property name="poolPreparedStatements" value="true"/>
>> </bean>
>>
>>     <osgi:service id="oraclePoolingDSService" ref="oraclePoolingDS" 
>>       auto-export="all-classes"/>
>>
>> </beans>
>>
>>
>> When I remove the osgi:service bean I don't have the error, so I think
>> it's
>> not really a parsing exception, any idea would be greatly appreciated !!
>>
>> Thanks,
>>
>> Florian
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21230228.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



Re: error deploying an oracle pooling osgi:service

Posted by florian M <fl...@gmail.com>.
That's right, it works, at least I don't have any error on deployment ! I use
this namespace for auto-completion with eclipse, I didn't have problems on
other projects. Thanks a lot !!!

Florian


Freeman Fang wrote:
> 
> Hi Florian,
> I think your xsi:schemaLocation  is incorrect.
> It should be
> xsi:schemaLocation="http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>                                     
> http://www.springframework.org/schema/osgi 
> http://www.springframework.org/schema/osgi/spring-osgi.xsd"
> Freeman
> florian M wrote:
>> Hi,
>>
>> I'm trying to deploy a osgi:service that exposes an oracle datasource
>> with a
>> pool on servicemix 4 as treated in Ade's blog 
>> http://trenaman.blogspot.com/
>> Ade On Middleware .
>>
>> I have already wrapped my oracle driver, and installed the commons-dbcp
>> bundle without errors, but when I drop my spring file in servicemix I
>> have a
>> saxParseException, like this : 
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
>> Line
>> 1 in XML document from URL [bundle://165.0:0/META-INF/spring/beans.xml]
>> is
>> invalid; nested exception is org.xml.sax.SAXParseException: White spaces
>> are
>> required between publicId and systemId.
>>
>> My spring file :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>   xmlns:osgi="http://www.springframework.org/schema/osgi"
>>   xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>   http://www.springframework.org/schema/osgi
>> http://www.springframework.org/schema/osgi
>>   ">
>>
>> <bean id="oraclePoolingDS"
>> class="org.apache.commons.dbcp.BasicDataSource">
>> 	<property name="driverClassName"
>> value="oracle.jdbc.driver.OracleDriver"/>
>> 	<property name="url" value="jdbc:oracle:thin:@demo2003:1521:sisError"/>
>> 	<property name="username" value="flmorello"/>
>> 	<property name="password" value="brainless"/>
>> 	<property name="maxActive" value="10"/>
>> 	<property name="poolPreparedStatements" value="true"/>
>> </bean>
>>
>>     <osgi:service id="oraclePoolingDSService" ref="oraclePoolingDS" 
>>       auto-export="all-classes"/>
>>
>> </beans>
>>
>>
>> When I remove the osgi:service bean I don't have the error, so I think
>> it's
>> not really a parsing exception, any idea would be greatly appreciated !!
>>
>> Thanks,
>>
>> Florian
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/error-deploying-an-oracle-pooling-osgi%3Aservice-tp21229772p21230228.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: error deploying an oracle pooling osgi:service

Posted by Freeman Fang <fr...@gmail.com>.
Hi Florian,
I think your xsi:schemaLocation  is incorrect.
It should be
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
                                    
http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi.xsd"
Freeman
florian M wrote:
> Hi,
>
> I'm trying to deploy a osgi:service that exposes an oracle datasource with a
> pool on servicemix 4 as treated in Ade's blog  http://trenaman.blogspot.com/
> Ade On Middleware .
>
> I have already wrapped my oracle driver, and installed the commons-dbcp
> bundle without errors, but when I drop my spring file in servicemix I have a
> saxParseException, like this : 
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 1 in XML document from URL [bundle://165.0:0/META-INF/spring/beans.xml] is
> invalid; nested exception is org.xml.sax.SAXParseException: White spaces are
> required between publicId and systemId.
>
> My spring file :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xmlns:osgi="http://www.springframework.org/schema/osgi"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>   http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi
>   ">
>
> <bean id="oraclePoolingDS" class="org.apache.commons.dbcp.BasicDataSource">
> 	<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
> 	<property name="url" value="jdbc:oracle:thin:@demo2003:1521:sisError"/>
> 	<property name="username" value="flmorello"/>
> 	<property name="password" value="brainless"/>
> 	<property name="maxActive" value="10"/>
> 	<property name="poolPreparedStatements" value="true"/>
> </bean>
>
>     <osgi:service id="oraclePoolingDSService" ref="oraclePoolingDS" 
>       auto-export="all-classes"/>
>
> </beans>
>
>
> When I remove the osgi:service bean I don't have the error, so I think it's
> not really a parsing exception, any idea would be greatly appreciated !!
>
> Thanks,
>
> Florian
>