Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kiswar Malik   on Jul 29 In Java Category.

  
Question Answered By: Heidi Larson   on Jul 29

The problem was with the code that came along
with the tutorial package.Who could have imagined!!!
Just had to comment out 2 import
statements. Problems were there with the converter  application and the
confirmer application. The code that needed to be commented
out were in ConverterClient.java and
ConfirmerClient.java In ConverterClient.java , the code looks somewhat
like this. ======== import
javax.naming.Context; import  javax.naming.InitialContext; import
javax.rmi.PortableRemoteObject; import java.math.BigDecimal; //import
Converter; //import ConverterHome; public class
ConverterClient { public static void main(String[] args)
{ try { Context initial = new
InitialContext(); Context myEnv =
(Context)initial.lookup("java:comp/env"); Object objref =
myEnv.lookup("ejb/SimpleConverter"); =============== I commented out those
2 lines and it compiled,
without errors. Likewise for
ConfirmerClient.java Also there are errors in the bookstore application.
============== [javac] Currency c =
(Currency)session.getAttribute("currency"); [javac] ^ [javac]
/local/j2sdkee1.3.1/j2eetutorial/examples/src/web/bookstore1/filters/OrderFilter\
.java:47: reference to Currency is ambiguous, both class
util.Currency in util and class java.util.Currency in java.util
match [javac] Currency c =
(Currency)session.getAttribute("currency"); [javac] ^ [javac] 2
errors BUILD FAILED
============== Solved the above with util.Currency c =
(util.Currency)session.getAttribute("currency"); How could sun ever
publish these
materials without testing it on different
platforms?? ========================== Still I am faced with another
problem, tried to
compile the example like the converter example. I did
according to the tutorial but am having problems running
it. Tried runclient -client ConverterApp.ear -name
ConverterClient -textauth Yes I do have the ConverterApp.ear
and ConverterAppClient.jar files. Can someone
help. They mentioned setting appcpath, but the compiler
gives me a syntax error: usage : blah blah
blah... Also I am typing this on my
c:\j2eetutorial\examples\ejb\src\converter directory. Using the "crash
resitant" ;D
Windows 98 as my platform. A friend of mine suggested me
to use an IDE to solve it, but I rather want to go
with the commandline for now. I guess I am just to
lazy to think, my head hurts..... Can someone help
please?

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on J2EE Help Or get search suggestion and latest updates.


Tagged: