EJBException instead of RemoteException???
Hi, everybody!
Does someone knows wyh my 9ias on Unix throws, from remote calls on EJBs, a javax.EJBException instead of a RemoteException??
The Specs says that the container will wrap the EJBException in a RemoteException.
This happens on the stand alone OC4J installation, but not on the Enterprise Application Server (same 9.0.3 version, same ear deployed).
Where am I wrong?
Thanks
Hi, everybody!
Does someone knows wyh my 9ias on Unix throws, from remote calls on EJBs, a javax.EJBException instead of a RemoteException??
The Specs says that the container will wrap the EJBException in a RemoteException.
This happens on the stand alone OC4J installation, but not on the Enterprise Application Server (same 9.0.3 version, same ear deployed).
Where am I wrong?
Thanks
Similar Messages
-
Doubt: NullPointerException instead of RemoteException???
Hi,
Scenario:
1. An external object (hosted by another process) registers itself in WebLogic
JNDI by invoking bind
2. WebLogic EJBs invoke the external object, everything is OK
3. Process hosting the external object goes down
4. Remote reference still exists in JNDI
5. Invoking the remote object throws the following exception:
2002-09-09 15:54:13,492 ERROR [ExecuteThread: '6' for queue: 'default'] cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean
- Failed to send message to clientconnector: Test-SMSC
java.lang.NullPointerException
at weblogic.transaction.internal.PropagationContext.getVersion(PropagationContext.java:646)
at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:165)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:92)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObjectWL(ChunkedObjectOutputStream.java:113)
at weblogic.rjvm.MsgAbbrevOutputStream.setTxContext(MsgAbbrevOutputStream.java:111)
at weblogic.rmi.internal.BasicOutboundRequest.setTxContext(BasicOutboundRequest.java:143)
at weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:95)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:116)
at cz.oskarmobil.is.bmg.connectivity.tcpip.UCPClientConnector_WLStub.sendMessage(Unknown
Source)
at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.sendMessage(UCPPostprocessorBean.java:294)
at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.sendMessage(UCPPostprocessorBean.java:237)
at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.onMessage(UCPPostprocessorBean.java:177)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:348)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:282)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:263)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2309)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2232)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
Why not RemoteException??? Why NullPointerException??? Wouldn't be RemoteException
the right exception in this case?
Please clarify this, since I thought it is enough to catch only RemoteException
and relookup the object but now seems NullPointerException is also needed to be
catched.
Or, do I miss something?
/SBwhile inserting data inserted into Temp_EmployeeDetails1, but not inserting in EmployeeDetails1,
Because it is an INSTEAD OF trigger; instead of directly inserting the data into the base table the Trigger is fired and you have to insert the data on your own, e.g. after validationg or modifying the data.
See
INSTEAD OF INSERT Triggers /
Designing INSTEAD OF Triggers
Use an AFTER Trigger instead or modify your INSTEAD OF Trigger =>
create trigger [dbo].[tr_emp1]
on [dbo].[Employeedetails1]
instead of insert
as
begin
insert into Emploeeydetails1
[EmployeeID],
[Employeename],
[Deptname]
select ins.[EmployeeID],
ins.[Employeename],
ins.[Deptname]
from inserted ins
insert into Temp_Emploeeydetails1
[EmployeeID],
[Employeename],
[Deptname]
select ins.[EmployeeID],
ins.[Employeename],
ins.[Deptname]
from inserted ins
end
Olaf Helper
[ Blog] [ Xing] [ MVP] -
RemoteException deprecation and EJBException
Is throwing a RemoteException from remote interfaces a deprecated
programming practice?
I've read some articles and newsgroups which stated that.
If true, since when exactly is this deprecated?
Remote interfaces implement java.rmi.Remote so they must throw a
RemoteException, don't they?
Should I throw EJBException instead of RemoteException?
Any remarks, explanations would be greatly helpful.Exactly.
The container implementation of your remote interface will throw a
RemoteException or javax.transaction.TransactionRolledBackException
(which is an instance of RemoteException) if you throw an EJBException
from your Bean implementation.
If instead you use a Local interface, then you should either get the
EJBException or javax.ejb.TransactionRolledBackLocalException (which is
an instance of EJBException).
It's a bit complicated and I might have been unclear myself for which I
apologize.
HTH,
Dejan
Yonatan Taub wrote:
I don't quite follow.
Do you mean that my remote interface class should declare that it throws a
RemoteException while my bean implementation class
should not state in its throws clause a RemoteException?
"Deyan D. Bektchiev" <[email protected]> wrote in message
news:[email protected]...
EJB 1.1 Spec deprecates throwing RemoteExceptions from the Bean
implementations.
EJBs can still throw it and the container should behave in the same was
as if an EJBException was thrown.
The difference is when all this happens if your EJB has a Remote and
Local interfaces. The local clients (those using the local interface)
should get the EJB exception that might be wrapped in a
TransactionRolledBackException to indicate that the current transaction
was rolled back, while the remote clients should get the EJB exception
(or any RuntimeException thrown from your EJB implementation) wrapped in
a RemoteException.
HTH,
Dejan
Yonatan Taub wrote:
All of this is known to me.
Since then I read some more material on the subject.
It seems that throwing a RemoteException from a bean implementation
class
is deprecated.
RemoteException indicates a system exception and the bean implementation
class should throw an EJBException.
The container specific implementation would catch this exception and
throw a
RemoteException.
http://groups.google.com/groups?q=ejb+RemoteException+deprecated+ejbexcepti
on&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=8i5b64%24bk8%241%40newsgroups.bea.com&rn
um=4
I would appreciate your thoughts on the subject. -
RemoteException vs EJBException
Hi
In EJB 2.0 specification, it is mentioned that the use of java.rmi.RemoteException was deprecated for container-invoked callbacks (like ejbCreate, ejbPassivate, ejbActivate) and must use javax.ejb.EJBException instead.
But when I create a new EJB 2.0 component with java.rmi.RemoteException, build and deployment was successful. Also with javax.ejb.EJBException, build and deployment was successful.
This means can we use either of these exceptions in EJB 2.0....?
Is it not necessary to replace java.rmi.RemoteException with javax.ejb.EJBException ....?
Thanks
RaghuMaybe deprecation was only introduced in specification but not in implementation, otherwise compilation should have reported a deprecation warning.
-
Who can explain how EJB connect to Oracle9i DB with DataSource?
I have taken 4 days into this problem. I am developing EJB with J2EE1.3 and Oracle9i DB, I can connect to DB in code with DriverManager. But I want to use DataSource to connect to DB. I failed, I can not get new way to resolve it when I after try to connect with javax.sql.DataSource, oracle.jdbc.pool.OracleDataSource and oracle.jdbc.pool.OracleConnectionPoolDataSource.
I have got different Exceptions when I coding different ways:
one is:
Caught an exception.
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: U
nable to connect to database. com.sun.enterprise.resource.JdbcDataSource; nested
exception is:
javax.ejb.EJBException: Unable to connect to database. com.sun.enterpris
e.resource.JdbcDataSource
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to
connect to database. com.sun.enterprise.resource.JdbcDataSource; nested excepti
on is:
javax.ejb.EJBException: Unable to connect to database. com.sun.enterpris
e.resource.JdbcDataSource
javax.ejb.EJBException: Unable to connect to database. com.sun.enterprise.resour
ce.JdbcDataSource
<<no stack trace available>>
the Other is:
Caught an exception.
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: U
nable to connect to database. makeConnection:Io Exception: Connection refused(DESCRIP
TION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)
))); nested exception is:
javax.ejb.EJBException: Unable to connect to database. makeConnection:Io
Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_
STACK=(ERROR=(CODE=12505)(EMFI=4))))
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to
connect to database. makeConnection:Io Exception: Connection refused(DESCRIPTION=(TM
P=)(VSNNUM=150999297)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))); nes
ted exception is:
javax.ejb.EJBException: Unable to connect to database. makeConnection:Io
Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_
STACK=(ERROR=(CODE=12505)(EMFI=4))))
javax.ejb.EJBException: Unable to connect to database. makeConnection:Io Exception: C
onnection refused(DESCRIPTION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_STACK=(E
RROR=(CODE=12505)(EMFI=4))))
<<no stack trace available>>
My codes related are:
private void makeConnection() throws NamingException, SQLException {
try{
InitialContext ic = new InitialContext();
OracleConnectionPoolDataSource ocpds = (OracleConnectionPoolDataSource) ic.lookup(dbName);
PooledConnection pc = ocpds.getPooledConnection();
con = pc.getConnection();
}catch(SQLException ex){
throw new SQLException("makeConnection:" + ex.getMessage());
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
con = DriverManager.getConnection(
"jdbc:oracle:thin:@172.28.200.43:1521:shcd",
"lijun", "xiaotian"); */
public void setEntityContext(EntityContext context) {
this.context = context;
try {
makeConnection();
} catch (Exception ex) {
throw new EJBException("Unable to connect to database. " +
ex.getMessage());
I believe I set JNDI and config EJB right, because I can run it with Cloudscape DB all right.
who can tell me where is my WRONG, or tell me how to connect to Oracle9i DB?Hi Jhlijun,
I am facing the same problem at the moment. However, I am not using a pooled connection. The following is my code. I am trying to connect a stateless session bean to an Oracle 9i database with result being fed back to a jsp page.
package Test;
import javax.naming.*;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.sql.DataSource;
import javax.sql.*;
public class TestSessionEJBbean extends java.lang.Object implements javax.ejb.SessionBean
String q="Select NAMETITLE,NAMEFIRST,NAMELAST from People where PeopleRSN<100";
protected boolean create() throws java.lang.Exception
return true;
public TestSessionEJBbean()
{ // EJB constructors don't have a server context.
private void unhandledEvent( String listenerName, String methodName, java.lang.Object event )
// method for interface javax.ejb.SessionBean
public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException
// To Do
// method for interface javax.ejb.SessionBean
public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException
// To Do
// method for interface javax.ejb.SessionBean
public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException
// To Do
// method for interface javax.ejb.SessionBean
public void setSessionContext( javax.ejb.SessionContext parm0 ) throws javax.ejb.EJBException, java.rmi.RemoteException
this._sessionContext = parm0; // generated helper code
// To Do
* Test Method
public String Test() throws javax.ejb.EJBException
return "Hi! I am the SessionEjbBean.";
* Session Context of this EJB.
* Set in 'setSessionContext()' before any 'ejbCreate()' is executed.
private javax.ejb.SessionContext _sessionContext;
* ejbCreate Method
public void ejbCreate() throws javax.ejb.EJBException, javax.ejb.CreateException
try {
create(); // This 'create()' is used for internal initialization.
catch( java.lang.Exception __e) {
System.err.println( __e.toString() + " " + __e.getMessage() );
// TODO: implement
* getDBConnection Method
public sun.jdbc.rowset.CachedRowSet getDBConnection() throws javax.ejb.EJBException
String testPrint = "Starting...";//Only to check output
Connection conn;
sun.jdbc.rowset.CachedRowSet crset=null;
try {
testPrint += "before new InitialContext()....";//Only to check output
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("java:comp/env/jdbc/coquit");
testPrint += "before ds.getConnection()....";//Only to check output
conn = ds.getConnection("coquit","coquit");
testPrint += "before conn.createStatement()....";
Statement stmt=conn.createStatement();
testPrint += "before stmt.executeQuery(....)";
ResultSet rset = stmt.executeQuery(q);
testPrint += "before new sun.jdbc.rowset.CachedRowSet()";
crset = new sun.jdbc.rowset.CachedRowSet();
testPrint += "before crset.populate(rset)";
crset.populate(rset);
rset.close();
stmt.close();
conn.close();
} catch (NamingException ne) {
System.out.println("TestSessionEJBbean::getDBConnection Naming Exception " + ne);
}catch (Exception e){
System.out.println(testPrint+"...TestSessionEJBbean::getDBConnectionException" + e);
System.out.println("\n\n");
e.printStackTrace();
return crset; -
Warning Messages On Deploy (APS 7.0.2/Weblogic 8.1.4)
I'm getting these warning upon deploying the edc-server.ear. Any ideas on what these mean?<br /><br />####<Mar 20, 2006 3:00:18 PM PST> <Warning> <EJB> <hqstwla02> <hqstwla02> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-012034> <The Remote interface method: 'public abstract com.adobe.edc.common.dto.LicenseDTO[] com.adobe.edc.policy.PolicyManager.getLicenses(com.adobe.edc.common.dto.LicenseSearchFilt erDTO,int) throws com.adobe.edc.common.EDCException,javax.ejb.EJBException,java.rmi.RemoteException' in EJB 'PolicyManagerBean' contains a parameter of type: 'int' which is not Serializable. Though the EJB 'PolicyManagerBean' has call-by-reference set to false, this parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is Serializable.> <br /><br />####<Mar 20, 2006 3:00:47 PM PST> <Debug> <com.adobe.edc.server.scheduler.EDCScheduler> <hqstwla01> <hqstwla01> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<anonymous>> <> <000000> <No properties were found in com/adobe/config/EDC Scheduler service-init> <br /><br />####<Mar 20, 2006 3:00:47 PM PST> <Debug> <com.adobe.edc.server.scheduler.EDCScheduler> <hqstwla01> <hqstwla01> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<anonymous>> <> <000000> <java.util.MissingResourceException: Can't find bundle for base name com/adobe/config/EDC Scheduler service-init, locale en_US<br />java.util.MissingResourceException: Can't find bundle for base name com/adobe/config/EDC Scheduler service-init, locale en_US<br /><br /> at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:838)<br /><br /> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:807)<br /><br /> at java.util.ResourceBundle.getBundle(ResourceBundle.java:551)<br /><br /> at com.adobe.service.Service.initialize(Service.java:364)<br /><br /> at com.adobe.service.ServerLifeCycleListener.contextInitialized(ServerLifeCycleListener.java :28)<br /><br /> at weblogic.servlet.internal.WebAppServletContext$FireContextListenerAction.run(WebAppServle tContext.java:6781)<br /><br /> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)<b r /><br /> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)<br /><br /> at weblogic.servlet.internal.WebAppServletContext.notifyCreated(WebAppServletContext.java:16 81)<br /><br /> at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java :3255)<br /><br /> at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5949) <br /><br /> at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:862)<br /><br /> at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2127)<br /><br /> at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2168)<br /><br /> at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(Sl aveDeployer.java:2503)<br /><br /> at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2 421)<br /><br /> at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2138)<br /><br /> at weblogic.management.deploy.slave.SlaveDeployer.commitUpdate(SlaveDeployer.java:676)<br /><br /> at weblogic.drs.internal.SlaveCallbackHandler$2.execute(SlaveCallbackHandler.java:35)<br /><br /> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)<br /><br /> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)<br /><br />>
Hi, I think you may want to follow-up on this thread
Evangelos Kokkoris, "LiveCycle supported software: BEA WebLogic 8.1, Service Pack 4" #2, 16 Mar 2006 11:53 am -
Exists some problem with auto-relationship?
Hi all,
I'm getting the following exception when I make deploy.
[14/May/2003:12:23:28] FINE ( 3132): Field: atributos
[14/May/2003:12:23:28] FINE ( 3132): Field: coluna br.com.inttegra.infra.bean.tabela.ColunaTabelaLocal
[14/May/2003:12:23:28] FINE ( 3132): -Methods: getColuna setColuna
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
[14/May/2003:12:23:28] FINE ( 3132): manySide: false
[14/May/2003:12:23:28] FINE ( 3132): Field: thisRelationshipFieldWasGeneratedByTheNameMapper67
[14/May/2003:12:23:28] FINE ( 3132): Field: classe br.com.inttegra.infra.bean.classes.ClassesLocal
[14/May/2003:12:23:28] FINE ( 3132): -Methods: getClasse setClasse
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
[14/May/2003:12:23:28] FINE ( 3132): manySide: false
[14/May/2003:12:23:28] FINE ( 3132): Field: thisRelationshipFieldWasGeneratedByTheNameMapper71
[14/May/2003:12:23:28] FINE ( 3132): Finder: ejbFindByPrimaryKey
[14/May/2003:12:23:28] FINE ( 3132): Finder: ejbFindAll
[14/May/2003:12:23:28] FINER ( 3132): EJBQLC compile query
Bean: ParseAtributo
Method: java.util.Collection findAll()
EJBQL: select object(pa) from ParseAtributoEJB pa
[14/May/2003:12:23:28] FINER ( 3132): EJBQLC start syntax analysis
[14/May/2003:12:23:28] FINEST ( 3132): EJBQLC dump tree (AST)
QUERY [61, (0/0), null]
from [5, (1/19), null]
RANGE [62, (0/0), null]
ParseAtributoEJB [46, (1/24), null]
pa [46, (1/41), null]
select [4, (1/1), null]
object [8, (1/8), null]
pa [46, (1/15), null]
WHERE [6, (0/0), null]
TRUE [10, (0/0), null]
[14/May/2003:12:23:28] FINER ( 3132): EJBQLC start semantic analysis
[14/May/2003:12:23:28] FINEST ( 3132): EJBQLC dump tree (typed AST)
QUERY [61, (0/0), null]
from [5, (1/19), null]
RANGE [62, (0/0), null]
ParseAtributoEJB [68, (1/24), ParseAtributo]
pa [67, (1/41), ParseAtributo]
select [4, (1/1), null]
object [8, (1/8), ParseAtributo]
pa [66, (1/15), ParseAtributo]
WHERE [6, (0/0), null]
TRUE [10, (0/0), boolean]
[14/May/2003:12:23:28] FINER ( 3132): EJBQLC start code generation
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState
[14/May/2003:12:23:28] FINER ( 3132): EJBQLC result JDOQLElements(candidateClass: br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState, filter: true, result: this, resultType: br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState, isPCResult: true)
[14/May/2003:12:23:28] FINE ( 3132): Selectors: 0
[14/May/2003:12:23:28] FINE ( 3132): CreateMethod: br.com.inttegra.infra.bean.parse.ParseAtributoEJBcreate
[14/May/2003:12:23:28] FINE ( 3132): ejbCreateMethod: ejbCreate
[14/May/2003:12:23:28] FINE ( 3132): ejbPostCreateMethod: ejbPostCreate
[14/May/2003:12:23:28] FINE ( 3132): Processing method: unsetEntityContext
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.unsetEntityContext()
[14/May/2003:12:23:28] FINE ( 3132): Processing method: ejbRemove
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.ejbRemove() throws javax.ejb.RemoveException,javax.ejb.EJBException
[14/May/2003:12:23:28] FINE ( 3132): Processing method: beforeCompletion
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Processing method: ejbLoad
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.ejbLoad() throws javax.ejb.EJBException,java.rmi.RemoteException
[14/May/2003:12:23:28] FINE ( 3132): Processing method: ejbStore
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.ejbStore() throws javax.ejb.EJBException,java.rmi.RemoteException
[14/May/2003:12:23:28] FINE ( 3132): Processing method: jdoCleanAllRefs
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Processing method: setEntityContext
[14/May/2003:12:23:28] FINE ( 3132): Known method: null
[14/May/2003:12:23:28] FINE ( 3132): Found method: public void br.com.inttegra.infra.bean.parse.ParseAtributoEJB.setEntityContext(javax.ejb.EntityContext)
[14/May/2003:12:23:28] FINE ( 3132): pkfield: idParseAtributo
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseAtributoEJB789766943_JDOState
[14/May/2003:12:23:28] FINEST ( 3132): TP PCClassGen: generating 'br/com/inttegra/infra/bean/parse/ParseAtributoEJB789766943_JDOState'...
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseEJB_1482881505_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.parse.ParseEJB_1482881505_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.tabela.ColunaTabelaEJB_849864039_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.classes.ClassesEJB_413640801_JDOState
[14/May/2003:12:23:28] FINEST ( 3132): TP PCClassGen: DONE generating 'br/com/inttegra/infra/bean/parse/ParseAtributoEJB789766943_JDOState'...
[14/May/2003:12:23:28] FINE ( 3132): gen file in /u03/dds/dds/var/opt/SUNWappserver7/domains/domainCronos/ServerNC/generated/ejb/j2ee-modules/NC
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.identificacao.IdentificacaoEJB_1068400097_JDOState
[14/May/2003:12:23:28] FINE ( 3132): ##### PCImplClass Name is br.com.inttegra.infra.bean.resposta.RespostaEJB670563865_JDOState
[14/May/2003:12:23:28] FINE ( 3132): listCmrs identificacoes parse resposta
[14/May/2003:12:23:28] FINE ( 3132): persistentClass br.com.inttegra.infra.bean.identificacao.IdentificacaoEJB
[14/May/2003:12:23:28] SEVERE ( 3132): JDOCodeGenerator: Caught Exception in generating CMP:
javax.ejb.EJBException: CMRFieldInfo not found for field identificacaoPai
at com.sun.enterprise.deployment.PersistenceDescriptor.getCMRFieldInfoByName(PersistenceDescriptor.java:262)
at com.iplanet.ias.persistence.internal.model.ejb.util.NameMapper.getRelatedEjbDescriptor(NameMapper.java:368)
at com.iplanet.ias.persistence.internal.model.ejb.util.NameMapper.getEjbNameForLocalInterface(NameMapper.java:297)
at com.sun.jdo.spi.persistence.support.ejb.model.util.NameMapper.getPersistenceClassForLocalInterface(NameMapper.java:284)
at com.sun.jdo.spi.persistence.support.ejb.model.DeploymentDescriptorModel.getFieldType(DeploymentDescriptorModel.java:503)
at com.sun.jdo.api.persistence.model.util.ModelValidator.shouldBeRelationship(ModelValidator.java:2377)
at com.sun.jdo.api.persistence.model.util.ModelValidator.isLegalRelationship(ModelValidator.java:2384)
at com.sun.jdo.api.persistence.model.util.ModelValidator.getFieldsValidationList(ModelValidator.java:325)
at com.sun.jdo.api.persistence.model.util.ModelValidator.getBasicValidationList(ModelValidator.java:167)
at com.sun.jdo.api.persistence.model.util.ModelValidator.getFullValidationList(ModelValidator.java:183)
at com.sun.jdo.api.persistence.model.util.ModelValidator.fullValidationCheck(ModelValidator.java:131)
at com.sun.jdo.api.persistence.model.Model.validate(Model.java:1592)
at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator.validate(JDOCodeGenerator.java:189)
at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator.generate(JDOCodeGenerator.java:225)
at com.iplanet.ias.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:155)
at com.iplanet.ias.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:1029)
at com.iplanet.ias.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:464)
at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:181)
at com.iplanet.ias.deployment.backend.EjbModuleDeployer.runEJBC(EjbModuleDeployer.java:246)
at com.iplanet.ias.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:128)
at com.iplanet.ias.deployment.backend.ModuleDeployer.doRequest(ModuleDeployer.java:77)
at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModuleArchiveOrDirectory(ManagedServerInstance.java:890)
at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModule(ManagedServerInstance.java:841)
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 com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callInvoke(AdminAPIEntryServlet.java:217)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callMBean(AdminAPIEntryServlet.java:176)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doGet(AdminAPIEntryServlet.java:101)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doPost(AdminAPIEntryServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.S
[14/May/2003:12:23:28] WARNING ( 3132): DPL5035:Error while running ejbc
com.iplanet.ias.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
at com.iplanet.ias.deployment.backend.EJBCompiler.wrapException(EJBCompiler.java:589)
at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:186)
at com.iplanet.ias.deployment.backend.EjbModuleDeployer.runEJBC(EjbModuleDeployer.java:246)
at com.iplanet.ias.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:128)
at com.iplanet.ias.deployment.backend.ModuleDeployer.doRequest(ModuleDeployer.java:77)
at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModuleArchiveOrDirectory(ManagedServerInstance.java:890)
at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployEJBJarModule(ManagedServerInstance.java:841)
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 com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callInvoke(AdminAPIEntryServlet.java:217)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.callMBean(AdminAPIEntryServlet.java:176)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doGet(AdminAPIEntryServlet.java:101)
at com.iplanet.ias.admin.server.core.servlet.AdminAPIEntryServlet.doPost(AdminAPIEntryServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
Caused by: com.iplanet.ias.ejb.codegen.CmpCompilerException: Error while processing CMP beans.
at com.iplanet.ias.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:198)
at com.iplanet.ias.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:1029)
at com.iplanet.ias.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:464)
at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:181)
... 30 more
Caused by: javax.ejb.EJBException: CMRFieldInfo not found for field identificacaoPai
at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator.generate(JDOCodeGenerator.java:264)
at com.iplanet.ias.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:155)
... 33 more
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: get connection
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: create connection
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: opening socket to [192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: server suggested 127.0.0.1:62189
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: using 192.168.200.9:0
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: create call context
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: outbound call: [endpoint:[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5](remote),objID:[0:0:0, 2]] : sun.rmi.transport.DGCImpl_Stub[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: write remote call header...
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: getting output stream
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: execute call
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: getting input stream
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "java.rmi.dgc.Lease", codebase = ""
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "java.rmi.dgc.Lease" found via codebase, defined by null
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "java.rmi.dgc.VMID", codebase = ""
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "java.rmi.dgc.VMID" found via codebase, defined by null
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "[B", codebase = ""
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "[B" found via codebase, defined by null
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: name = "java.rmi.server.UID", codebase = ""
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: (thread context class loader: sun.misc.Launcher$AppClassLoader@a56a7c)
[14/May/2003:12:23:33] FINER ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: class "java.rmi.server.UID" found via codebase, defined by null
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: free connection (reuse = true)
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: reuse connection
[14/May/2003:12:23:33] FINE ( 3132): RMI RenewClean-[192.168.200.9:40873,com.iplanet.ias.admin.server.core.channel.LocalRMIClientSocketFactory@6fdca5]: create reaper
my ejb-jar:
<ejb-relation>
<ejb-relation-name>Identificacao-Identificacoes</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Identificacao-has-identificacoes</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>Identificacao</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>identificacoes</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>identificacoes-owned-by-Identificacao</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>Identificacao</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>identificacaoPai</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
my sun-cmp-mappgins
<cmr-field-mapping>
<cmr-field-name>resposta</cmr-field-name>
<column-pair>
<column-name>IDENTIFICACAO.ID_RESPOSTA</column-name>
<column-name>RESPOSTA.ID_RESPOSTA</column-name>
</column-pair>
</cmr-field-mapping>
<cmr-field-mapping>
<cmr-field-name>identificacaoPai</cmr-field-name>
<column-pair>
<column-name>IDENTIFICACAO.ID_IDENTIFICACAO_PAI</column-name>
<column-name>IDENTIFICACAO.ID_IDENTIFICACAO</column-name>
</column-pair>
</cmr-field-mapping>
<cmr-field-mapping>
<cmr-field-name>identificacoes</cmr-field-name>
<column-pair>
<column-name>IDENTIFICACAO.ID_IDENTIFICACAO</column-name>
<column-name>IDENTIFICACAO.ID_IDENTIFICACAO_PAI</column-name>
</column-pair>
</cmr-field-mapping>
<cmr-field-mapping>
<cmr-field-name>parse</cmr-field-name>
<column-pair>
<column-name>IDENTIFICACAO.ID_PARSE</column-name>
<column-name>PARSE.ID_PARSE</column-name>
</column-pair>
</cmr-field-mapping>
somebody already got this exception?This question is identical to the thread=19208 and 19209.
Please do not duplicate the threads.
Regards,
Marina -
How to use local interface in my easy code ?
hi everybody
I work on an ejb project. My code is like that to test remote interface (and it works) :
public class TestStudent {
Properties properties;
public TestStudent() {
properties = new Properties();
properties.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url", "jnp://localhost:1099");
properties.put("jnp.disableDiscovery", "true");
public static void main(String[] args) {
TestStudent beanStudent = new TestStudent();
beanStudent.createBean();
public void createBean() throws EJBException {
try {
InitialContext context = new InitialContext(properties);
Object object = context.lookup(StudentHome.JNDI_NAME);
StudentHome studentHome = (StudentHome) PortableRemoteObject.narrow(object,StudentHome.class);
Student student = studentHome.create();
student.setName("pirlouit");
System.out.println(student.getId());
System.out.println(student.getName());
} catch (NamingException e) {
throw new EJBException(e);
} catch (RemoteException e) {
throw new EJBException(e);
} catch (CreateException e) {
throw new EJBException(e);
}Then I do quite the same thing to test local interface like in the following code but it doen't work :
public class TestStudent {
Properties properties;
public TestStudent() {
properties = new Properties();
properties.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url", "jnp://localhost:1099");
properties.put("jnp.disableDiscovery", "true");
public static void main(String[] args) {
TestStudent beanStudent = new TestStudent();
beanStudent.createBean();
public void createBean() throws EJBException {
try {
InitialContext context = new InitialContext(properties);
Object object = context.lookup(StudentLocalHome.JNDI_NAME);
StudentLocalHome studentLocalHome = (StudentLocalHome)object;
System.out.println("studentLocalHome is null ? "+studentHome.equals(null));
StudentLocal student = studentLocalHome.create();
student.setName("pirlouit");
System.out.println(student.getId());
System.out.println(student.getName());
} catch (NamingException e) {
throw new EJBException(e);
} /*catch (RemoteException e) {
throw new EJBException(e);
}*/ catch (CreateException e) {
throw new EJBException(e);
}The print of "student local home is null ?" give me 'true' which is not the answer I want ... so here is the problem. How can I get my entity bean using local interface ?
For the moment 've got the exception (which appears on instruction "StudentLocal student = studentLocalHome.create();") :
Exception in thread "main" java.lang.NullPointerException
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
at $Proxy0.create(Unknown Source)Please help !! Thank you very much !Write a JSP to test Local Interface. You cannot call Local Interface from a remote JVM.
Jay
http://www.javarss.com - Java News from around the world.
Visit JavaRSS.com and add above signature to your messages. Thanks! -
Exception while starting OC4J 10g
When ever I start OC4J, I get the following exception thrown. Althopugh my container starts. Also when I try to connect using admin_client.jar for deploying any CMP EJB, it fails to connect.
I am using JDK 1.4.2 even when I invoke with JDev 10g java executable I get the same error.
Can some one please help me. I am desperately looking to get started with 10g
D:\App Servers\oc4j\j2ee\home>D:\JavaTools\JDev10g\jdk\bin\java -jar oc4j.jar
03/11/19 18:42:13 Auto-deploying ../../home/applications/admin_ejb.jar (New serv
er version detected)... MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:3: p
ackage oracle.dms.instrument does not exist
import oracle.dms.instrument.*;
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:7: package javax.ejb does no
t exist
import javax.ejb.*;
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:10: cannot access javax.ejb.
EJBHome
file javax\ejb\EJBHome.class not found
public class MBeanServerEjbHome_StatefulSessionHomeWrapper1 extends com.evermind
.server.ejb.RemoteStatefulSessionEJBHome implements oracle.oc4j.admin.jmx.ejb.MB
eanServerEjbHome
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:22: package javax.ejb does n
ot exist
public oracle.oc4j.admin.jmx.ejb.MBeanServerEjbRemote create(oracle.oc4j.admin.j
mx.shared.Domain argument0) throws javax.ejb.CreateException, java.rmi.RemoteExc
eption
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:150: cannot resolve symbol
symbol : class SessionBean
location: class MBeanServerEjbHome_StatefulSessionHomeWrapper1
public SessionBean createInstance()
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:155: cannot resolve symbol
symbol : class NounIntf
location: class MBeanServerEjbHome_StatefulSessionHomeWrapper1
protected static NounIntf create___124_noun = null;
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:156: cannot resolve symbol
symbol : class PhaseEventIntf
location: class MBeanServerEjbHome_StatefulSessionHomeWrapper1
protected static PhaseEventIntf create___124_wrapperPE = null;
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:157: cannot resolve symbol
symbol : class PhaseEventIntf
location: class MBeanServerEjbHome_StatefulSessionHomeWrapper1
protected static PhaseEventIntf create___124_clientPE = null;
^
MBeanServerEjbHome_StatefulSessionHomeWrapper1.java:158: cannot resolve symbol
symbol : class PhaseEventIntf
location: class MBeanServerEjbHome_StatefulSessionHomeWrapper1
protected static PhaseEventIntf create___124__PostCreatePE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3: package oracle.dms.inst
rument does not exist
import oracle.dms.instrument.*;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:5: package javax.ejb does
not exist
import javax.ejb.*;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:11: cannot access javax.ej
b.EJBObject
file javax\ejb\EJBObject.class not found
public class MBeanServerEjbRemote_StatefulSessionBeanWrapper0 extends com.evermi
nd.server.ejb.RemoteStatefulSessionEJBObject implements oracle.oc4j.admin.jmx.ej
b.MBeanServerEjbRemote
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:35: package javax.ejb does
not exist
public javax.ejb.SessionBean getObject()
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:47: package javax.manageme
nt does not exist
public java.lang.Object invoke(javax.management.ObjectName argument0, java.lang.
String argument1, java.io.Serializable[] argument2, java.lang.String[] argument3
) throws javax.management.InstanceNotFoundException, javax.management.MBeanExcep
tion, javax.management.ReflectionException, oracle.oc4j.admin.jmx.shared.excepti
ons.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:47: package javax.manageme
nt does not exist
public java.lang.Object invoke(javax.management.ObjectName argument0, java.lang.
String argument1, java.io.Serializable[] argument2, java.lang.String[] argument3
) throws javax.management.InstanceNotFoundException, javax.management.MBeanExcep
tion, javax.management.ReflectionException, oracle.oc4j.admin.jmx.shared.excepti
ons.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:47: package javax.manageme
nt does not exist
public java.lang.Object invoke(javax.management.ObjectName argument0, java.lang.
String argument1, java.io.Serializable[] argument2, java.lang.String[] argument3
) throws javax.management.InstanceNotFoundException, javax.management.MBeanExcep
tion, javax.management.ReflectionException, oracle.oc4j.admin.jmx.shared.excepti
ons.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:47: package javax.manageme
nt does not exist
public java.lang.Object invoke(javax.management.ObjectName argument0, java.lang.
String argument1, java.io.Serializable[] argument2, java.lang.String[] argument3
) throws javax.management.InstanceNotFoundException, javax.management.MBeanExcep
tion, javax.management.ReflectionException, oracle.oc4j.admin.jmx.shared.excepti
ons.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:500: package javax.managem
ent does not exist
public javax.management.AttributeList getAttributes(javax.management.ObjectName
argument0, java.lang.String[] argument1) throws javax.management.InstanceNotFoun
dException, javax.management.ReflectionException, oracle.oc4j.admin.jmx.shared.e
xceptions.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:663: package javax.managem
ent does not exist
public void unregisterMBean(javax.management.ObjectName argument0) throws javax.
management.InstanceNotFoundException, javax.management.MBeanRegistrationExceptio
n, oracle.oc4j.admin.jmx.shared.exceptions.InternalException, java.rmi.RemoteExc
eption
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:959: package javax.managem
ent does not exist
public void setAttribute(javax.management.ObjectName argument0, javax.management
.Attribute argument1) throws javax.management.InstanceNotFoundException, javax.m
anagement.AttributeNotFoundException, javax.management.InvalidAttributeValueExce
ption, javax.management.MBeanException, javax.management.ReflectionException, or
acle.oc4j.admin.jmx.shared.exceptions.InternalException, java.rmi.RemoteExceptio
n
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:959: package javax.managem
ent does not exist
public void setAttribute(javax.management.ObjectName argument0, javax.management
.Attribute argument1) throws javax.management.InstanceNotFoundException, javax.m
anagement.AttributeNotFoundException, javax.management.InvalidAttributeValueExce
ption, javax.management.MBeanException, javax.management.ReflectionException, or
acle.oc4j.admin.jmx.shared.exceptions.InternalException, java.rmi.RemoteExceptio
n
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:959: package javax.managem
ent does not exist
public void setAttribute(javax.management.ObjectName argument0, javax.management
.Attribute argument1) throws javax.management.InstanceNotFoundException, javax.m
anagement.AttributeNotFoundException, javax.management.InvalidAttributeValueExce
ption, javax.management.MBeanException, javax.management.ReflectionException, or
acle.oc4j.admin.jmx.shared.exceptions.InternalException, java.rmi.RemoteExceptio
n
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:1323: package javax.manage
ment does not exist
public java.util.Set queryNames(javax.management.ObjectName argument0, javax.man
agement.QueryExp argument1) throws oracle.oc4j.admin.jmx.shared.exceptions.Inter
nalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:1597: package javax.manage
ment does not exist
public javax.management.ObjectInstance getObjectInstance(javax.management.Object
Name argument0) throws javax.management.InstanceNotFoundException, oracle.oc4j.a
dmin.jmx.shared.exceptions.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:2336: package javax.manage
ment does not exist
public void addNotificationListener(javax.management.ObjectName argument0, oracl
e.oc4j.admin.jmx.shared.RemoteListenerId argument1, javax.management.Notificatio
nFilter argument2, java.lang.Object argument3) throws javax.management.InstanceN
otFoundException, oracle.oc4j.admin.jmx.shared.exceptions.InternalException, jav
a.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:2636: package javax.manage
ment does not exist
public void removeNotificationListener(javax.management.ObjectName argument0, ja
vax.management.ObjectName argument1) throws javax.management.InstanceNotFoundExc
eption, javax.management.ListenerNotFoundException, oracle.oc4j.admin.jmx.shared
.exceptions.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3268: package javax.manage
ment does not exist
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName argum
ent0) throws javax.management.InstanceNotFoundException, javax.management.Intros
pectionException, javax.management.ReflectionException, oracle.oc4j.admin.jmx.sh
ared.exceptions.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3268: package javax.manage
ment does not exist
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName argum
ent0) throws javax.management.InstanceNotFoundException, javax.management.Intros
pectionException, javax.management.ReflectionException, oracle.oc4j.admin.jmx.sh
ared.exceptions.InternalException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3756: cannot resolve symbo
l
symbol : class SessionBean
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
public SessionBean passivate() throws Exception
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3780: cannot resolve symbo
l
symbol : class EJBException
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
public void activate() throws EJBException, java.rmi.RemoteException
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3801: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf invoke___100_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3802: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf invoke___100_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3803: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf invoke___100_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3804: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getDefaultDomain___101_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3805: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getDefaultDomain___101_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3806: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getDefaultDomain___101_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3807: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf isRegistered___102_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3808: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf isRegistered___102_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3809: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf isRegistered___102_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3810: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getAttributes___103_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3811: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getAttributes___103_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3812: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getAttributes___103_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3813: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf unregisterMBean___104_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3814: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf unregisterMBean___104_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3815: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf unregisterMBean___104_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3816: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getEvents___105_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3817: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getEvents___105_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3818: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getEvents___105_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3819: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf setAttribute___106_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3820: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf setAttribute___106_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3821: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf setAttribute___106_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3822: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getAttribute___107_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3823: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getAttribute___107_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3824: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getAttribute___107_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3825: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf queryNames___108_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3826: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf queryNames___108_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3827: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf queryNames___108_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3828: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf test___109_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3829: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf test___109_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3830: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf test___109_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3831: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getObjectInstance___110_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3832: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getObjectInstance___110_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3833: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getObjectInstance___110_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3834: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf queryMBeans___111_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3835: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf queryMBeans___111_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3836: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf queryMBeans___111_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3837: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getMBeanCount___112_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3838: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getMBeanCount___112_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3839: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getMBeanCount___112_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3840: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf setAttributes___113_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3841: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf setAttributes___113_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3842: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf setAttributes___113_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3843: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getDomains___114_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3844: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getDomains___114_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3845: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getDomains___114_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3846: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf addNotificationListener___115_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3847: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf addNotificationListener___115_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3848: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf addNotificationListener___115_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3849: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf addNotificationListener___116_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3850: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf addNotificationListener___116_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3851: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf addNotificationListener___116_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3852: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf removeNotificationListener___117_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3853: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___117_wrapperPE = nul
l;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3854: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___117_clientPE = null
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3855: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf removeNotificationListener___118_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3856: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___118_wrapperPE = nul
l;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3857: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___118_clientPE = null
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3858: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf removeNotificationListener___119_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3859: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___119_wrapperPE = nul
l;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3860: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___119_clientPE = null
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3861: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf removeNotificationListener___120_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3862: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___120_wrapperPE = nul
l;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3863: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf removeNotificationListener___120_clientPE = null
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3864: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf getMBeanInfo___121_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3865: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getMBeanInfo___121_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3866: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf getMBeanInfo___121_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3867: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf isInstanceOf___122_noun = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3868: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf isInstanceOf___122_wrapperPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3869: cannot resolve symbo
l
symbol : class PhaseEventIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static PhaseEventIntf isInstanceOf___122_clientPE = null;
^
MBeanServerEjbRemote_StatefulSessionBeanWrapper0.java:3870: cannot resolve symbo
l
symbol : class NounIntf
location: class MBeanServerEjbRemote_StatefulSessionBeanWrapper0
protected static NounIntf ping___123_noun = null;
^
An exception has occurred in the compiler (1.4.1_02). Please file a bug at the J
ava Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after chec
king the Bug Parade for duplicates. Include your program and the following diagn
ostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.v8.comp.Check$Validator.visitSelect(Check.java:44
3)
at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
at com.sun.tools.javac.v8.comp.Check.validate(Check.java:415)
at com.sun.tools.javac.v8.comp.Check.validate(Check.java:426)
at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:1383)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1366)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1342)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:358)
at com.sun.tools.javac.v8.Main.compile(Main.java:520)
at com.sun.tools.javac.Main.compile(Main.java:36)
at com.sun.tools.javac.Main.main(Main.java:27)
Error compiling D:\App Servers\oc4j\j2ee\home\applications/admin_ejb.jar: Syntax
error in source
Oracle Application Server Containers for J2EE 10g (10.0.3.0.0) - Developer Preview initializedGot the issue resolved after lot of pain
The problem is with config/application.xml file shipped with OC4J
It doesn't have an entry to point to the required lib directories
Adding the below two entries resolved the issue
<library path="../lib" />
<library path="../../../lib" />
Hope you don't forget to include it in next revison -
Hi,
In my project, i have a sessionbeanA, it has methodA(). In methodA(), i call classB's methodB(). In methodB(), I first call classC's methodC() and then classD's methodD(). In methodC() will call entitybeanE's methodE(); in methodD() will call entitybeanF's methodF(). methodE() will insert record to table1, and methodF() will insert record to table2.
What i want: when exception happen in classD's methodD(), inserted record in table1 will rollback.
What i do:
1. Transaction is container managed transaction.
2. Set transaction attribute for sessinbeanA,entitybeanE,entitybeanF as 'Required'.
3. Exception in methodD(), will be finally caught in sessionbeanA's methodA(). code in methodA() is as following:
try
bla bla
catch(AppException ex)
sessionContext.setRollbackOnly();
What i get: inserted record in table1 is still there, not rollback.
What's wrong?? Any correction is highly appreciated and highly duke dollared.Hi,
Since the record inserted is not getting rolled back. It can be due to foolowing reasons. As in case of EJB in case of exceptions: System Exceptions or Business exceptions following strategy is to be used:
try{
your code....
} catch(SQLException eSQLE){
throw new EJBException(eSQLE);
} catch(Exception e){
throw new EJBException(e);
Unless and until u don't throw EJBException your inserted records won't rollback.
For your reference I am also sending an excerpt of how to handle exceptions in case of EJB.
Handling Exceptions
The exceptions thrown by enterprise beans fall into two categories: system and application.
A system exception indicates a problem with the services that support an application. Examples of these problems include the following: a database connection cannot be obtained, a SQL insert fails because the database is full, or a lookup method cannot find the desired object. If your enterprise bean encounters a system-level problem, it should throw a javax.ejb.EJBException. The container will wrap the EJBException in a RemoteException, which it passes back to the client. Because the EJBException is a subclass of the RuntimeException, you do not have to specify it in the throws clause of the method declaration. If a system exception is thrown, the EJB container might destroy the bean instance. Therefore, a system exception cannot be handled by the bean's client program; it requires intervention by a system administrator.
An application exception signals an error in the business logic of an enterprise bean. There are two types of application exceptions: customized and predefined. A customized exception is one that you've coded yourself, such as the InsufficentBalanceException thrown by the debit business method of the SavingsAccountEJB example. The javax.ejb package includes several predefined exceptions that are designed to handle common problems. For example, an ejbCreate method should throw a CreateException to indicate an invalid input parameter. When an enterprise bean throws an application exception, the container does not wrap it in another exception. The client should be able to handle any application exception it receives.
If a system exception occurs within a transaction, the EJB container rolls back the transaction. However, if an application exception is thrown within a transaction, the container does not roll back the transaction.
bye !! Hope this helps you.
Thanks & regards
Paritosh -
XDoclet and ejb-jar.xml - No Entity tags?
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="XDoclet" default="ejbdoclet">
<property file="build.properties"/>
<target name="init">
<property name="dir" value="G:\JAVA Tools"/>
<property name="lib.dir" value="lib"/>
<!-- library/jar path -->
<property name="xdoclet.jar.path" value="${dir}\XDoclet\lib\xdoclet.jar"/>
<property name="log4j.jar.path" value="${dir}\XDoclet\samples\lib\log4j.jar"/>
<property name="ant.jar.path" value="${dir}\ANT\lib\ant.jar"/>
<property name="src.dir" value="src"/>
<property name="generated.src.dir" value="XDoclet/gen-src-code"/>
<property name="web.dir" value="${src.dir}/web"/>
<property name="generated.java.dir" value="${generated.src.dir}/java"/>
<property name="config.dir" value="config"/>
<property name="build.dir" value="XDoclet/build"/>
<property name="dist.dir" value="XDoclet/dist"/>
<property name="build.compiler" value="modern"/>
<path id="project.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
<!-- append the external classpath lastly -->
<pathelement path="${java.class.path};${log4j.jar.path}"/>
</path>
</target>
<!-- Prepare -->
<target name="prepare" depends="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/ejb"/>
<mkdir dir="${build.dir}/ejb/META-INF"/>
<mkdir dir="${build.dir}/web"/>
<mkdir dir="${build.dir}/web/WEB-INF"/>
<mkdir dir="${build.dir}/web/WEB-INF/tlds"/>
<mkdir dir="${build.dir}/web/WEB-INF/classes"/>
<mkdir dir="${build.dir}/j2ee"/>
<mkdir dir="${build.dir}/j2ee/META-INF"/>
<mkdir dir="${build.dir}/jmx"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${generated.src.dir}"/>
<mkdir dir="${generated.java.dir}"/>
<echo message="XDoclet Path = ${xdoclet.jar.path}"/>
<echo message="Log4J Path = ${log4j.jar.path}"/>
<echo message="Ant Path = ${ant.jar.path}"/>
<echo message="ClassPath = ${java.class.path}"/>
<property name="cp" refid="project.class.path"/>
<echo message="CLASSPATH/REF ID:${cp}"/>
<echo message="base dir = ${basedir}/${src.dir}"/>
</target>
<target name="delete" >
<echo message = "Deleting directories"/>
<delete dir="${build.dir}"/>
<delete dir="${build.dir}/ejb"/>
<delete dir="${build.dir}/ejb/META-INF"/>
<delete dir="${build.dir}/web"/>
<delete dir="${build.dir}/web/WEB-INF"/>
<delete dir="${build.dir}/web/WEB-INF/tlds"/>
<delete dir="${build.dir}/web/WEB-INF/classes"/>
<delete dir="${build.dir}/j2ee"/>
<delete dir="${build.dir}/j2ee/META-INF"/>
<delete dir="${build.dir}/jmx"/>
<delete dir="${dist.dir}"/>
<delete dir="${generated.src.dir}"/>
<delete dir="${generated.java.dir}"/>
</target>
<!-- Run EJBDoclet -->
<target name="ejbdoclet" depends="prepare">
<taskdef name="ejbdoclet"
classname="xdoclet.ejb.EjbDocletTask"
classpath="${java.class.path};${log4j.jar.path};${ant.jar.path};${xdoclet.jar.path} "/>
<ejbdoclet sourcepath="${src.dir}"
destdir="${generated.java.dir}"
classpathref="project.class.path"
excludedtags="@version,@author"
ejbspec="2.0"
>
<fileset dir="${src.dir}">
<include name="**/*EJB.java"/>
</fileset>
<dataobject/>
<!-- <localinterface/>
<localhomeinterface/> -->
<remoteinterface/>
<homeinterface/>
<entitypk/>
<!-- <entitycmp/> -->
<deploymentdescriptor destdir="${build.dir}/ejb/META-INF" validatexml="true"/>
<jboss version="2.4" xmlencoding="UTF-8" validatexml="true" typemapping="Hypersonic
SQL" datasource="java:/DefaultDS" destdir="${build.dir}/ejb/META-INF"/>
<!--
<weblogic xmlencoding="UTF-8" destdir="${build.dir}/ejb/META-INF" validatexml="true"/>
<webSphere destdir="${build.dir}/ejb/META-INF" />
<orion/>
<apachesoap destdir="${build.dir}/web"/>
-->
<!--
Have struts form objects generated based on entity beans'
data objects. Will require struts.jar to compile.
<strutsform />
-->
</ejbdoclet>
</target>
</project>
My Session Bean:
package com.uniserv.comn.controller.ejb.session.terminalfacade;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
import javax.ejb.*;
import java.util.*;
import com.uniserv.comn.util.*;
import com.uniserv.comn.model.*;
import com.uniserv.comn.controller.ejb.entity.tenderconfig.*;
public class TerminalSessionFacadeEJB implements SessionBean {
private SessionContext ctx = null;
private ServiceLocator serviceLocator = null;
public TerminalSessionFacadeEJB() throws ServiceLocatorException {
try {
serviceLocator = ServiceLocator.getInstance();
} catch (Exception e) {
System.out.println("TerminalSessionFacade Exception : " + e.getMessage());
* Adds an tenderConfig record
* @param tenderConfigVO TenderConfig's Value Object
* @return boolean true if successful, false if not
public boolean addTenderConfig(TenderConfigVO tenderConfigVO) {
System.out.println("TerminalSessionFacadeEJB.addTenderConfig - START");
boolean blnRet = false;
try {
LocalTenderConfigHome home = (LocalTenderConfigHome)
serviceLocator.getLocalHome(ServiceLocator.Services.TENDERCONFIG);
LocalTenderConfig local = null;
try {
TenderConfigPK pk
= new TenderConfigPK(tenderConfigVO.getTndrID(), tenderConfigVO.getTndrCfgName());
local = home.findByPrimaryKey(pk);
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
if (local == null) {
home.create(tenderConfigVO);
blnRet = true;
} else {
blnRet = false;
} catch (Exception e) {
System.out.println("Error in TerminalSessionFacadeEJB.addTenderConfig "
+ "method (Exception) : "
+ e.getMessage());
} finally {
System.out.println("Returned value : " + blnRet);
System.out.println("TerminalSessionFacadeEJB.addTenderConfig - END");
return blnRet;
public void setSessionContext(SessionContext parm1) throws javax.ejb.EJBException, java.rmi.RemoteException {
this.ctx = parm1;
public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException
public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException
public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException
public void ejbCreate() throws javax.ejb.EJBException
My Entity Bean:
package com.uniserv.comn.controller.ejb.entity.tenderconfig;
* @ejb.bean
* type="CMP"
* cmp-version="2.x"
* name="TenderConfigEJB"
* schema="TenderConfig"
* view-type="local"
import javax.ejb.*;
import com.uniserv.comn.model.*;
public abstract class TenderConfigEJB implements EntityBean{
private EntityContext ctx = null;
* @ejb.pk
public abstract int getTndrID();
public abstract void setTndrID(int iTndrID);
* @ejb.pk
public abstract String getTndrCfgName();
public abstract void setTndrCfgName(String strTndrCfgName);
public abstract int getTndrType();
public abstract void setTndrType(int iTndrType);
public abstract String getTndrCfgValue();
public abstract void setTndrCfgValue(String strTndrCfgValue);
public abstract String getTndrCfgDataType();
public abstract void setTndrCfgDataType(String strTndrCfgDataType);
public abstract String getTndrCfgDesc();
public abstract void setTndrCfgDesc(String strTndrCfgDesc);
public TenderConfigVO getTenderConfigVO() {
TenderConfigVO tenderConfigVO = new TenderConfigVO();
tenderConfigVO.setTndrID(this.getTndrID());
tenderConfigVO.setTndrCfgName(this.getTndrCfgName());
tenderConfigVO.setTndrType(this.getTndrType());
tenderConfigVO.setTndrCfgValue(this.getTndrCfgValue());
tenderConfigVO.setTndrCfgDataType(this.getTndrCfgDataType());
tenderConfigVO.setTndrCfgDesc(this.getTndrCfgDesc());
return tenderConfigVO;
public void setTenderConfigVO(TenderConfigVO tenderConfigVO) {
this.setTndrID(tenderConfigVO.getTndrID());
this.setTndrCfgName(tenderConfigVO.getTndrCfgName());
this.setTndrType(tenderConfigVO.getTndrType());
this.setTndrCfgValue(tenderConfigVO.getTndrCfgValue());
this.setTndrCfgDataType(tenderConfigVO.getTndrCfgDataType());
this.setTndrCfgDesc(tenderConfigVO.getTndrCfgDesc());
* Constructor
public TenderConfigEJB() {
* ejbCreate callback method
* @return int
public TenderConfigPK ejbCreate(TenderConfigVO tenderConfigVO)
throws CreateException {
this.setTenderConfigVO(tenderConfigVO);
return null;
* ejbPostCreate
* @param TerminalConfigTypeVO
public void ejbPostCreate(TenderConfigVO tenderConfigVO) {
* setEntityContext callback method
public void setEntityContext(EntityContext ctx) {
this.ctx = ctx;
* unsetEntityContext callback method
public void unsetEntityContext() {
this.ctx = null;
* ejbActivate callback method
public void ejbActivate() {
* ejbPassivate callback method
public void ejbPassivate() {
* ejbLoad callback method
public void ejbLoad() {
* ejbRemove callback method
public void ejbRemove() {
* ejbStore callback method
public void ejbStore() {
But the generated ejb-jar.xml only contains
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>No Description.</description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session>
<description><![CDATA[No Description.]]></description>
<ejb-name>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</ejb-name>
<home>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeHome</home>
<remote>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</remote>
<ejb-class>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
-->
<!-- Entity Beans -->
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor>
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar>
this ejb-jar.xml only contains entries for session beans? where did the entries for entity beans went?Ive written XDoclet tags for the Entity Bean as what ive posted above....help!!!you comment the generation of CMP entity beans out :
build.xml:
replace
<!-- <entitycmp/> -->
with
<entitycmp/>i've already removed the comments of the tag <entitycmp> and yet the resulting ejb-jar.xml contains no <entity> tags....i'm just wondering how can i include the generation of entity tags (not only session tags) in the resulting ejb-jar.xml
<ejb-jar>
<description>No Description.</description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session>
<description><![CDATA[No Description.]]></description>
<ejb-name>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</ejb-name>
<home>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeHome</home>
<remote>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</remote>
<ejb-class>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
-->
<!-- Entity Beans -->
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor>
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar> -
Any Example of Activation ?
ejbActivate. The EJB container invokes this method when the entity bean instance is
retrieved from the pool to become associated with a specific entity object. The signature
of this method is as follows:
public void ejbActivate() throws javax.ejb.EJBException,
java.rmi.RemoteException;can u give any real example ? i am getting difficulty to understand this.
thanksif anybody knows the real example of Activation and Passivation...plz let me know.
and also, i have just one more query...
many a times i thought why this method returns primary class ?
For example, an entity bean class might contain two finder methods: ejbFindByPrimaryKey and
ejbFindByName, as you see here:
public ProductPK ejbFindByPrimaryKey(ProductPK primaryKey) throws RemoteException, FinderException {
public Enumeration ejbFindByName(String name)
throws RemoteException, FinderException {
}why it has to return primary class ProductPK? plz i am not taking about the grammer...but the reason of why ? it could return String,collection,int,Enum,Iterator....you might say, if we need the primary key (e.g productid ) then ? but that we can return via a String ...is not it . Do u think any speciality about returning the whole class ? -
RemoteExceptions instead of SQLExceptions
Hi All
i am using weblogic 4.5.1 .We use Jsp - > Servlet ->Session Bean
->entitybean combination.We have a problem with Unique Key Constraint .
If the unique key is voilated an SQLException is thrown which is caught
by the container(i think so is it true) which then wraps it into
RemoteException.
Our problem is this we would like to show the user that the inforamtion
he entered is already available in the database (This should be possible
if i am able to catch the SQLException)and show him the next logical
step to continue.But with the remote exception being thrown instead of
SQLException we are not able to identify the cause .. Any suggestions
TIA
VC
How are you trying to integrate the email address? from device or from the web? You can try integrating the service from the web. Delete the email ID and reintegrate it again.
Thanks you gifts are a good gesture by RIM. You can take it or leave it. Being a technology company this is very common that glitches will happen The important thing is how reactive or prompt that company is to resolve the issue. Can anyone ever asked that question how many service interruption does Google or iPhone faced over past couple of years???
tanzim
If your query is resolved then please click on “Accept as Solution”
Click on the LIKE on the bottom right if the post deserves credit -
Remoteexception and ejbexception
I have a stateless session bean method:
try{
catch(){
throw new EJBException()...// here
I read some article says: either throw EJBException for local or throw RemoteException for remote.
but my EJB suppose to be used by both local or remote client, how can I throw both EJBException or RemoteException?
ThanksYour EJB should not directly throw RemoteException. First, you need to decide whether the
condition you encounter is an application exception or a system exception. An application
exception is a condition from which the client might be able to recover and is considered non-fatal
by the container. When an application exception is thrown, the client will receive that exact
exception. An application is a user-defined exception or any other existing exception that is a
sublcass of java.lang.Exception (except java.rmi.RemoteException)
With a system exception, the container destroys the bean instance that threw the exception
and automatically rolls back the current transaction. The way to signify a system exception is by
throwing EJBException or any runtime exception.
The container will convert that exception to the appropriate client-side
exception. In the case of a Local EJB client, the client will receive EJBException. If the client is
an EJB 2.x Remote client, it will receive RemoteException. If the client is a 3.0 Remote client, it
will receive EJBException. -
package library.client;
import javax.naming.InitialContext;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.reflect.Method;
import java.sql.ResultSet;
import javax.ejb.*;
import javax.naming.*;
import javax.swing.*;
import library.common.*;
@SuppressWarnings("serial")
public class LibraryClient extends JFrame implements ActionListener {
private static LibraryInterface li;
private JTextField book_author = new JTextField(10);
private JTextField book_title = new JTextField(10);
private JTextField book_isbn = new JTextField(10);
private JLabel author_label = new JLabel("Podaj autora:");
private JLabel book_title_label = new JLabel("Podaj tytul ksiazki");
private JLabel isbn_label = new JLabel("Podaj ISBN");
private JTextArea display_books = new JTextArea(20,50);
private JButton search = new JButton("Search");
private ResultSet resultset;
public LibraryClient() {
this("DEFAULT_CONTEXT");
private JPanel createPanel1(){
JPanel panel = new JPanel();
panel.add(author_label);
panel.add(book_author);
panel.add(book_title_label);
panel.add(book_title);
panel.add(isbn_label);
panel.add(book_isbn);
panel.add(search);
////search.setActionCommand("ISBN");
search.addActionListener(this);
return panel;
private JPanel createPanel2(){
JPanel panel = new JPanel();
panel.add(display_books);
return panel;
private JPanel createPanels(){
JPanel panel = new JPanel();
//Use default FlowLayout.
panel.setLayout(new BorderLayout());
panel.add(createPanel1(), BorderLayout.NORTH);
panel.add(createPanel2(), BorderLayout.SOUTH);
return panel;
public LibraryClient(String appType) {
init(appType);
JFrame frame = new JFrame("Library");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// /final Table table = new Table();
frame.setContentPane(createPanels());
frame.pack();
// /f.setLocationRelativeTo(null);
frame.setVisible(true);
public void actionPerformed(ActionEvent e) {
try {
display_books.setText("");
display_books.setText("Wyszukane Ksiazki\n");
if(!book_author.getText().equals("")){
resultset=li.getBookByAuthor(book_author.getText());
}else if(!book_title.getText().equals("")){
resultset=li.getBookByName(book_title.getText());
}else if(!book_isbn.getText().equals("")){
resultset=li.getBookByISBN(book_isbn.getText());
}else {
System.out.println("Before->resultset=li.getAllBooks()");
resultset=li.getAllBooks();
System.out.println("After->resultset=li.getAllBooks()");
while(resultset.next()){
System.out.println("in while resultset.next()");
String name = resultset.getString("name");
String author =resultset.getString("author");
String isbn = resultset.getString("ISBN");
display_books.append("\n"+ name + " " + author +" "+ isbn);
} catch(Exception exc) { exc.printStackTrace(); }
private void init(String type) {
if (type.equals("JAVA_APP")) li = new library.ejb.LibraryBean();
else if (type.equals("JAVA_CLIENT")) {
try {
InitialContext ic = new InitialContext();
li = (LibraryInterface) ic.lookup("library.common.LibraryInterface");
} catch (NamingException e) {
e.printStackTrace();
public static void main(String[] args) {
if (args.length >= 1) new LibraryClient(args[0]);
else new LibraryClient();
}it throws the exception when it gets to
any of the functions
resultset=li.getBookByAuthor(book_author.getText());
resultset=li.getBookByName(book_title.getText());
resultset=li.getBookByISBN(book_isbn.getText());
resultset=li.getAllBooks();
Please help
Thank YouHi,
I also get the same error.have you got the solution,fi so explain me how to rectify the error
Regards
SamyMohan
Maybe you are looking for
-
I get so ahead of myself and sometimes forget the basics of Flash. These are gonna look like a newbie questions but I gotta be sure. If I use (example) Apple Chancery TTF in a Flash movie, publish the file and look at it on a pc, unless the pc has th
-
What cameras are compatible with the camera connection kit
what cameras are compatible with the camera connection kit and ipad2
-
A FIX FOR THE GREEN-ORANGE-GREEN GOBLIN!!!!!!!!!
Is it the software version of ITUNES? Has anyone thought of this? Has anyone else tried uninstalling the latest version of Itunes, 6.0.4.2 and replaced it with an earlier version like 6.0.2.23? I did this and now my "dead" IPOD (that could not be fix
-
Invalid Indentifier error using UNION ALL?
Can someone tell me why this would give me the error: ORA-00904: "WAIT_TIME": invalid identifier. It must be something with the UNION ALL because it works fine if i run just one of the queries at a time. Thanks Deanna selecT WAIT_TIME||'Minutes.'||',
-
I bought an iPhone 5. I was at work event and left cord in hotel. I've visited 2 apple stores and it looks very bleak. HUGE regret for being an early adopter. Consumer BEWARE. Apple was not prepared. These cords are impossible to find