ClassCastException running JDev Generated EJB Client
Hi,
I'm trying to test a CMP entity bean I created by using the JDev903 generated TestClient class. First I run the EJB I want to test, then I attempt to run the Client class. I get a ClassCastException. The exception occurs on the call to PortableRemoteObject.
How do I get this to run? I'm not sure how to get past this exception. Is there something else I need to run? Is there something that needs to be set in a config file.
I kinda expected this to run outta da box.
package Samplecom.ngit.iis.cmedia.cmptest;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import com.ngit.iis.cmedia.cmptest.Tcmmtpic;
import com.ngit.iis.cmedia.cmptest.TcmmtpicHome;
import java.util.Collection;
import java.util.Iterator;
import javax.naming.NamingException;
public class TcmmtpicClient {
public static void main(String [] args) {
TcmmtpicClient tcmmtpicClient = new TcmmtpicClient();
try {
Context context = getInitialContext();
TcmmtpicHome tcmmtpicHome = (TcmmtpicHome)PortableRemoteObject.narrow(context.lookup("Tcmmtpic"), TcmmtpicHome.class); <=== EXCEPTION OCCURS HERE ===>
Tcmmtpic tcmmtpic;
// Retrieve all instances using the findAll() method
// (CMP Entity beans only)
Collection coll = tcmmtpicHome.findAll();
Iterator iter = coll.iterator();
while (iter.hasNext()) {
tcmmtpic = (Tcmmtpic)iter.next();
System.out.println("tpic_cmvg_id = " + tcmmtpic.getTpic_cmvg_id());
System.out.println("tpic_id = " + tcmmtpic.getTpic_id());
System.out.println("tpic_sequence_no = " + tcmmtpic.getTpic_sequence_no());
System.out.println("tpic_nm = " + tcmmtpic.getTpic_nm());
System.out.println();
} catch(Throwable ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "ormi://localhost:23891/current-workspace-app");
return new InitialContext(env);
Thanks,
Art
I was attempting to run this under JDev. I created a CMP from a table and then created the client to run it. I started the bean and then ran the client with the following result.
The stack trace is listed below.
C:\JDev903\jdk\bin\javaw.exe -ojvm -classpath J:\CM_SOURCE\workspaces\cmee\cmptest\classes;C:\JDev903\jdev\lib\jdev-rt.jar;C:\JDev903\j2ee\home\lib\activation.jar;C:\JDev903\j2ee\home\lib\ejb.jar;C:\JDev903\j2ee\home\lib\jaas.jar;C:\JDev903\j2ee\home\lib\jaxp.jar;C:\JDev903\j2ee\home\lib\jcert.jar;C:\JDev903\j2ee\home\lib\jdbc.jar;C:\JDev903\j2ee\home\lib\jms.jar;C:\JDev903\j2ee\home\lib\jndi.jar;C:\JDev903\j2ee\home\lib\jnet.jar;C:\JDev903\j2ee\home\lib\jsse.jar;C:\JDev903\j2ee\home\lib\jta.jar;C:\JDev903\j2ee\home\lib\mail.jar;C:\JDev903\j2ee\home\oc4j.jar;C:\JDev903\lib\xmlparserv2.jar;C:\JDev903\lib\xmlcomp.jar -Dhttp.proxyHost=spider.northgrum.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=*.ihsxtra.net|*.ihserc.com|*.logicon.com|*.grumman.com|*.northrop.com|*.northgrum.com Samplecom.ngit.iis.cmedia.cmptest.TcmmtpicClient
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect
java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
RMIContext.java:134
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
InitialContext.java:350
void Samplecom.ngit.iis.cmedia.cmptest.TcmmtpicClient.main(java.lang.String[])
TcmmtpicClient.java:20
Process exited with exit code 0.
Similar Messages
-
Using JarSettings to generate EJB client jar, but supported classes missed
Appreciated for any comments in advance.
I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
Please advise how I can add the implementation of this interface to client jar?
Best Regards,
JamesHi James,
I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
- Matt -
Help: Problem in running a simple EJB client
Hi All,
I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
// EJB client code in main()
Context ctx = new InitialContext();
Object hwobj = ctx.lookup("HelloWorldApp");
HelloWorldHome hworldHome = (HelloWorldHome)
PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
HelloWorld hworld = hworldHome.create();
String msg = hworld.sayHelloWorld();
System.out.println(msg);
When I am running my client I am getting the following exception. Can anyone tell me why ?
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at HelloWorldClient.main(HelloWorldClient.java:13)
Thanks
Ratheesh* I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
* Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
Forum Home > Enterprise JavaBeans
Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Welcome ratheeshpai!
Search Forum
Not watching this topic.
This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
[ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: NicholasHsiao Oct 28, 2001 5:51 AM
Hi,
I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
Context ic = null;
try
ic = new InitialContext();
catch(Exception e)
System.out.println("1: "+e.toString());
This exception is happend when I try to lookup the jndi name
This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: cdunn5
In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
Reply 1 of 4
hi,
I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
Author: scottiep
In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
Reply 2 of 4
Da:Frederik Hansen ([email protected])
Message 2 in thread
Soggetto:Re: J2EE - NO_PERMISSION
Newsgroups:dk.edb.programmering.java
View this article only
Data:2001-11-10 03:32:12 PST
For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
beta 2 stop running under the 1.3 FCS release with the
following message: java.rmi.AccessException: CORBA
NO_PERMISSION 0 No. Why does this happen and what
can be done about it? When your application ran under the 1.3 beta 2
version of the reference implementation (RI), security permissions may
not have
been checked. For example, the beta 2 RI allowed
calls to enterprise beans that required username-password permission,
even
when the client provided no username-password
information. With 1.3 FCS release, the J2EE SDK became strict
about checking adherence to the security policies of J2EE components. How can you make your application run under the
FCS release? 1.If you don't want security checks, do the
following: Use the deploytool to build a deployment
descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
or the Security tab of the EJB inspector in deploytool, click
"Deployment
Settings..". Under the box "Client
Authentication", make sure "Support Client Choice" is checked instead of
"Certificate"
or "Password". 2.To require the application pass security
checks to run, do the following: When an enterprise bean specifies
"Certificate" or "Password" as the method of Client Authentication, use
a J2EE
application client, instead of a stand-alone
Java application, to access the bean. You will need to login as a valid
J2EE
user.
By : scottiep
Thanks
Ratheesh -
Hi,
I m working with Jdeveloper 10G and oracle 9IAS 9.0.3.
I ve deployed an Ejb module on 9IAS
I m now wondering how generate the EJB client jar (Stubs and interfaces )to access my EJB module from anywhere.
Any Idea?I found the answer.
specify the client jar name in the jar settings and the workshop will generate the client jar for you.
inlcude the client jar and the wlclient.jar in the remote client application. -
Hi,
i want to know wheather there is any way to generate client jars for any specified ejb's in oracle 10g. In weblogic using appc generates a client jar that contains all required classes for the ejb's including the Stub implementation classes.
I need the client jar's in order to make it available to a war file which does a lookup of these beans.
Any ant taks that oracle provides for this??You need to deploy the class files specific to your client as well as the generated stubs for the EJB.
-
Problem running ClientGen generated webservice client
I'm using Workshop for Weblogic 10.3 and I'm trying to generate a webservice client. When I generate it with ClientGen and I try to use it I get the following error:
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/j2ee/descriptor/ServiceRefHandlerBean
at weblogic.wsee.jaxrpc.HandlerRegistryImpl.<init>(HandlerRegistryImpl.java:32)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:88)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at testClient.main(testClient.java:18)
If I add the com.bea.core.descriptor.j2ee_1.1.0.0.jar to the libraries then I get the following error:
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: com/sun/xml/ws/util/JAXWSUtils
at weblogic.wsee.util.is.InputSourceUtil.loadURL(InputSourceUtil.java:44)
at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:118)
at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)
at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)
at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:403)
at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:389)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:476)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at testClient.main(testClient.java:18)
How can I fix it?I didn't see a mistake, but my sample works fine. Are you trying to execute the client from Workshop / Eclipse? If that is the case, then I believe it's a matter of just using the appropriate client libraries, which I believe is your issue even though the error is misleading. You should definitely try using a Java Project for a stand-alone web service invocation. According to this link: http://edocs.bea.com/wls/docs103/webserv_rpc/client.html#wp229351 you simply need 1 jar file named wseeclient.jar on your path, which is archived inside <WL_INSTALL>\wlserver_10.3\server\lib\wseeclient.zip
Once I set up a new Java Project with wseeclient.jar on my path and my clientgen generated classes, I could invoke the sample.
Also, here is what the successful invocation from the command line using (ant build, ant deploy, ant run):
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant build
Buildfile: build.xml
clean:
[delete] Deleting directory C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar
[delete] Deleting directory C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
server:
[mkdir] Created dir: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar
[jwsc] JWS: processing module /SimpleImpl
[jwsc] Parsing source files
[jwsc] Parsing source files
[jwsc] 1 JWS files being processed for module /SimpleImpl
[jwsc] JWS: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple\SimpleImpl.java Validated.
[jwsc] Since compiler setting isn't classic or modern,ignoring fork setting.
[jwsc] Compiling 2 source files to C:\temp\_x58sqp
[jwsc] Since compiler setting isn't classic or modern,ignoring fork setting.
[jwsc] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF
[jwsc] Copying 22 files to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF
[jwsc] Copying 2 files to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF\classes
[jwsc] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl
[jwsc] [EarFile] Application File : C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\META-INF\application.xml
[AntUtil.deleteDir] Deleting directory C:\temp\_x58sqp
client:
[mkdir] Created dir: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[clientgen] Ignoring JAX-WS options - building a JAX-RPC client
[clientgen]
[clientgen] *********** jax-rpc clientgen attribute settings ***************
[clientgen]
[clientgen] wsdlURI: file:/C:/Oracle/wls10.3/wlserver_10.3/samples/server/examples/build/webservicesJwsSimpleEar/SimpleImpl/WEB-INF/SimpleImplService.wsdl
[clientgen] serviceName : null
[clientgen] packageName : examples.webservices.jws_basic.simple.client
[clientgen] destDir : C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[clientgen] handlerChainFile : null
[clientgen] generatePolicyMethods : false
[clientgen] autoDetectWrapped : true
[clientgen] jaxRPCWrappedArrayStyle : true
[clientgen] generateAsyncMethods : true
[clientgen]
[clientgen] *********** jax-rpc clientgen attribute settings end ***************
[clientgen] Package name is examples.webservices.jws_basic.simple.client
[clientgen] DestDir is C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[clientgen] class name is Simple_Stub
[clientgen] service class name is SimpleImplService
[clientgen] Porttype name is Simple
[clientgen] service impl name is SimpleImplService_Impl
[javac] Compiling 4 source files
[javac] Note: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client\examples\webservices\jws_basic\simple\client\Simple_Stub.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Compiling 1 source file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[jar] Updating jar: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\examplesWebApp\WEB-INF\lib\jws_basic_simple.jar
[copy] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\examplesWebApp
build:
BUILD SUCCESSFUL
Total time: 22 seconds
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant deploy
Buildfile: build.xml
deploy:
[wldeploy] weblogic.Deployer -verbose -noexit -source C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar -targets examplesServer -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
[wldeploy] weblogic.Deployer invoked with options: -verbose -noexit -source C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar -targets examplesServer -adminurl t3://localhost:7001 -user weblogic -deploy
[wldeploy] <Dec 23, 2008 2:48:19 PM CST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, webservicesJwsSimpleEar [archive: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJws
SimpleEar], to examplesServer .>
[wldeploy] Task 0 initiated: [Deployer:149026]deploy application webservicesJwsSimpleEar on examplesServer.
[wldeploy] Task 0 completed: [Deployer:149026]deploy application webservicesJwsSimpleEar on examplesServer.
[wldeploy] Target state: deploy completed on Server examplesServer
[wldeploy]
[wldeploy] Target Assignments:
[wldeploy] + webservicesJwsSimpleEar examplesServer
BUILD SUCCESSFUL
Total time: 9 seconds
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant run
Buildfile: build.xml
run:
[java] Got result: Here is the message: 'Hi there!'
BUILD SUCCESSFUL
Total time: 7 seconds
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple> -
ClassCastException exception while running EJB Client
Folks,
I am getting following exception while running the EJB Client.. I am
using WLS 5.1
Exception in thread "main" java.lang.ClassCastException
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:319)
at FirstStatelessEJBClient.Client.lookupHome(Client.java:149)
at FirstStatelessEJBClient.Client.<init>(Client.java:44)
at FirstStatelessEJBClient.Client.main(Client.java:82)
Can anybody throw a light on this.
Thanks
AshishHi Eduardo,
Below is my classpath. The stubs are in first_statlessSession.jar file.
CLASSPATH=C:\weblogic\myserver\first_statelessSession.jar;
C:\jdk1.2.2\lib\tools.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogi
c\lib\weblogicaux.jar;
C:\weblogic\myserver\clientclasses;C:\weblogic\myserver\serverclasses
Also, I am just compiling and deploying the
C:\weblogic\examples\ejb\basic\statelessSession myself and testing it. I
am
using the build.cmd files to compile and deploy the above EJB. If I use the
jars provided by weblogic it works fine with same above classpath.
I don't know what to do next. I have invested the whole day to solve this
problem and couldn't.
Please let me know if I am doing anything wrong.
Appreciate your help.
Thanks,
Ashish
Eduardo Ceballos wrote:
Try putting the stubs into the client class path.
"Ashish N. Shah" wrote:
Folks,
I am getting following exception while running the EJB Client.. I am
using WLS 5.1
Exception in thread "main" java.lang.ClassCastException
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:319)
at FirstStatelessEJBClient.Client.lookupHome(Client.java:149)
at FirstStatelessEJBClient.Client.<init>(Client.java:44)
at FirstStatelessEJBClient.Client.main(Client.java:82)
Can anybody throw a light on this.
Thanks
Ashish -
How can I run EJB Client in other computer ?
Hello,
I'm trying to run converter examples.
if ejb client pgm resides on a same machine with j2ee server , it works fine.
But when I put client pgm on a different maching
below message show.
No application client descriptors defined for: ConverterClinet
I put ConverterApp.ear, ConverterAppClient.jar and ConverterClient.class on the machine and
set APPCPATH=ConverterAppClient.jar
set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=xxx.xxx.xx.xx
What should I do to run ejb client on different machine?Hi SangHPark,
I had the same problem but have solved it and it works.
I ran the client remotely from a win98 box.
Keep two things in mind
1> Deploy the applications to an ip address and not to the local host using the deploy too. Use the deploy tool Gui to add a new server and then deploy the application to this ip address.
2> I am running j2ee version 1.3 and jsdk 1.3
Use the following code but instead of using "java:comp/env/ejb/SimpleConverter" use the jndi name of the object: "MyConverter" as specified in the tutorial.
Properties prop = new Properties();
prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
prop.setProperty(Context.PROVIDER_URL,"IIOP://xxx.xx.x.xxx:1050");
System.out.println("Attempting to create context...");
Context initial = new InitialContext(prop);
// Instead of this use the below line of code
//Object objref = initial.lookup("java:comp/env/ejb/SimpleConverter");
Object objref = initial.lookup("MyConverter");
// MyConverter is the Jndi name of the ConverterBean as per the tutorial
You need to do the following things.
1> After making changes to the code recompile using Ant and redeploy it.
2> Copy the j2ee.jar, ConverterAppClient.jar and ConverterClient.class file to the machine that u want to run the client from.
3> create a directory called "config" on the remote machine where you copied the files in step two.
4> Copy to this directory the files ejb.properties and security.properties from your j2ee_home\config\ directory.
For example you copied the files in step 2 on the remote machine in the c:\test directory. Create c:\test\config directory and copy the files from step 4 into this directory.
5> Run the following command from the directory where u copied the client files
java -Dorg.omg.CORBA.ORBInitialHost="host name" -classpath .\j2ee.jar;.;.\ConverterAppClient.jar ConverterClient
Monal -
Error in running EJB Client on a remote machine
I delploy my beans and can run the EJB Client locally. However when I try to run the Client on another machine, there are errors.
Here is the errors
Syntax error
Out of environment space
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/appclient/Main
I have follow the step in the j2ee tutorial and set the env variables according. Here is the bat file I write
set APPCPATH=CBSAppClient.jar
set VMARGS=-Dj2eelogin.name=guest -Dj2eelogin.password=guest123 -Dorg.omg.CORBA.ORBInitialHost=192.168.0.2
runclient -client CBSApp.ear -name CBSClient -textauth
Do anyone facing the same problem with me?
And how can I solve the problems?
This is really URGENT, please helpYou are running on Windows 9x or Me, right? The darn OS has 300 or so bytes allocated for environment by default.
Try setting the Initial environment to 4096 in the Properties|Memory tab for the batch file. That will get rid of "Out of environment space". The syntax error is another matter; Windows (except NT and derivatives) shells do not allow '=' in an environment variables value. You cannot overcome that. Some software (Sybase for instance) interprets # as = just because of that. Unfortunately, the JVM doesn't take such an approach.
Better, grab copies of Unix utilities for Windows (www.gnu.org) including the wonderful shell 'bash' and write .sh scripts, which are inherently more powerful. -
Steps to deploy an ejb application and running an ejb client in weblogic server6.1
steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
if the client is an simple java application and if the client is a servletHi.
Check out the beanManaged example that ships with WLS and read the accompanying docs. This
is a simple EJB with a servlet that invokes it.
Michael
shekhar sachdev wrote:
steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
if the client is an simple java application and if the client is a servlet--
Michael Young
Developer Relations Engineer
BEA Support -
I am getting this problem when running ejb client
Hi,
Any one help me , i am getting this error when i run my ejb Client
D:\sample\Client>
java -Djava.naming.factory.initial=com.sun.jndi.cosnamin
g.CNCtxFactory -Djava.naming.provider.url=iiop://localhost:1050 com.net.ejbexamples.slsb.EJBClient
Exception in thread "main" org.omg.CORBA.COMM_FAILURE: minor code: 1398079490
completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnectio
n.java:956)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.jav
a:1017)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStre
am.java:71)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequest
Impl.java:82)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.
java:153)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNa
mingClient.java:195)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialRefe
rences(InitialNamingClient.java:260)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_r
eferences(InitialNamingClient.java:183)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.ja
va:1465)
at weblogic.iiop.IORManager.createInitialReference(IORManager.java:113)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContex
t(InitialContextFactoryImpl.java:96)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContex
t(InitialContextFactoryImpl.java:86)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:149)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
60)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:193)
at com.net.ejbexamples.slsb.EJBClient.main(EJBClient.java:15)
ThanksFound in negative cache.... very strange.
RFC found in negative cache
What is the negative cache? -
How to run Session ejb client program?
Hi
I am using weblogic server8.1 . I was running an ejb session client program it throws exception like below. Can any one tell me how to run a client in weblogic server. give the syntax for running ejb client.
D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB\stateful>jav
a -cp .;c:\j2ee\j2ee.jar;c:\weblogic\classes;D:\Weblogicserver\weblogic81\server
\lib\weblogic.jar PortfolioClient
Exception in thread "main" java.lang.NoClassDefFoundError: PortfolioClient (wron
g name: stateful/PortfolioClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
byeIf stateful is the package for the client application, you should be executing from
D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB
on the command line. The command should look like -
java -classpath <whatever should be here> stateful.MyClient -
The server deploy EJB but I run EJB Client program,The error msg is can't find JNDI
Hi all:
I am using Weblogic 6.1/SP2. I use the console to start
server and deploy EJB jar,from the msg I see my EJB jar
been deployed. When I run EJB Client program, the error
msg is can't find JNDI name t3://URL:11003.....
I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
Last week I did deploy EJB and ran the client both
suceessful. Any ideas, Thank you.Sabha:
Thank you for your help info, I soloved the problem.
The problem is the ejb jar was deleted(I don't why)
then System Admin to deploy EJB jar from Admin console.
After that everything is fine.
"Sabha" <[email protected]> wrote:
Run weblogic.Admin -url ... LIST to see whether the JNDI name is there
. or
you can view the jndi tree of the server from the console (right click
on
server name) and check whether the ejb home is bound to the correct jndi
name.
-Sabha
"Matthew Shinn" <[email protected]> wrote in message
news:[email protected]..
Hi Albert,
I would double check to make sure the EJB was indeed deployed (check
server log). What message did you see that leads you to believe itwas
successfully deployed? Also, verify the JNDI name you are lookingup in
your client matches the JNDI name for the EJB. If this doesn't solve
the problem, please post the error message and stack trace you are
seeing on the client.
- Matt
Albert Pi wrote:
Hi all:
I am using Weblogic 6.1/SP2. I use the console to start
server and deploy EJB jar,from the msg I see my EJB jar
been deployed. When I run EJB Client program, the error
msg is can't find JNDI name t3://URL:11003.....
I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
Last week I did deploy EJB and ran the client both
suceessful. Any ideas, Thank you. -
How do I generate the sample EJB Client
The online documentation says, by right clicking on EJB in system navigator, I should be able to see the context menu for creating a Sample EJB Client. However, I only see "New Java Client" and that too is disabled. Can somebody tell me how do I generate the Sample EJB Client.
Thanks
vimalThe right-mouse option is on each individual session bean.
"New Sample Java Client..." -
EJB Client Access From JDeveloper9iR2
I seem to be running into a lot of problems when trying to get a simple EJB client to talk to an EJB on our 9IAS platform. I have developed a simple session bean (just to test) which simply returns a string. When I create the default client code this works fine using the embedded OC4J server in Jdeveloper but I can't run a similar client against 9IAS when I deploy the code. When I go through the client wizard it seems to produce the same code as the standalone EJB OC4J client. I simply changed the name of the server (Context.PROVIDER_URL, "ormi://pe2500/). This is the parameter code I use:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "ormi://pe2500:23891/MyEJBs");
This is the output I receive:
D:\jdeveloper9ir2\jdk\bin\javaw.exe -ojvm -classpath D:\javadev\ejbservlet\ejbservlet\WEB-INF\classes;D:\jdeveloper9ir2\jdev\lib\jdev-rt.jar;D:\jdeveloper9ir2\j2ee\home\lib\ojsp.jar;D:\jdeveloper9ir2\j2ee\home\jsp\lib\taglib\ojsputil.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar;D:\jdeveloper9ir2\jdev\lib\ojc.jar;D:\jdeveloper9ir2\j2ee\home\lib\activation.jar;D:\jdeveloper9ir2\j2ee\home\lib\ejb.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaas.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaxp.jar;D:\jdeveloper9ir2\j2ee\home\lib\jcert.jar;D:\jdeveloper9ir2\j2ee\home\lib\jdbc.jar;D:\jdeveloper9ir2\j2ee\home\lib\jms.jar;D:\jdeveloper9ir2\j2ee\home\lib\jndi.jar;D:\jdeveloper9ir2\j2ee\home\lib\jnet.jar;D:\jdeveloper9ir2\j2ee\home\lib\jsse.jar;D:\jdeveloper9ir2\j2ee\home\lib\jta.jar;D:\jdeveloper9ir2\j2ee\home\lib\mail.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\lib\xmlparserv2.jar;D:\jdeveloper9ir2\lib\xmlcomp.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar Samplemypackage6.ctejb1Client3
javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
java.net.ConnectException: Connection refused: connect
java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
RMIContext.java:134
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
InitialContext.java:350
void Samplemypackage6.ctejb1Client3.main(java.lang.String[])
ctejb1Client3.java:18
Process exited with exit code 0.
Can anyone tell me if this is the correct communication method for client EJB's talking to the 9IAS server?
Any help really appreciated.
Chris Taylorhi Chris Taylor, did you find the solution for this error. i too get this error and i am looking for the answer. if you find any answer please share with me too. if i get any answer for this i will reply you too.
Maybe you are looking for
-
I made a in app purchase on a game and it never took, when I went back and tried it again a window popped up that said I have already purchased this item but has not been downloaded yet? How do I download it when there is not a option to download?
-
Which is better iPod 4th gen or 5th
hi I have a choice of a 32gb ipod 5th gen or a 4th 64gb which is better?
-
How to access database in Sql Server 7.0 using Java
I am trying to access a database in SQL Server 7.0 using JDBC.But it is giving me errors.I have used following statements to connect the database private String URL = "jdbc:odbc:DatabaseName"; private String userName="user"; private String passWord="
-
Hi all, I am running standard SAP transaction PEG01 and it is updating some tables. How do I know or how can I determine when the program is complete and nothing is left in the buffers and the locks have been released? Thanks for any help you ma
-
ACR 6.1 and Vista x64 failures
Vista Ultimate x64, LR3 x64, CS5 Master Edition. When I am in Photoshop and I run updates I am told that there are no updates (ACR 6.0, Bridge 4.0). When I download the manual updates and run them I get told "update is not applicable". I have tried