Can't connect to Oracle 11g

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't connect to Oracle 11g

skyswind@gmail.com
Hi everyone,

I want to do some search in Oracle 11g with the following xml.

<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
 <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@ip:port:dbname" />
 <property name="username" value="xxx" />
<property name="password" value="xxx" />
 </bean>

 <route>
  <setBody>
 <constant>select * from GEO_FEATURE</constant>
  </setBody>
 <to uri="jdbc:dataSource"/>
 </route>

However I got  response and no error log, is there any possible reason or
some suggested debug method for me?

Thanks a lot!
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to Oracle 11g

Claus Ibsen-2
Hi

You need to the route to start with a <from>

<route>
  <from uri="timer:foo?period=5000"/>
  <setBody>
 <constant>select * from GEO_FEATURE</constant>
  </setBody>
 <to uri="jdbc:dataSource"/>
  <to uri="log:response"/>
 </route>

eg you can also see this by the examples on the jdbc doc page
http://camel.apache.org/jdbc


On Thu, May 2, 2013 at 10:20 AM, [hidden email] <[hidden email]> wrote:

> Hi everyone,
>
> I want to do some search in Oracle 11g with the following xml.
>
> <bean id="dataSource"
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>  <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
> <property name="url" value="jdbc:oracle:thin:@ip:port:dbname" />
>  <property name="username" value="xxx" />
> <property name="password" value="xxx" />
>  </bean>
>
>  <route>
>   <setBody>
>  <constant>select * from GEO_FEATURE</constant>
>   </setBody>
>  <to uri="jdbc:dataSource"/>
>  </route>
>
> However I got  response and no error log, is there any possible reason or
> some suggested debug method for me?
>
> Thanks a lot!



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to Oracle 11g

黄骞
Hi,

Thank you very much  for the suggestion! I think I missed some code in my
first letter.

The real code is

 <route>
 <from uri="jms:queue:FEATURES.JSON"/>
  <setBody>
<constant>select * from GEO_FEATURE</constant>
  </setBody>
  <log message = "start db"/>
 <to uri="jdbc:dataSource"/>
  <log message = "stop db"/>
  <to uri="jms:queue:FEATURES.JSON3"/>
 </route>

However, I can get the "start db" log, but cannot get "stop db" log.

Can you give me some further suggestin?


Thank you !


黄骞/Huang Qian
超图分布式地理信息研究室主任/ Director of SuperMap Distributed GIS Lab
超图GIS研究所高级研究员/ Senior Researcher at SuperMap GIS Institute
地址:北京市朝阳区酒仙桥北路甲10号电子城IT产业园201楼E门4层,100015
Add: 4/F Unit E, Building 201, No. A10, Jiuxianqiaobei Road, Chaoyang
District, Beijing, 100015, CHINA
电话/Tel:+86-10- 010-59896522
传真/Fax:+86-10-59896666
手机/Mobile:15901268883
电子邮件/Mail: [hidden email]
网址/Website: http://www.supermap.com.cn


On Thu, May 2, 2013 at 4:27 PM, Claus Ibsen <[hidden email]> wrote:

> Hi
>
> You need to the route to start with a <from>
>
> <route>
>   <from uri="timer:foo?period=5000"/>
>   <setBody>
>  <constant>select * from GEO_FEATURE</constant>
>   </setBody>
>  <to uri="jdbc:dataSource"/>
>   <to uri="log:response"/>
>  </route>
>
> eg you can also see this by the examples on the jdbc doc page
> http://camel.apache.org/jdbc
>
>
> On Thu, May 2, 2013 at 10:20 AM, [hidden email] <[hidden email]>
> wrote:
> > Hi everyone,
> >
> > I want to do some search in Oracle 11g with the following xml.
> >
> > <bean id="dataSource"
> > class="org.springframework.jdbc.datasource.DriverManagerDataSource">
> >  <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
> > <property name="url" value="jdbc:oracle:thin:@ip:port:dbname" />
> >  <property name="username" value="xxx" />
> > <property name="password" value="xxx" />
> >  </bean>
> >
> >  <route>
> >   <setBody>
> >  <constant>select * from GEO_FEATURE</constant>
> >   </setBody>
> >  <to uri="jdbc:dataSource"/>
> >  </route>
> >
> > However I got  response and no error log, is there any possible reason or
> > some suggested debug method for me?
> >
> > Thanks a lot!
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to Oracle 11g

Claus Ibsen-2
Hi

You have to check the logs to see what goes on. And also make sure the
SQL query is not returning very big data as then it takes a long time.

And you can also look on the Oracle side what goes on, if it has
received the SQL and is executing it etc.

On Thu, May 2, 2013 at 11:07 AM, 黄骞 <[hidden email]> wrote:

> Hi,
>
> Thank you very much  for the suggestion! I think I missed some code in my
> first letter.
>
> The real code is
>
> <route>
> <from uri="jms:queue:FEATURES.JSON"/>
>  <setBody>
> <constant>select * from GEO_FEATURE</constant>
>  </setBody>
>  <log message = "start db"/>
> <to uri="jdbc:dataSource"/>
>  <log message = "stop db"/>
>  <to uri="jms:queue:FEATURES.JSON3"/>
> </route>
>
> However, I can get the "start db" log, but cannot get "stop db" log.
>
> Can you give me some further suggestin?
>
>
> Thank you !
>
>
> 黄骞/Huang Qian
> 超图分布式地理信息研究室主任/ Director of SuperMap Distributed GIS Lab
> 超图GIS研究所高级研究员/ Senior Researcher at SuperMap GIS Institute
> 地址:北京市朝阳区酒仙桥北路甲10号电子城IT产业园201楼E门4层,100015
> Add: 4/F Unit E, Building 201, No. A10, Jiuxianqiaobei Road, Chaoyang
> District, Beijing, 100015, CHINA
> 电话/Tel:+86-10- 010-59896522
> 传真/Fax:+86-10-59896666
> 手机/Mobile:15901268883
> 电子邮件/Mail: [hidden email]
> 网址/Website: http://www.supermap.com.cn
>
>
> On Thu, May 2, 2013 at 4:27 PM, Claus Ibsen <[hidden email]> wrote:
>>
>> Hi
>>
>> You need to the route to start with a <from>
>>
>> <route>
>>   <from uri="timer:foo?period=5000"/>
>>   <setBody>
>>  <constant>select * from GEO_FEATURE</constant>
>>   </setBody>
>>  <to uri="jdbc:dataSource"/>
>>   <to uri="log:response"/>
>>  </route>
>>
>> eg you can also see this by the examples on the jdbc doc page
>> http://camel.apache.org/jdbc
>>
>>
>> On Thu, May 2, 2013 at 10:20 AM, [hidden email] <[hidden email]>
>> wrote:
>> > Hi everyone,
>> >
>> > I want to do some search in Oracle 11g with the following xml.
>> >
>> > <bean id="dataSource"
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>> >  <property name="driverClassName"
>> > value="oracle.jdbc.driver.OracleDriver"/>
>> > <property name="url" value="jdbc:oracle:thin:@ip:port:dbname" />
>> >  <property name="username" value="xxx" />
>> > <property name="password" value="xxx" />
>> >  </bean>
>> >
>> >  <route>
>> >   <setBody>
>> >  <constant>select * from GEO_FEATURE</constant>
>> >   </setBody>
>> >  <to uri="jdbc:dataSource"/>
>> >  </route>
>> >
>> > However I got  response and no error log, is there any possible reason
>> > or
>> > some suggested debug method for me?
>> >
>> > Thanks a lot!
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: [hidden email]
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>
>



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to Oracle 11g

skyswind@gmail.com
Hi Claus,

Thank you for the advice, I will make a try and feedback later



On Fri, May 3, 2013 at 1:26 PM, Claus Ibsen <[hidden email]> wrote:

> Hi
>
> You have to check the logs to see what goes on. And also make sure the
> SQL query is not returning very big data as then it takes a long time.
>
> And you can also look on the Oracle side what goes on, if it has
> received the SQL and is executing it etc.
>
> On Thu, May 2, 2013 at 11:07 AM, 黄骞 <[hidden email]> wrote:
> > Hi,
> >
> > Thank you very much  for the suggestion! I think I missed some code in my
> > first letter.
> >
> > The real code is
> >
> > <route>
> > <from uri="jms:queue:FEATURES.JSON"/>
> >  <setBody>
> > <constant>select * from GEO_FEATURE</constant>
> >  </setBody>
> >  <log message = "start db"/>
> > <to uri="jdbc:dataSource"/>
> >  <log message = "stop db"/>
> >  <to uri="jms:queue:FEATURES.JSON3"/>
> > </route>
> >
> > However, I can get the "start db" log, but cannot get "stop db" log.
> >
> > Can you give me some further suggestin?
> >
> >
> > Thank you !
> >
> >
> > 黄骞/Huang Qian
> > 超图分布式地理信息研究室主任/ Director of SuperMap Distributed GIS Lab
> > 超图GIS研究所高级研究员/ Senior Researcher at SuperMap GIS Institute
> > 地址:北京市朝阳区酒仙桥北路甲10号电子城IT产业园201楼E门4层,100015
> > Add: 4/F Unit E, Building 201, No. A10, Jiuxianqiaobei Road, Chaoyang
> > District, Beijing, 100015, CHINA
> > 电话/Tel:+86-10- 010-59896522
> > 传真/Fax:+86-10-59896666
> > 手机/Mobile:15901268883
> > 电子邮件/Mail: [hidden email]
> > 网址/Website: http://www.supermap.com.cn
> >
> >
> > On Thu, May 2, 2013 at 4:27 PM, Claus Ibsen <[hidden email]>
> wrote:
> >>
> >> Hi
> >>
> >> You need to the route to start with a <from>
> >>
> >> <route>
> >>   <from uri="timer:foo?period=5000"/>
> >>   <setBody>
> >>  <constant>select * from GEO_FEATURE</constant>
> >>   </setBody>
> >>  <to uri="jdbc:dataSource"/>
> >>   <to uri="log:response"/>
> >>  </route>
> >>
> >> eg you can also see this by the examples on the jdbc doc page
> >> http://camel.apache.org/jdbc
> >>
> >>
> >> On Thu, May 2, 2013 at 10:20 AM, [hidden email] <[hidden email]
> >
> >> wrote:
> >> > Hi everyone,
> >> >
> >> > I want to do some search in Oracle 11g with the following xml.
> >> >
> >> > <bean id="dataSource"
> >> > class="org.springframework.jdbc.datasource.DriverManagerDataSource">
> >> >  <property name="driverClassName"
> >> > value="oracle.jdbc.driver.OracleDriver"/>
> >> > <property name="url" value="jdbc:oracle:thin:@ip:port:dbname" />
> >> >  <property name="username" value="xxx" />
> >> > <property name="password" value="xxx" />
> >> >  </bean>
> >> >
> >> >  <route>
> >> >   <setBody>
> >> >  <constant>select * from GEO_FEATURE</constant>
> >> >   </setBody>
> >> >  <to uri="jdbc:dataSource"/>
> >> >  </route>
> >> >
> >> > However I got  response and no error log, is there any possible reason
> >> > or
> >> > some suggested debug method for me?
> >> >
> >> > Thanks a lot!
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: [hidden email]
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>