Subject java.lang.IncompatibleClassChangeError
Author txpet@msn.com
I am trying to deploy a cmp2 EJB using jboss 3.0.6 and jboss 3.2.0RC2. I am
using firebird jdbc/jca RC3. The table has three fields, int, VARCHAR(48),
VARCHAR(2), VARCHAR(48). I am using Eclipse 2.1.M5 and xDoclet 1.2RC2. I
keep getting the following error on deployment:

18:08:52,025 WARN [ServiceController] Problem starting service
jboss.j2ee:jndiName=jndi/CityBean,service=EJB
java.lang.IncompatibleClassChangeError
at org.firebirdsql.jdbc.FBStringField.setString(FBStringField.java:288)
at
org.firebirdsql.jdbc.FBPreparedStatement.setString(FBPreparedStatement.java:210)
at org.firebirdsql.jdbc.FBConnection.doQuery(FBConnection.java:1181)
at
org.firebirdsql.jdbc.FBDatabaseMetaData.getTables(FBDatabaseMetaData.java:2342)
at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.tableExists(SQLUtil.java:726)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:143)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:87)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:505)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:416)
at
org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:170)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
at $Proxy11.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:392)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy29.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:380)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
at $Proxy11.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:392)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy20.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:451)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:827)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:612)
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy7.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:404)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:545)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:195)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:268)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:392)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy5.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:231)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:827)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:612)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:596)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy6.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:332)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:239)
at org.jboss.Main.boot(Main.java:155)
at org.jboss.Main$1.run(Main.java:393)
at java.lang.Thread.run(Thread.java:536)

Source code for the bean is as follows:
import javax.ejb.EntityBean;

/**
* @ejb:bean name="City"
* jndi-name="jndi/CityBean"
* type="CMP"
* description="EJB For the geo city table"
* displayname="CityBean"
* cmp-version="2.x"
* @...
* method-intf="LocalHome"
* query="SELECT OBJECT(c) FROM City c"
* result-type-mapping="Local"
* signature="java.util.Collection findAll()"
* @...
* method-intf="LocalHome"
* query="SELECT DISTINCT OBJECT(c) FROM City c WHERE c.cityName = ?1"
* result-type-mapping="Local"
* signature="java.util.Collection findByCityName(java.lang.String
cityName)"
* @...
* method-intf="LocalHome"
* query="SELECT DISTINCT OBJECT(c) FROM City c WHERE c.stAbbr = ?1"
* result-type-mapping="Local"
* signature="java.util.Collection findByStateAbbr(java.lang.String
stAbbr)"
* @...
* table-name="City"
* @...-object
* match="*"
**/
public abstract class CityBean implements EntityBean {

/**
* Context set by container
*/
private javax.ejb.EntityContext _entityContext;

/**
* Manditory public constructor
*
* @return new CityBean
*/
public CityBean() {
}

/**
* Returns the cityId
*
* @return the cityId
* @...-field
* @...-field
* @...
* column-name="CITYID"
* @...-method
* view-type="local"
*/
public abstract java.lang.Integer getCityId();

/**
* Sets the cityId
*
* @param java.lang.Integer the new cityId value
*/
public abstract void setCityId(java.lang.Integer CityId);

/**
* Returns the cityName
*
* @return the cityName
* @...-field
* @...
* column-name="CITYNAME"
* @...-method
* view-type="local"
*/
public abstract java.lang.String getCityName();

/**
* Sets the cityName
*
* @param java.lang.String the new cityName value
* @...-method
* view-type="local"
*/
public abstract void setCityName(java.lang.String cityName);

/**
* Returns the stAbbr
*
* @return the stAbbr
* @...-field
* @...
* column-name="STABBR"
* @...-method
* view-type="local"
*/
public abstract java.lang.String getStAbbr();

/**
* Sets the stAbbr
*
* @param java.lang.String the new stAbbr value
* @...-method
* view-type="local"
*/
public abstract void setStAbbr(java.lang.String stAbbr);

/**
* Returns the county
*
* @return the county
* @...-field
* @...
* column-name="county"
* @...-method
* view-type="local"
*/
public abstract java.lang.String getCounty();

/**
* Sets the county
*
* @param java.lang.String the new county value
* @...-method
* view-type="local"
*/
public abstract void setCounty(java.lang.String county);

/**
* @ejb:create-method
**/

/**
* This create method takes only mandatory (non-nullable) parameters. The pk
columns must be provided. When the client invokes a create method, the EJB
container invokes the ejbCreate method. Typically, an ejbCreate method in an
entity bean performs the following tasks: <UL> <LI>Inserts the entity state
into the database.</LI> <LI>Initializes the instance variables.</LI>
<LI>Returns the primary key.</LI> </UL>
*
* @param cityId the cityId value
* @param cityName the cityName value
* @param stAbbr the stAbbr value
* @param county the county value
* @return the primary key of the new instance
* @...-method
*/
public CityPK ejbCreate( java.lang.Integer cityId, java.lang.String
cityName, java.lang.String stAbbr, java.lang.String county ) throws
javax.ejb.CreateException {
setCityId(cityId);
setCityName(cityName);
setStAbbr(stAbbr);
setCounty(county);
// EJB 2.0 spec says return null for CMP ejbCreate methods.
return null;
}

/**
* The container invokes this method immediately after it calls ejbCreate.
*
* @param cityId the cityId value
* @param cityName the cityName value
* @param stAbbr the stAbbr value
* @param county the county value
*/
public void ejbPostCreate( java.lang.Integer cityId, java.lang.String
cityName, java.lang.String stAbbr, java.lang.String county ) throws
javax.ejb.CreateException {
//Set the CMR
}

/**
* @ejb:create-method
**/
public CityPK ejbCreate() throws javax.ejb.CreateException {
return null;
}

/**
* The container invokes this method immediately after it calls ejbCreate.
*
*/
public void ejbPostCreate() throws javax.ejb.CreateException {
//Set the CMR
}

/**
* The container invokes setEntityContext just once - when it creates the
bean instance.
*
*/
public void setEntityContext(javax.ejb.EntityContext entityContext) {
_entityContext = entityContext;
}

/**
* At the end of the life cycle, the container removes the instance from the
pool and invokes this method.
*
*/
public void unsetEntityContext() {
_entityContext = null;
}
}

I have also tried stable versions of all the above mentioned products and
still get the same error.

I'm new to EBJ, JBoss and Firebird.

Sincerly,
Really feeling stupid in Illinois





_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail