Help: applet call ejb in oracle8i
Hello:
Can someone tell me how to call ejb in oracle8i from applet?
thanks a lot!
tom
null
Hi mark tomlinson:
It does not work(IE and Netscape). Did you run the example
ejbclubmed?
tom
mark tomlinson (guest) wrote:
: Here is an example snippet:
: Assuming that the EJB MyEJB has been deployed and the generated
: server stubs (MyEJB_generated.jar) is referenced to resolve the
: Home and Bean objects, then:
: MyEJB myejb_obj;
: String user = "scott";
: String password = "tiger"
: String URL = "sess_iiop://<my8iserver>:2481:ORCL:/test/MyEJB";
: // Creates the Hashtable to hold the environment variables.
: Hashtable environment = new Hashtable();
: // Tells JNDI to speak sess_iiop
: environment.put(javax.naming.Context.URL_PKG_PREFIXES,
: "oracle.aurora.jndi");
: // Tells sess_iiop the userid, password, and credential
: authentication.environment.put
(Context.SECURITY_PRINCIPAL,user);
: environment.put(Context.SECURITY_CREDENTIALS, password);
: environment.put(Context.SECURITY_AUTHENTICATION,
: ServiceCtx.NON_SSL_LOGIN);
: // Creates the initial context.
: Context ic = new InitialContext(environment);
: // Gets an implementation of the EJB's home interface from the
: // inital context.
: MyEJBHome home = (RentalsEJBHome) ic.lookup(URL);
: // Tells the home interface to create an instance of the bean
: myejb_obj = home.create();
: From there you invoke moethods exposed on the bean object as
you
: would any other java object...
null
Similar Messages
-
Now I want to use an applet embeded in IE to call an EJB on the server.
They worked well in JBuilder6.0,and there are:
test.html
eb/*.class (the classes of EJB)
ebaptest/test.class (the class of applet)
Generated Source/*.class (some class made by JBuilder)
under the directory %JBuilderworkingdir%/classes.
But I want to deploy them to weblogic6.1,and how to do that.
I've tried many methods,and failed.
After I input "http://localhost:7001/test.html" in the IE,then the message "javax/ejb/EJBHome not found" is displayed.
pls help me,THXAlthough I've used applets and EJBs together, through servlets, I've not done it directly.
I suspect that what is happening is that our applet, when deployed outside of the JBuilder environment, cannot find the j2ee.jar, which contains all of the javax.ejb.* classes and interfaces.
Make sure that this jar file is in your applet's codebase. That should fix it.
Paul -
Calling EJB from an applet in 9iAS Release 2?
Hello!
In 9iAS Release 1 it is not so easy to call an EJB from an applet. First the applet needs special privileges and then the applet starts only once. The cause of problem is the implementation of ormi.
Will 9iAS Rel. 2 support Applets calling EJBs?Jeff,
I am also trying to make an applet client for an EJB deployed to OC4J.
I modified the java2.policy file as you suggested, but when I tried to run my applet, I
got the following error:
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 its.fnd.ejb.EJBHomeFinder.getHomeObject(Unknown Source)
at its.fnd.flight.ejb.EJBFlightFactory.<init>(Unknown Source)
at its.fnd.flight.FlightFactory.<init>(FlightFactory.java:97)
at EJBApplet.jbInit(EJBApplet.java:47)
at EJBApplet.init(EJBApplet.java:36)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I am using OC4J (stand-alone) version 9.0.2.0.0 on Solaris 7 and Microsoft Internet Explorer
5.0 with the java 1.3.1 plug-in.
Here is the applet code that I use to lookup the EJB home interface:
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
props.put(Context.PROVIDER_URL,"ormi://host:6666/app");
props.put(Context.SECURITY_PRINCIPAL,"admin");
props.put(Context.SECURITY_CREDENTIALS,"password");
Context ctxt = new InitialContext(props);
Object homeObj = ctxt.lookup("my_bean");
MyBeanHome home = PortableRemoteObject.narrow(homeObj, MyBeanHome.class);
The HTML page with the <applet> tag is a static HTML page that is part of OC4J's default
web application. The applet class file is located in a subdirectory of the default-web-app
directory. Here is the HTML page...
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>
HTML Test Page
</TITLE>
</HEAD>
<BODY>
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="580" height="450" name="EJBApplet" align="middle" alt="Loading EJBApplet ...">
<param name="java_code" value="EJBApplet">
<param name="java_codebase" value="/tests">
<param name="java_archive" value="xerces.jar,ejb.jar,oc4j.jar,jaas.jar"/>
<param name="java_type" value="application/x-java-applet;version=1.3">
<param name="java_scriptable" value="true">
<table cellpadding="1" bgcolor="#FFFFFF" width="580" height="450">
<tr><td>
This is a place for an APPLET.<br>Your browser doesn't support the correct applet java plug-in.<br><br>You can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="/classes/3rdparty/j2re-win-plug-in.exe">Click here to install plug-in.</a><br><br>Or if you have an Internet connection you can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="http://java.sun.com/products/plugin/1.3/plugin-install.html">Click here to install plug-in from Internet.</a><br><br>You can call your System Administrator for assistance.</td></tr>
</table>
</object>
</BODY>
</HTML>
I have searched the Internet, and the documentation, and tried several, different things,
but I can't get it to work.
Any and all help will be greatly appreciated.
Thanks,
Sofia. -
Hi friends,
I have a problem of caling EJB from applet.that too from browser.
Through dos prompt,I am able to set the classpath and then open the applet and then call the EJB.but thru browser i am encontering two problems,
First,The codebase of applet is not being set and i am unable to view the applet.
Second,my Initial Context Factory is not being found it is giving error as
Cannot instantiate class: com.evermind.server.rmi.RMIInitialContextFactory.I am using oracle app server Oc4j2.
can any one help me out.
i am able to get output thru dos prompt where i can set classpathkyren,
he has used something called HTML ConvertersDepends on the version of the plug-in you are using.
(I'm sorry, but I couldn't find that detail in any of your posts!)
You have to use the (HTML) converter with java version 1.3 (for example), but you don't have to with java version 1.4.
thru my jbuilder version i am able to solve my
problem.
but thru browser,i am first of all not able to
display applet.That's because "JBuilder" uses the appletviewer to display the applet (and not a browser).
I Think for normal displaying applet we don't need of
signed or unsigned applet.when calling ejb we may
require.As Anupama has stated, the "codebase" attribute of the applet tag must be relative to the directory where the HTML file (containing the "applet" tag) is located. Where I work, we also use the "archive" attribute that tells the applet where to download the JAR files from. In order to lookup your ejb from your applet, you need (at least) the "oc4jclient.jar" file.
By the way, if you want your name to appear next to your posts (instead of your ID number), you need to update your profile. Click on the "Forum Settings" link at the top of the (Web) page.
Good Luck,
Avi. -
Help needed in EJB - to call AS from EJB a Session Bean
Hi All ,
I have been strictly told not to use Web Services as all the applications are on the same server
actually I have to make an EJB invocation to an Application Service from the CAF layer from a Session Bean of another EJB Project(Not a CAF Service).
the CAF layer has 5 parts metadata , permissions , dictionary , ear and ejbmodule.
I added the ejbModule to the Build Path of the calling EJB Session Bean. And so I was able to access the operations of the Application Service which in turn accesses a BAPI(The Appl Service operation returns a String).
But while executing I got the exception java.lang.RuntimeException: java.lang.NoClassDefFoundError
My method :
Normally from a Dynamic Web Project acting as a client to an EJB Session bean, I was able to get access to EJB Local Interface by using
private ConverterLocal converterBean = null;
public void jspInit() {
try {
InitialContext ic = new InitialContext();
converterBean = (ConverterLocal)
ic.lookup("java:comp/env/Converter");
} catch (Exception ex) {
System.out.println("Couldn't create converter bean."+
ex.getMessage());
BigDecimal dollarAmount = converterBean.euroToDollar(value);
So I created a JNDI field in ejb-j2ee-engine.xml
enterprise-beans>
<enterprise-bean>
<ejb-name>com.sap*******.bapi_company_getlist.BAPI_COMPANY_GETLIST</ejb-name>
<jndi-name>COMPANY</jndi-name>
</enterprise-bean>
</enterprise-beans>
And from my Session Bean , I tried to access it using the code in already existing Bean which was working fine
BAPI_COMPANY_GETLISTBeanImpl bean = new BAPI_COMPANY_GETLISTBeanImpl();
try {
InitialContext ctx = new InitialContext();
bean = (BAPI_COMPANY_GETLISTBeanImpl)ctx.lookup("COMPANY");
} catch (NamingException e) {
System.out.println("Converter Bean can't be created");
String send = bean.returnDetails();
And I tried to print the String , but I got the above error
I have a doubt :
1) How do I specify the JNDI name ie in the ejb-j2ee-engine.xml file , what should I add as the name of the ejb
is this sufficient , or are there more steps ??Hi Ekaterina,
I have the document to access my Bean from another Bean.
I could access my Bean from a standalone Java class with this code
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
props.put(Context.PROVIDER_URL,"hostname:port");
try{
Context ctx = new InitialContext(props);
Object o = ctx.lookup("sap.com/TestEAR/REMOTE/TestBean/com.@#$.TestRemote");
TestRemote testRem = (TestRemote)javax.rmi.PortableRemoteObject.narrow(o, TestRemote.class);
String msg = testRem.getMessage();
System.out.println(msg);
And in this document there is a way shown to access a bean from another Bean.
http://help.sap.com/saphelp_nw04/helpdata/en/13/c8633e0084e946e10000000a114084/frameset.htm
If your client is another enterprise bean, declare the EJB reference in the ejb-jar.xml.
-For more information, see Declaring EJB References.
But the problem is that in EJB 3.0 , I can't see the ejb-jar.xml file .
So how should I have a Bean as a client to another Bean, I am not that familiar with Annotations. -
JDK1.2 client to EJB in Oracle8.1.6
I had my EJB client (JDK1.1.8) with my EJBs (in Oracle8.1.5) all worked before.
After I deployed the same EJBs (with SQLJs) into Oracle8.1.6, my EJB client (JDK1.2.2)
was able to connect and using the EJB sevices.
However, I got some strange behavior which never occurd with JDK1.1.8 and Oracle8.1.5.
I will sometimes get exception for calling the remote method as,
Exception in thread "main" org.omg.CORBA.COMM_FAILURE:
java.net.SocketException:Connection shoutdown:
JVM_recv in socket input stream read minor code: 0 completed: No
at com.visigenic.vbroker.orb.TcpConnection.read(TcpConnection.java, Compiled Code)
at com.visigenic.vbroker.orb.GiopConnectionImpl.receive_message(GiopConnectionImpl.java:436)
This normally occured after several calls. But it does not always happen.
Any suggestions?
--Yitao
nullSorry, the problem still exists. If I repeated calling all the methods
in my EJB from the EJB client, I will eventually get the
"Peer disconnected socket" error.
Please let me know what could be the reason.
Thanks for any help.
--Yitao -
Hello Developers!
I deployed my ejb to OAS4081. I call that
from JDeveloper so it good. But when I try
to call from applet in IExpl5 I can't
instantiate the ORB. I've got a com.ms.security.SecurityException : oracle.oas.orb.CORBA.ORB.init
I coded the CLASSPATH(oasoorb(yoj),client,
ejbapi...) perfectly, I think.
If anybody could help, please...
Thanx!Hi there,
I saw someone on this group had a problem to locate proper classpath
to call EJB from JSP. I thought if you call EJB from classpath, you are
calling the bean. But you loss all the EJB functions. To be able to utilize
EJB features like object pooling. You need to call it from Weblogic server
using url/jndi, not from the jar directly.
Any comment? Am I right?
BTW, my question about calling EJB from JSP means calling through URL,
not a local path.
Thank you
>-------------------------------------------------------------------->
Jim wrote in message <[email protected]>...
>Hi there,
> Can I call EJB from JSP? Is there a particular security setting or
>concern for Weblogic? Is there an coding example?
>
>Thank you
>
>
-
Hi,
Is the following true? If so what is the recommended way to load balance
EJB calls from applets?
Since applets (not signed) can only create a connection to the server they
where downloaded from, I can not call EJBs that reside in a WL cluster.
These EJBs may reside on a different machine other than the one the applet
was downloaded from.
Can I solve this by installing a Web Server on each of the machines in the
cluster and have the applets stick the one machine? What I do not like
about this scheme is that I loose the dynamic load balancing features of WL.
Any help will be appreciated,
Assaf Pazner
The WLS RJVM scheme supports routing / session concentration of
request. Thus, using clustered services within the applet security
model or over a firewall should work fine. The server that the applet
talks to will route requests to the appropriate server within the
cluster.
- Mike
Assaf Pazner wrote:
>
> Hi,
>
> Is the following true? If so what is the recommended way to load balance
> EJB calls from applets?
>
> Since applets (not signed) can only create a connection to the server they
> where downloaded from, I can not call EJBs that reside in a WL cluster.
> These EJBs may reside on a different machine other than the one the applet
> was downloaded from.
>
> Can I solve this by installing a Web Server on each of the machines in the
> cluster and have the applets stick the one machine? What I do not like
> about this scheme is that I loose the dynamic load balancing features of WL.
>
> Any help will be appreciated,
> Assaf Pazner
-
Hi! there.
I use applet to get Bean from EJB.
when I lookup jndiName from context. I get following exception ,
java.lang.ClassCastException : weblogic.rmi.internal.StubInfo
How I can obtain EJBean from context in applets?
any reply is appreciated.
I use wlServer 6.1sp1, and I use java plugin1.3.1_01
I used following applet code
<html>
<OBJECT CODE = "Test.class" CODEBASE = "t3://localhost:7001/applets" ARCHIVE =
"weblogic.jar, micDcdpApprovalEJB.jar, micDcdpSystemEJB.jar" WIDTH = 500 HEIGHT
= 440>
</OBJECT>
</html>Of course can.
You should call EJB remote interface.
This will help you
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/J2eeTutorialTOC.html -
Error while calling ejb service call from BPM service
Hi,
We are using the Oracle 11.1.1.5.0
We are calling ejb service call from BPM service to update the data to Oracle database.
We are getting the below error when we executing the ejb service call from BPM Service.
<Error> <EJB> <BEA-010026> <Exception occurred du
ring commit of transaction Name=[EJB oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliver
yBean.handleCallback(java.lang.String,java.lang.String,java.lang.String,int,bool
ean)],Xid=BEA1-45B91984D57960994897(30845116),Status=Rolled back. [Reason=javax.
transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a p
articipant in two-phase commit. To force this participation, set the GlobalTrans
actionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhas
eCommit for the Data Source = EBSConnection],numRepliesOwedMe=0,numRepliesOwedOt
hers=0,seconds since begin=1,seconds left=60,XAServerResourceInfo[SOADataSource_
base_domain]=(ServerResourceInfo[SOADataSource_base_domain]=(state=rolledback,as
signed=soa_server1),xar=SOADataSource,re-Registered = false),XAServerResourceInf
o[ArCnTaskForms@EBSConnection@EBSConnection_base_domain]=(ServerResourceInfo[ArC
nTaskForms@EBSConnection@EBSConnection_base_domain]=(state=rolledback,assigned=s
oa_server1),xar=weblogic.jdbc.wrapper.JTSEmulateXAResourceImpl@fa5476,re-Registe
red = false),SCInfo[base_domain+soa_server1]=(state=rolledback),properties=({web
logic.jdbc.remote.EBSConnection=t3://192.168.10.114:8001, weblogic.transaction.n
ame=[EJB oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean.handleCallback(java.la
ng.String,java.lang.String,java.lang.String,int,boolean)]}),local properties=({w
eblogic.jdbc.jta.SOADataSource=[ No XAConnection is attached to this TxInfo ]}),
OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=soa
server1+192.168.10.114:8001+basedomain+t3+, XAResources={eis/tibjms/Queue, eis
/activemq/Queue, WLStore_base_domain_BPMJMSFileStore, WLStore_base_domain__WLS_s
oa_server1, eis/fioranomq/Topic, eis/jbossmq/Queue, eis/Apps/Apps, eis/websphere
mq/Queue, eis/AQ/aqSample, WLStore_base_domain_SOAJMSFileStore, eis/aqjms/Queue,
WSATGatewayRM_soa_server1_base_domain, eis/sunmq/Queue, eis/pramati/Queue, SSCo
nnectionDS_base_domain, eis/tibjms/Topic, eis/tibjmsDirect/Queue, eis/wls/Queue,
eis/tibjmsDirect/Topic, EDNDataSource_base_domain, eis/wls/Topic, eis/aqjms/Top
ic, RL3TST_base_domain, ArCnTaskForms@EBSConnection@EBSConnection_base_domain, S
OADataSource_base_domain, WLStore_base_domain_UMSJMSFileStore_auto_2},NonXAResou
rces={})],CoordinatorURL=soa_server1+192.168.10.114:8001+base_domain+t3+): weblo
gic.transaction.RollbackException: Could not prepare resource 'ArCnTaskForms@EBS
Connection@EBSConnection_base_domain
JDBC driver does not support XA, hence cannot be a participant in two-phase comm
it. To force this participation, set the GlobalTransactionsProtocol attribute to
LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source
= EBSConnection
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(
TransactionImpl.java:1881)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(Se
rverTransactionImpl.java:345)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
sactionImpl.java:239)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocal
Object.java:622)
at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetr
y(BaseLocalObject.java:455)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(Sess
ionLocalMethodInvoker.java:52)
at oracle.bpm.bpmn.engine.ejb.impl.BPMNDeliveryBean_of8dk6_ICubeDelivery
LocalBeanImpl.handleCallback(Unknown Source)
at com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMes
sageHandler.handle(CallbackDeliveryMessageHandler.java:47)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(Dispatc
hHelper.java:140)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatc
hTask.java:88)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTas
k.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.transaction.xa.XAException: JDBC driver does not support XA, he
nce cannot be a participant in two-phase commit. To force this participation, se
t the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended)
or EmulateTwoPhaseCommit for the Data Source = EBSConnection
at weblogic.jdbc.wrapper.JTSXAResourceImpl.prepare(JTSXAResourceImpl.jav
a:83)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
sourceInfo.java:1327)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
sourceInfo.java:513)
at weblogic.transaction.internal.ServerSCInfo$1.run(ServerSCInfo.java:36
8)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
gWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
.>
<12 Oct, 2012 12:34:40 PM IST> <Error> <oracle.soa.bpel.engine.dispatch> <BEA-00
0000> <failed to handle message
javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot
be a participant in two-phase commit. To force this participation, set the Globa
lTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateT
woPhaseCommit for the Data Source = EBSConnection
at weblogic.jdbc.wrapper.JTSXAResourceImpl.prepare(JTSXAResourceImpl.jav
a:83)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
sourceInfo.java:1327)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerRe
sourceInfo.java:513)
at weblogic.transaction.internal.ServerSCInfo$1.run(ServerSCInfo.java:36
8)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
gWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
>
<12 Oct, 2012 12:34:40 PM IST> <Error> <oracle.soa.bpel.engine.dispatch> <BEA-00
0000> <Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.
message.instance.CallbackDeliveryMessage"; the reported exception is: Error comm
itting transaction:; nested exception is: javax.transaction.xa.XAException: JDBC
driver does not support XA, hence cannot be a participant in two-phase commit.
To force this participation, set the GlobalTransactionsProtocol attribute to Log
gingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = EB
SConnection
This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).
ORABPEL-05002
Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.
message.instance.CallbackDeliveryMessage"; the reported exception is: Error comm
itting transaction:; nested exception is: javax.transaction.xa.XAException: JDBC
driver does not support XA, hence cannot be a participant in two-phase commit.
To force this participation, set the GlobalTransactionsProtocol attribute to Log
gingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = EB
SConnection
This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(Dispatc
hHelper.java:207)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatc
hTask.java:88)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTas
k.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
>
Could any body help on this issue.It is little bit urgent for us to resolve.
Thanks in advance.Thanks Sudipto Desmukh,
The link is helpful me to resolve this issue.
Thanks,
Narasimha E -
Java Applet call javascript problem
Hi I have a web page as follow and embedded a applet. The applet call the java script, and instead of showing an alarm, the browser show the javascript code. Is that strange ? Any suggestion for this problem.
HTML:
================================================================
<HTML>
<HEAD>
function ShowEmbd()
alert("Test Applet call Javascript");
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="AppletEmbdStart">
<OBJECT classid="clsid:48B2DD7B-6B52-4DB0-97C9-ECB940113B47" id="CIVON_DEmbdObj" width="0" height="0"></OBJECT>
<APPLET code="MyApplet.class" width="0" height="0"></APPLET>
</FORM>
</BODY>
</HTML>MyApplet.java
=========================================================================
import netscape.javascript.*;
public class MyApplet extends javax.swing.JApplet
private JSObject m_win = null;
private JSObject m_doc = null;
public void init()
getJSWin().call("ShowEmbd", null);
private getJSDoc()
if(m_doc == bull)
m_doc = (JSObject) getJSWin().getMember("document");
return m_doc;
private JSObject getJSWin()
if (m_win == null)
m_win = netscape.javascript.JSObject.getWindow(this);
return m_win;
}The page was load and it should call the applet MyApplet. The MyApplet should do the init() method and call the Javascript "ShowEmbd()", BUT, instead of show alert from ShowEmbd(), the browser show the code of ShowEmbd() itself ...... It did not run the javascript and shows the alert ??
The browser shows a message from status bar "The applet not initial" ???? why ???
Can anyone help ?!On first look:
I am not sure about the Object Tag, but the Applet Tag requires the MAYSCRIPT attribute before Java can call Javascript. -
Calling EJB with Annotation not successfull within Netbeans
I am trying to call EJB but my simple program can't find a ejb
within netbeans. I also download a stub file from the admin page and add to the ejb client path. but still without the luck
@EJB
private static ConverterBean converterBean;
public static void main(String[] args) {
// TODO code application logic here
BigDecimal param = new BigDecimal ("100.00");
BigDecimal amount = converterBean.dollarToYen(param);
System.out.println( amount );
}Thanks for your pointer. Could you please help me out with a small code snippet example?
I want to make use of this existing bean (AMSProfileServiceBean ):
@WebService(targetNamespace = "http://www.ttt.de/ota")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
// standard EJB3 annotations
@Local(AMSAgencyWSPortType.class)
@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
// jboss propriatary annotations
@WebContext(transportGuarantee = "NONE", secureWSDLAccess = false)
public class AMSProfileServiceBean extends AbstractProfileBuilder implements AMSAgencyWSPortType
private static Log log = LogFactory.getLog(AMSMappingServiceBean.class);
@EJB(mappedName = "PotsdamProfileService/local")
private PotsdamProfileService profileService;
private Security security;
@EJB
private OTAProfileBuilder otaProfileBuilder;
@EJB
private OTAProfileUpdater otaProfileUpdater;
@Override
public OTATTProfileReadRS otaTTReadRQ(Holder<Security> wsseHeader, OTATTReadRQ request)
...in my soap-connector :
@WebServiceProvider(wsdlLocation = "WEB-INF/wsdl/PotsdamAMSAgencyWS.wsdl", targetNamespace = "http://www.ttt.de/ota", serviceName = "PotsdamAMSAgencyWS", portName = "PotsdamAMSAgencyWSPortType")
@ServiceMode(value = Service.Mode.MESSAGE)
public class PotsdamAgencyWSProvider extends WSProvider implements Provider<SOAPMessage>
@Resource
WebServiceContext wsCtx;
...A small example would be really appreciated.
Thanks. -
Can an applet call one of the methods of servlet??
hi everyone...
i m very new servlet and applet programming and i have come accross a problem....
i m using a applet which establishes connection with the servlet(residing on server)..i want to use few of the methods of the servlet....
now is it possible tfor me to call the methods of this servlet using its object.???
please help me..
thanx in advancefirst of all thanx a lot for the reply...
but i wanted to know can an applet call any other
function of servlet other than get and post....as i
hacve defined some more functions in servlet..
please reply...I did this a while back (2003/4?) and unless it's changed you cannot do it directly, it must be GETor POST, then you could just use conditional logic to invoke another method. -
Error when calling ejb.create() call
Hi Folks,
I am trying to create a simple CMP bean with J2EE1.4 but when I call ejb.create I get the following exception :-
Exception in thread "main" java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.RemoteException
at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
n(Unknown Source)
at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
at com.titan.customer._CustomerHomeRemote_Stub.create(Unknown Source)
at Client.main(Client.java:20)
Caused by: java.rmi.RemoteException
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.ja
va:195)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:73
9)
at com.titan.customer.CustomerBean_986018080_ConcreteImpl_RemoteHomeImpl
.create(CustomerBean_986018080_ConcreteImpl_RemoteHomeImpl.java:38)
at com.titan.customer._CustomerBean_986018080_ConcreteImpl_RemoteHomeImp
l_Tie._invoke(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
tchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
tch(CorbaServerRequestDispatcherImpl.java:191)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
Request(CorbaMessageMediatorImpl.java:1655)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
(CorbaMessageMediatorImpl.java:1514)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
orbaMessageMediatorImpl.java:896)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
back(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
h(SocketOrChannelConnectionImpl.java:352)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(So
cketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadI
mpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
run(ThreadPoolImpl.java:382)
Bean code :-
package com.titan.customer;
import javax.ejb.EntityContext;
public abstract class CustomerBean implements javax.ejb.EntityBean {
public Integer ejbCreate(Integer id) {
setId(id);
return id;
public void ejbPostCreate() {
//abstract methods
public abstract Integer getId();
public abstract void setId(Integer Id);
public abstract String getLastName();
public abstract void setLastName(String lastName );
public abstract String getFirstName();
public abstract void setFirstName(String firstName);
public void setEntityContext(EntityContext ec) {}
public void unsetEntityContext() {}
public void ejbLoad() {}
public void ejbStore() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove() {}
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>CustomerBean</display-name>
<enterprise-beans>
<entity>
<ejb-name>CustomerBean</ejb-name>
<home>com.titan.customer.CustomerHomeRemote</home>
<remote>com.titan.customer.CustomerRemote</remote>
<ejb-class>com.titan.customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>false</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>CustomerBean</abstract-schema-name>
<cmp-field>
<description>no description</description>
<field-name>firstName</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>lastName</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<security-identity>
<use-caller-identity/>
</security-identity>
</entity>
</enterprise-beans>
</ejb-jar>
sun cmp mapping
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mapping.dtd">
<sun-cmp-mappings>
<sun-cmp-mapping>
<schema>CustomerBean_jar</schema>
<entity-mapping>
<ejb-name>CustomerBean</ejb-name>
<table-name>CUSTOMERBEAN</table-name>
<cmp-field-mapping>
<field-name>firstName</field-name>
<column-name>CUSTOMERBEAN.FIRSTNAME</column-name>
</cmp-field-mapping>
<cmp-field-mapping>
<field-name>id</field-name>
<column-name>CUSTOMERBEAN.ID</column-name>
</cmp-field-mapping>
<cmp-field-mapping>
<field-name>lastName</field-name>
<column-name>CUSTOMERBEAN.LASTNAME</column-name>
</cmp-field-mapping>
</entity-mapping>
</sun-cmp-mapping>
</sun-cmp-mappings>
sun-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<name>CustomerBean</name>
<unique-id>579688304</unique-id>
<ejb>
<ejb-name>CustomerBean</ejb-name>
<jndi-name>CustomerBean</jndi-name>
</ejb>
<pm-descriptors/>
<cmp-resource>
<jndi-name>jdbc/Vineeth</jndi-name>
<create-tables-at-deploy>true</create-tables-at-deploy>
<drop-tables-at-undeploy>true</drop-tables-at-undeploy>
<schema-generator-properties>
<property>
<name>use-unique-table-names</name>
<value>true</value>
</property>
<property>
<name>java-to-database</name>
<value>true</value>
</property>
</schema-generator-properties>
</cmp-resource>
</enterprise-beans>
</sun-ejb-jar>
Can someone please help me out with this...this is a bit urgent..
ThanksIt seems that u need a ejbPostCreate with the same parameters as ejbCreate:
public Integer ejbCreate(Integer id) {
setId(id);
return id;
public void ejbPostCreate(Integer id) {
} -
How to call EJB deployed on OC4J from java stored procedure?
Hello,
I'd like to call EJB from java stored procedure. My example works fine from command line, but the problem seems to be with deployment of this code into database. Especialy I'm wondering how to reference jars like oc4jclient.jar, ejb.jar, ... from java stored procedure.
Is there some example how to do that ?
Can You help me please ?
Many thanks,
Radim Kolek,
Eurotel Prague.Hi,
You may want to check up this thread
Calling JBoss EJBs from Java stored procedure
Hope this helps,
Sujatha.
OTN Group.
Maybe you are looking for
-
Question about Contact Sheets and Version name.
When making a contact sheet, is it possible to just have the image number under each photo and NOT the words "Version Name" in front of each number? Thanks for any help.
-
Best way to save HQ video for the web?
What´s the best settings for great video-quality for the web? I have a 5 min long clip I´d like to put on my website. I would like it to be 480x360 and with good quality. It´s ok if the file gets 30-40 MB. I have tryed the Expert Settings, Quicktime
-
Hi all,... I want to ask : how we can import file swf to java... I want to make that *.swf to become my first page in my program. that swf will be displayed in my program... by the way, please tell me step by step (i'm still newbie).. Thanxs for u' a
-
Freight Amount Posting.
Dear all I am use the Purchase account posting system when i want to add the freight on purchases at the time of GRN system is not allow me to post the transaction and giving the Error (Cannot Retrieve the tax information.) I try this in
-
Systemd: run cloudprint.py daemon
Hi! I tried to use cloudprint.py to use Google cloudprint with my USB printers. Running it as user and root is working fine ("normal" and daemon mode). The problems started, when I tried to create a systemd service file, to start it automatically at