You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by carlos <ca...@onewaylife.co.uk> on 2003/10/04 14:28:46 UTC

Invalid SQL call statements generated

Hi,

I've just insalled rc4 cvs HEAD and I'm receiving the following error on 
inserts, updates and deletes:

[org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Invalid JDBC 
call syntax:<valid sql here>

It looks like I'm trying to call a stored procedure instead of a prepared 
statement. I've not placed any <insert-procedure>, etc tags in the 
class-descriptor xml.

Any help on what I may be doing wrong would be much appreciated.

Regards,

Carlos


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Invalid SQL call statements generated

Posted by Thomas Mahler <th...@web.de>.
There seems to be a minor problem in StatementForClassImpl. We are 
working on it.

cheers,
Thomas

Jason Pyeron wrote:
> I have been trying to fix my MySQL identity column issues, I turned off 
> Mysql's auto increment, now using the High Low sequencer
> 
> but I get preparedCall not supported, why is OJB trying to prepare calls?
> 
> should it not be prepare statement?
> 
> my jars are compiled from cvs tip
> 
> -Jason Pyeron
> 
> ...
> 
> 
> <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
>  <attribute attribute-name="grabSize" attribute-value="5"/>
>  <attribute attribute-name="globalSequenceId" attribute-value="false"/>
>  <attribute attribute-name="globalSequenceStart" attribute-value="10000"/>
> </sequence-manager>
> 
> ...
> 
>  <class-descriptor class="com.pyerotechnics.customer.mmserv.rejistore.tier1.dataobjects.AddressTypes"
>                    table="AddressTypes">
>   <field-descriptor name="id"
>                     column="id"
>                     jdbc-type="BIGINT"
>                     primarykey="true"
>                     autoincrement="true"
>   />
>   <field-descriptor name="name"
>                     column="name"
>                     jdbc-type="VARCHAR"
>   />
>  </class-descriptor>
> 
> ...
> 
>    AddressTypes at=new AddressTypes(); //AddressTypesCollection.java:38
>    at.setName("Work");                 //AddressTypesCollection.java:39
>    broker.beginTransaction();          //AddressTypesCollection.java:40
>    broker.store(at);                   //AddressTypesCollection.java:41
>    broker.commitTransaction();         //AddressTypesCollection.java:42
> 
> ...
> 
> 
> [org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Callable statments not supported. 
> java.sql.SQLException: Callable statments not supported.
>         at com.mysql.jdbc.Connection.prepareCall(Connection.java:1201)
>         at com.mysql.jdbc.Connection.prepareCall(Connection.java:1221)
>         at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(StatementsForClassImpl.java:306)
>         at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getInsertStmt(StatementsForClassImpl.java:184)
>         at org.apache.ojb.broker.accesslayer.StatementManager.getInsertStatement(StatementManager.java:691)
>         at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:224)
>         at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:2026)
>         at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1943)
>         at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:661)
>         at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
>         at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
>         at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(SequenceManagerHighLowImpl.java:289)
>         at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong(SequenceManagerHighLowImpl.java:191)
>         at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(AbstractSequenceManager.java:125)
>         at org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelper.java:303)
>         at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:349)
>         at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:215)
>         at org.apache.ojb.broker.Identity.init(Identity.java:165)
>         at org.apache.ojb.broker.Identity.<init>(Identity.java:129)
>         at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:651)
>         at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
>         at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
>         at com.pyerotechnics.customer.mmserv.rejistore.tier1.AddressTypesCollection.refresh(AddressTypesCollection.java:41)
>         at com.pyerotechnics.customer.mmserv.rejistore.tier1.AddressTypesCollection.<init>(AddressTypesCollection.java:19)
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Invalid SQL call statements generated

Posted by Jason Pyeron <ja...@pyeron.com>.
I have been trying to fix my MySQL identity column issues, I turned off 
Mysql's auto increment, now using the High Low sequencer

but I get preparedCall not supported, why is OJB trying to prepare calls?

should it not be prepare statement?

my jars are compiled from cvs tip

-Jason Pyeron

...


<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
 <attribute attribute-name="grabSize" attribute-value="5"/>
 <attribute attribute-name="globalSequenceId" attribute-value="false"/>
 <attribute attribute-name="globalSequenceStart" attribute-value="10000"/>
</sequence-manager>

...

 <class-descriptor class="com.pyerotechnics.customer.mmserv.rejistore.tier1.dataobjects.AddressTypes"
                   table="AddressTypes">
  <field-descriptor name="id"
                    column="id"
                    jdbc-type="BIGINT"
                    primarykey="true"
                    autoincrement="true"
  />
  <field-descriptor name="name"
                    column="name"
                    jdbc-type="VARCHAR"
  />
 </class-descriptor>

...

   AddressTypes at=new AddressTypes(); //AddressTypesCollection.java:38
   at.setName("Work");                 //AddressTypesCollection.java:39
   broker.beginTransaction();          //AddressTypesCollection.java:40
   broker.store(at);                   //AddressTypesCollection.java:41
   broker.commitTransaction();         //AddressTypesCollection.java:42

...


[org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Callable statments not supported. 
java.sql.SQLException: Callable statments not supported.
        at com.mysql.jdbc.Connection.prepareCall(Connection.java:1201)
        at com.mysql.jdbc.Connection.prepareCall(Connection.java:1221)
        at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(StatementsForClassImpl.java:306)
        at org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getInsertStmt(StatementsForClassImpl.java:184)
        at org.apache.ojb.broker.accesslayer.StatementManager.getInsertStatement(StatementManager.java:691)
        at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:224)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:2026)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1943)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:661)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
        at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(SequenceManagerHighLowImpl.java:289)
        at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong(SequenceManagerHighLowImpl.java:191)
        at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(AbstractSequenceManager.java:125)
        at org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelper.java:303)
        at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:349)
        at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:215)
        at org.apache.ojb.broker.Identity.init(Identity.java:165)
        at org.apache.ojb.broker.Identity.<init>(Identity.java:129)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:651)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:165)
        at com.pyerotechnics.customer.mmserv.rejistore.tier1.AddressTypesCollection.refresh(AddressTypesCollection.java:41)
        at com.pyerotechnics.customer.mmserv.rejistore.tier1.AddressTypesCollection.<init>(AddressTypesCollection.java:19)

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Partner & Sr. Manager         Pyerotechnics Development, Inc. -
-                               500 West University Parkway #1S -
- +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.





---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Invalid SQL call statements generated

Posted by Jason Pyeron <ja...@pyeron.com>.
I noticed that too, I had chalked it up to my previous problem with mysql.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                   http://www.pyerotechnics.com   -
- Partner & Sr. Manager         Pyerotechnics Development, Inc. -
-                               500 West University Parkway #1S -
- +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org