• Post Reply Bookmark Topic Watch Topic
  • New Topic

J2EE tutorial from sun web site

 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
Has anyone followed the tutorial? I found when I tried to build example "Converter", only get two class files: Converter and ConverterBean, instead of three as in tutorial. I went into that durectory, try to compile it by "javac ConverterHome.java". I failed. I attached the java file and error message below. I was wondering can anyone point out what is the problem?
Thanks,
Don

Error message:
=============================================================
C:\j2eetutorial\examples\src\ejb\converter>javac ConverterHome.java
ConverterHome.java:17: cannot resolve symbol
symbol : class Converter
location: interface ConverterHome
Converter create() throws RemoteException, CreateException;
^
1 error
==============================================================
ConverterHome.java
==============================================================
/*
*
* Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface ConverterHome extends EJBHome {
Converter create() throws RemoteException, CreateException;
}
==============================================================
 
Chris Gray
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also experiencing this problem, but in my case none of the converter files will complile due to the same kind of error, in fact when I entered "ant all" in order to compile all of the source files in the tutorial some compiled ok but the majority did not, in all there are 29 compile errors similar to the one on the above post.
Does anyone know what I've done wrong here?
 
Preety Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am facing the same problem but i am not able to compile even one. Can you advice me how you proceeded until now.
Regards
Preety Agarwal
 
aanchal mathur
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1).Always make sure all your environment vars are set properly,cause most of the time the error lies due to improper setting of the vars.
2). Next you need to create an EAR file,using the deploytool utility, as given in the tutorial.
2).After that you go to the tut(folder)\examples\src path.At that
point you say > ant converter.(No need to compile all seperately)
We use this path cause ur bulid.aml lies in this folder.
3).If it properly compiles 4 files ,and you get a Build successful message,ignore how many files it copies,cause each time i built,it wuld gie me a diff. number of files copied.
4).At this point check to c that it has created folder called build in the /example folder,which initially only had the src folder.
5).If created then,check that all the class files do exist in the converter folder,along with the ear and jsp file.
6).Total of 6 files should exist.If so,then ontinue again as in the tutorial.
Hope this is of some help to you guys.
aanchal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!