• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

They faild me, and I don't know how to fight them back

 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get my result today, and they faild me. The given reason is:

Comment: Automatic Failure: Assessor's Comments: Error Message: Failed to start the registry and register an object.



The error message is a message from an exception I throw if the registery faild to start. So, I know the reason that they couldn't start the program in server, or default mode.

I ran the same jar file I gave them on 3 different machines, and it works fine. I even copied and pasetd it on a server machine at work, and it works fine.

I don't know what happen, or what I should do next. I don't even know what is wrong so I can fix it. The programs runs in four different modes (server, alone, default, and an extra mode I decided to support). The only files the jar file needs to run is: .properites file, which was indicated on the specification that it must be in the working directore, and the database file, which also must be in the working directory.

what should I do now
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

Exactly what steps/commands do youexecute to start just the remote server and did you specify these exact steps in the user guide?

Could you post just the code where you create the registry, bind the address/port and register the object?

I don't know about your instructions, but mine (URLyBIRD) specificaly forbids any extra command line arguments other than "the single mode flag".

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Jon:
There isn't any extra command arguments I am using. The project is packed in a jar file. when you un-jar the file, you will get

runme.jar
suncertify.properties
.db file
and some other files like doc, and images

from the working directory you can run the program using the command lines, which is specified in the spec.

java -jar runme.jar server//to run the server
java -jar runme.jar alone//stand alone mode
java -jar runme.jara // to start the default server and client

the .properties and the db file must be in the current working directory, which is a requirment in the spec.
no more and no less, it is exactly what the spec asked for.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could be that you require a .properties file at startup? I am pretty sure (if you're doing B&S) that you cannot expect that.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Robert:
yes the program requires the properties file at startup, as well as the db file before the server get to run. In the given specification document it says: "Such configuration information must be in a file called suncertify.properties which must be located in the currect working directory". So, it accually demand me to create a property file, and place it in the current working directory.

Robert, where did you get the assumption that the property files must not be need at startup?
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

What exception do you catch to print this message? I am just taking guesses, but did you use the default port java.rmi.registry.LocateRegistry.createRegistry and what hostname string did you bind the Data object to with Naming.rebind()?

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Jon:
I am using the defualt port 1099, and I am using the proper URL to register an object. This error message is thrown only if the registry faild to start, which means missing .properties file, missing the db file, or the port number is taken. It is too bad that they didn't give me the stack trace
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

What I was driving at is that if you used a name in the hostname, you would rely on the DNS on the assessor's machine having that association too - localhost will only point to the loopback if it is registered as such in the DNS. Just a possibility - just ideas as to a possible cause ....

What did you specify as your hostname string?

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jon:
her is the line code I use as the object name:
String serverName = "//" + ip + "/" + OBJECT_NAME;

I don't use localhost, or any machine specific naming. Also, I copied and pasted the jar file in 2 different machines that don't belong to me. My co-worker machine, and a QA server I use at work. In both case it ran fine, without any errors.

The only reason I see can throw that exception if the .properties file or the db file is not on the current working directory. But it is specified in the spec document that both of them must be in the current working direcotry.
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hanna,

Have you tried starting the server on one machine and the client on another?

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jon:
Yes I did that. One scenario was to run the server on one machine, and the client on another machine.
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hanna,

I confess that my experience lies a lot more in Unix network programming than RMI, but thinking it through the only reasons I can come up with if the examiner has the correct files in place are:

1) You have used a port lower than 1024 to bind the server - you have discounted this.

2) Trying to bind the server to a host other than localhost/127.0.0.1

3) A program was already running on the port 1099 - I am sure the assessor would realise this from the stack trace if he had accidentaly left another server running.

Short of seeing the code I don't know what else to try, although I am sure others here will be able to add to this list or correct me if I am wrong. If you can't find what could have caused the error, you would have to write to Sun to appeal the result. I think the address is who2contact@sun.com.

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jon:
Thank alot for you time and help. All these reasons I went through it, and it doesn't apply to me. I contacted Sun at this address before, twice. They respond to one contact only, and it took them 10 to get back to me. They never responed to my other contact. I already sent an email to them, but I don't know when they are goingn to responed, if they ever will...!!
The only thing left to me that the axaminer either didn't have .properties file, or the db file in the current directory.
thanks again
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

There could still be some socket/DNS problem that has been overlooked.

If it is any help I could give you a shell account with ssh on a Linux rack server which I administrate (I would open up port 1099 for you to connect to). If you can start the server in standalone from a remote network and connect to it from your client following your instructions, this would point to the assessor being at fault. Let me know if you want to give it a try.

Regards,

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jon:
Thank you very much for the generious offer. I realy appreciate it. At this moment I don't think there is a DNS problem. I tried already on two different network, my home network and my company network. I will wait to see if Sun can provide me with any more details.
Thanks again
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

Call me an old stick in the mud but I would try between two different networks rather than two hosts on a private network to be sure that your results up to now are not a routing/DNS issue, but if you are sure....

Regards and good luck!

Jon
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna

Originally posted by Hanna Habashy:
hi Robert:
yes the program requires the properties file at startup, as well as the db file before the server get to run.

So if the properties and db file are not there, server will not start? In that case, then I think it is pretty much the reason. If grader tried to start server after removing properties and db files, probably it did'nt start.

In the given specification document it says: "Such configuration information must be in a file called suncertify.properties which must be located in the currect working directory".

Exactly.

So, it accually demand me to create a property file, and place it in the current working directory.

Sorry. But I think what it means is, when you start you app. in any of three modes, if properties file is not present in current working directory then app. MUST create a new file in the current working directory. Application MUST start without properties file and then create if there is not one already.

Robert, where did you get the assumption that the property files must not be need at startup?



My understanding is if server will not start without properties file, then I think it is the reason.

Good Luck.
Satish.
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


"Such configuration information must be in a file called suncertify.properties which
must be located in the currect working directory".


Sorry to hear about this delay in you receiving your certification.

Exactly what does your application say when there is no properties file
when the server is attempted to be started with the following
command:
java -jar runme.jar server

Does it inform the user that the properties file is missing, or give
any hint so that the Sun tester could take appropriate action (perhaps
marking off for not starting due to the properties file, but not
failing becauase the server actually does work).

Is it stated in the user's guide that the properties file must be present?
If so, maybe the Sun tester didn't read the user's guide (perhaps all the
user's guides seem pretty similar

Is it stated in the design decisions document that the propertes file
must be present?

Again, anything that the application itself does, or any supporting
documents do to tell Sun that the properties file must be present
is, in my opinion, to your advantage.

Gook luck, and again sorry to hear about this delay in your
certification.

Thanks,
Javini Javono

P.S.
Please note that no one ever really fails this exam (as long as they
have $100 to resubmit). So, you may attempt to appeal, and in
the very worst case, you can resubmit and probably pass.
Goodluck, again.
[ July 06, 2004: Message edited by: Javini Javono ]
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for your reply. You explination makes sense so me, but it is totaly vague in the spec. document. When they said: "the suncertify.properties must exist in the current working directory" I thought I must place a file there.
Also, I thought about this situation when the property file is currupted or missing, that is why I added an additional mode called "restore".

java -jar runme.jar restor

This command will restore the application property to the default settings, and create a new one if it doesn't exist. I guess the examiner didn't even bother to look at the user guide. It is shame on them not to look at the document one put so many hours in.
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's why I think this might be the reason for your issue:

REGARDING PROPERTIES FILE


yes the program requires the properties file at startup, as well as the db file before the server get to run. In the given specification document it says: "Such configuration information must be in a file called suncertify.properties which must be located in the currect working directory". So, it accually demand me to create a property file, and place it in the current working directory.



Mine doesn't say what you typed. Mine says

All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.



That is different. That doesn't mean that a configuration must be SUPPLIED. It just means that you WILL STORE a configuration, and that WHEN you STORE the configuration, put it in suncertify.properties.

Another reason why you are not required to supply a .properties file is because in my documentation on [i]Packaging of Submissions[i], it does not say anything about including a .properies file. No "You MUST supply a .properties file" or something like that.

OTHER REASON WHY I THINK .PROPERTIES IS NOT REQUIRED AT STARTUP
Because the application does not say anything about being able to run without configuration, and it does not say anything like, "This application has to be run out-of-the-box, without being preconfigured." Since it does not prevent me from requiring preconfiguration, that was the safest path I figured I'd go down.

REGARDING COMMAND-LINE PARAMETERS
Also mine says: "The mode flag must be either "server", ... "alone", ... or left out entirely, in which case ... .

Said another way, according to my requirements, adding a parameter called "restore" is grounds for an automatic failure. Now, they didn't fail you for that, but keep that in mind, and use that as a way to consider how you need to structure your solution to accomodate that, IN ADDITION TO the problem you originally stated.

SOMETHING ELSE MY REQUIREMENTS SAY ABOUT CONFIGURATION[b]
"You must not require manual editing of any files by the examiners."

[b]More on "restore"

This command will restore the application property to the default settings, and create a new one if it doesn't exist. I guess the examiner didn't even bother to look at the user guide. It is shame on them not to look at the document one put so many hours in.


Does "restore" use the GUI? Cause according to my requirements (look at the top) you MUST use the GUI to set configuration.

I'M ALWAYS RIGHT[b]
Just kidding. I'm mostly wrong. I may be wrong here. You may be right. I'm just saying what I think. When I get my test results, I'll find out just how wrong I am.

[b]FINALLY

I know you probably put many hours into this project. You probably did something that was a very good piece of technical work.

You might not like this: This may be a valuable lesson for you. What if you did mis-read the requirements? That's not a big deal. Instead of using your anger to lash out at Sun, use it to focus on what you might have possibly missed. Someone in your situation who just screams "It's not fair!" is not someone whom I would want to work for me. Someone in your situation who asks, "What happened? What was missed? In general, what kinds of situations cause me to misunderstand requirements? What can I do to prevent that in the future?" is the guy I want by my side.
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

If you think you failed because a missing properties file, you'd better resubmit IMO. I think that most people simply create the file automatically and by code if it does not exist. In other words, what you do yourself with your special "restore" mode.

In case the properties file is missing, your server should have asked the grader (through some GUI element) for the database path. And instead, he got an error...

I guess the examiner didn't even bother to look at the user guide. It is shame on them not to look at the document one put so many hours in.



If he did, you'd probably have failed for another reason, as Robert suggests above:

Your programs must not require use of command line arguments other than the single mode flag, which must be supported. (...) The mode flag must be either "server", indicating the server program must run, "alone" (...)



It means that your "restore" mode is another condition for automatic failure.
That's why I wouldn't insist and just resubmit. Because you're right: the grader probably didn't notice the "restore" mode. But if you get his attention on it with the hope to convince him that he made you fail unfairly, well, he'll have no other choice (because it's an automatic failure condition) but making you fail a second time.

Good luck,

Phil.
[ July 06, 2004: Message edited by: Philippe Maquet ]
 
Jon Entwistle
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a thought - have you tried starting the server from a different directory from the jar file? Of course the properties file will need to be in the directory where you are when you start the application.

Regards,

Jon
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you all for the valuable information. I fixed the program with a single line of code. I misinterpet the requirments, and I thought I must supply the properties file. The original properties file contains only the relative URL of the database file used by the server. I generated the file using some method, so all what I had to do is call this method at startup if the property file is missing.

You know I am not angery or anything, I am just pissd off...just joking
See, my English is a second langauge, and they know that many none-English speaking people try to take there certifications. The least they can do, just make the instructions clearer.

Well, they want another $150, here it is for one line of code...
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

I fixed the program with a single line of code.



That's what make the SCJD process so harsh ... but also so valuable (I mean that it takes its value from its harshness).

See, my English is a second language



I'm not the right guy to send you a compliment about your English language (because English is my third language), but anyway, from my reading of your posts, I just thought you lived in America. Probably, given your last name, as an immigrant - as I thought of becoming myself in '97 -, but 100% fluent in English anyway.

Well, they want another $150, here it is for one line of code...



If you can, forget about that 150$/one_line_of_code terrible ratio. Think of all the time and energy you put in SCJD already (during at least a few minute and preferably eyes shut ), and then think of you *being* a SCJD in - at worst - a few weeks.

I hate encouraging people to transgress the rules - mmmh, after all, I just can be a liar here, who knows - but please post your results *here* when you pass!

Good luck again,

Phil.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Philippe:
Thank you very much for the nice words and encourgment. Acually, I live here in the U.S. After I got my BS in Computer Science, I decided to stay.
I really appreciate your kindess.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hanna,

If this makes you feel any better, the specs aren't very clear to someone whose FIRST language is English =)

Good luck on the resubmittal.
Perogi.

p.s. If this makes you feel any better, checking for your error in my code has led me to find a minor one in mine. Thank you very much for posting!
[ July 07, 2004: Message edited by: S Perreault ]
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm surprised English is not your first language either. You communicate very well. I'm glad you were able to figure out how to fix your application, and good luck!

Rob
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hanna,

I just wanted to echo the sentiment that the B&S spec is far from foolproof, even for a native English speaker. I consider my English to be exceptional (even for a native speaker) and I still interpreted the requirement exactly as you did. I've not yet finished my implementation so I can't say if I would have ultimately fallen into the same trap, but certainly not now thanks to your experience.

I must admit that, having read a few of your recent postings in response to the queries of others, I was actually shocked to see that you'd been failed. I've found your postings to be very well thought out and informative, so please keep it up! You never know, I may have a few questions of my own that you can help me with. :-)

Regards

Jules
 
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hanna -
Keep your chin up, don't worry about the initial failure, and good luck on the resubmission! We will all be rooting for you.

After you get the certification, the initial failure will not even matter and you won't even have to give it another thought.

TJ
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

how could it happen that a .properties file was missing? I suppose You had put it in. Did they remove it?

I have two .properties files:
suncertify.properties
tables.properties

The first one stores the last used ip and port..
The second one provides a flexible extending of the system with new db files...

Is it forbidden to have any other .properties files than suncertify.properties??

Thanks,
d
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dora,
First, you cannot have two .properties files, at least this is what my project specifications says.
Second, yes I included my .properties file in the submission package, and I believe they remored it.
The issue is this, your project should not assume that .properties file is there.
To fix this problem do the following, at startup check if the .properties file exist, if it does continue. If the file doesn't exist, create a new one with the default values.
The only default value I have in this file is the db file location.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Julian,
Thank you very much for your kind words. This forum has been very valuable to me, and I am trying to give back what I can.
I already passed the certification. I sent two emails to SUN, and after waiting for about a week, I get no response. Then, I decided to just pay the fee and upload for the second time. I get the result back 3 days after.
Thanks again
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The issue is this, your project should not assume that .properties file is there.
To fix this problem do the following, at startup check if the .properties file exist, if it does continue. If the file doesn't exist, create a new one with the default values.



Or as we have previously discussed:

Have your default properties as a resource internal to the Jar, this is then apart of the application, as much as the .class files.
Then load these properties and decorate them with the suncertify.properties:

new Properties(defaultProperties).load(suncertifyProperties); //pseudoesque

if these don't exist it doesn't matter.
At shutdown, write out the properties as normal.
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hanna Habashy:
hi Julian,
Thank you very much for your kind words. This forum has been very valuable to me, and I am trying to give back what I can.
I already passed the certification. I sent two emails to SUN, and after waiting for about a week, I get no response. Then, I decided to just pay the fee and upload for the second time. I get the result back 3 days after.
Thanks again



Congratulations, .
What a long strange trip its been!
 
Once upon a time there were three bears. And they were visted by a golden haired tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic