This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Yat Cheung

Greenhorn
+ Follow
since Jul 18, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yat Cheung

Hello,
Is there any point in declaring variables like this ...
private static final int BLAH_1 = 0;
private static final int BLAH_2 = 0;


or since I've made it private I may as well declare it ...
private final int blah1 = 0;

I often declare variables with different names but with same values to make my code more readable so I can say stuff like if (field == BLAH_1)

Or should I declare these as
public static final int BLAH_1 = 0
though I am unlikely to use them outside the class they are declared.

Just some thoughts I had which I'd like to clarify to myself really so any comments appreciated
Thanks
12 years ago
Hello,

Given a number x and a number of decimal places y are there any library methods than can produce the following results

x y result
1 3 0.001
10 3 0.010
100 3 0.100

So basically formatting the given number with the given decimal place value. I thought there would be something to do this in the API but haven't found anything. I want to avoid having to write my own routine if possible

Thanks in advance
Jack
13 years ago
I thought I had scored a pretty good result with 80% but looking through this forum there are some amazing scores. Anyway, I'm happy. Threads were my lowest scoring topic. In general I found the code examples to be a lot simpler than some of the ones appearing on the mocks out there - I guess this is a good thing as if you can score well on the mocks you should score well on real thing. To be honest though I found my K&B the most useful resource and only did 4 different mock exams - maybe I should've done more??
18 years ago
I wouldn't set any firm dates for your test. They can be booked at fairly short notice so wait until you know you are ready. As it happens I took my test today and passed with 80% which I was quite happy with. I rang up at 7.15am this morning and had a test scheduled for 12.30pm (5 hours notice). I too also used the K&B book and took a few mock exams. My own method was just to read it in order, one chapter a night and then make a few notes and do self-tests. I did this a couple of times and then last week did quite a few mocks. I also have 1 years previous Java experience and studied for 4 weeks. If you put the effort in it's possible to pass in the time scale you have planned.
Hello
Does anybody have a link to where the bonus exam is that is apprantly part of the book. I've looked on the website but can't find it.
Thanks.
Bruce.
Can anyone tell me the process for purchasing an exam to take in the UK? Do I buy a voucher from Sun and then schedule a time at a Prometric test centre using the voucher as payment. Or do I bypass Sun and go straight to Prometric. Or if I buy a voucher from Sun do I have to take it at one of there test centres. I've looked at the website but it's not entirely clear. If anyone has gone through the process in the UK (london area) I'd be glad to know of your experiences.
Thanks
Hey thanks for clearing that up. Didn't know about the errata page but will use it from know on. Great book btw Kathy.
Hi
I'm planning to taje the SCJP exam soon and have been using the red and blue Sierra/Bates study guide. I've found it to be very good and easy to read. One question I have which I hope someone can help me clear up is
up is whether interfaces are implicitly public.
On page 133 in the 2-minute drill it states "Interfaces are by default
public and abstact - explicit declaration of these modifiers is optional"
On page 115 however it states "The public modifier is required if you want
the interface to have public rather than default access". Which is correct.
I hope I'm not reading this wrong but they seem to contradict one another.

Thanks in advance
Bruce
Hi Kyle
Thanks for the offer of help but I seem to have solved the problem. I put the EJB files into a package and they deployed fine!! I've read on other newsgroups that WebSphere doesn't like it when the classes aren't in a package....not sure if this is true or not but it solved my problem :-)
Maysc
20 years ago
Hi
I'm having problems deploying EJB's on Websphere 3.5. I have tried deploying the sample code from the book "Enterprise Java Programming with IBM Websphere" by Brown, Craig et al, so I don't think there is a problem with the code. This is the stack trace log that I get:

Exception:
Deployment[createEJSJar] failed.
IVJ0805E: There were errors during generation of stubs/ties for the interface classes.
EJBDeploy: setupWorkingDir(): Setting up working directory D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir
EJBDeploy: setupWorkingDir(): Deleting directory D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar
EJBDeploy: open(): Processing jar file C:\Development\b4-HelloWebSphere.jar
EJBJar: processJar(): Extracting jar file C:\Development\b4-HelloWebSphere.jar to directory D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar
EJBJar: processJar(): Parsing manifest file for deployment descriptors
Found b4-HelloWebSphere.ser
EJBJar: loadJarClasses(): Adding all classes in .jar file to custom class loader
EJBJar: processJar(): Deserializing deployment descriptors
b4-HelloWebSphere.ser
EJBDeploy: open(): Verifying EJB HelloWebSphereBean
EJBDeploy: generateClasses(): Generating home remote implementation class for bean HelloWebSphereBean
Class name: EJSRemoteHelloWebSphereHome
EJBDeploy: generateClasses(): Generating home implementation class for session bean HelloWebSphereBean
Class name: EJSHelloWebSphereHomeBean
EJBDeploy: generateClasses(): Generating remote implementation class for session bean HelloWebSphereBean
Class name: EJSRemoteHelloWebSphere
EJBDeploy: compileClasses(): Searching for source files...
Found D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSHelloWebSphereHomeBean.java
Found D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphere.java
Found D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphereHome.java
EJBDeploy: compileClasses(): Compiling generated classes...
javac command line:
javac -d D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar -classpath D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar;D:\WebSphere\AppServer\lib\ibmwebas.jar;D:\WebSphere\AppServer\properties;D:\WebSphere\AppServer\lib\servle t.jar;D:\WebSphere\AppServer\lib\webtlsrn.jar;D:\WebSphere\AppServer\lib\lotusxsl.jar;D:\WebSphere\AppServer\lib\compat.jar;D:\WebSphere\AppServer\lib\xalan.jar;D:\WebSphere\AppSer ver\lib\ns.jar;D:\WebSphere\AppServer\lib\ejs.jar;D:\WebSphere\AppServer\lib\ujc.jar;D:\WebSphere\AppServer\lib\idb.jar;D:\WebSphere\AppServer\lib\repository.jar;D:\WebSphere\AppSe rver\lib\admin.jar;D:\WebSphere\AppServer\lib\console.jar;D:\WebSphere\AppServer\lib\was20cm.jar;D:\WebSphere\AppServer\lib\tasks.jar;D:\WebSphere\AppServer\lib\xml4j.jar;D:\WebSph ere\AppServer\lib\vaprt.jar;D:\WebSphere\AppServer\lib\sslight.jar;D:\WebSphere\AppServer\lib\ibmjndi.jar;D:\WebSphere\AppServer\lib\deployTool.jar;D:\WebSphere\AppServer\lib\datab eans.jar;D:\WebSphere\AppServer\classes;D:\WebSphere\AppServer\jdk\lib\tools.jar;D:\WebSphere\AppServer\lib\bsf.jar;D:\WebSphere\AppServer\lib\dertrjrt.jar;D:\WebSphere\AppServer\l ib\derdbpw.jar;D:\WebSphere\AppServer\lib\ivjejb35.jar;D:\WebSphere\AppServer\lib\js.jar
D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphereHome.java
D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphere.java
D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSHelloWebSphereHomeBean.java
javac return code = 0
EJBDeploy: generateTies(): Generating ties for implementation classes...
rmic command line:
rmic -classpath D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar;D:\WebSphere\AppServer\lib\ibmwebas.jar;D:\WebSphere\AppServer\properties;D:\WebSphere\AppServer\lib\servle t.jar;D:\WebSphere\AppServer\lib\webtlsrn.jar;D:\WebSphere\AppServer\lib\lotusxsl.jar;D:\WebSphere\AppServer\lib\compat.jar;D:\WebSphere\AppServer\lib\xalan.jar;D:\WebSphere\AppSer ver\lib\ns.jar;D:\WebSphere\AppServer\lib\ejs.jar;D:\WebSphere\AppServer\lib\ujc.jar;D:\WebSphere\AppServer\lib\idb.jar;D:\WebSphere\AppServer\lib\repository.jar;D:\WebSphere\AppSe rver\lib\admin.jar;D:\WebSphere\AppServer\lib\console.jar;D:\WebSphere\AppServer\lib\was20cm.jar;D:\WebSphere\AppServer\lib\tasks.jar;D:\WebSphere\AppServer\lib\xml4j.jar;D:\WebSph ere\AppServer\lib\vaprt.jar;D:\WebSphere\AppServer\lib\sslight.jar;D:\WebSphere\AppServer\lib\ibmjndi.jar;D:\WebSphere\AppServer\lib\deployTool.jar;D:\WebSphere\AppServer\lib\datab eans.jar;D:\WebSphere\AppServer\classes;D:\WebSphere\AppServer\jdk\lib\tools.jar;D:\WebSphere\AppServer\lib\bsf.jar;D:\WebSphere\AppServer\lib\dertrjrt.jar;D:\WebSphere\AppServer\l ib\derdbpw.jar;D:\WebSphere\AppServer\lib\ivjejb35.jar;D:\WebSphere\AppServer\lib\js.jar -keep -iiop -d D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar .EJSRemoteHelloWebSphereHome
rmic return code = 1
com.ibm.ejs.sm.exception.DeploymentException: Deployment[createEJSJar] failed.
IVJ0805E: There were errors during generation of stubs/ties for the interface classes.
EJBDeploy: setupWorkingDir(): Setting up working directory D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir
EJBDeploy: setupWorkingDir(): Deleting directory D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar
EJBDeploy: open(): Processing jar file C:\Development\b4-HelloWebSphere.jar
EJBJar: processJar(): Extracting jar file C:\Development\b4-HelloWebSphere.jar to directory D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar
EJBJar: processJar(): Parsing manifest file for deployment descriptors
Found b4-HelloWebSphere.ser
EJBJar: loadJarClasses(): Adding all classes in .jar file to custom class loader
EJBJar: processJar(): Deserializing deployment descriptors
b4-HelloWebSphere.ser
EJBDeploy: open(): Verifying EJB HelloWebSphereBean
EJBDeploy: generateClasses(): Generating home remote implementation class for bean HelloWebSphereBean
Class name: EJSRemoteHelloWebSphereHome
EJBDeploy: generateClasses(): Generating home implementation class for session bean HelloWebSphereBean
Class name: EJSHelloWebSphereHomeBean
EJBDeploy: generateClasses(): Generating remote implementation class for session bean HelloWebSphereBean
Class name: EJSRemoteHelloWebSphere
EJBDeploy: compileClasses(): Searching for source files...
Found D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSHelloWebSphereHomeBean.java
Found D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphere.java
Found D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphereHome.java
EJBDeploy: compileClasses(): Compiling generated classes...
javac command line:
javac -d D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar -classpath D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar;D:\WebSphere\AppServer\lib\ibmwebas.jar;D:\WebSphere\AppServer\properties;D:\WebSphere\AppServer\lib\servle t.jar;D:\WebSphere\AppServer\lib\webtlsrn.jar;D:\WebSphere\AppServer\lib\lotusxsl.jar;D:\WebSphere\AppServer\lib\compat.jar;D:\WebSphere\AppServer\lib\xalan.jar;D:\WebSphere\AppSer ver\lib\ns.jar;D:\WebSphere\AppServer\lib\ejs.jar;D:\WebSphere\AppServer\lib\ujc.jar;D:\WebSphere\AppServer\lib\idb.jar;D:\WebSphere\AppServer\lib\repository.jar;D:\WebSphere\AppSe rver\lib\admin.jar;D:\WebSphere\AppServer\lib\console.jar;D:\WebSphere\AppServer\lib\was20cm.jar;D:\WebSphere\AppServer\lib\tasks.jar;D:\WebSphere\AppServer\lib\xml4j.jar;D:\WebSph ere\AppServer\lib\vaprt.jar;D:\WebSphere\AppServer\lib\sslight.jar;D:\WebSphere\AppServer\lib\ibmjndi.jar;D:\WebSphere\AppServer\lib\deployTool.jar;D:\WebSphere\AppServer\lib\datab eans.jar;D:\WebSphere\AppServer\classes;D:\WebSphere\AppServer\jdk\lib\tools.jar;D:\WebSphere\AppServer\lib\bsf.jar;D:\WebSphere\AppServer\lib\dertrjrt.jar;D:\WebSphere\AppServer\l ib\derdbpw.jar;D:\WebSphere\AppServer\lib\ivjejb35.jar;D:\WebSphere\AppServer\lib\js.jar
D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphereHome.java
D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSRemoteHelloWebSphere.java
D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar\EJSHelloWebSphereHomeBean.java
javac return code = 0
EJBDeploy: generateTies(): Generating ties for implementation classes...
rmic command line:
rmic -classpath D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar;D:\WebSphere\AppServer\lib\ibmwebas.jar;D:\WebSphere\AppServer\properties;D:\WebSphere\AppServer\lib\servle t.jar;D:\WebSphere\AppServer\lib\webtlsrn.jar;D:\WebSphere\AppServer\lib\lotusxsl.jar;D:\WebSphere\AppServer\lib\compat.jar;D:\WebSphere\AppServer\lib\xalan.jar;D:\WebSphere\AppSer ver\lib\ns.jar;D:\WebSphere\AppServer\lib\ejs.jar;D:\WebSphere\AppServer\lib\ujc.jar;D:\WebSphere\AppServer\lib\idb.jar;D:\WebSphere\AppServer\lib\repository.jar;D:\WebSphere\AppSe rver\lib\admin.jar;D:\WebSphere\AppServer\lib\console.jar;D:\WebSphere\AppServer\lib\was20cm.jar;D:\WebSphere\AppServer\lib\tasks.jar;D:\WebSphere\AppServer\lib\xml4j.jar;D:\WebSph ere\AppServer\lib\vaprt.jar;D:\WebSphere\AppServer\lib\sslight.jar;D:\WebSphere\AppServer\lib\ibmjndi.jar;D:\WebSphere\AppServer\lib\deployTool.jar;D:\WebSphere\AppServer\lib\datab eans.jar;D:\WebSphere\AppServer\classes;D:\WebSphere\AppServer\jdk\lib\tools.jar;D:\WebSphere\AppServer\lib\bsf.jar;D:\WebSphere\AppServer\lib\dertrjrt.jar;D:\WebSphere\AppServer\l ib\derdbpw.jar;D:\WebSphere\AppServer\lib\ivjejb35.jar;D:\WebSphere\AppServer\lib\js.jar -keep -iiop -d D:\WebSphere\AppServer\deployedEJBs\b4-HelloWebSphereWorkingDir\__ejbjar .EJSRemoteHelloWebSphereHome
rmic return code = 1
--------
com.ibm.ejs.sm.client.command.ExecutionException: Error during deploying jar file.
at com.ibm.ejs.sm.client.RepositoryOpException.<init>(RepositoryOpException.java:51)
at com.ibm.ejs.sm.client.command.ExecutionException.<init>(ExecutionException.java:63)
at com.ibm.ejs.sm.client.command.DeployJarCommand.execute(DeployJarCommand.java:86)
at com.ibm.ejs.sm.client.command.CommandManager$ExecutionThread.run(CommandManager.java:270)
at com.ibm.ejs.sm.client.command.ThreadPool$PooledThread.run(ThreadPool.java(Compiled Code))

It seems there is a problem generating the stub classes. Does anyone have any ideas about this??
Incidentally, I'm not using VAJ - I had to use the Jetace tool to create the .ser file and deployable .jar file
Any help would be greatly appreciated
Thanks
Maysc
20 years ago
This is a guess but try port 9080
maysc
20 years ago
Hi
I'm having difficulty getting any servlets to run on WAS 3.5. I am running Win2000 server, WAS 3.5 with IBM HTTP server. None of the example servlets run ( I get an internal servlet error page appearing). I have also tried a simple HelloWorldServlet example from the IBM redbooks 3.5 handbook going through each stage of creating a app server then servlet engine etc....
This is what appears in the trace logs:
Wed Oct 10 12:14:11 2001 - Error - ws_open_domain_client_socket - WaitNamedPipe Wed Oct 10 12:14:11 2001 - Error - ws_open_domain_client_socket - WaitNamedPipe Wed Oct 10 12:14:11 2001 - Error - ws_open_domain_client_socket return error
Wed Oct 10 12:14:11 2001 - Error - ERROR: In do_service_time_request, connect_to_queue failed
Wed Oct 10 12:14:11 2001 - Error - Error passing service/run request ... error 8 on clone 0
Wed Oct 10 12:14:11 2001 - Error - router_service : Failed 8
Any suggestions would be gratefully recieved
Maysc
20 years ago
Hi
Does anybody know what this error means??
I am using WAS 3.5 on Windows 2000 Server. Do I need a fix pack of some sort?
This error happens when I try and start the server
Thanks in advance
maysc
[This message has been edited by maysc che (edited October 08, 2001).]
[This message has been edited by maysc che (edited October 08, 2001).]
20 years ago
Thanks Ajith
Any chance of an example? How do I tree walk recursively?
maysc
Hi
I'm trying to write some methods using the JDOM API's....
Given an Element name, how can I search my JDOM Document for the given element name. This is so that I can add an attribute value to it. The purpose is for a utility class that encapsulates the JDOM functionality in case you were wondering why I don't just access the element direct
Thanks in advance
maysc