This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.

jhonson berens

Greenhorn
+ Follow
since Feb 28, 2018
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jhonson berens


0
down vote
favorite
I am writing code (with java) that puts employee info into csv file (thanks EUGDPR). I got my other similar code that dumps all employees data to csv file working but now i ran into problem with one that dumps only specific employee's info to csv file.

I get the following error:

anyone know whats wrong? i am not calling posixgroup in code.
6 months ago

Paul Clapham wrote:Your problem could be at line 13, where you ignore IOExceptions. I would recommend you replace that // TODO comment by this:



It would also help if you described the problem. Saying "wont run" is unhelpful, as it could mean almost anything, resulting in it not meaning anything at all. You could also consider putting some debugging code into that code to show you what is actually running.

i got this out: [LDAP: error code 32 - No Such Object] and its not about exception, i have another similar code but  it prints all employees,  this one is supposed to print only one....
6 months ago

John Joe wrote:Any errors?

nope :/
6 months ago
ive tried many solutions but i cant get code to run. could anyone help me?
heres codes:

and part that wont run:

any help is appericated!
6 months ago

Tim Cooke wrote:Again, more information is useful.

- What kind of exception?
- Where is it being thrown?

Try to work this little bit through yourself and find out exactly where the exception is originating from. Perhaps employeeService is null? Why? Perhaps getEmployeeByUserName() throws and exception within it? Dig in and find it.

okay i got it working(no more errors), but it doesnt  get values? heres codes:

and part what does not get values from employee:

6 months ago

jhonson berens wrote:

Tim Cooke wrote:What is? The clearer the information you provide, the easier it is to help.

null

i mean exception is thrown
6 months ago

Tim Cooke wrote:What is? The clearer the information you provide, the easier it is to help.

null
6 months ago

Tim Cooke wrote:It has to return something

- null
- Empty list
- Populated list

Unless an exception it thrown. Is as exception thrown?

it is
6 months ago

Tim Cooke wrote:Next step:

- Does employeeService.getEmployeeByUserName(userName); return anything? Or null?

it doesnt return anything
6 months ago

Tim Cooke wrote:Does that string value make it into the getEmployee method? Perhaps put some System.out.println(); statements in there to print the value to the console as a debug technique.

it prints usernames as its supposed, now i need it to get only that username's data
6 months ago

jhonson berens wrote:

jhonson berens wrote:

Tim Cooke wrote:Let's start at the beginning:

- Does userName contain a string? Or is it null?
- Does employeeService.getEmployeeByUserName(userName); return anything? Or null?
- What goes on in singleEmployeecsv.csv(list); Does it do what you expect?

username should come from html: <a  input class="btn2"  id="employee"  rel="nofollow">DL csv</a>, username is variable that by program gets info from list. to list goes employee info that then goes into csv file.


oops, heres complete html code  that cut off:


it keeps disappearing, but here:
6 months ago

jhonson berens wrote:

Tim Cooke wrote:Let's start at the beginning:

- Does userName contain a string? Or is it null?
- Does employeeService.getEmployeeByUserName(userName); return anything? Or null?
- What goes on in singleEmployeecsv.csv(list); Does it do what you expect?

username should come from html: <a  input class="btn2"  id="employee"  rel="nofollow">DL csv, username is variable that by program gets info from list. to list goes employee info that then goes into csv file.


oops, heres complete html code  that cut off:
6 months ago

Tim Cooke wrote:Let's start at the beginning:

- Does userName contain a string? Or is it null?
- Does employeeService.getEmployeeByUserName(userName); return anything? Or null?
- What goes on in singleEmployeecsv.csv(list); Does it do what you expect?

username should come from html: <a  input class="btn2"  id="employee"  rel="nofollow">DL csv, username is variable that by program gets info from list. to list goes employee info that then goes into csv file.
6 months ago

Tim Cooke wrote:Exactly what part of it isn't doing what you expect?

It does not search from list the userName variable
6 months ago

Tim Cooke wrote:
This is what you asked. But I sense that is not what you want. Perhaps explain your problem again trying to make it a bit clearer this time.

userName is variable that definies what is written to csv file.
6 months ago