Discussion:
[OSPL-Dev] Hello example with DBMSConnect
Ravi Chandran
2011-06-22 12:47:04 UTC
Permalink
hi,
I am working on Hello World example provided in Opensplice DDS. I am
getting the data from publisher to subscriber. Now what I want to see
is if I can use DBMS Connect with this example and receive and send
data to and from database and DDS. I am using java, MySQL 5.1, MySQL
ODBC Connector 3.51 for this experiment. I have tried many
permutations and combinations on ospl.xml. But I am unable to see a
successful working dbms service....??? The OSPL is starting but the
DBMS service is getting stuck up somewhere. It's not even giving any
error to point out what is wrong..? Has anyone here used dbmsconnect
on windows successfully? I am uploading ospl.xml as I think this can
be one of the causes for error. Right now the issue seems to be at osp
start only.
--
Thanks & RegardsRavi
--
Thanks & Regards
Ravi
Hans van't Hag
2011-06-22 12:53:02 UTC
Permalink
Did you checkout/test the bundled DBMSConnect example that works with the
chatroom tutorial ?

We've had people before that had to remove the odbc setting in the xml in
order for it to work 'out-of-the-box' so you might want to try that too


Hans van 't Hag
OpenSplice DDS Product Manager
PrismTech Netherlands
Email: hans.vanthag at prismtech.com
Tel: +31742472572
Fax: +31742472571
Gsm: +31624654078

PrismTech is a global leader in standards-based, performance-critical
middleware. Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
-----Original Message-----
From: developer-bounces at opensplice.org
[mailto:developer-bounces at opensplice.org] On Behalf Of Ravi Chandran
Sent: Wednesday, June 22, 2011 2:47 PM
To: OpenSplice DDS Developer Mailing List
Subject: [OSPL-Dev] Hello example with DBMSConnect

hi,
I am working on Hello World example provided in Opensplice DDS. I am
getting the data from publisher to subscriber. Now what I want to see
is if I can use DBMS Connect with this example and receive and send
data to and from database and DDS. I am using java, MySQL 5.1, MySQL
ODBC Connector 3.51 for this experiment. I have tried many
permutations and combinations on ospl.xml. But I am unable to see a
successful working dbms service....??? The OSPL is starting but the
DBMS service is getting stuck up somewhere. It's not even giving any
error to point out what is wrong..? Has anyone here used dbmsconnect
on windows successfully? I am uploading ospl.xml as I think this can
be one of the causes for error. Right now the issue seems to be at osp
start only.

--
Thanks & RegardsRavi


--
Thanks & Regards
Ravi
Ravi Chandran
2011-06-22 14:11:09 UTC
Permalink
Thanks for replying. I didnt find any example for dbmsconnect using
java. i dont understand what happens in the c++ example.. Is there
any example for dbmsconnect using java? And also, if i remove dbms
setting from ospl.xml, where shd i keep it...
Post by Hans van't Hag
Did you checkout/test the bundled DBMSConnect example that works with the
chatroom tutorial ?
We've had people before that had to remove the odbc setting in the xml in
order for it to work 'out-of-the-box' so you might want to try that too
Hans van 't Hag
OpenSplice DDS Product Manager
PrismTech Netherlands
Email: hans.vanthag at prismtech.com
Tel: +31742472572
Fax: +31742472571
Gsm: +31624654078
PrismTech is a global leader in standards-based, performance-critical
middleware. ?Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
-----Original Message-----
From: developer-bounces at opensplice.org
[mailto:developer-bounces at opensplice.org] On Behalf Of Ravi Chandran
Sent: Wednesday, June 22, 2011 2:47 PM
To: OpenSplice DDS Developer Mailing List
Subject: [OSPL-Dev] Hello example with DBMSConnect
hi,
I am working on Hello World example provided in Opensplice DDS. I am
getting the data from publisher to subscriber. Now what I want to see
is if I can use DBMS Connect with this example and receive and send
data to and from database and DDS. I am using java, MySQL 5.1, MySQL
ODBC Connector 3.51 for this experiment. I have tried many
permutations and combinations on ospl.xml. But I am unable to see a
successful working dbms service....??? The OSPL is starting but the
DBMS service is getting stuck up somewhere. It's not even giving any
error to point out what is wrong..? Has anyone here used dbmsconnect
on windows successfully? I am uploading ospl.xml as I think this can
be one of the causes for error. Right now the issue seems to be at osp
start only.
--
Thanks & RegardsRavi
--
Thanks & Regards
Ravi
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe
http://dev.opensplice.org/mailman/listinfo/developer
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe http://dev.opensplice.org/mailman/listinfo/developer
--
Thanks & Regards
Ravi
Ravi Chandran
2011-06-23 06:18:08 UTC
Permalink
hi Hans,
It seems that I have found one error from dbmsconnect log... I found these
two lines in the log file::

OPERATIONAL (dbmsField) -> Unable to map detected column to
DDS: Name: '"userID"' Type: 'integer unsigned(10)' Nullable: '1'.
OPERATIONAL (dbmsConnectionOdbc) -> Unable to map detected column to
DDS: Name: '"userID"' Type: 'integer unsigned(10)' Nullable: '1'.


This is the IDL which I am using::

module HelloWorldData
{
struct Msg
{
long userID; // User ID
string message; // message
};
#pragma keylist Msg userID
};


This is the table structure :

mysql> describe HelloTopic;

+---------+--------------------------+-----+---------+-----------+-----
---------------+

| Field | Type | Null | Key | Default | Extra
|

+---------+--------------------------+-----+---------+----------------+

| userID | int(10) unsigned | NO | PRI | NULL | auto_increment |


Is this mapping wrong? Did I add something extra?
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/4ced1cec/attachment.htm>
Ravi Chandran
2011-06-23 07:36:40 UTC
Permalink
hi
I have removed the unsigned property from userID column, now it seems to be
okay..

INIT (ddsMetaHandler) -> Found new group
'durabilityPartition.d_status'
INIT (ddsMetaHandler) -> Found new group '__BUILT-IN
PARTITION__.DCPSHeartbeat'
INIT (ddsMetaHandler) -> Found new group '__BUILT-IN
PARTITION__.DCPSSubscription'
INIT (dbmsField) -> - long userID (0) KEY
INIT (dbmsField) -> - string message (0)
INIT (dbmsConnectionOdbc) -> Detected MySQL server, switching to
MySQL table.

But I am still getting this error :

OPERATIONAL (mainThread) -> DBMS service fully started.
OPERATIONAL (dbmsConnectionOdbc) -> Detected new table: "hellotopic".
OPERATIONAL (dbmsDataHandler) -> Looking for Topic 'HelloTopic'.
OPERATIONAL (dbmsDataHandler) -> Table 'hellotopic' could not be
mapped to Topic 'HelloTopic'.

I had one question regarding it. I dont see any other table being created in
the DSN which I had created.. In the demo I had seen that there were other
tables created like DCPSHeartbeat, DCPSSubscription, d_status, d_newgroup.
Do we need to create it manually before starting OSPL or is it supposed to
be created by OSPL?
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/1c5b3fa6/attachment.htm>
Hans van't Hag
2011-06-23 07:42:22 UTC
Permalink
Have you considered the fact that ?hellotopic? is another string than
?HelloTopic? ??



* *

*Hans van 't Hag*

OpenSplice DDS Product Manager

PrismTech Netherlands

Email: hans.vanthag at prismtech.com

Tel: +31742472572

Fax: +31742472571

Gsm: +31624654078



PrismTech is a global leader in standards-based, performance-critical
middleware. Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
------------------------------

*From:* developer-bounces at opensplice.org [mailto:
developer-bounces at opensplice.org] *On Behalf Of *Ravi Chandran
*Sent:* Thursday, June 23, 2011 9:37 AM
*To:* OpenSplice DDS Developer Mailing List
*Subject:* Re: [OSPL-Dev] Hello example with DBMSConnect



hi

I have removed the unsigned property from userID column, now it seems to be
okay..



INIT (ddsMetaHandler) -> Found new group
'durabilityPartition.d_status'

INIT (ddsMetaHandler) -> Found new group '__BUILT-IN
PARTITION__.DCPSHeartbeat'

INIT (ddsMetaHandler) -> Found new group '__BUILT-IN
PARTITION__.DCPSSubscription'

INIT (dbmsField) -> - long userID (0) KEY

INIT (dbmsField) -> - string message (0)

INIT (dbmsConnectionOdbc) -> Detected MySQL server, switching to
MySQL table.



But I am still getting this error :



OPERATIONAL (mainThread) -> DBMS service fully started.

OPERATIONAL (dbmsConnectionOdbc) -> Detected new table: "hellotopic".

OPERATIONAL (dbmsDataHandler) -> Looking for Topic 'HelloTopic'.

OPERATIONAL (dbmsDataHandler) -> Table 'hellotopic' could not be
mapped to Topic 'HelloTopic'.



I had one question regarding it. I dont see any other table being created in
the DSN which I had created.. In the demo I had seen that there were other
tables created like DCPSHeartbeat, DCPSSubscription, d_status, d_newgroup.
Do we need to create it manually before starting OSPL or is it supposed to
be created by OSPL?
--
Thanks & Regards

Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/e7a3181f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3349 bytes
Desc: not available
URL: <Loading Image...>
Ravi Chandran
2011-06-23 08:29:56 UTC
Permalink
how can I make it case sensitive? I had created table with HelloTopic only,
but when the Table is created, it shows up in lowercase..
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/903baf8c/attachment.htm>
Ravi Chandran
2011-06-23 08:33:52 UTC
Permalink
I changed the table name to "hellotopic", still the result is same..

INIT (dbmsConnectionOdbc) -> Detected new table: "hellotopic".

INIT (dbmsDataHandler) -> Looking for Topic 'HelloTopic'.

INIT (dbmsDataHandler) -> Table 'hellotopic' could not be
mapped to Topic 'HelloTopic'.
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/0b133e06/attachment.htm>
Maurits de Jong
2011-06-23 08:41:11 UTC
Permalink
Hi Ravi,

DBMSConnect cannot be made case-insensitive (although you could define an
explicit mapping from topic HelloTopic to table hellotopic, that is not what
you want). What you should really do is follow the advice given in my
previous mail; that is: reconfigure your MySQL server to behave correctly
regarding case-sensitivity. How to do that is explained in the link I
provided in my last mail (please read the information pointed to by that
link, it is specific for MySQL on Windows and has little to do with
DBMSConnect). It boils down to passing the option I pasted in my last mail
to your MySQL server instance either on the commandline or in the
configuration file of your MySQL server.

With best regards,
Maurits

*Maurits de Jong*

Software Engineer

E-mail: maurits.dejong at prismtech.com <niels.kortstee>
Tele: +31-74-247-257-4
Web: www.prismtech.com

PrismTech is a global leader in standards-based, performance-critical
middleware. Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
Post by Ravi Chandran
I changed the table name to "hellotopic", still the result is same..
INIT (dbmsConnectionOdbc) -> Detected new table: "hellotopic".
INIT (dbmsDataHandler) -> Looking for Topic 'HelloTopic'.
INIT (dbmsDataHandler) -> Table 'hellotopic' could not be
mapped to Topic 'HelloTopic'.
--
Thanks & Regards
Ravi
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe
http://dev.opensplice.org/mailman/listinfo/developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/13a34c24/attachment.htm>
Maurits de Jong
2011-06-23 07:56:35 UTC
Permalink
Hi Ravi,

If you are using MySQL on Windows, it is possible that you are running into
an issue with case-sensitivity on Windows (
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html). In
that case you should configure your MySQL server (as explained in the MySQL
reference manual) to use lower_case_table_names=2.

The DCPS* tables will only be created if you define a namespace that matches
those partitions/topics (*.*), which is generally not what you want.

With best regards,

Maurits

*Maurits de Jong*

Software Engineer

E-mail: maurits.dejong at prismtech.com <niels.kortstee>
Tele: +31-74-247-257-4
Web: www.prismtech.com

PrismTech is a global leader in standards-based, performance-critical
middleware. Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
Post by Ravi Chandran
hi
I have removed the unsigned property from userID column, now it seems to be
okay..
INIT (ddsMetaHandler) -> Found new group
'durabilityPartition.d_status'
INIT (ddsMetaHandler) -> Found new group '__BUILT-IN
PARTITION__.DCPSHeartbeat'
INIT (ddsMetaHandler) -> Found new group '__BUILT-IN
PARTITION__.DCPSSubscription'
INIT (dbmsField) -> - long userID (0) KEY
INIT (dbmsField) -> - string message (0)
INIT (dbmsConnectionOdbc) -> Detected MySQL server, switching
to MySQL table.
OPERATIONAL (mainThread) -> DBMS service fully started.
OPERATIONAL (dbmsConnectionOdbc) -> Detected new table: "hellotopic".
OPERATIONAL (dbmsDataHandler) -> Looking for Topic 'HelloTopic'.
OPERATIONAL (dbmsDataHandler) -> Table 'hellotopic' could not be
mapped to Topic 'HelloTopic'.
I had one question regarding it. I dont see any other table being created
in the DSN which I had created.. In the demo I had seen that there were
other tables created like DCPSHeartbeat, DCPSSubscription, d_status,
d_newgroup. Do we need to create it manually before starting OSPL or is it
supposed to be created by OSPL?
--
Thanks & Regards
Ravi
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe
http://dev.opensplice.org/mailman/listinfo/developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/41d4a491/attachment.htm>
Ravi Chandran
2011-06-23 08:42:25 UTC
Permalink
hi Maurits,
I had indeed added those specific lines to my.ini in MySQL installation
folder. These are the lines which I changed::

default-storage-engine=MyISAM

sql-mode="ANSI,NO_BACKSLASH_ESCAPES"

lower_case_table_names=2

And regarding DCPS tables creation, what parameters do I need to specify for
that? This is my current ospl.xml settings:

<DbmsConnectService name="dbmsconnect">
<DbmsToDds>
<NameSpace dsn="Spykar" name="dbmstodds" partition="*" pwd="root"
usr="root">
<Mapping table="hellotopic" topic="HelloTopic"/>
</NameSpace>
</DbmsToDds>
</DbmsConnectService>
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/97654b7a/attachment.htm>
Maurits de Jong
2011-06-23 09:01:09 UTC
Permalink
Hi Ravi,

Tables will only be created by DBMSConnect when you define a DdsToDbms
mapping. The other way around, DBMSConnect will never create a table to read
from (nor a Topic to write to). Since you explicitly defined the mapping
(from lowercase to the case used in the topic), there must be another reason
reported in your log-file why DBMSConnect is not able to map the topic on
the table (if you restarted MySQL after reconfiguring).

What you could do to find the issue if it is not reported by DBMSConnect, is
define a mapping the other way around:

<DbmsConnectService name="dbmsconnect">
<*DdsToDbms*>
<NameSpace dsn="Spykar" name="ddstodbms" partition="*
ThePartitionInWhichYourHelloTopicLives*" *topic="HelloTopic"* pwd="root"
usr="root" />
</*DdsToDbms*>
</DbmsConnectService>

This will let DBMSConnect create a table that is compatible and you could
verify what is different with the table you are trying to use.

Please be aware that in the configuration you sent, the
partition="*"setting will cause the topic to be published in ALL
partitions, which is
quite certainly not what you are after.

With best regards,
Maurits

*Maurits de Jong*

Software Engineer

E-mail: maurits.dejong at prismtech.com <niels.kortstee>
Tele: +31-74-247-257-4
Web: www.prismtech.com

PrismTech is a global leader in standards-based, performance-critical
middleware. Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
Post by Ravi Chandran
hi Maurits,
I had indeed added those specific lines to my.ini in MySQL installation
default-storage-engine=MyISAM
sql-mode="ANSI,NO_BACKSLASH_ESCAPES"
lower_case_table_names=2
And regarding DCPS tables creation, what parameters do I need to specify
<DbmsConnectService name="dbmsconnect">
<DbmsToDds>
<NameSpace dsn="Spykar" name="dbmstodds" partition="*" pwd="root"
usr="root">
<Mapping table="hellotopic" topic="HelloTopic"/>
</NameSpace>
</DbmsToDds>
</DbmsConnectService>
--
Thanks & Regards
Ravi
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe
http://dev.opensplice.org/mailman/listinfo/developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/23afbe12/attachment.htm>
Ravi Chandran
2011-06-23 09:28:10 UTC
Permalink
hi Maurits,
Thanks for explaining this issue.. What I was trying here was DbmsToDds
interaction.. Anyways, I will try to use DdsToDbms interaction for now. I
had checked the mysql log when I restarted MySQL, but did not find any error
there...

As for using "*" for partition, I was using Wrapper classes for creation of
applications. So I did not see the option to create Partition in powertool.
Now, I have created a partition in model.

Sorry, if you feel this is a noob question, but how can I connect the Pub
and Sub applications with this partition?
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/906840be/attachment.htm>
Ravi Chandran
2011-06-23 10:13:21 UTC
Permalink
ok, I found it. I have added a partition "Splice" to the publisher and
subscriber. This is my current ospl.xml configuration::

<DbmsConnectService name="dbmsconnect">
<DdsToDbms>
<NameSpace dsn="Spykar" name="ddstodbms" partition="Splice"
pwd="root" topic="HelloTopic" usr="root">
<Mapping topic="HelloTopic"/>
</NameSpace>
</DdsToDbms>
<Tracing>
<OutputFile>C:\Documents and
Settings\admin\Desktop\dbmsconnect.log</OutputFile>
<Verbosity>FINE</Verbosity>
</Tracing>
</DbmsConnectService>

I am uploading my dbmsconnect.log with attachment.
--
Thanks & Regards
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/54ca8ff7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbmsconnect.log
Type: application/octet-stream
Size: 7254 bytes
Desc: not available
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110623/54ca8ff7/attachment.obj>
Ravi Chandran
2011-06-23 13:22:59 UTC
Permalink
Thanks for replying. I didnt find any example for dbmsconnect using
java. i dont understand what happens in the c++ example.. Is there
any example for dbmsconnect using java? And also, if i remove dbms
setting from ospl.xml, where shd i keep it...
Post by Hans van't Hag
Did you checkout/test the bundled DBMSConnect example that works with the
chatroom tutorial ?
We've had people before that had to remove the odbc setting in the xml in
order for it to work 'out-of-the-box' so you might want to try that too
Hans van 't Hag
OpenSplice DDS Product Manager
PrismTech Netherlands
Email: hans.vanthag at prismtech.com
Tel: +31742472572
Fax: +31742472571
Gsm: +31624654078
PrismTech is a global leader in standards-based, performance-critical
middleware. ?Our products enable our OEM, Systems Integrator, and End User
customers to build and optimize high-performance systems primarily for
Mil/Aero, Communications, Industrial, and Financial Markets.
-----Original Message-----
From: developer-bounces at opensplice.org
[mailto:developer-bounces at opensplice.org] On Behalf Of Ravi Chandran
Sent: Wednesday, June 22, 2011 2:47 PM
To: OpenSplice DDS Developer Mailing List
Subject: [OSPL-Dev] Hello example with DBMSConnect
hi,
I am working on Hello World example provided in Opensplice DDS. I am
getting the data from publisher to subscriber. Now what I want to see
is if I can use DBMS Connect with this example and receive and send
data to and from database and DDS. I am using java, MySQL 5.1, MySQL
ODBC Connector 3.51 for this experiment. I have tried many
permutations and combinations on ospl.xml. But I am unable to see a
successful working dbms service....??? The OSPL is starting but the
DBMS service is getting stuck up somewhere. It's not even giving any
error to point out what is wrong..? Has anyone here used dbmsconnect
on windows successfully? I am uploading ospl.xml as I think this can
be one of the causes for error. Right now the issue seems to be at osp
start only.
--
Thanks & RegardsRavi
--
Thanks & Regards
Ravi
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe
http://dev.opensplice.org/mailman/listinfo/developer
_______________________________________________
OpenSplice DDS Developer Mailing List
Developer at opensplice.org
Subscribe / Unsubscribe http://dev.opensplice.org/mailman/listinfo/developer
--
Thanks & Regards
Ravi
Ravi Chandran
2011-06-23 13:57:38 UTC
Permalink
Sorry for my last mail. This was previous message which was
accidentally sent off from my android..
Post by Ravi Chandran
Thanks for replying. I didnt find any example for dbmsconnect using
java. i dont understand what happens in the c++ example.. ?Is there
any example for dbmsconnect using java? And also, if i remove dbms
setting from ospl.xml, where shd i keep it...
--
Thanks & Regards
Ravi
Ravi Chandran
2011-06-24 06:34:20 UTC
Permalink
Thanks Maurits and Hans . Now, everything is working fine at my end. I am
able to create table from publisher and then read data from the same table
using subscriber.. I think the issue seems to be with the table which I
created using MySQL.

Cheers!
Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dev.opensplice.org/pipermail/developer/attachments/20110624/961001c4/attachment.htm>
Loading...