HOWTO:Deploy BC4J as Session Bean in Weblogic
This document describes Howto deploy a BC4J Appmodule as EJB Session Bean to Weblogic and
test the appmodule through the BC4J tester.
=>create a BC4J Application using Business Components Wizard.
=>test it using BC4J tester
=>make the Application Module Remotable [list]
[*]Select Appmodule and right mouse on it to select the edit option
[*]Select Remote tab
[*]Select the check box for Remotable Application Module
[*]Select EJB Session Bean and shuttle it from Available list to Selected list
[*]Click on the finish button[list]
=> Do File| Save All and a Rebuild on the project
=> create the weblogic XML Deployment Descriptor[list]
[*]Choose File|New
[*]Select the web objects tab
[*]Select XML and click ok
[*]Rename the file as ejb-jar.xml using File|Rename
[*]Save it in the JDEV_HOME/myclasses/META-INF directory.
[*]Open the xml file by double clicking on it.
[*]Paste the following into the file
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>wl.WlModule</ejb-name>
<home>wl.common.ejb.WlModuleHome</home>
<remote>wl.common.ejb.RemoteWlModule</remote>
<ejb-class>wl.server.ejb.WlModuleServerEJB</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
</assembly-descriptor>
</ejb-jar>
[*]Choose File|New
[*]Select the web objects tab
[*]Select XML and click ok
[*]Rename the file as weblogic-ejb-jar.xml using File|Rename
[*]Save it in the JDEV_HOME/myclasses/META-INF directory.
[*]Open the xml file by double clicking on it.
[*]Paste the following into the file
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>wl.WlModule</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>60</idle-timeout-seconds>
</caching-descriptor>
<jndi-name>wl.WlModule</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
In this example "wl" is the package name and "WlModule" is the Appmodule name.[list]
=> generate the jar file for appmodule along with xml deployment descriptors[list]
[*]from the command line in JDEV_HOME/myclasses directory run
[*]jar cvf0 wlappmodule.jar wl META-INF[list]
=> edit the setenv.cmd file in WEBLOGIC_HOME directory[list]
[*]set JAVA_HOME=f:\jdev32\java1.2
[*]set JBOLIB=f:\jdev32\lib
[*]set JDBC_CLASSES=f:\jdev32\jdbc\lib\oracle8.1.7\classes12.zip
[*]set JBO_RUNTIME=%JBOLIB%\jboorasql.zip;%JDBC_CLASSES%;%JBOLIB%\jbodatum12.zip;%JBOLIB%\xmlparserv2.jar;%JBOLIB%\jbomt.zip;%JBOLIB%\jboejb.jar
[*]add JBO_RUNTIME in the set CLASSPATH variable[list]
=> create a bc4j deploy batch file "Deploybc4j.cmd" in the WEB_LOGIC HOME
which will generate the server side jar files
@setlocal
set JAVA=java
set JAVAC=javac
set BEAN_JAR=%1
set EJB_TEMP=f:\jdev32\myclasses\wl
set XMLPARSERV2=f:\jdev32\lib\xmlparserv2.jar;
set JDBC_LIBS=f:\jdev32\jdbc\oracle8.1.7\lib\classes12.zip
set JBO_EJB_RUNTIME=f:\jdev32\lib\jbomt.zip;f:\jdev32\lib\jboejb.jar;%XMLPARSERV2%;%JDBC_LIBS%
set CLASSPATH=%CLASSPATH%;%JBO_EJB_RUNTIME%;%BEAN_JAR%;%EJB_TEMP%
%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar;f:\jdev32\lib\jbodomorcl.zip
pushd %EJB_TEMP%
@endlocal
Note: substittue appropriate jar file and directory structure names
=> Run setenv.cmd
=> Run deploybc4j.cmd
=> Configure Weblogic server[list]
If your weblogic server is residing on a different machine then
[*]copy wlAppModuleGenerated.jar (generated jar file from deploybc4j.cmd)
[*]Copy classes12.zip from JDEV_HOME/jdbc/lib/oracle8.1.7/ directory
[*]Copy jbodomorcl.zip
[*]jbodatum12.zip
[*]xmlparserv2.jar
[*]jbomt.zip
[*]jboejb.jar from JDEV_HOME/lib directory
[*]edit weblogic.properties file in WEBLOGIC_HOME directory
[*]In the WEBLOGIC EJB DEMO PROPERTIES sectio
[*]add weblogic.ejb.deploy=E:/weblogic/myserver/wlAppModuleGenerated.jar
(generated jar file from deploybc4j.cmd file)
[*]edit startweblogic.cmd file in WEBLOGIC_HOME directory
[*]set POST_CLASSPATH=f:\jdev32\jdbc\oracle8.1.7\lib\classes12.zip;f:\jdev32\lib\jboorasql.zip;f:\jdev32\lib\jbodatum12.zip;f:\jdev32\lib\xmlparserv2.jar;f:\jdev32\lib\jbomt.zip;f:\jdev32 \lib\jboEJB.jar;f:\jdev32\lib\jbodomorcl.zip
[*]add E:/weblogic/myserver/wlAppModuleGenerated.jar
(generated jar file from deploybc4j.cmd file) in the weblogic_classpath setting[list]
Note: modify the directory structure of jar files as apporpriate
=> Run the BC4J tester to test the deployed BC4J Appmodule as session bean to Weblogic[list]
[*]Add a new library
[*]Select the Project in which you developed the BC4J Appmodule
[*]Project | Project Properties
[*]select libraries tab
[*]Click on Add
[*]Click on New
[*]Specify "JBO WL Client" in the NAME
[*]Click on ... button for adding the jar files
[*]Click on Add/Zip jar button to add the following files
weblogicaux.jar
jboremoteejb.zip
jboremote.zip
<Weblogic_home>/classes
[*]Click on OK
[*]Start the weblogic server
[*]Bring the BC4J Tester by doing a right mouse on the appmodule and selecting Test option
[*]In the Middle Tier Server Type Select "Weblogic"
[*]Specify Host name and port # of weblogic server
[*]Click on Connect[list]
raghu
null
Although this explains how to then deploy to Weblogic on another server, it still presumes that it is installed on the same computer as JDev. I moved the weblogic.jar file over to the computer and fudged a few things to get it to work.
Also, I am testing this with Weblogic 6.0, so some of the information does not work as prescribed. I edited the config.xml instead of the weblogic.properties file. I am trying to figure out where to put all of the *.jar and *.zip files that I copied over to the Solaris machine with Weblogic. Any suggestions?
And one of the steps in the section to create the deploybc4j.cmd file is wrong. It says
"%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar;f:\jdev32\lib\jbodomorcl.zip"
Which does not work. I took off the last part:
"%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar"
and it worked. It was getting that whole last part and trying to create a directory with that name and failing.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Shanes ([email protected]):
This seems to assume that JDev and Weblogic are installed on the same server (I refer to the section on setting the setenv.cmd file in the WEBLOGIC_HOME dir that includes the path to the JDev install.
I have JDev installed on a Win 2k box and Weblogic installed on a Solaris. Any suggestions? I got all the way up to the setenv.cmd step fine.<HR></BLOCKQUOTE>
null
Similar Messages
-
Deploying session beans with weblogic 5.1 in NT
Hello ,
I have a problem with deploying session beans in weblogic 5.0. I have
written the code and compiled it. My Compilation is fine. Cud any one give
me a step by step of how I should deploy my bean with weblogic 5.0 on
windows NT.
Raj UrsHello ,
I have a problem with deploying session beans in weblogic 5.0. I have
written the code and compiled it. My Compilation is fine. Cud any one give
me a step by step of how I should deploy my bean with weblogic 5.0 on
windows NT.
Raj Urs -
How to deploy a session bean in Weblogic 9.2
Hi,
Can anyone please point me to the procedure of deploying session bean on weblogic 9.2. My operating system is Fedora 5. Please let me know the steps as i am very new to EJB.
Regards,
SanjeevI looked for this information in ServletConfig, in ServletContext, in JVMID
ServletConfig or ServletContext do not have anything (at least I do not see anything),
The newsgroups recommend the following code
public static String getLocalUrlString()
String urlString;
JVMID jvmid = JVMID.localID();
urlString = jvmid.getHostAddress();
weblogic.rjvm.Protocol proto
=weblogic.rjvm.Protocol.getDefaultProtocol();
int port = jvmid.getPort(proto);
return urlString + ISoapConstants.SCHEME_DELIMITER + port;
I also tried
weblogic.rjvm.Protocol does not exist in current version, and I did not get any real information inside JVMID
Also tried JVMID.localID().ports(), which returns null
System.getProperty("weblogic.system.bindAddr"); or weblogic.system.listenPort property,
getProperty returns null
Tried also another approach from the newsgroups - JwsContext.
/** @common:context */
JwsContext context;
String myPort = context.getService().getURL().getPort();
String myUrl = context.getService().getURL().toString();
context is null
None of them worked.
Do you have any other ideas?
All those ideas I found in the newsgroups were to the previos version(s) of weblogic - up to 8.1. I have not found anything specific to 9.2 -
How to run a client program in Session bean using weblogic 8.1
Hi
I am new to weblogic server 8.1. I sucessfully deployed session ejb Session Bean. I created sessionbean jar file and put it it classpath also.
and also i created sessiobeanclient jar file, it included in class path.
While running client program it throws exception like noclass def found exception
plz tell me the right way to run the session ejb program.
byeHi,
You have to follow the given steps before you are going to run the client program that invokes the session bean .
1)set the Weblogic Environment using the tool setWLSEnv
2)place the Session bean jar file in classpath
3)run the client program
Note:If the client has to execute on remote machine we need to copy client class,remote interface, home interface and other classes which are used as
parameters and return types.
Regards
Anilkumar kari -
Deploying ApplicationModule as Session Bean
I am trying to deploy an ApplicationModule as a EJB Session Bean.
How should I set up the InitialContext if I am testing this using the embedded OC4J in JDeveloper? Should I be using JboContext.PLATFORM_EJB (this is giving me a ClassNotFoundException for AuroraEJBInitialContext) or JboContext.PLATFORM_EJB_IAS? What other fields do I have to set in the environment I pass in when I create the InitialContext?Use JboContext.PLATFORM_EJB_IAS.
env.put(JboContext.INITIAL_CONTEXT_FACTORY,
JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM,
JboContext.PLATFORM_EJB_IAS);
env.put(JboContext.SECURITY_PRINCIPAL, "admin");
env.put(JboContext.SECURITY_CREDENTIALS, "welcome");
env.put(JboContext.HOST_NAME, "localhost");
env.put(JboContext.CONNECTION_PORT, "23891");
env.put(JboContext.APPLICATION_PATH,
"application_name");
Alternatively you can use the Configuration api and use the embedded configuration which reads all these properties from the bc4j.xcfg and creates the appmodule for you. There's a code template (type bc4jclient followed by ctrl-enter) that shows it's usage.
Dhiraj -
Timout error when ADF Swing+BC deployed as Stateful Session Bean
i deploy the AM as stateful session bean onto OC4J 10.1.3,and the Client access them by Java Web Start.
the error message is
Exception in thread "AWT-EventQueue-0" oracle.jbo.JboException: JBO-29000: Error resuming transaction; nested exception is:
javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.processRemoteJboException(RootApplicationModuleImpl.java:435)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:333)
at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveResponse(ApplicationModuleImpl.java:1234)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveValues(ApplicationModuleImpl.java:1250)
at oracle.jbo.client.remote.ApplicationModuleImpl.isRangeAt(ApplicationModuleImpl.java:3856)
at oracle.jbo.client.remote.RowSetIteratorImpl.isRangeAtTop(RowSetIteratorImpl.java:1109)
at oracle.jbo.client.remote.RowSetImpl.isRangeAtTop(RowSetImpl.java:861)
at oracle.jbo.client.remote.ViewUsageImpl.isRangeAtTop(ViewUsageImpl.java:968)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:409)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:247)
at com.kunteng.fabric.jclientview.MyJUNavigationBar._isEnabled(MyJUNavigationBar.java:1558)
at com.kunteng.fabric.jclientview.MyJUNavigationBar._updateButtonStates(MyJUNavigationBar.java:1506)
at com.kunteng.fabric.jclientview.MyJUNavigationBar$1.run(MyJUNavigationBar.java:1419)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
## Detail 0 ##
oracle.oc4j.rmi.OracleRemoteException: Error resuming transaction
at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:202)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
at connection to /192.168.1.254
at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
at __Proxy6.doMessage(Unknown Source)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.invokeDoMessage(RootApplicationModuleImpl.java:485)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:325)
at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveResponse(ApplicationModuleImpl.java:1234)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveValues(ApplicationModuleImpl.java:1250)
at oracle.jbo.client.remote.ApplicationModuleImpl.isRangeAt(ApplicationModuleImpl.java:3856)
at oracle.jbo.client.remote.RowSetIteratorImpl.isRangeAtTop(RowSetIteratorImpl.java:1109)
at oracle.jbo.client.remote.RowSetImpl.isRangeAtTop(RowSetImpl.java:861)
at oracle.jbo.client.remote.ViewUsageImpl.isRangeAtTop(ViewUsageImpl.java:968)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:409)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:247)
at com.kunteng.fabric.jclientview.MyJUNavigationBar._isEnabled(MyJUNavigationBar.java:1558)
at com.kunteng.fabric.jclientview.MyJUNavigationBar._updateButtonStates(MyJUNavigationBar.java:1506)
at com.kunteng.fabric.jclientview.MyJUNavigationBar$1.run(MyJUNavigationBar.java:1419)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Nested exception is:
javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
at com.evermind.server.ApplicationServerTransaction.resume(ApplicationServerTransaction.java:330)
at com.evermind.server.ApplicationServerTransactionManager.resume(ApplicationServerTransactionManager.java:494)
at com.evermind.server.ApplicationServer$2.resume(ApplicationServer.java:4559)
at com.evermind.server.ejb.EJBTransactionManager.resume(EJBTransactionManager.java:209)
at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:200)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
at connection to /192.168.1.254
at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Unknown Source)when i use BC4J Test tool to connect to the Stateful Session Bean ,meet the same error .The full error message is
oracle.jbo.JboException: JBO-29000: Error resuming transaction; nested exception is:
javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.processRemoteJboException(RootApplicationModuleImpl.java:435)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:333)
at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
at oracle.jbo.client.remote.ApplicationModuleImpl.createAndInitRow(ApplicationModuleImpl.java:3989)
at oracle.jbo.client.remote.RowSetIteratorImpl.createAndInitRow(RowSetIteratorImpl.java:1602)
at oracle.jbo.client.remote.RowSetIteratorImpl.createRow(RowSetIteratorImpl.java:1553)
at oracle.jbo.client.remote.RowSetImpl.createRow(RowSetImpl.java:1022)
at oracle.jbo.client.remote.ViewUsageImpl.createRow(ViewUsageImpl.java:1168)
at oracle.jbo.jbotester.NavBar$rsInsert.doAction(NavBar.java:151)
at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:81)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
## Detail 0 ##
oracle.oc4j.rmi.OracleRemoteException: Error resuming transaction
at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:202)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
at connection to FUWUQI/192.168.1.254
at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
at __Proxy2.doMessage(Unknown Source)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.invokeDoMessage(RootApplicationModuleImpl.java:485)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:325)
at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
at oracle.jbo.client.remote.ApplicationModuleImpl.createAndInitRow(ApplicationModuleImpl.java:3989)
at oracle.jbo.client.remote.RowSetIteratorImpl.createAndInitRow(RowSetIteratorImpl.java:1602)
at oracle.jbo.client.remote.RowSetIteratorImpl.createRow(RowSetIteratorImpl.java:1553)
at oracle.jbo.client.remote.RowSetImpl.createRow(RowSetImpl.java:1022)
at oracle.jbo.client.remote.ViewUsageImpl.createRow(ViewUsageImpl.java:1168)
at oracle.jbo.jbotester.NavBar$rsInsert.doAction(NavBar.java:151)
at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:81)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Nested exception is:
javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
at com.evermind.server.ApplicationServerTransaction.resume(ApplicationServerTransaction.java:330)
at com.evermind.server.ApplicationServerTransactionManager.resume(ApplicationServerTransactionManager.java:494)
at com.evermind.server.ApplicationServer$2.resume(ApplicationServer.java:4559)
at com.evermind.server.ejb.EJBTransactionManager.resume(EJBTransactionManager.java:209)
at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:200)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
at connection to FUWUQI/192.168.1.254
at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:595)
----- LEVEL 1: DETAIL 0 -----
oracle.oc4j.rmi.OracleRemoteException: Error resuming transaction
at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:202)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
at connection to FUWUQI/192.168.1.254
at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
at __Proxy2.doMessage(Unknown Source)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.invokeDoMessage(RootApplicationModuleImpl.java:485)
at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:325)
at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
at oracle.jbo.client.remote.ApplicationModuleImpl.createAndInitRow(ApplicationModuleImpl.java:3989)
at oracle.jbo.client.remote.RowSetIteratorImpl.createAndInitRow(RowSetIteratorImpl.java:1602)
at oracle.jbo.client.remote.RowSetIteratorImpl.createRow(RowSetIteratorImpl.java:1553)
at oracle.jbo.client.remote.RowSetImpl.createRow(RowSetImpl.java:1022)
at oracle.jbo.client.remote.ViewUsageImpl.createRow(ViewUsageImpl.java:1168)
at oracle.jbo.jbotester.NavBar$rsInsert.doAction(NavBar.java:151)
at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:81)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Nested exception is:
javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
at com.evermind.server.ApplicationServerTransaction.resume(ApplicationServerTransaction.java:330)
at com.evermind.server.ApplicationServerTransactionManager.resume(ApplicationServerTransactionManager.java:494)
at com.evermind.server.ApplicationServer$2.resume(ApplicationServer.java:4559)
at com.evermind.server.ejb.EJBTransactionManager.resume(EJBTransactionManager.java:209)
at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:200)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
at connection to FUWUQI/192.168.1.254
at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:595) -
my enviroment
jdev9i_902
JDK1.3
oracle 9i
oc4j(Jdeveloper oc4j)
everything is on the same machine.
I have a BC4J deployed as Session Bean(BMT) on stanalone oc4j(jdeveloper oc4j)
an applet deployed to oc4j.
( I have gone through the HOW TO: Applet Deployment for JDev 3.1)
when I try to run the applet from IE (http://myhomeURL:8888/myroot/applet.html), I get the following error:(seems like that applet thinks that oracle db is on a different server than the app-server)
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.lang.Boolean.getBoolean(Unknown Source)
at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.remoteLookup(AmHomeImpl.java:101)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.initRemoteHome(AmHomeImpl.java:68)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>(AmHomeImpl.java:41)
at oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome(InitialContextImpl.java:17)
at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:72)
at javax.naming.InitialContext.lookup(Unknown Source)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:102)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:62)
at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:1431)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1082)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:269)
at oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject(JUMetaObjectManager.java:345)
at mypackage6.AppletBestill1View.init(AppletBestill1View.java:88)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
cheers
RusselRussel,
You are seeing bug 2087789. During JNDI lookup, certain system properties are being read. Since you are
running in a sandvox environment, AccessControl exception is being thrown.
You will have to either sign your jar files or provide a policy file on the client side which will relax
some of the restriction.
Sample Java2 policy file follows
/** Java2 policy for JAZN/OC4J **/
/** INSTRUCTIONS **/
@ /** - set ${oracle.ons.oraclehome} to your $ORACLE_HOME **/
/** this is automatically set by OPMN **/
@ /** - set ${localhost.ip} to your OC4J machine's IP address **/
@ /** - set ${oidhost.ip} to your Oid machine's IP address **/
@ grant codebase "file:${oracle.ons.oraclehome}/-" {
permission java.lang.RuntimePermission "createSecurityManager";
permission java.lang.RuntimePermission "setSecurityManager";
permission java.lang.RuntimePermission "createClassLoader";
permission java.util.PropertyPermission "*","read";
permission java.io.SerializablePermission "enableSubstitution";
/* JAAS */
grant codebase "file:${java.home}/jre/lib/ext/jaas.jar" {
permission java.security.AllPermission;
@ /* JAAS Login Modules */
grant codebase "file:${java.home}/jre/lib/ext/jaasmod.jar" {
permission java.security.AllPermission;
/* JAZN */
@ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/jazn.jar" {
permission java.security.AllPermission;
/* OC4J */
@ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/oc4j.jar" {
permission java.security.AllPermission;
/* DMS - J2EE */
@ grant codebase "file:${oracle.ons.oraclehome}/lib/dms.jar" {
permission java.security.AllPermission;
/* DMS - IAS */
@ grant codebase "file:${oracle.ons.oraclehome}/dms/lib/dms.jar" {
permission java.security.AllPermission;
/* ONS */
@ grant codebase "file:${oracle.ons.oraclehome}/opmn/lib/ons.jar" {
permission java.security.AllPermission;
/* JDBC */
@ grant codebase "file:${oracle.ons.oraclehome}/jdbc/lib/classes12.jar" {
permission java.security.AllPermission;
/* OJSP */
@ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/lib/ojsp.jar" {
permission java.security.AllPermission;
/* tools.jar - for compiling JSPs */
@ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/tools.jar" {
permission java.security.AllPermission;
/* J2EE/home */
@ grant codebase "file:${oracle.ons.oraclehome}/j2ee/home/-" {
/* DMS grants */
@ permission java.io.FilePermission "${oracle.ons.oraclehome}/j2ee/-
", "write,delete";
permission java.util.PropertyPermission "oracle.*", "read,write";
permission java.util.PropertyPermission "java.protocol.handler.pkgs",
"read,write";
permission java.util.PropertyPermission "transaction.log", "read";
permission java.lang.RuntimePermission "createClassLoader";
permission java.lang.RuntimePermission "setContextClassLoader";
permission java.util.PropertyPermission "http.singlethreaded.maxsize",
"read";
permission java.util.PropertyPermission "*", "read,write";
/* Default Grants to get things going */
permission java.security.SecurityPermission "*";
permission java.io.FilePermission "<<ALL FILES>>", "read";
permission java.lang.RuntimePermission "getProtectionDomain";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "loadLibrary.ldapjclnt9";
@ permission javax.security.auth.AuthPermission "createLoginContext";
permission javax.security.auth.AuthPermission "doAs";
permission javax.security.auth.AuthPermission "doAsPrivileged";
permission javax.security.auth.AuthPermission "getSubject";
permission javax.security.auth.AuthPermission
"getSubjectFromDomainCombiner";
@ permission javax.security.auth.AuthPermission "getLoginConfiguration";
permission javax.security.auth.AuthPermission "getPolicy";
permission javax.security.auth.AuthPermission "modifyPrincipals";
permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.util.PropertyPermission "user.dir", "read,write";
permission java.util.PropertyPermission "java.security.auth.policy",
"read,write";
@ permission java.net.SocketPermission "*.us.oracle.com",
"accept,resolve";
@ permission java.net.SocketPermission "127.0.0.1",
"accept,connect,resolve";
@ permission java.net.SocketPermission "${localhost.ip}",
"accept,connect,resolve";
@ permission java.net.SocketPermission "${oidhost.ip}",
"accept,connect,resolve";
/* JAZN Permissions */
permission oracle.security.jazn.JAZNPermission "getCredentials";
permission oracle.security.jazn.JAZNPermission "setCredentials";
permission oracle.security.jazn.JAZNPermission "getClearCredentials";
permission oracle.security.jazn.JAZNPermission
"setClearCredentialsNoCheck";
permission oracle.security.jazn.JAZNPermission "getProperty.*";
permission oracle.security.jazn.JAZNPermission "getPolicy";
permission oracle.security.jazn.JAZNPermission "getRealmManager";
permission oracle.security.jazn.policy.AdminPermission
"java.io.FilePermission$/tmp/*$read,write";
permission oracle.security.jazn.policy.AdminPermission
"java.io.FilePermission$/teams/jazn/*$read,write";
permission oracle.security.jazn.policy.AdminPermission
"oracle.security.jazn.realm.RealmPermission$*$createRealm,dropRealm,createR
ole,dropRole,modifyRealmMetaData";
permission oracle.security.jazn.realm.RealmPermission "*",
"createRealm";
permission oracle.security.jazn.realm.RealmPermission "*",
"dropRealm";
permission oracle.security.jazn.realm.RealmPermission "*",
"createRole";
permission oracle.security.jazn.realm.RealmPermission "*", "dropRole";
permission oracle.security.jazn.realm.RealmPermission "*",
"modifyRealmMetaData";
permission oracle.security.jazn.policy.RoleAdminPermission "*";
permission oracle.security.jazn.policy.AdminPermission
"oracle.security.jazn.policy.RoleAdminPermission$*";
my enviroment
jdev9i_902
JDK1.3
oracle 9i
oc4j(Jdeveloper oc4j)
everything is on the same machine.
I have a BC4J deployed as Session Bean(BMT) on stanalone oc4j(jdeveloper oc4j)
an applet deployed to oc4j.
( I have gone through the HOW TO: Applet Deployment for JDev 3.1)
when I try to run the applet from IE (http://myhomeURL:8888/myroot/applet.html), I get the following error:(seems like that applet thinks that oracle db is on a different server than the app-server)
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.lang.Boolean.getBoolean(Unknown Source)
at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.remoteLookup(AmHomeImpl.java:101)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.initRemoteHome(AmHomeImpl.java:68)
at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>(AmHomeImpl.java:41)
at oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome(InitialContextImpl.java:17)
at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:72)
at javax.naming.InitialContext.lookup(Unknown Source)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:102)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:62)
at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:1431)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1082)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:269)
at oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject(JUMetaObjectManager.java:345)
at mypackage6.AppletBestill1View.init(AppletBestill1View.java:88)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
cheers
Russel -
Problem Deploying EJB3 Stateless session bean in Jboss4.0.3
Hi All,
I have developed an EJB 3 Stateless session bean and tried to deploy in JBoss 4.0.3 , But i get the following Exception.
javax.naming.NameNotFoundException: ejb not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.apache.jsp.session_jsp._jspService(org.apache.jsp.session_jsp:69)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:157)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
I am sorry if the question is silly..... My Remote Interface will be one like this
import javax.ejb.Remote;
@Remote
public interface CityService {
public String getCity();
And My Bean Class will be
import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
@EJB
@Remote(CityService.class)
@Stateless(mappedName="ejb/CityService")
public class CityServiceBean implements CityService {
public String getCity(){
return "Chennai Metropolitan";
And the client which invokes the bean will be
InitialContext ctx = new InitialContext();
CityService c = (CityService)ctx.lookup("ejb/CityService");
System.out.println("Msg from Bean"+c.getCity());
please help me out of this issue....
Thanks in advanceford wrote:
If you deploy your application in a .ear, you also can use this:
You have to set a name to your EJBBean -> @Stateless(name = "XXX")
The client for remote interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Remote");
The client for local interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Local");the problem with this approach is that if you version your ears, the version numbers show up in the jndi names, and your client code will be hard coded to specific server versions. -
Deploying EJB 3 session beans on OC4J 10.1.3.0.0 Standalone
Guys,
I am unable to deploy any EJB 3.0 session beans on my freshly installed OC4J 10.1.3.0.0 instance. I also have tried to deploy the EAR created by the "Develop a Stateless Session Bean using EJB 3.0" to eliminate problems in the deployed archive, but itfails with the exact same stacktrace:
06/06/05 14:38:52 SEVERE: ProgressObjectImpl.reportError java.lang.InstantiationException: Error initializing ejb-module
s: nested exception is: java.lang.reflect.InvocationTargetExceptionoracle.oc4j.admin.jmx.shared.exceptions.InternalExcep
tion: java.lang.InstantiationException: Error initializing ejb-modules: nested exception is: java.lang.reflect.Invocatio
nTargetException
at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(NotificationUserData.java:107)
at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
at java.lang.Thread.run(Thread.java:595)
Caused by: oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Error initializing ejb-module
s: nested exception is: java.lang.reflect.InvocationTargetException
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126)
... 4 more
Caused by: java.lang.InstantiationException: Error initializing ejb-modules: nested exception is: java.lang.reflect.Invo
cationTargetException
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:1056)
at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:210)
at com.evermind.server.Application.setConfig(Application.java:391)
at com.evermind.server.Application.setConfig(Application.java:308)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:507)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:191)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
... 4 more
Caused by: javax.ejb.EJBException: nested exception is: java.lang.reflect.InvocationTargetException
at com.evermind.server.ejb.EJBUtils.createEJBException(EJBUtils.java:352)
at com.evermind.server.ejb.EJBUtils.createEJBException(EJBUtils.java:343)
at com.evermind.server.ejb.POJOEntityAnnotationListener.parseAnnotatedClass(POJOEntityAnnotationListener.java:56
at com.evermind.server.ejb.AnnotationParser.notifyAnnotationListeners(AnnotationParser.java:197)
at com.evermind.server.ejb.AnnotationParser.parseAnnotations(AnnotationParser.java:69)
at com.evermind.server.ejb.EJBPackageDeployment.parseMetaData(EJBPackageDeployment.java:964)
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:831)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
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:585)
at com.evermind.server.ejb.POJOEntityAnnotationListener.parseAnnotatedClass(POJOEntityAnnotationListener.java:48
... 15 more
Caused by: java.lang.NullPointerException
at java.lang.Class.getAnnotation(Class.java:2956)
... 20 more
Also, and this is probably related, when starting up it the app server prints:
6-06-05 14:38:51.777 WARNING J2EE EJB5003 EJB 3.0 enabled but JDK 1.5 is not in use. No annotations will be parsed.
Which is not true as I am running JDK 5.0_6 and I have tested/validated this by deploying a working (working as in putting stuff in and pulling stuff out of a db) EJB 3.0 Persistence project in there, which uses annotations.
I really hope somebody on the OC4J team can help me out on this, as I am guessing a lot of people will run into this.
Kind regards,
MikWell, I think I at least isolated the problem:
My installation was not as fresh as I thought. It had to do with my trying to get the latest version of TopLink (the final EJB 3.0 RI one) running on the latest OC4J standalone. For this I deleted the j2ee/home/persistence.jar and replaced it by toplink-essentials.jar. I apparently misjudged the differences that occured in the last steps of the EJB 3 specs.
So let me rephrase my question: is there a way to get the latest version of TopLink (the one packaged as the EJB3 Persistence RI) in the OC4J 10.1.3.0 Standalone container? And if not, when will there be one?
Mik -
Problem while deploying a stateless Session bean
hi,
I am a beginner in J2EE. Please help..
I have encountered an error while i am deploying a session bean in IBM Webspere App Servere
the eroor is
D:\Program Files\WebSphere\AppServer\deploytool\itp>ejbdeploy.bat c:\account\dep
loy\account.jar c:\account\deploy c:\account\deploy\account-ejb.jar
Starting workbench.
Creating the project.
Validating
Generating deployment code
Refreshing: /account.jar/ejbModule.
Building: /account.jar.
Invoking RMIC.
error: Invalid class file format in C:\account\deploy\account.jar(com/fl/ac/Acco
unt.class). The major.minor version '49.0' is too recent for this tool to under
stand.
error: Class com.fl.ac.Account not found in class com.fl.ac.EJSRemoteStatelessAc
countEJB_ca490e54.
error: Invalid class file format in C:\account\deploy\account.jar(com/fl/ac/Acco
untHome.class). The major.minor version '49.0' is too recent for this tool to u
nderstand.
error: Class com.fl.ac.AccountHome not found in class com.fl.ac.EJSRemoteStatele
ssAccountEJBHome_ca490e54.
4 errors
[*Error] An unexpected exception was thrown. Halting execution.
Shutting down workbench.
Error generating RMI code: RMIC Command returns RC = 1. The problems which stopp
ed RMIC are displayed, and have also been recorded in the .log file in c:\accoun
t\deploy\account-ejb._\.metadata.
RMIC command was:
-extdirs D:\Program Files\WebSphere\AppServer\java\jre\lib\core.jar;D:\Program F
iles\WebSphere\AppServer\java\jre\lib\graphics.jar;D:\Program Files\WebSphere\Ap
pServer\java\jre\lib\security.jar;D:\Program Files\WebSphere\AppServer\java\jre\
lib\server.jar;D:\Program Files\WebSphere\AppServer\java\jre\lib\xml.jar;D:\Prog
ram Files\WebSphere\AppServer\java\jre\lib\charsets.jar;D:\Program Files\WebSphe
re\AppServer\java\jre\lib\ext;D:\Program Files\WebSphere\AppServer\java\lib;D:\P
rogram Files\WebSphere\AppServer\classes;D:\Program Files\WebSphere\AppServer\li
b;D:\Program Files\WebSphere\AppServer\lib\ext;D:\Program Files\WebSphere\AppSer
ver\web\help;D:\Program Files\WebSphere\AppServer\deploytool\itp\plugins\com.ibm
.etools.ejbdeploy\runtime;D:\Program Files\ibm\WebSphere MQ\Java\lib; -classpath
c:\account\deploy\account-ejb._\account.jar\ejbModule;C:\account\deploy\account
.jar -iiop -always -keep -d c:\account\deploy\account-ejb._\account.jar\ejbModul
e -sourcepath c:\account\deploy\account-ejb._\account.jar\ejbModule com.fl.ac.EJ
SRemoteStatelessAccountEJBHome_ca490e54 com.fl.ac.EJSRemoteStatelessAccountEJB_c
a490e54
BEAN SOURCE CODE IS
------------------Remote Interface -------------------------------
package com.fl.ac;
import java.rmi.*;
import javax.ejb.*;
public interface Account extends EJBObject {
public double withdraw(double balance,double amount) throws RemoteException;
public double deposite(double balance,double amount) throws RemoteException;
------------------------ Home Interface -----------------------------------
package com.fl.ac;
import java.rmi.*;
import javax.ejb.*;
public interface AccountHome extends EJBHome {
public Account create() throws CreateException,RemoteException;
------------------------- Bean Class -----------------------------------------------
package com.fl.ac;
import java.rmi.*;
import javax.ejb.*;
public class AccountEJB implements SessionBean {
public void setSessionContext(SessionContext ctx) { }
public void unsetSessionContext() { }
public void ejbCreate() { }
public void ejbActivate() { }
public void ejbPassivate() { }
public void ejbRemove() { }
public double withdraw(double balance,double amount){
return (balance - amount);
public double deposite(double balance,double amount){
return (balance+amount);
------------------------------ ejb-jar.xml --------------------------------------------
<?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 id="ejb-jar_ID">
<display-name>Account EJB</display-name>
<enterprise-beans>
<session>
<ejb-name>AccountEJB</ejb-name>
<home>com.fl.ac.AccountHome</home>
<remote>com.fl.ac.Account</remote>
<ejb-class>com.fl.ac.AccountEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
PLZ HELP ME......
francisHi Gauarv,
Did you not see my reply in the following post?
Re: 502 service temporarily unavailable
If I'm not mistaken, this is exactly the same question as you asked
there.
By the way, is there some reason you are still using OC4J version
1.0.2.2? Is there something stopping you from upgrading to the later
versions (9.0.2 and 9.0.3)?
Good Luck,
Avi. -
HowTo talk to a Session bean from an Applet sample app. problem
Hi!
When I push the "Call EJB" button in the sample application I get the following exception:
2005.02.20. 15:49:27 com.evermind.server.rmi.RMIClient createRemoteInvocationHandlerFactory
WARNING: com.evermind.server.ejb.EJBRemoteInvocationHandlerFactory
java.lang.ClassNotFoundException: com.evermind.server.ejb.EJBRemoteInvocationHandlerFactory
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.evermind.server.rmi.RMIClient.createRemoteInvocationHandlerFactory(RMIClient.java:427)
at com.evermind.server.rmi.RMIClient.initHandlerFactories(RMIClient.java:415)
at com.evermind.server.rmi.RMIClient.<init>(RMIClient.java:61)
at com.evermind.server.rmi.RMIClient.getInstance(RMIClient.java:464)
at com.evermind.server.rmi.RMIInitialContext.<clinit>(RMIInitialContext.java:48)
at oracle.j2ee.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:58)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at oracle.otnsamples.EJBCaller.getInitialContext(Unknown Source)
at oracle.otnsamples.EJBCaller.callEjb(Unknown Source)
at oracle.otnsamples.EJBCaller.access$000(Unknown Source)
at oracle.otnsamples.EJBCaller$2.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 43 more
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:183)
at javax.naming.InitialContext.lookup(Unknown Source)
at oracle.otnsamples.EJBCaller.callEjb(Unknown Source)
at oracle.otnsamples.EJBCaller.access$000(Unknown Source)
at oracle.otnsamples.EJBCaller$2.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:394)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:80)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:250)
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:154)
... 26 more
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:183)
at javax.naming.InitialContext.lookup(Unknown Source)
at oracle.otnsamples.EJBCaller.callEjb(Unknown Source)
at oracle.otnsamples.EJBCaller.access$000(Unknown Source)
at oracle.otnsamples.EJBCaller$2.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:394)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:80)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:250)
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:154)
... 26 more
Thanks!Refer to the following link for a list of tutorials that will guide you through the steps you have queried about: http://www.oracle.com/technology/tech/java/ejb30.html
Also, if you are attempting to call a session bean from your applet code you may run into firewall issues depending on your corporate infrastructure. RMI does not run over the ever popular port 80 and therefore is not always open on company firewalls. If you run into trouble you may have to use HTTP Tunneling. A better alternative maybe to call your session bean as a web service which is provided to you by default in the EJB 3.0 spec. -
Prolem in deploying a stateless session bean
Hi all,
I am new to EJB programming... I am using EJB3.0.
1. In my EJB project I have a persistence.xml file which specifies a data source.
2. In the deploy dir of JBoss I have a '-DS' file.
3. in the bean itself I use the annotation @PersistenceContext(unit="unitname");
4 this unit name is the same as the unit name in the persistence.xml
However when I create the jar and deploy it - it gives an error
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jar=abc.jar,name=abcBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:unitName=first
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:unitName=first
State: NOTYETINSTALLED
Depends On Me:
jboss.j2ee:jar=abc.jar,name=abcBean,service=EJB3
Does anyone know what could be the problem? Any help would be greatly appreciated.
Thanks.i believe calling a remote entity bean from the same machine will not generate network traffic.
Anyway you can. take a look here:
http://developer.java.sun.com/developer/onlineTraining/J2EE/Intro2/session_bean/session.html#Local_Interfaces -
Unable to deploy an EJB session Bean
I run with JDeveloper 3.1, Oracle8.1.6 on windows NT.
All steps to deploy the Business Logic Tier work fine except the last one when to deploy
using the deployment profile; I' ve got the following error in the debug window:
(last lines of the debug)
Generating Jar File...done
Loading EJB Jar file and Comm Stubs Jar file...done
Generating EJBHome and EJBObject on the server...
An exception occurred during code generation: Class not found: DpltBcPkg.common.ejb.DpltBcPkgModuleHome.class
*** Errors occurred while deploying the EJB to JServer ***
*** Deployment completed ***
Help will be greatly appreciated, thanks in advanceJean-Yves,
The class that the deployment wizard can't find should have been created when you made your application module remotable. So you should check the following:
- Did you make your application module remotable? (edit the application module and select the "Remote" tab; complete instructions are in the online help).
- Did you rebuild your application after making your application module remotable?
When you make your application module remotable, the node for Common->ejb->DpltBcPkgModuleHome.java should show in the navigator pane.
Blaise -
Hi,
It depends upon your client program. You can use a java rmi based client or a web application. The good kick start to the problem would be to have a look into the java pet store example and converter example which is using RMI port for client access as well as web based access. Please review the examples shipped along with iAS and I'm sure that you will have a good idea on going about the coding.
Regards
Raj -
Enable to Deploy Stateful session Bean
Hello EveryBody,
I have problem to deploy the stateful session bean.i have attached the error shown in server screen.Please give me the suggestion.when ever i create .ear file and paste in application directory it shows following errors.
weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: Prepare failed. Task Id = 0
Module: Cart.war Error: [HTTP:101179][HTTP] Error occurred while
parsing descriptor in Web application "C:\bea\user_projects\domains\mydomain\.\m
yserver\stage\_appsdir_Cart_ear\Cart.war" [Path="C:\bea\user_projects\domains\my
domain\applications\Cart.ear", URI="Cart.war"
weblogic.xml.dom.DOMProcessingException: Neither principal-names nor externall
-defined element specified for security-role-assignment
weblogic.xml.dom.DOMProcessingException: Neither principal-names nor externall
-defined element specified for security-role-assignment
at weblogic.servlet.internal.dd.SecurityRoleAssignment.<init>(Lweblogic
servlet.internal.dd.WebAppDescriptor;Lorg.w3c.dom.Element;)V(SecurityRoleAssign
ent.java:73)
at weblogic.servlet.internal.dd.WLWebAppDescriptor.<init>(Lweblogic.ser
let.internal.dd.WebAppDescriptor;Lorg.w3c.dom.Element;)V(WLWebAppDescriptor.jav
:147)
at weblogic.servlet.internal.dd.DescriptorLoader.initializeWebLogicXml(
org.xml.sax.InputSource;Ljava.lang.String;)V(DescriptorLoader.java:742)
at weblogic.servlet.internal.dd.DescriptorLoader.<init>(Ljava.util.jar.
arFile;Ljava.io.File;Ljava.lang.String;)V(DescriptorLoader.java:303)
at weblogic.servlet.internal.dd.DescriptorLoader.<init>(Ljava.util.jar.
arFile;Ljava.lang.String;)V(DescriptorLoader.java:235)
at weblogic.servlet.internal.WebAppModule.loadDescriptor()Lweblogic.man
Thanks in Advance.
RiazThank u for user suggestion.but can u specifiy the which type of error is this.I am using Weblogic Builder for generating xml file.
in the j2ee reference-->EJBRefs-->ADD
RefName:--ejb/Cart
JNDI Name:CartBean
EJBTYPE:session
REMOTE INTERFACE:statedemo.Cart
HomeInterface:statedemo.CartHome
I have add these parameters.but don't write anything in
link & Description field
Thanks a lot
Riaz
Maybe you are looking for
-
How to obtain the license for the mentioned products.
Hi All, Please help me in below licensing issues. 1) Our functional team got the below error while accessing "Job Scheduling Workbench". Error: The Workbench is inaccessible because Oracle Manufacturing Scheduling has not been licensed. Please work w
-
How do I delete a movie from the iTunes-cloud?
How do I delete a movie from the iTunes-cloud? I don't want to hide it I want to delete it even if it means I can't download it again..
-
Error with SSIS package running as SQL Agent job
I have a strange issue. I have a SQL Agent job that execute 5 steps, each step is an SSIS package that imports a CSV file to a temp table, then executes a SQL script to update a production table. This job runs every 3 mins, every day, and has been f
-
HELP WITH SLIDESHOW!! WEDDING SATURDAY!!
I'm making a slideshow for a wedding this Saturday. As I was previewing the slideshow, I noticed that the pictures weren't being shown in their entirety. Is there an option that I can select that will allow the photos to be shown as a whole? I've tri
-
Getting ORA-01031: insufficient privileges with underlying code
Any hlp welcome, I'm using this function to create user's CREATE OR REPLACE function create_user_from_asdb (p_user IN VARCHAR2,p_wachtwoord IN VARCHAR2) return VARCHAR2 as sql_stmt VARCHAR2(100); v_message VARCHAR2(2000); begin sql_stmt := 'creat