I am trying to follow the steps in Orion CMP Primer. 
My database server is Informix Dynamic Server 7.30.TC2. 
When I klick on the "Open the addressbook" link in 
HTML browser I get the following error message 
on the Orion server:

Caught "com.evermind.server.rmi.OrionRemoteException" while attempting to
find a
ll AddressBook entries.
com.evermind.server.rmi.OrionRemoteException: Database error: Identifier
length 
exceeds the maximum allowed by this version of the server.
        at
AddressBook_EntityHomeWrapper2.findAll(AddressBook_EntityHomeWrapper2
.java, Compiled Code)
        at __jspPage0_list_jsp._jspService(__jspPage0_list_jsp.java,
Compiled Co
de)
        at com.orionserver.http.OrionHttpJspPage.service(JAX)
        at com.evermind.server.http.HttpApplication.w5(JAX)
        at com.evermind.server.http.JSPServlet.service(JAX)
        at com.evermind.server.http.d1.si(JAX, Compiled Code)
        at com.evermind.server.http.d1.forward(JAX)
        at com.evermind.server.http.ed.sp(JAX, Compiled Code)
        at com.evermind.server.http.ed.so(JAX, Compiled Code)
        at com.evermind.util.f.run(JAX, Compiled Code)

        Nested exception is:
java.sql.SQLException: Identifier length exceeds the maximum allowed by this
ver
sion of the server.
        at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:308)
        at com.informix.jdbc.IfxSqli.errorDone(IfxSqli.java:3109)
        at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:2982)
        at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2066)
        at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java, Compiled
Code)

        at com.informix.jdbc.IfxSqli.executePrepare(IfxSqli.java:977)
        at
com.informix.jdbc.IfxResultSet.executePrepare(IfxResultSet.java:186)
        at
com.informix.jdbc.IfxPreparedStatement.setupExecutePrepare(IfxPrepare
dStatement.java:182)
        at
com.informix.jdbc.IfxPreparedStatement.<init>(IfxPreparedStatement.ja
va:165)
        at
com.informix.jdbc.IfxSqliConnect.prepareStatement(IfxSqliConnect.java
:1267)
        at com.evermind.sql.an.prepareStatement(JAX)
        at com.evermind.sql.an.prepareStatement(JAX)
        at
com.evermind.server.ejb.DataSourceConnection.getCustomStatement(JAX)
        at
AddressBook_EntityHomeWrapper2.findAll(AddressBook_EntityHomeWrapper2
.java, Compiled Code)
        at __jspPage0_list_jsp._jspService(__jspPage0_list_jsp.java,
Compiled Co
de)
        at com.orionserver.http.OrionHttpJspPage.service(JAX)
        at com.evermind.server.http.HttpApplication.w5(JAX)
        at com.evermind.server.http.JSPServlet.service(JAX)
        at com.evermind.server.http.d1.si(JAX, Compiled Code)
        at com.evermind.server.http.d1.forward(JAX)
        at com.evermind.server.http.ed.sp(JAX, Compiled Code)
        at com.evermind.server.http.ed.so(JAX, Compiled Code)
        at com.evermind.util.f.run(JAX, Compiled Code)

SQL statement issued by Orion server was:

select addressbook_ejb_AddressEntry.name,
  addressbook_ejb_AddressEntry.address, addressbook_ejb_AddressEntry.city
  from addressbook_ejb_AddressEntry
  
Column names are longer than 18 as I specified in database schema file:

<?xml version="1.0"?>
<!DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema"
"http://www.orionserver.com/dtds/database-schemas.dtd">

<database-schema name="Informix" not-null="not null" null="null"
primary-key="primary key" max-table-name-length="18">
        <type-mapping type="java.lang.String" name="varchar2(255)" />
        <type-mapping type="int" name="number(20,0)" />
        <type-mapping type="long" name="number(20,0)" />
        <type-mapping type="float" name="number(20,5)" />
        <type-mapping type="double" name="number(30,0)" />
        <type-mapping type="byte" name="number(10,0)" />
        <type-mapping type="char" name="char(1)" />
        <type-mapping type="short" name="number(10,0)" />
        <type-mapping type="boolean" name="number(1,0)" />
        <type-mapping type="java.util.Date" name="date" />
        <type-mapping type="java.io.Serializable" name="blob" />

        <disallowed-field name="password" />
        <disallowed-field name="date" />
</database-schema>

I added the following data-source tag in data-sources.xml file:

<data-source
  class="com.evermind.sql.ConnectionDataSource"
  name="Informix"
  location="jdbc/InformixDS"
  xa-location="jdbc/xa/InformixXADS"
  ejb-location="jdbc/InformixDS"
  connection-driver="com.informix.jdbc.IfxDriver"
  username="username"
  password="password"
 
url="jdbc:informix-sqli://petr.iskratel.si:1526/orion:INFORMIXSERVER=ol_petr
"
  schema="database-schemas/informix.xml"
  inactivity-timeout="30"
/>

with best regards, 

Ciril Petr
System engineer
Iskratel telecommunications Systems Ltd.
Trzaska c. 37a
2000 Maribor
www.iskratel.si

Phone: +386 2 3003 227
Fax: +386 4 207 39 930 (fax server)
Fax: +386 2 3003 199
EMail: [EMAIL PROTECTED]


Reply via email to