Serge Blais

« CEP Example | Main | IEP now supported!... »
Tuesday Feb 03, 2009

DatabaseBC not Connecting?

I though this might be of interest, so here it is. While using the database BC for the first time on a MySQL database, I ran into this strange error:

Caused by: java.sql.SQLException:

Error occured while executing

SQL.insert into firetable (Fire) values (?)

Reason: No database selected SQLState: 3D000 ErrorCode: 1046 at org.glassfish.openesb.databasebc.OutboundMessageProcessor. executeOutboundSQL(OutboundMessageProcessor.java:1377)  at org.glassfish.openesb.databasebc.OutboundMessageProcessor.  processInOut(OutboundMessageProcessor.java:611)

Which basically means what is says. It doesn't know which database to connect to to execute the sql statement. So, when this happens, prefix the name of the table with the name of the database in the WSDL with the database binding. In my case this meant to change the sql from

insert into firetable (Fire) values (?)

to

insert into cep.firetable (Fire) values (?)

Nothing more to it.

Now back to our regular programming...

Serge

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed