For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > March 2004 > java.lang.NoSuchMethodError in stateful session bean









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author java.lang.NoSuchMethodError in stateful session bean
Biebel

2004-03-19, 8:45 pm

Hello,

I've a stateful session bean. In the ejbCreate I construct an object. The
problem is that the constructor isn't found.

Here are the classes.

Session bean:
public class yComboDataBean implements SessionBean
{
SessionContext sessionContext;
yServerCtx serverCtx;

public void ejbCreate(yUserProfile userProfile) throws CreateException
{
try
{
serverCtx = new yServerCtx( userProfile );
}
catch(Exception e)
{
throw new CreateException("Could not make database connection in
HistorySessionBean");
}
}

public void ejbRemove()
{
try
{
serverCtx.disconnect();
}
catch(java.sql.SQLException e) {}
finally
{
serverCtx = null;
}
}

public void ejbActivate() {}
public void ejbPassivate() {}

public void setSessionContext(SessionContext sessionContext)
{
this.sessionContext = sessionContext;
}
}



public class yServerCtx
{
private yUserProfile userProfile;
public DatabaseOps dbOps = new DatabaseOps();
public static final BigDecimal zero = new BigDecimal(0);

public yServerCtx(yUserProfile userProfile) throws
javax.naming.NamingException, java.sql.SQLException
{
this.userProfile = userProfile;
}

public void disconnect() throws java.sql.SQLException
{
dbOps.disconnect();
dbOps = null;
userProfile = null;
}
}


I've deployed everything on a JBoss app server. The error message I got is:

10:56:01,459 ERROR [LogInterceptor] Unexpected Error:
java.lang.NoSuchMethodError:
yTools.Server.yServerCtx.<init>(LyTools/yUserProfile;)V
at yToolsBeans.yComboDataBean.ejbCreate(yComboDataBean.java:25)
...


Has anyone a clue,
thanks
Bart



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com