B
biebel
Hi,
We have a big problem with the creation of an object in the ejbCreate method
of our bean (yComboDataBean). We construct an object that makes a database
connection (yServerCtx). This object is then used in methods of the bean as
a way to access the database.
Constructing the bean fails, because creating the server context object
fails. The error we get is the following (our JBoss server tells us
ERROR [LogInterceptor] Unexpected Error:
java.lang.NoSuchMethodError:
yTools.Server.yServerCtx.<init>(LyTools/yUserProfileV
at yToolsBeans.yComboDataBean.ejbCreate(yComboDataBean.java:25)
There are no problems with deployment, only execution. The code is as
follows:
// The bean (simplified)
// ...
public class yComboDataBean implements SessionBean
{ SessionContext sessionContext;
yServerCtx serverCtx;
public void ejbCreate(yUserProfile userProfile) throws CreateException
{ try {
serverCtx = new yServerCtx( userProfile );
}
catch(Exception e)
{ /*...*/ }
}
// ...
}
// The server context class (simplified)
package yTools.server;
public class yServerCtx
{ private yUserProfile userProfile;
public DatabaseOps dbOps = new DatabaseOps();
public yServerCtx(yUserProfile userProfile) throws Exception
{ this.userProfile = userProfile; }
}
The yUserProfile class is a simple data class.
We are absolutely baffled. The code compiles and deploys without problems,
but execution tells us "NoSuchMethodError"??? The bean is stateful,
bean-managed session bean. The environment is JBoss 3.2.1 / JBuilder 9 /
Windows2k.
Does anyone have a clue as to what is going wrong here?
Tom & Bart.
Upsilon SA (Luxembourg)
We have a big problem with the creation of an object in the ejbCreate method
of our bean (yComboDataBean). We construct an object that makes a database
connection (yServerCtx). This object is then used in methods of the bean as
a way to access the database.
Constructing the bean fails, because creating the server context object
fails. The error we get is the following (our JBoss server tells us
ERROR [LogInterceptor] Unexpected Error:
java.lang.NoSuchMethodError:
yTools.Server.yServerCtx.<init>(LyTools/yUserProfileV
at yToolsBeans.yComboDataBean.ejbCreate(yComboDataBean.java:25)
There are no problems with deployment, only execution. The code is as
follows:
// The bean (simplified)
// ...
public class yComboDataBean implements SessionBean
{ SessionContext sessionContext;
yServerCtx serverCtx;
public void ejbCreate(yUserProfile userProfile) throws CreateException
{ try {
serverCtx = new yServerCtx( userProfile );
}
catch(Exception e)
{ /*...*/ }
}
// ...
}
// The server context class (simplified)
package yTools.server;
public class yServerCtx
{ private yUserProfile userProfile;
public DatabaseOps dbOps = new DatabaseOps();
public yServerCtx(yUserProfile userProfile) throws Exception
{ this.userProfile = userProfile; }
}
The yUserProfile class is a simple data class.
We are absolutely baffled. The code compiles and deploys without problems,
but execution tells us "NoSuchMethodError"??? The bean is stateful,
bean-managed session bean. The environment is JBoss 3.2.1 / JBuilder 9 /
Windows2k.
Does anyone have a clue as to what is going wrong here?
Tom & Bart.
Upsilon SA (Luxembourg)