This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 814214 - Camel SQL gateway can't lookup for DataSource in Camel Context
Camel SQL gateway can't lookup for DataSource in Camel Context
Status: CLOSED NOTABUG
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: 3rd Party (Show other bugs)
5.3.0 GA
Unspecified Unspecified
high Severity high
: ER2
: 5.3.0 GA
Assigned To: Default User
:
Depends On:
Blocks: 814297
  Show dependency treegraph
 
Reported: 2012-04-19 07:45 EDT by Robert Balent
Modified: 2014-01-12 19:20 EST (History)
3 users (show)

See Also:
Fixed In Version: 5.3.0 GA
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-10 05:23:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
camel_sql_deploy.log (11.65 KB, patch)
2012-04-19 07:45 EDT, Robert Balent
no flags Details | Diff
Camel SQL reporoducer (14.71 KB, application/zip)
2012-04-19 07:46 EDT, Robert Balent
no flags Details

  None (edit)
Description Robert Balent 2012-04-19 07:45:41 EDT
Created attachment 578613 [details]
camel_sql_deploy.log

When you try use camel-sql component[1], the deployment of application fails because Camel can't lookup for DataSource in Camel Context and fails with:

Caused by: java.lang.IllegalArgumentException: registry entry called java:/DefaultDS of type javax.sql.DataSource must be specified

There is possibility that this bug is related to JBESB-3471[2] issue.

Full log of failed deployment is attached.

I'm also attaching sample project, which tries to connect to database through DefaultDS DataSource but it fails. 

Table which is example trying to query doesn't exist but it's not relevant for this bug.

1. Start server
2. Unzip reproducer to quickstarts directory
3. Configure quickstarts.properties to target your server profile
4. from camel_sql directory run: ant deploy



[1] http://camel.apache.org/sql-component.html
[2] https://issues.jboss.org/browse/JBESB-3471
Comment 1 Robert Balent 2012-04-19 07:46:13 EDT
Created attachment 578614 [details]
Camel SQL reporoducer
Comment 2 tcunning 2012-05-04 17:32:00 EDT
The problem here looks to me like you're using a datasource in the java: namespace, which Camel can't see.    If you use a datasource in the global namespace (you need to set <use-java-context/>, you shouldn't have this issue : 


<?xml version="1.0" encoding="UTF-8"?>
<datasources>
   <local-tx-datasource>
         <use-java-context>false</use-java-context>
...

I still see the space issue, which I believe is represented by https://bugzilla.redhat.com/show_bug.cgi?id=814297 but I don't believe this to be an issue.
Comment 3 Robert Balent 2012-05-10 05:23:34 EDT
Yes, you are right. Good work Tom.

So I'm closing this issue as a NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.