Error running client program
c:>java HelloClient
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/logging/LogO
utputStream
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:124)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
71)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at HelloClient.main(HelloClient.java:17)
I am gettting the following error when run the client program
i am using weblogic 5.1
the code is HelloClient.java
import java.rmi.RemoteException;
import java.util.Properties;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
public class HelloClient {
public static void main(String [] args) {
try {
Properties props=new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
props.put(Context.PROVIDER_URL,"t3://localhost:7001");
InitialContext ctx = new InitialContext(props);
Object ref = ctx.lookup("helloBean.HelloHome");
HelloHome hello1 =
(HelloHome)PortableRemoteObject.narrow(ref,HelloHome.class);
Hello1 helloHome = hello1.create();
String message = helloHome.getMessage();
System.out.println("messsage from Bean====" +message);
// helloHome.remove(); //clean up
catch (NamingException ne){
ne.printStackTrace();}
catch (Exception exception) {
System.err.println("Exception!");
exception.printStackTrace();}
Hello1 is remote interface
HelloHome is home inteerface
the bean is deployed
anyone please help
i hava added c:\weblogic\classes\weblogic\logging in classs path
but the same problem occured.
Try addinging weblogic.jar to the classpath.
Similar Messages
-
Error in running client program
hi , i am tring to run a sample client program for web service
i am getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: BatchWebServices/axis
/browsing/Sample1 (wrong name: browsing/Sample1)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
Could not find the main class: BatchWebServices.axis.browsing.Sample1. Program
will exit.
can any one please helpDear all,
I just tried my RMI examples downloaded from http://java.sun.com/j2se/1.5.0/docs/guide/rmi/ and I got exactly the same java.rmi UnmarshalException.
Could you still pay attension to this problem and provide a solution?
Best regards,
PY -
Error while running client program
Hi,
I am writing a sample program. Below is the server code.
package helloWorld;
import javax.jws.*;
@WebService
public class HelloWorld {
@WebMethod
public String hello() {
System.out.println("Print data");
return "Test";
Firstly when I start the server I get
<WSEE>Warning: JMS Queue 'weblogic.wsee.DefaultQueue' is not found, as a result, Web Service async responses via jms transport is not supported. If the target service uses JMS transport, the responses will not be able to come back.<JmsQueueListener.connect:227>
Ignoring this I wrote a client program
package web;
import java.io.IOException;
import java.io.PrintWriter;
* Servlet implementation class for Servlet: WebClient
public class WebClient {
public static void main(String[] argc)
try {
HelloWorldService_Impl service = new HelloWorldService_Impl();
HelloWorld port = service.getHelloWorldSoapPort();
java.lang.String message = "Hi";
// TODO process result here
String result = port.hello();
System.out.println("Result = "+result);
}catch(Exception e)
e.printStackTrace();
When I run the client I get runtime error
D:\test\2105\WebClient\src>D:\bea\jdk150_04\bin\java -cp .;jaxrpc.jar;weblogic.jar;webservices.jar;webservicesclient.jar;xbean.jar;ant.jar;ant-antlr.jar;ant-weblogic.jar web/WebClient
Exception in thread "main" java.lang.AssertionError: java.io.IOException
at weblogic.descriptor.DescriptorManager$DefaultMarshallerFactorySingleton.<clinit>(DescriptorManager.java:42)
at weblogic.descriptor.DescriptorManager.getDefaultMF(DescriptorManager.java:116)
at weblogic.descriptor.DescriptorManager.getMarshallerFactory(DescriptorManager.java:125)
at weblogic.descriptor.DescriptorManager.getDescriptorFactory(DescriptorManager.java:147)
at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:215)
at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:185)
at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:170)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWeblogicDD(ServiceImpl.java:404)
at weblogic.wsee.jaxrpc.ServiceImpl.loadInternalDD(ServiceImpl.java:346)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:110)
at web.HelloWorldService_Impl.<init>(HelloWorldService_Impl.java:21)
at web.HelloWorldService_Impl.<init>(HelloWorldService_Impl.java:13)
at web.WebClient.main(WebClient.java:15)
Caused by: java.io.IOException
at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:50)
at weblogic.descriptor.DescriptorManager$DefaultMarshallerFactorySingleton.<clinit>(DescriptorManager.java:40)
... 12 more
Caused by: com.bea.xml.XmlException: unable to load type library from classloader sun.misc.Launcher$AppClassLoader@e39a3e
at com.bea.staxb.runtime.internal.BindingContextFactoryImpl.createBindingContext(BindingContextFactoryImpl.java:50)
at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:48)
Can anyone let me know what could be the problem?Hi,
My Client Program is as follows:
import javax.ejb.*;
public class Client{
public static void main(String[] args){
Account account = null;
try{
Context = new
Context = new
InitialContext(System.getProperties());
AccountHome home = (AccountHome)
AccountHome)
ctx.lookup("java:comp/env/ejb/AccountBean");
home.create("123-456-7890","John");
}catch(...){
}What are the System Properties? Are you running the client remotely? Are you running the client as a stand alone Java app or using the Weblogic's Client Runner? 'java:comp' as the jndi name is usually used when the client runs inside the container... But it doesn't seem to be the case.
Kexkey -
Hi,
I have tried an entity bean application. I am able to deploy my entity bean in WebLogic 7.0 server. But when I ran the client program I am getting the following error.
javax.naming.NameNotFoundException : Unable to resolve 'java:comp.env/ejb/AccountBean' Resolved: ' ' unresolved : 'java:comp': remaining name 'java:comp.env/ejb/AccountBean'
My ejb-jar.xml is as follows:
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>AccountBean</ejb-name>
<home>AccountHome</home>
<remote>Account</remote>
<ejb-class>AccountBean<ejb-class>
<persistance-type>Bean</persistance-type>
<prim-key-class>AccountPK</prim-key-class>
<reentrant>False</reentrant>
<primkey-field>AccountID</primkey-field>
<env-entry>
<env-entry-name>jdbc.drivers</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>oracle.jdbc.driver.OracleDriver</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>JDBC-URL</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>jdbc:oracle:thin:@erp:1521:Oracle9i</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/AccountBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>AccountHome</home>
<remote>Account</Account>
<ejb-link>AccountBean</ejb-link>
<ejb-ref>
<resource-ref>
<resource-ref-name>jdbc/bmp-account</resource-ref-name>
<resouce-ref-type>javax.sql.DataSource</resource-ref-type>
<res-auth>Container</res-auth>
<res-sharing-scope>sharable</res-sharing-sope>
<resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
</assembly-descriptor>
<ejb-jar>
My weblogic-ejb-jar.xml is as follows:
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>AccountBean</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transaction>false</cache-between-transcation>
</entity-cache>
<persistance>
</persistance>
<entity-clustering>
</entity-clustering>
</entity-descripto>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<resource-descriptor>
<res-ref-name>jdbc/bmp-accoun</res-ref-name>
<jndi-name>MariJNDI</jndi-name>
</resource-descriptor>
<ejb-reference-descriptor>
<ejb-ref-name>ejb/AccountBean</ejb-ref-name>
<jndi-name>AccountBean</jndi-name>
</ejb-reference-descriptor>
</reference-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
My Client Program is as follows:
import javax.ejb.*;
public class Client{
public static void main(String[] args){
Account account = null;
try{
Context = new InitialContext(System.getProperties());
AccountHome home = (AccountHome) ctx.lookup("java:comp/env/ejb/AccountBean");
home.create("123-456-7890","John");
}catch(...){
Any help is appreciated.
Thanks in advance.
Regards,
Mari.Hi,
My Client Program is as follows:
import javax.ejb.*;
public class Client{
public static void main(String[] args){
Account account = null;
try{
Context = new
Context = new
InitialContext(System.getProperties());
AccountHome home = (AccountHome)
AccountHome)
ctx.lookup("java:comp/env/ejb/AccountBean");
home.create("123-456-7890","John");
}catch(...){
}What are the System Properties? Are you running the client remotely? Are you running the client as a stand alone Java app or using the Weblogic's Client Runner? 'java:comp' as the jndi name is usually used when the client runs inside the container... But it doesn't seem to be the case.
Kexkey -
Problem while running client program in Netbeans4.0
Hi,
I am facing the following problem while running a client program in Nebeans4.0.
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7C9012B4
Function=RtlInitAnsiString+0x1B
Library=C:\WINDOWS\system32\ntdll.dll
Current Java thread:
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:770)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1059)
at java.net.InetAddress.getAllByName0(InetAddress.java:1009)
at java.net.InetAddress.getAllByName0(InetAddress.java:981)
at java.net.InetAddress.getAllByName(InetAddress.java:975)
at weblogic.rjvm.RJVMFinder.getDnsEntries(RJVMFinder.java:370)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:181)
- locked <0x1007ff78> (a weblogic.rjvm.RJVMFinder)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:125)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:291)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
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 AcfClient.getHomeRef(AcfClient.java:73)
at AcfClient.forceSession(AcfClient.java:43)
at AcfClient.main(AcfClient.java:34)
Dynamic libraries:
0x00400000 - 0x00406000 C:\Data\j2sdk1.4.2_04\jre\bin\java.exe
0x7C900000 - 0x7C9B0000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 - 0x7C8F4000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E6B000 C:\WINDOWS\system32\ADVAPI32.dll
0x77E70000 - 0x77F01000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C68000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000 C:\Data\j2sdk1.4.2_04\jre\bin\client\jvm.dll
0x77D40000 - 0x77DD0000 C:\WINDOWS\system32\USER32.dll
0x77F10000 - 0x77F56000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6D000 C:\WINDOWS\system32\WINMM.dll
0x6BD00000 - 0x6BD0D000 C:\WINDOWS\system32\SYNCOR11.DLL
0x10000000 - 0x10007000 C:\Data\j2sdk1.4.2_04\jre\bin\hpi.dll
0x00390000 - 0x0039E000 C:\Data\j2sdk1.4.2_04\jre\bin\verify.dll
0x003B0000 - 0x003C9000 C:\Data\j2sdk1.4.2_04\jre\bin\java.dll
0x003D0000 - 0x003DD000 C:\Data\j2sdk1.4.2_04\jre\bin\zip.dll
0x02DA0000 - 0x02DAF000 C:\Data\j2sdk1.4.2_04\jre\bin\net.dll
0x71AB0000 - 0x71AC7000 C:\WINDOWS\system32\WS2_32.dll
0x71AA0000 - 0x71AA8000 C:\WINDOWS\system32\WS2HELP.dll
0x71A50000 - 0x71A8F000 C:\WINDOWS\System32\mswsock.dll
0x76F20000 - 0x76F47000 C:\WINDOWS\system32\DNSAPI.dll
0x76FB0000 - 0x76FB8000 C:\WINDOWS\System32\winrnr.dll
0x76F60000 - 0x76F8C000 C:\WINDOWS\system32\WLDAP32.dll
0x66210000 - 0x66219000 C:\WINDOWS\system32\netware\NWWS2NDS.DLL
0x50D50000 - 0x50D95000 C:\WINDOWS\system32\NETWIN32.DLL
0x50D00000 - 0x50D15000 C:\WINDOWS\system32\CLNWIN32.DLL
0x50DF0000 - 0x50E10000 C:\WINDOWS\system32\LOCWIN32.DLL
0x50DB0000 - 0x50DD9000 C:\WINDOWS\system32\NCPWIN32.dll
0x71AD0000 - 0x71AD9000 C:\WINDOWS\system32\WSOCK32.dll
0x66220000 - 0x6622C000 C:\WINDOWS\system32\netware\NWWS2SLP.DLL
0x1C000000 - 0x1C007000 C:\WINDOWS\system32\NWSRVLOC.dll
0x76C90000 - 0x76CB8000 C:\WINDOWS\system32\imagehlp.dll
0x59A60000 - 0x59B01000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C08000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\system32\PSAPI.DLL
Heap at VM Abort:
Heap
def new generation total 576K, used 497K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 89% used [0x10010000, 0x10083158, 0x10090000)
from space 64K, 57% used [0x100a0000, 0x100a9478, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 129K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 9% used [0x104f0000, 0x10510438, 0x10510600, 0x10650000)
compacting perm gen total 4096K, used 2122K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 51% used [0x14010000, 0x14222828, 0x14222a00, 0x14410000)
Local Time = Fri Aug 26 10:26:03 2005
Elapsed Time = 2
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode)
# An error report file has been saved as hs_err_pid1280.log.
# Please refer to the file for further information.
Can anyone pls let me know what could be the problem.
Thanks in adv.Hi,
This type of error
java.lang.NoClassDefFoundError: javax/naming/Context
will occur when the client program could not able to locate lib/j2EE.jar file.
So set the classpath correctly and make sure that you have correctly defined the JAVA_HOME environment variable in .bat script.
Hope this will help you.
Regards,
Anil.
Technical Support Engineer. -
IE: java xxxx gives me a class not found error. OK, restart. Same error. The programs I'm running I've run hundreds of times before. Java doesn't recognize any java classes actually. I'm going to reinstall, but has anyone run into this before? Oh yeah, I'm running 1.3. ( Reinstalling the latest one). Thanks in advance.
Goddammit. I just wrote a reply, and clicked preview and closed the window without posting. Grrr...
Anyway, I had the same problems with IE. You need to disable Sun Java:
Tools -> Internet Options -> Advanced
Scroll down to "Java (Sun)"
Disable the checkbox "Use Java 2 v1.4.1_02 for <applet> (requires restart)
And ignore it, it doesn't require a restart (at least not for me). If the box is checked (using Sun Java), most applets don't work. I uncheck it, they all work.
HTH,
Radish21 -
Error running java program (testing oracle-character-set-31 against ab?c )
Hi
When i run my java program from eclipse , i get these errors : how to correct these errors and run the program
testing oracle-character-set-31 against <ab?c>
PASSED LOSSY
testing oracle-character-set-31 against <XYZ>
PASSED LOSSY
testing oracle-character-set-31 against <longlonglonglong...>
PASSED LOSSY
testing oracle-character-set-870 against <abc>
PASSED
testing oracle-character-set-870 against <ab?c>
PASSED
testing oracle-character-set-870 against <XYZ>
PASSED
testing oracle-character-set-870 against <longlonglonglong...>
PASSED
testing oracle-character-set-871 against <abc>
PASSED
testing oracle-character-set-871 against <ab?c>
PASSED
testing oracle-character-set-871 against <XYZ>
PASSED
testing oracle-character-set-871 against <longlonglonglong...>
PASSEDrxg wrote:
Hi
When i run my java program from eclipse , i get these errors : how to correct these errors and run the program
...Sun's not Oracle (yet). You will have better luck on a forum relating to whatever is producing that "oracle-character-set..." output.
Edit:
Although a Google search for "testing oracle-character-set" yields only this thread. Are you sure that output isn't part of your program?
Edited by: endasil on 7-Oct-2009 3:40 PM -
EJB Hotel Sample Application - error running client
Hi
I am trying to run the GUI client interface in the EJB Hotel Enquiry and Reservation Application (using a single EJB). I have deployed the EJB jar file and had no errors but when I run the GUI client I get the following error whilst trying to read the list of hotels:
Error while invoking EJB procedure :RemoteException :
com.evermind.server.rmi.OrionRemoteException: Invocation error: java.lang.NoSuchMethodException; nested exception is:
java.lang.NoSuchMethodException
Could anyone please suggest where to start looking ?
TIA
TrevorHi,
I am able to run this sample successfully. Can you try bouncing OC4J and then run the client application again ? Let me ]
know if that works.
Cheers,
--Rajesh -
Hi guys, new to the forum here, just as I'm new to Java. I'm trying to get my Java environment running, but everytime I execute the code, I get an error message saying
"Exception in thread "main" java.lang.NoClassDefFoundError: TestJavaEnvironment"
If anyone has any ideas what I'm doing wrong, I'd greatly appreciate it, got some homework for a class I'm taking, but talk about stumbling out of the gate. Anyways, thanks in advance.Assuming that you have created a file named
"TestJavaEnvironment.class", change to the directory that contains it. From that directory issue the following command:
java -cp . TestJavaEnvironment
Important: include the period and the surrounding spaces. -
Error running RMI program in Linux
hi,
hope can get some advices and help from you all..my problems is like this:
There is no problem when i run my RMI client in Windows to send message to server. but when i run my RMI client in Linux to send message to server, exception occurs..here are the source codes...
****interface Task2*****
public interface Task2 extends Serializable {
Object getSender();
Object getReceiver();
Object getText();
}****sdMssg.class********
public class sdMssg implements Task2{
Sring sender, receiver, text;
public sdMssg(String s, String r, String t) {
sender = s;
receiver = r;
text = t;
public Object getSender(){
return sender;
public Object getReceiver(){
return receiver;
public Object getText(){
return text;
}when i click "send" in my message box,
public void actionPerformed(ActionEvent e){
if(e.getActionCommand().equals("Send")){
try{
String input = lsd2.getText(0, lsd2.getLength());
String mssg = new String(sender.getText()+": ");
mssg = mssg.concat(input);
try{
sdMssg task = new sdMssg(sender.getText(), receiver.getText(), mssg);
uL.sendMessage(task); //uL is the reference to the remote
//object.sendMessage is remote
//method to send task object to
//server
}catch(Exception ex){
ex.printStackTrace();
lsd.insertString(lsd.getLength(), mssg + newline, attrs);
lsd2.remove(0, lsd2.getLength());
}catch(BadLocationException ex){}************************************************************************
the exception : java.lang.NullPointerException() at line uL.sendMessage(task)..do you know what is the problem? it's running very well in Windows but not in Linux..what should i do? i really need yours help..
Thanks a lot here..sorry, it's my mistake..it really Naming.lookup problem..i have solved it..anyway, thanks for your kindness..
-
Error in EJB client program (javax.naming.NoInitialContextException)
Hi folks ,
I'm new to j2ee programming and using Netbeans 5.5 , i created a session bean program and deployed successfully in JOnAS application server but i'm not able to run the client program which invokes session bean (EJB module ).
when i run client program i'm getting the following error .
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at SimpleSessionClient.Main.main(Main.java:33)
BUILD SUCCESSFUL (total time: 21 seconds)
but the same program runnig perfectly when i deploy in Java System Application Server(8.2(JSAS))
I included j2ee.jar and appserv-rt jar in classpath of client program for JSAS i don't know what are the jar files (which does the same function as j2ee.ar,appserv-rt.jar ) which is to be included for JOnAS .
i'm struggling with this for the past two weeks . please tell me the solution .
Thanks in advanceThanks for the suggestion artntek.
I located the jndi.properties file in the %J2EE_HOME%\lib\classes folder, and I copied it to the %J2EE_HOME%\bin directory, but nothing seems to have changed.
does anyone know what value should be associated with Context.INITIAL_CONTEXT_FACTORY in the properties for the InitialContext object? More specifically, what value should be used for the reference install of the 1.3 j2ee release from sun?
This error suggests to me that a class name must be specified for the initial naming context factory - but I don't know what to use. -
How to run a client program in Session bean using weblogic 8.1
Hi
I am new to weblogic server 8.1. I sucessfully deployed session ejb Session Bean. I created sessionbean jar file and put it it classpath also.
and also i created sessiobeanclient jar file, it included in class path.
While running client program it throws exception like noclass def found exception
plz tell me the right way to run the session ejb program.
byeHi,
You have to follow the given steps before you are going to run the client program that invokes the session bean .
1)set the Weblogic Environment using the tool setWLSEnv
2)place the Session bean jar file in classpath
3)run the client program
Note:If the client has to execute on remote machine we need to copy client class,remote interface, home interface and other classes which are used as
parameters and return types.
Regards
Anilkumar kari -
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. -
Error When running the Client Program
hi all,
i got exception while running the Client program
"Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]"
plz solve my problem ASAP.
thanks in advance..
from
sreethanks this problem solved...
but i got another exception
javax.naming.NameNotFoundException: Unable to resolve 'ExeBean' Resolved: '' Unresolved:'ExeBean' ; remaining name 'ExeBean'
thanks in advance
from
Sree -
hi all
the following error occur on running the client program
C:\navneet\ejb_examples\hello>java HelloClient
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/logging/LogO
utputStream
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:124)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
71)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at HelloClient.main(HelloClient.java:16)
the source code is
import java.rmi.RemoteException;
import java.util.Properties;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
public class HelloClient {
public static void main(String [] args) {
try {
Properties props=System.getProperties();
Context ctx=null;
props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
props.put(javax.naming.Context.PROVIDER_URL,"t3://localhost:7001");
ctx = new InitialContext(props);
Object ref = ctx.lookup("helloBean.HelloHome");
HelloHome hello1 =
(HelloHome)PortableRemoteObject.narrow(ref,HelloHome.class);
Hello1 helloHome = hello1.create();
String message = helloHome.getMessage();
System.out.println("messsage from Bean====" +message);
// helloHome.remove(); //
catch (NamingException ne){
ne.printStackTrace();}
catch (Exception exception) {
System.err.println("Exception!");
exception.printStackTrace();}
any one please help
thanx in advanceHi !
make sure that your weblogic.jar in classpath
set classpath=;.;\bea\wlserver6.1\lib\weblogic.jar;
javac HelloClient .java
java HelloClient
Thanks
Ramu
Maybe you are looking for
-
Calling program instance?Or?
Hello,I have a MDI screen.On this main screen I have a menubar an toolbar and a side panel assessible menu bar that acts like a general choice menu of top menu bar.When I click the side assessible bar it shows in large internal frame the same menu it
-
Field in the selection screen as a select option with two default values
Hi All, can anybody tell me how to put field in the selection screen with two defaul values. for ex: selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005. please reply ASAP. Its urgent. Thanks
-
Apple will sell no whine before its time
<<<< WHINE UPDATE >>>> I believe the latest firmware update (1.0.1) has changed the quality of the whine. It hasn't gotten rid of it, it has just made it sound...different... (in my opinion). Of course, I'm willing to admit this could be my imaginati
-
Referencing a row level field value in an Interactive Report using jquery
I have an Interactive Report with a row level select_list: select ename "Employee Name", mgr "Manager", empno, APEX_ITEM.SELECT_LIST( p_idx => 3, --p_value => deptno, p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF', -
-
Download "photo library" & "picture" to pc
I have been able to download "camera roll" to my PC, but the files labeled "Photo Library" and "Picture" will not show when I open the camera to download (on PC>Guy's iphone>Camera Tasks>Get Pictures). Please respond with the steps I need to take to