Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!

Dave Tolls

Rancher
+ Follow
since Sep 04, 2013
Cows and Likes
Cows
Total received
47
In last 30 days
0
Total given
0
Likes
Total received
787
Received in last 30 days
4
Total given
24
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dave Tolls

...and can you point out exactly which line in your code this was thrown from?
11 hours ago
So that's the thing it's trying to set:

by passing in an auditMessageSender, which is class MessageSenderImpl implements AuditMessageSender.

So, what does the class NhAuditHookMessageSenderImpl look like, as that doesn't seem to be immediately related to your MessageSenderImpl class?
12 hours ago
It's complaining about something in nhAuditRouterProcessor.
Can you show us the definition for that one?
14 hours ago
I don't see where in that code that has anything to do with activemq?

The stacktrace doesn't involve your code at all, and seems to be activemq trying to read data from somewhere and failing.

Note, when posting code use code tags, not quote tags.
19 hours ago
Because the first one is a <div> tag and the second is a <form> tag?

Which says to me that I don't actually understand your question.

The person that wrote that html could have given the <form> tag an id, or the <div> tag a class.

Assuming that the page these examples came from was a good example of HTML (always a risky assumption) then I would hazard a guess that they wanted an id on that div so they could target it directly in some Javascript.
For the form they were likely using the class to manipulate the layout of the form fields in CSS.

Of course, these are just examples so likely bear no relationship to real world pages.
So, I suggest you do as Rob says and try and write the smallest bit of code that shows the problem.

Your issue is going to be around the order these things are assigned.

One thing you can do to see that is to add a  println call just before you create the label logging what the values of those variables are and then see when that println occurs compared to the one in the list selection listener.
1 week ago
Is that all the code in that area?
Are those two statements actually near each other?
Where are those two variables (the String and the int) declared?
Where are they set?

1 week ago
Make the list view editable depending on the user that is logged in.
One way is to add a part of the page that is an editable version for the super user, and a read only version for the customer.

They aren't errors, they're warnings.
You can ignore them if you don't want to have to go through and give them proper types.
1 week ago
Yes, you'll need to post the exact error you are getting, because there is no error in the line you highlighted that I can see.  It's just a String.

Michael Mutek wrote:
Does anyone have an idea why my list is apparently not storing the added elements correctly, but just overwrting itself with every new
element I want to add?



The first place I would check is how you are maintaining the full List in testStagingArea.
I'm taking a bit of a guess here, but I'm going to suggest this is a new List each time, and so will only ever contain the single StagingAreaItem when it is serialised.

Exactly how you ensure that List is correct before adding a new element is up to you, and likely depends on the system itself.
1 week ago
As you've seen, JAXB won't do that for you if the element is missing entirely.

If you need a default value I suppose you could just assign it in the Java:


It does look a little odd, though.
1 week ago

Steve Dyke wrote:
To the best of my knowledge it is the correct DuplicateKeyException. Yes it is deployed. And no the println do not appear.



Then that code does not execute at all.
Seriously.
The only other option is that your version of the JVM is completely borked such that it does not operate within the rules of a JVM.

If that exception is being thrown from within that try block then, even if the first catch is using the wrong DuplicateKeyException the second catch (which is a catch all Exception catch) will catch it and print out those log lines.
That is assuming any println calls in your code appear in your logs.

Your original code above was this:


So either the exception is ignored, which seems to be what you want, or it is picked up by the next catch block.
That code will not result in a stack trace appearing in the logs for that exception, unless it is something inside the executeUpdate that is doing the logging, which would strike me as a little odd.

My next step would be either to debug it using the debugger, if this is easily reproducible in your test environment, or stick a load of debug statements in that area of code to track exactly what route it is taking and with what variables.
1 week ago