BPEL calling EJB 3.0 - EclipseLink error
I have an 11g BPEL process calling an EJB 3.0 method. It looks like the payload has been formatted correctly, but it is throwing an exception:
Exception [EclipseLink-70] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A NullPointerException was thrown while extracting a value through the method [null] in the object [com.test.TestDataVO].
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.DescriptorException.nullPointerWhileGettingValueThruMethodAccessor(DescriptorException.java:1254)
at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:77)
at org.eclipse.persistence.oxm.record.UnmarshalRecord.initializeRecord(UnmarshalRecord.java:443)
Caused by: java.lang.NullPointerException
at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:67)
... 96 more
The EBJ WSDL was generated from the WSDL so if that was done correctly, the data schemas should be OK.
I really don't know how to go about debugging this. Any ideas?
Hi,
any annotation like this can be used only in "managed classes" like Session Beans, Servlets etc. Managed classes are those classes managed by the J2EE server. Managed here means, lifetime controlled by server.
You can find this in J2EE specification.
Frank
Similar Messages
-
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 -
Getting error while calling ejb business methods from servlet
Hi
Iam getting error when i try to call a ejb method from servlet.Error is
"com.netscape.server.eb.UncheckedException: unchecked exception nested exception is:java.lang.NullPointerException".
I build the application and deployed it successfully.Iam using IAS 6.O with windows NT 4.0.
This is just a method which takes values from database and return as an array of bean to servlet.
Any help on this.Thanks ShankHi
I was using the session bean.Your suggestion helped me a lot.Perfect.
I debug my program and found that from ejbCreate()exception is getting.
I was getting the datasource object thro ejb create() initialisation.
Somehow the look up jndi which i mentioned was not interpretting from ejb-jar.xml ias-ejb-jar.xml and datasource ref .Due to this iam getting jndi Namenotfound exception which in turns to null pointer as datasource is getting null.
when i hardcoded in the ejb the the jndi name for datasource it is working fine.Bit worried all the existing ejbs working with the xml referenced datasource and jndi,but when i added a new ejb with same properties it is failing to get the jndi name.
Piece of code from ias-ejb-jar.xml
<resource-ref>
<res-ref-name>myDataSource</res-ref-name>
<jndi-name>jdbc/nb/myData</jndi-name>
</resource-ref>
Piece of code from ejb-jar.xml
<resource-ref>
<res-ref-name>myDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Thanks a lot meka -
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) {
} -
Error in calling EJB from servlet
I've create a servlet as a client bean to call EJB
I deploy the EJB, copy the servlet class (in .class format)
(\config\<domain>\serverclass) and
jsp to Weblogic 6.0
When I run the JSP, It said that the EJB class not found.
Please help
Fannie
Additional information :
I added the path where ejb jar file located to the calsspath in
startWebLogic.sh
Thanks!!
Fannie
Fannie <[email protected]> wrote in message
news:3ac84447$[email protected]..
> I've create a servlet as a client bean to call EJB
> I deploy the EJB, copy the servlet class (in .class format)
> (\config\<domain>\serverclass) and
> jsp to Weblogic 6.0
> When I run the JSP, It said that the EJB class not found.
>
> Please help
>
> Fannie
>
>
>
>
-
Oracle Service Bus, calling ejb on ormi protocol
Hi.
I'm trying to call an EJB on a Oracle Application server on the ormi protocol, but when i try to call it, I get this error:
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>
General runtime error: Error accessing the JNDI context for the EJB call: java.net.UnknownHostException: Unknown protocol: 'ORMI'
</con:reason>
<con:location>
<con:node>PipelinePairNode1</con:node>
<con:pipeline>PipelinePairNode1_request</con:pipeline>
<con:stage>stage1</con:stage>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
I have my business service referencing a local jndi provider which in turn points to the remote server, on the ormi protocol.
Could I be missing some libraries?I have my business service referencing a local jndi provider which in turn points to the remote server, on the ormi protocol.
Could I be missing some libraries?EJB transport doesn't support ORMI. Protocols supported by JNDI Provider resource are documented. Click help on you JNDI provider page.
supported protocols : http, https,t3, t3s, iiop,iiops.
Only BPEL transport supports ORMI (http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/bpelpmtransport/transport.html)
cheers
Manoj
Edited by: mneelapu on Jun 8, 2009 2:39 PM -
Calling EJB with HTML via SERVLET
Hi,
I used a writen example that calls EJB from HTML via SERVLET. Example name is Bonus. The problem I have is that the HTML throw error while calling SERVLET. I dont figure out what seams to be a problem. Someone know?
I wonder if the problem is in servlet? The EJB is fine!
christian
HTML CODE:(bonus.html)
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250"/>
<TITLE>untitled1</TITLE>
</HEAD>
<BODY BGCOLOR = "WHITE">
<BLOCKQUOTE>
<H3>Bonus Calculation</H3>
<FORM METHOD="GET" ACTION="BonusAlias">
<P>Enter social security Number:<P>
<INPUT TYPE="TEXT" NAME="SOCSEC"></INPUT>
</P>
Enter Multiplier:
<P>
<INPUT TYPE="TEXT" NAME="MULTIPLIER"></INPUT>
</P>
<INPUT TYPE="SUBMIT" VALUE="Submit">
<INPUT TYPE="RESET">
</FORM>
</BLOCKQUOTE>
</BODY>
</HTML>
SERVLET CODE:(BonusServlet.java)
package mypackage5;
import mypackage5.Calc;
import mypackage5.CalcHome;
import mypackage5.impl.CalcBean;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import java.beans.*;
public class BonusServlet extends HttpServlet {
CalcHome homecalc;
public void init(ServletConfig config) throws ServletException{
//Look up home interface
try{
//InitialContext ctx = new InitialContext();
//Object objref = ctx.lookup("Calc");
//homecalc = (CalcHome)PortableRemoteObject.narrow(objref, CalcHome.class);
Context context = new InitialContext();
CalcHome calcHome = (CalcHome)PortableRemoteObject.narrow(context.lookup("Calc"), CalcHome.class);
Calc calc;
catch (Exception NamingException) {
NamingException.printStackTrace();
public void doGet (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String socsec = null;
int multiplier = 0;
double calc = 0.0;
PrintWriter out;
response.setContentType("text/html");
String title = "EJB Example";
out = response.getWriter();
out.println("<HTML><HEAD><TITLE>");
out.println(title);
out.println("</TITLE></HEAD><BODY>");
try{
Calc theCalculation;
//Get Multiplier and Social Security Information
String strMult = request.getParameter("MULTIPLIER");
Integer integerMult = new Integer(strMult);
multiplier = integerMult.intValue();
socsec = request.getParameter("SOCSEC");
//Calculate bonus
double bonus = 100.00;
theCalculation = homecalc.create();
calc = theCalculation.calcBonus(multiplier, bonus);
catch (Exception CreateException){
CreateException.printStackTrace();
//Display Data
out.println("<H1>Bonus Calculation</H1>");
out.println("<P>Soc Sec: " + socsec + "<P>");
out.println("<P>Multiplier: " +
multiplier + "<P>");
out.println("<P>Bonus Amount: " + calc + "<P>");
out.println("</BODY></HTML>");
out.close();
public void destroy() {
System.out.println("Destroy");The error is that page cannot be found! When I run only the servlet it works, when I run the HTML page and enter the field throws eror that the page cannot be found!
thanks
Christian -
Why so happen when tomcat call ejb from weblogic6.1?
Hi everyone,
I've developed a stataless session bean and deployed to weblogic6.1,then
converted the ejb into a web service and deployed to axis hosting
Tomcat4.1.when I developed a web service client to call the web service,but
errors displayed as follows:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultSubcode:
faultString: javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal ʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ]
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal ʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
at javax.security.auth.Subject$SecureSet.add(Subject.java:1071)
at
weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootService
sStub.java:72)
at
weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java
:80)
at weblogic.security.acl.internal.Security.authenticate(Security.java:108)
at
weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFacto
ryDelegate.java:509)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
toryDelegate.java:364)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:336)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:208)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:149)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at
org.apache.axis.providers.java.EJBProvider.getContext(EJBProvider.java:349)
at
org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:314)
at
org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.
java:127)
at
org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider
.java:206)
at
org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.ja
va:144)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:258)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)
javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal ʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ]
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
49)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
8)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:973)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:230)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2511)
at org.apache.axis.client.Call.invoke(Call.java:2481)
at org.apache.axis.client.Call.invoke(Call.java:2176)
at org.apache.axis.client.Call.invoke(Call.java:2099)
at org.apache.axis.client.Call.invoke(Call.java:1622)
at wsclient.common.DynamicInvoker.invokeMethod(DynamicInvoker.java:177)
at wsclient.common.DynamicInvoker.main(DynamicInvoker.java:79)
Exception in thread "main"
anyone may help me,thank you in advance!
Regards peeroHello,
I know the reason of the problem,that is the conflict from different
version of jdk.As we know weblogic6.1 run using jdk1.3.1.If I run tomcat
using jdk1.3.1,it work fine.But if change it jdk1.4.1,the error is always
same.
Anyway thank you!
then can you tell me if weblogic6.1 can run using jdk1.4.1? If true,how to
do?
Regards,
Peero
"Bruce Stephens" <[email protected]> wrote in message
news:[email protected]...
Hello,
Your WSDL looks fine, so this should not be your issue. I'd suggest
that you focus on the security framework.
Not much help,
Bruce
peero wrote:
Hello Bruce,
Thank you! the content of wsdl file list as follows:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/Greeting"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/axis/services/Greeting"
xmlns:intf="http://localhost:8080/axis/services/Greeting"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:message name="greetingRequest">
<wsdl:part name="in0" type="xsd:string" />
</wsdl:message>
- <wsdl:message name="greetingResponse">
<wsdl:part name="greetingReturn" type="xsd:string" />
</wsdl:message>
- <wsdl:portType name="Greeting">
- <wsdl:operation name="greeting" parameterOrder="in0">
<wsdl:input message="impl:greetingRequest" name="greetingRequest" />
<wsdl:output message="impl:greetingResponse" name="greetingResponse"
/>
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="GreetingSoapBinding" type="impl:Greeting">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="greeting">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="greetingRequest">
<wsdlsoap:bodyencodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/Greeting" use="encoded"
/>
</wsdl:input>
- <wsdl:output name="greetingResponse">
<wsdlsoap:bodyencodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/Greeting" use="encoded"
/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="GreetingService">
- <wsdl:port binding="impl:GreetingSoapBinding" name="Greeting">
<wsdlsoap:addresslocation="http://localhost:8080/axis/services/Greeting"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Regards,
Peero
"Bruce Stephens" <[email protected]> wrote in message
news:[email protected]...
Hello,
This is a curious stack trace and on the surface it looks like a
security issue. I'm not sure we can help you solve the axis problem,
but I would like to know from an interop perspective. Could you post
the wsdl for the service you are trying to call?
Thanks,
Bruce
peero wrote:
Hi everyone,
I've developed a stataless session bean and deployed to
weblogic6.1,then
converted the ejb into a web service and deployed to axis hosting
Tomcat4.1.when I developed a web service client to call the webservice,but
errors displayed as follows:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultSubcode:
faultString: javax.naming.AuthenticationException [Root exception
is> > > > java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal> > ʵÀýµÄ¶ÔÏó> > > > Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.PrincipalʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
at javax.security.auth.Subject$SecureSet.add(Subject.java:1071)
at
weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootService
sStub.java:72)
at
weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java
:80)
atweblogic.security.acl.internal.Security.authenticate(Security.java:108)
at
weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFacto
ryDelegate.java:509)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
toryDelegate.java:364)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:336)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:208)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:149)
atjavax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
atjavax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at
javax.naming.InitialContext.<init>(InitialContext.java:195)
>>>>
at
org.apache.axis.providers.java.EJBProvider.getContext(EJBProvider.java:349)
>>>>
at
org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:314)
>>>>
at
org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.
java:127)
at
org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider
.java:206)
at
org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.ja
va:144)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:258)
>>>>
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
atorg.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
atorg.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
>>>>
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
atorg.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
>>>>
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
>>>>
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)
javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.PrincipalʵÀýµÄ¶ÔÏó> > > > Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
49)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
8)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:973)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(UnknownSource)
atorg.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(UnknownSource)
>>>>
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:230)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2511)
at org.apache.axis.client.Call.invoke(Call.java:2481)
at org.apache.axis.client.Call.invoke(Call.java:2176)
at org.apache.axis.client.Call.invoke(Call.java:2099)
at org.apache.axis.client.Call.invoke(Call.java:1622)
atwsclient.common.DynamicInvoker.invokeMethod(DynamicInvoker.java:177)
>>>>
at wsclient.common.DynamicInvoker.main(DynamicInvoker.java:79)
Exception in thread "main"
anyone may help me,thank you in advance!
Regards peero -
How to Call EJB from coldfusion
I need to call EJB that's created in JBoss from coldfusion.
I'm getting different errors depending on how I set the home object
and provider url.
If I prefix provider url with jnp://, then I get the
following error
The connection to the remote JNDI server on host jnp at port
1099 has failed (as have all backup hosts listed, if any) - please
verify that the server is running and the NamingService is
available
If I take the jnp out and keep just the ip address and port,
then i get the following error
null (no security manager: RMI class loader disabled).
So I'm not sure what the issue is and I haven't used this
feature before.
Here's my codeI tries to call custom EJBfrom custom component received
follwong error
ERROR [STDERR] javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException:
No ClassLoaders found for: com.mycom.myapp.action.interfaces.pm.ejb.PmFacadeRemote
(no security manager: RMI class loader disabled)]
any idea?
Thanks
YogLC -
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. -
Calling EJB from Java Stored Procedures
Hi,
I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
It is not working when I am trying to call EJB from it. It is giving compile-time error.
If anybody has implemented the same please suggest how to go forward.
thanks in advance,
Shashank AgarwalI tried the same thing without any luck. I assume you are using OC4J for your EJB ...
The compiling issue may be because you don't have the classes in your EJB client jar loaded into the database. Once those classes are loaded, you should loadjava without any problem.
However, you won't be able to call the EJB server because the EJB client (your Java code in the DB) will need the OC4J environment (oc4j.jar). I have tried to load oc4j.jar into the DB as well, and that was a big mess and nothing worked. My DB is 8.1.7, maybe the new 9i have OC4J libs bundled?!?
I looked around and only found 2 alternatives:
1. Write a JSP page that acts like an EJB client, then use URLConnection in your DB java code to send params to the JSP for it to invlode the EJB
2. Replace the JSP with RMI code, and use RMI instead of URLConnection in your DB code to invloke the EJB client.
If you find any other solution, please share it here.
Good luck!
Hi,
I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
It is not working when I am trying to call EJB from it. It is giving compile-time error.
If anybody has implemented the same please suggest how to go forward.
thanks in advance,
Shashank Agarwal -
Hi all ,
I am getting this error every time i try to make a new instance of BPEL process using java API .
The error is thrown on when I do a post using "deliveryService.post("UserTaskSample", "4.0", "initiate", nm);"
An exception has occured : java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ]; nested exception is: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ] [Root exception is javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ]] at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:69) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279) at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:299) at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:194) at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:178) at welcome.welcome.doPost(welcome.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) Caused by: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ] at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:100) at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:425) at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:233) at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302) at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:56) ... 18 more Caused by: oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2287) at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462) at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674) at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85) at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33) at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:1018) at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26) at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:879) at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337) at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296) at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278) at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152) at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127) at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) at com.evermind.server.rmi.RMICall.warningExceptionOriginatesFromTheRemoteServer(RMICall.java:109) at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:91) ... 22 more Caused by: java.lang.LinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2241) at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462) at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674) at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85) at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33) at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:1018) at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26) at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:879) at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337) at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296) at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278) at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152) at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127) at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107) ... 2 more ".Hi,
Thanks for the reply since I am quite new to BPEl can you elaborate a bit on this .
What I did was
1. I created a Async BPEL process in JDeveloper and in the same project I put my servlet code and html part when I deploy it on the server and ascess it the welcome jsp is displayed when I click submit on wecome.jsp it forwards to servlet and there the error originates .
2 If instead I deploy the BPEl process seperately and the try to access the BPEL process using my JDeveloper java code I don't get any error it works fine.
3 I have included config and schema folders in source path . wf_client_config.xml,user-properties.xml and wf-config.xml is also present in the source folder.
4 Along with this the jars needed have been also added.
So when I deploy the BPEL process created in 1 above from Jdeveloper it creates a .ear in j2ee\home\applications and the deploys it .This .ear doesn't has any .class files .
I take bpelclasses.jar from the .jar which is created when I compile the project and put it in the j2ee\home\applib folder and made an entry for it in the server.xml file.After this it is able to get .class files.
If there is any alternate way to do the same thing kindly tell me .
Thanks
Pranay -
Calling EJB from from a client app
Hi all,
I am trying to call an EJB component from portal. The example EJB I have taken is from SDN Bonus Calculator example - Application Server/Web Dynpro/Samples and Tutorials/Using EJBs (20)
I deployed the EAR file - no issue
I wrote the following code in a client app and trying to connect to the EJB remotely.
try {
java.util.Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
properties.put(Context.PROVIDER_URL, "ux0800:55304");
InitialContext ctx = new InitialContext(properties);
//InitialContext ctx = new InitialContext();
// get ejb home
home =
(BonusCalculatorLocalHome) ctx.lookup(
"localejbs/MySessionBean");
theCalculator = home.create();
} catch (Exception namingException) {
namingException.printStackTrace();
I get the following error
javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
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 com.sap.bonus.calculation.sessionBean.MyCommandBean.<init>(MyCommandBean.java:27)
at com.sap.bonus.calculation.sessionBean.MyCommandBean.main(MyCommandBean.java:68)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.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.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
Any clue will be appreciated.
thnxHi Sabbir,
Following code works for me in calling EJB from normal java application. Did you added the jar files to your application?. see the required jar files in end of code.
Create simple java applcation do the following steps:
Give JNDI name to the EJB(HelloJNDI)->Add the HelloEJB to HelloEAR ->deploy
Proxy Program to call ejb:
import javax.naming.Context;
import javax.naming.InitialContext;
import com.sample.Hello;
import com.sample.HelloHome;
public class HelloTest {
public static void main(String[] args) {
Hello remote = null;
try {
Context ctx = new InitialContext();
HelloHome home = (HelloHome) ctx.lookup("HelloJNDI");
remote = home.create();
String result = remote.hello();
System.out.print("Result:" + result);
} catch (Exception e) {
System.out.println("Exception:" + e.getLocalizedMessage());
1. Go To Run > Java Application ->New->select your project and select your main class(java program from which your going to call EJB)
2. Click next tab ->(x)=Arguments
paste the following code in VM Arguments
-Djava.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl -Djava.naming.provider.url=localhost:50104
replace the server IP address with your server IP address where your ejbs are running.
Under Class path settings for the program put the following jar files.
You can search for them from net weaver soruce folders
or copy from D:\usr\sap\J2E\JC01\j2ee\j2eeclient
ejb20.jar
logging.jar
exception.jar
sapj2eeclient.jar
Add Corresponding ejb.jar
and RUN >>>
this makes testing of your client programs easier, you can find the error trace on which line and saves lot of time.
Regards, Suresh -
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. -
SQLPLUS How to call ejb remote method in the sql plus.i am getting problem to intiallize the initial context.
hi chidambaresh,
you could have sent this to me directly.
the Enumeration si an interface and so the object we get during the runtime is basically an object of some implementation of this interface.
the Enumeration you get from HAshtable is actually Serializable.
but the Enumeration you actually get from Vector (this is actaully an inner class of Vector viz., Vector$1) is not serializable. that is what the error you are getting.
regards
Srinivasan.R
(VAMSOFT)
Maybe you are looking for
-
Selected Desktop Picture Will Not Appear
I recently downloaded this picture from this site: http://interfacelift.com/wallpaper/details.php?id=654 I have done so on both my iBook G4 (12") and now my iMac G5 (20"). I selected the file for 1680x1050 to match my resolution settings. I placed th
-
I can no longer print docs sent or downloaded to me in Adobe. This has been going on for about 4 months, and prior to that there was no problem using the system. The documents show on my screen as printing, but nothing happens. The one doc i am tyr
-
Download file for my dock & Time Machine
I had to do a reinstall om my Mac, and everything is gone that used to be there. I don't know how to use my Time Machine, and my download file is gone from my dock and also from the drop down menu in the Finder. What do I do~?? Can anyone help me
-
Object placeholder not working
Hi I have a JPG of an iPad an use the screen as Object Placeholder. This allows me to drop and drag any image into the iPad. This works fine, but not in the new version. Check http://www.screencast.com/t/Ui55rKVj : this works in the old Keynote, but
-
New Artwork not accepted!
iTunes has suddenly refused to accept artwork that I wish to add manually for a number of albums that I deleted (and which previously had associated artwork)and which I have now re-installed. When I try to drag the artwork into the artwork box I get