|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: porting an application from MySql to MaxDB
From: praveen jothi (praveeno
gmail.com)
Date: Wed Jul 27 2005 - 06:39:04 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Daer Mr.Schöder and Elke,
Thank you very much and now everything is fine. The mistake was exactly the
same what Mr.Schöder suspected.
Thanking you again,
Regards,
Praveenjothi
On 7/27/05, Schroeder, Alexander <alexander.schroeder
sap.com> wrote:
>
> Hello Praveen,
> it seems that you mixed up your code, or missed a statement. You create
> the table with the shorter name:
> com.sap.dbtech.jdbc.StatementSapDB
112e7f7.executeUpdate (create table
> person_rolle_zuordnung_versionen (*pn_rolle_zuordng_vn_id *FIXED(19,0) not
> null, aenderer FIXED(19,0) not null, aenderungszeitpunkt TIMESTAMP not null,
> version_nummer INT not null, aenderungsaktion CHAR(1) not null,
> personalnummer FIXED(19,0) null, primary key (pn_rolle_zuordng_vn_id)))
> => 0
> but access it the on the insert operation with a statement that seems to
> be the 'old' (i.e. long) name of that column.
> com.sap.dbtech.jdbc.ConnectionSapDB
193a66f.prepareStatement (insert into
> person_rolle_zuordnung_versionen (aenderer, aenderungszeitpunkt,
> version_nummer, aenderungsaktion, personalnummer, *
> person_rolle_zuordnung_versionen_id*) values (?, ?, ?, ?, ?, ?))
> <-!
> Timestamp: 2005-07-27 09:36:49.906
> com.sap.dbtech.jdbc.exceptions.DatabaseException: [-2014] (at 128):
> Identifier too long
> The identifier person_rolle_zuordnung_versionen_id is apparantly too long,
> so please look into your application what went wrong here. (BTW, the
> position 128 is correctly pointing to the beginning of the offending, and
> too long column in this SQL statement).
> Regards
> Alexander Schröder
> SAP DB, SAP Labs Berlin
>
> ------------------------------
> *From:* praveen jothi [mailto:praveeno
gmail.com]
> *Sent:* Wednesday, July 27, 2005 9:51 AM
> *To:* Schroeder, Alexander
> *Subject:* Re: porting an application from MySql to MaxDB
>
> Dear Mr.Schröder and colleagues,
> I am attaching the jdbc trace. I see the statement at the end which I
> think is causing the problem, but I dont understand when it is 32 characters
> long, which is the maximum, why it still says "identifier too long". The
> point here is, I also renamed that identifier for a much smaller version,
> but still I get the same error.
> Please give me your suggestions.
> Thank you very much.
> Regards,
> Praveenjothi
>
> On 7/27/05, Schroeder, Alexander <alexander.schroeder
sap.com> wrote:
> >
> > Hello Praveen,
> >
> > could you run the application with JDBC trace enabled, and
> > send the trace? See http://sapdb.2scale.net/moin.cgi/JdbcTrace
> > on how to create one. So, the offending SQL statement can
> > probably be seen in the trace.
> >
> > Regards
> > Alexander Schröder
> > SAP DB, SAP Labs Berlin
> >
> > > -----Original Message-----
> > > From: praveen jothi [mailto:praveeno
gmail.com]
> > > Sent: Wednesday, July 27, 2005 7:16 AM
> > > To: maxdb
lists.mysql.com
> > > Subject: porting an application from MySql to MaxDB
> > >
> > > Dear all,
> > >
> > > I am a beginner. My work involves porting an Application from
> > > Mysql to
> > > Maxdb. I use Hibernate and everything was working fine with
> > > MySql. When I
> > > tried to setup the same application with MaxDB, initially it
> > > showed errors
> > > that the table name's used are long. I learnt that the
> > > characters should be
> > > maximum 32. So,I changed all the table names and columns in
> > > the hibernate
> > > mapping files and ensured that they are within 32 characters.
> > > After changing
> > > this, all my tables and columns were created.
> > >
> > > Now, when I run a class which basically inserts the default
> > > values in the
> > > columns in each table, I again get "identifier too long"
> > > exception. I could
> > > not understand why even after the tables and columns are
> > > properly created I
> > > am getting this error. Should I also change the name of the
> > > mapped classes
> > > if they are more than 32 characters long, kindly give me suggestions.
> > >
> > > I have copied the error from the console and are as follows
> > > __________________________________________________________________
> > >
> > > ul 26, 2005 1:33:12 PM
> > > net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
> > > WARNING: SQL Error: -2014, SQLState: 42000
> > > Jul 26, 2005 1:33:12 PM
> > > net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
> > > SEVERE: [-2014] (at 128): Identifier too long
> > > Jul 26, 2005 1:33:12 PM
> > > net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
> > > WARNING: SQL Error: -2014, SQLState: 42000
> > > Jul 26, 2005 1:33:12 PM
> > > net.sf.hibernate.util.JDBCExceptionReporterlogExceptions
> > > SEVERE: [-2014] (at 128): Identifier too long
> > > Jul 26, 2005 1:33:12 PM net.sf.hibernate.JDBCException <init>
> > > SEVERE: could not insert: [
> > > com.ste.rolo.persistence.PPersonRolleZuordnungVersionen#15]
> > > com.sap.dbtech.jdbc.exceptions.DatabaseException: [-2014] (at 128):
> > > Identifier too long
> > > at
> > > com.sap.dbtech.jdbc.packet.ReplyPacket.createException (ReplyPa
> > > cket.java:72)
> > >
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSa
> > > pDB.java:910)
> > >
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java :569)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.sendCommand(
> > > CallableStatementSapDB.java:1736)
> > > at
> > > com.sap.dbtech.jdbc.StatementSapDB.sendSQL(StatementSapDB.java:778)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.doParse (
> > > CallableStatementSapDB.java:235)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.constructor(
> > > CallableStatementSapDB.java:186)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.<init>(
> > > CallableStatementSapDB.java:88)
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.prepareStatement(Connectio
> > > nSapDB.java:802)
> > >
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.getPreparedStatement (Batcher
> > > Impl.java:249)
> > >
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl
> > > .java:61)
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl
> > > .java:56)
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(Batche
> > > rImpl.java:109)
> > >
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:460)
> > >
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:442)
> > >
> > > at
> > > net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInse
> > > rtion.java:29)
> > >
> > > at
> > > net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
> > > at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
> > > at
> > > net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired (SessionI
> > > mpl.java:1775)
> > >
> > > at
> > > net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1536)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1501)
> > > at net.sf.hibernate.impl.SessionImpl.find (SessionImpl.java:1491)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483)
> > > at
> > > com.ste.rolo.realworldobjects.PersonRolleZuordnung.erzeugeNeue
> > > PersonRolleZuordnung
> > > (PersonRolleZuordnung.java :144)
> > > at
> > > com.ste.rolo.test.SimpleTest.testRealPersonRolle(SimpleTest.ja
> > > va:1024)
> > > at com.ste.rolo.test.SimpleTest.main(SimpleTest.java:147)
> > > Jul 26, 2005 1:33:12 PM net.sf.hibernate.impl.SessionImpl execute
> > > SEVERE: Could not synchronize database state with session
> > > net.sf.hibernate.JDBCException: could not insert: [
> > > com.ste.rolo.persistence.PPersonRolleZuordnungVersionen#15]
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:478)
> > >
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:442)
> > >
> > > at
> > > net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInse
> > > rtion.java:29)
> > >
> > > at
> > > net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
> > > at net.sf.hibernate.impl.SessionImpl.execute (SessionImpl.java:2335)
> > > at
> > > net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionI
> > > mpl.java:1775)
> > >
> > > at
> > > net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1536)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1501)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483)
> > > at
> > > com.ste.rolo.realworldobjects.PersonRolleZuordnung.erzeugeNeue
> > > PersonRolleZuordnung
> > > (PersonRolleZuordnung.java:144)
> > > at
> > > com.ste.rolo.test.SimpleTest.testRealPersonRolle(SimpleTest.ja
> > > va:1024)
> > > at com.ste.rolo.test.SimpleTest.main(SimpleTest.java:147)
> > > Caused by: com.sap.dbtech.jdbc.exceptions.DatabaseException:
> > > [-2014] (at
> > > 128): Identifier too long
> > > at
> > > com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPa
> > > cket.java:72)
> > >
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSa
> > > pDB.java:910)
> > >
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:569)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.sendCommand(
> > > CallableStatementSapDB.java:1736)
> > > at
> > > com.sap.dbtech.jdbc.StatementSapDB.sendSQL (StatementSapDB.java:778)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.doParse(
> > > CallableStatementSapDB.java:235)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.constructor(
> > > CallableStatementSapDB.java :186)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.<init>(
> > > CallableStatementSapDB.java:88)
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.prepareStatement(Connectio
> > > nSapDB.java:802)
> > >
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(Batcher
> > > Impl.java:249)
> > >
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl
> > > .java:61)
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl
> > > .java:56)
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(Batche
> > > rImpl.java:109)
> > >
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:460)
> > >
> > > ... 12 more
> > > net.sf.hibernate.JDBCException: could not insert: [
> > > com.ste.rolo.persistence.PPersonRolleZuordnungVersionen#15 ]
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:478)
> > >
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:442)
> > >
> > > at
> > > net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInse
> > > rtion.java:29)
> > >
> > > at
> > > net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
> > > at net.sf.hibernate.impl.SessionImpl.execute (SessionImpl.java:2335)
> > > at
> > > net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionI
> > > mpl.java:1775)
> > >
> > > at
> > > net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1536)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1501)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
> > > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483)
> > > at
> > > com.ste.rolo.realworldobjects.PersonRolleZuordnung.erzeugeNeue
> > > PersonRolleZuordnung
> > > (PersonRolleZuordnung.java:144)
> > > at
> > > com.ste.rolo.test.SimpleTest.testRealPersonRolle(SimpleTest.ja
> > > va:1024)
> > > at com.ste.rolo.test.SimpleTest.main(SimpleTest.java:147)
> > > Caused by: com.sap.dbtech.jdbc.exceptions.DatabaseException:
> > > [-2014] (at
> > > 128): Identifier too long
> > > at
> > > com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPa
> > > cket.java:72)
> > >
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSa
> > > pDB.java:910)
> > >
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:569)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.sendCommand(
> > > CallableStatementSapDB.java:1736)
> > > at
> > > com.sap.dbtech.jdbc.StatementSapDB.sendSQL (StatementSapDB.java:778)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.doParse(
> > > CallableStatementSapDB.java:235)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.constructor(
> > > CallableStatementSapDB.java :186)
> > > at com.sap.dbtech.jdbc.CallableStatementSapDB.<init>(
> > > CallableStatementSapDB.java:88)
> > > at
> > > com.sap.dbtech.jdbc.ConnectionSapDB.prepareStatement(Connectio
> > > nSapDB.java:802)
> > >
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(Batcher
> > > Impl.java:249)
> > >
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl
> > > .java:61)
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl
> > > .java:56)
> > > at
> > > net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(Batche
> > > rImpl.java:109)
> > >
> > > at
> > > net.sf.hibernate.persister.EntityPersister.insert(EntityPersis
> > > ter.java:460)
> > >
> > > ... 12 more
> > >
> > > ______________________________________________________________
> > > __________
> > >
> > > Thank you very much in advance.
> > >
> > > Regards,
> > > Praveenjothi
> > >
> >
>
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]