Click here to Skip to main content
       

Java

 
GeneralRe: OpenOffice and GUI (Integration) PinmemberThomas Grapel25-Mar-13 2:05 
GeneralRe: OpenOffice and GUI (Integration) PinmvpRichard MacCutchan25-Mar-13 2:21 
GeneralRe: OpenOffice and GUI (Integration) PinmemberThomas Grapel25-Mar-13 2:27 
GeneralRe: OpenOffice and GUI (Integration) PinmvpRichard MacCutchan25-Mar-13 2:44 
GeneralRe: OpenOffice and GUI (Integration) PinmemberThomas Grapel25-Mar-13 2:50 
Questionhow to use tmx map in my code Pinmemberjava_beginer24-Mar-13 11:22 
AnswerRe: how to use tmx map in my code PinmvpRichard MacCutchan24-Mar-13 23:43 
Questioncan anyone help me with my final project Pinmemberjava_beginer24-Mar-13 8:18 
AnswerRe: can anyone help me with my final project PinmemberMarco Bertschi24-Mar-13 11:00 
GeneralRe: can anyone help me with my final project Pinmemberjava_beginer24-Mar-13 11:12 
GeneralRe: can anyone help me with my final project PinmvpRichard MacCutchan24-Mar-13 23:42 
GeneralRe: can anyone help me with my final project Pinmemberajp5527-Mar-13 0:30 
GeneralRe: can anyone help me with my final project Pinmemberkonate30-Apr-13 22:14 
Questionexception : javax.naming.NoInitialContextException: Pinmemberswarjava23-Mar-13 17:41 
Hi,
I have written a simple ejb application(stateless session bean) in eclipse. When iam running the client program getting the below exception on console:
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
 
My client program is as below:
import javax.naming.InitialContext;
 
import example.ExampleSessionBeanRemote;

public class Main {
public void runTest() throws Exception {
InitialContext ctx = new InitialContext();
ExampleSessionBeanRemote bean =
(ExampleSessionBeanRemote) ctx
.lookup("ejb/ExampleSessionBean");
int result = bean.multiply(3, 4);
System.out.println(result);
}

public static void main(String[] args) {
Main cli = new Main();
try {
cli.runTest();
} catch (Exception e) {
e.printStackTrace();
}
}
}
 
How to solve the above exception, do i need to include something in websphere, i have just include the jar file of the session bean i have written in eclipse.
 
Thanks.
AnswerRe: exception : javax.naming.NoInitialContextException: PinmemberPrasad Khandekar26-Apr-13 0:30 
QuestionOnlick POPUP the Calender month based on dropdownlist Pinmembersiddiqali md21-Mar-13 2:17 
AnswerRe: Onlick POPUP the Calender month based on dropdownlist PinmvpRichard MacCutchan21-Mar-13 3:32 
QuestionHow to import file and compare the file with other file in j2se platform PinmemberMember 824369315-Mar-13 9:47 
AnswerRe: How to import file and compare the file with other file in j2se platform PinmvpRichard MacCutchan15-Mar-13 23:11 
AnswerRe: How to import file and compare the file with other file in j2se platform PinmemberPrasad Khandekar26-Apr-13 0:36 
GeneralGame Development using Android Platform PinmemberCelmar Galindez14-Mar-13 3:31 
GeneralRe: Game Development using Android Platform PinmvpRichard MacCutchan14-Mar-13 4:55 
QuestionQueue implementation in java PinmemberKishoreT14-Mar-13 2:15 
AnswerRe: Queue implementation in java PinmvpRichard MacCutchan14-Mar-13 3:02 
AnswerRe: Queue implementation in java PinmemberAmarnath S4-May-13 5:48 
QuestionHelps, Rijndael on java swing Pinmembercode99013-Mar-13 23:20 
AnswerRe: Helps, Rijndael on java swing PinmemberNagy Vilmos14-Mar-13 1:07 
GeneralRe: Helps, Rijndael on java swing Pinmembercode99015-Mar-13 0:15 
QuestionThread implementation in Eclipse Plug-in PinmemberKishoreT13-Mar-13 6:19 
QuestionRegarding K-means Text Clustering Pinmembersunny funny12-Mar-13 21:43 
AnswerCross posted from C# forum PinprotectorPete O'Hanlon12-Mar-13 22:05 
Questionwhat is the difference between sendRedirect() and forward()? Pinmembervenky002811-Mar-13 19:38 
AnswerRe: what is the difference between sendRedirect() and forward()? PinmvpSandeep Mewara11-Mar-13 20:44 
AnswerRe: what is the difference between sendRedirect() and forward()? Pinmembervkscool24-Mar-13 21:01 
QuestionHow to use time picker in jsp? PinmemberPhyo Thinzar Aung10-Mar-13 23:26 
AnswerRe: How to use time picker in jsp? PinmvpRichard MacCutchan10-Mar-13 23:39 
AnswerRe: How to use time picker in jsp? PinmemberShubhashish_Mandal14-Mar-13 0:26 
QuestionHelp For Creating JSP invoice PinmembereMaM1519878-Mar-13 23:37 
AnswerRe: Help For Creating JSP invoice PinmvpRichard MacCutchan10-Mar-13 23:37 
QuestionAudio Sample Playback Pinmemberdusty_dex7-Mar-13 15:46 
AnswerRe: Audio Sample Playback PinmvpRichard MacCutchan7-Mar-13 21:58 
Questionjtds connection problem.... SQL Server 2012 Express [modified] PinmemberMacRaider47-Mar-13 3:22 
AnswerRe: jtds connection problem.... SQL Server 2012 Express PinmemberMacRaider47-Mar-13 7:03 
AnswerHibernate Data base connection lost Pinmemberkvsravindrareddy12-Mar-13 21:04 
SuggestionRe: jtds connection problem.... SQL Server 2012 Express PinprofessionalPrasad Khandekar2-May-13 20:12 
QuestionRetails invoice PinmembereMaM1519877-Mar-13 0:39 
AnswerRe: Retails invoice PinmvpSandeep Mewara7-Mar-13 1:24 
Questionjava help Pinmemberokedi5-Mar-13 22:15 
AnswerRe: java help PinmvpRichard MacCutchan5-Mar-13 22:22 
Questiondemende help Pinmemberلحن الأماني5-Mar-13 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 25 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid