This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Darryl Nortje

Ranch Hand
+ Follow
since Jun 11, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Darryl Nortje

Hi Kannan.

Your post is very old, but very applicable to the problem I'm having. I was wondering if you found a solution for it. I'm getting the exact same stack trace/Exception with the only difference being that my client gets this exception after waiting for almost 6 hours. ie: A request is made at 8 in the morning, some processing happened on the server, and then the server seemed to hang, don't know why. Then on the client 6 hours later this stack trace printed.

org.omg.CORBA.COMM_FAILURE
at org.jacorb.orb.giop.ReplyPlaceholder.getInputStream(ReplyPlaceholder.java:132)
at org.jacorb.orb.ReplyReceiver.getReply(ReplyReceiver.java:273)
at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:1090)
at org.jacorb.orb.Delegate.invoke(Delegate.java:957)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:80)


If you found a solution please can you provide what you did to fix, or any more info on what this problem was.

thanks
cheers
Darryl
10 years ago
Hi Paul, and everyone else.

Thanks for the reply. I like this suggestion, but could you perhaps please clear up a concern I have with this.

A lot of the logic in processing the log file is based on the fact that the 1 log statement follows the next. We are using thread pools, and each thread pool has an ID. Each Log set begins with a BEGIN statement and completes with a COMPLETE statement. So I know that all log lines with that thread ID all belong to the same log set until I hit a log statement with the COMPLETE id.

If I use a JMS queue, is the order that the items get onto the queue, the exact same as the order that I get items off the queue.

I realise this is no longer an IO question, more a JMS question. I haven't done much work with JMS so just asking up front before I run with it.

thanks
cheers
Darryl
10 years ago
Howzit everyone.

Long time no post for me.

I've been given an odd project that I actually have no idea what the best solution for it is. Please could you guys give me hand here.

Basically, we have lots of corba servers running on different machines, as well as web (tomcat) projects and some ejb's on glassfish. All of these apps are writing to 1 or more log files. We have nagios running monitoring our infrastructure and applications. The trend that we see when things go pear shaped is that if we scrutinise the log files after generally speaking things started going haywire a long time before our apps crashed. So we decided we wanted to monitor our log files. Each app uses a framework logger, so for each and every call we have an entry with time, some content and developer specified log statements, and an exit with time. These I call log set. Each log set also has it's own unique ID.

The crux of the matter is, we want to monitor the log files in real time.

Now I have a couple of ideas on how to do this. But this is where you guys come, please feel free to shoot down my ideas, cos I really don't have much of clue how to best go about this.

Idea 1.
Using something like log4j's FileWatchDog kick off a "log set" gathering process each time the log file changes. Start reading the log file from where we left off last time, and do the necessary gathering of log sets.
My concerns about this are the log files are written too very often. It will sometimes spurt out 2000 lines a second. So when does the watch dog tell me the file has changed? Could the watch dog tell me the file changed, and before I've finished processing that change, the watch dog has told me 3 more times that the file has changed. It start becoming a bit blury for me exactly what will happen.

Idea 2:
Every 5 minutes (or less depending on exactly what "they" meant when they said "real time") gather all the log sets. Basically same as above, just that I remove the concern above.
This however raises more concerns. What if the logs generated take longer that 5 minutes to process. what if I can't process the massive volume of log statements faster than what they're been written. Eventually this method might run forever while trying to catch up....

Idea 3:
A bit sketchy on this one, but someone subclassing the log4j appender, and log the log set gathering as the log line is being written, in a seperate thread so as not to add overhead to the logging function.
My concerns here are that by doing the gathering in a different thread that because of the speed of the logging that we end up with too many open threads, and kill the vm.

We want to write this all out to a database, flat table so that it is fast. But again, I have concerns that this might be slower that the logging itself and this Monitoring beast falls behind and never catches up, basically becomming useless.

That's my ideas. Are there any other better ways of doing this. I don't feel good about any of these 3 ways, because I can see how things can go horribly wrong.

Lastly, To give an indication of how big some of these log files get I spose the average for log file is around 100Mb a day. But when things go bad, and there are stack traces everywhere, this can go up to and past 500Mb.

Thanks for the help, in advance.

Looking forward to hearing from you guys, and any ideas you might have.

Ps: I'm in South Africa, so please bear with any slow responses you might get back from me.... thanks.

cheers
Darryl
10 years ago
Howzit guys.

I thought I would first come check here before logging a bug with sun, and to find out how to log a bug with sun. But I think I have found a bug in the Server VM of jdk1.6 (update 10, 11 and 12) haven't checked the rest.

Please can you guys help with ideas for further testing, as well as perhaps a solution, if this is not a bug. Thanks.

We recently upgraded from 1.5 to 1.6u10. On our dev boxes the default vm that the JRE picks up is Client. On our test and prod servers the default is Server. Everything worked fine in 1.5, both server and client VM's.

When we upgraded we suddenly started getting errors in test and prod, that were not reproducable in dev. After lots and lots of attempts to change the code I eventually forced the test server to use the client VM by default by changing values in the jvm.cfg file in jre/lib/i386 directory. And suddenly Test stopped breaking. Same for prod.

So, here is the code, it's very simple. We're calling a stored procdure running on AS400 database (DB2 variant) and after a set amount of calls, we start getting data integrity errors. Please don't forget that this code worked as is on 1.5, on the server VM. The error in question, with a particular set of values passed into the call is

java.sql.SQLException: [CEE9901] Application error. MCH1202 unmonitored by FEMEMSP at statement 0000000108, instruction X'0000'.

And this error gets thrown on the 46th time that I call this stored proc, in the loop, and everytime on the 46th time. 45 times it works perfectly and returns the expected results. So here is the code, and the full stack trace.

We've updated to the latest jdk update, the latest jdbc drivers, (jtopen 6.4) I've put finally blocks in to release all resources after each iteration, I've tried everything I can think of, to get this thing to work, but to no avail.



It's a bit long, but this generates the error. Attached for completeness is the stored procedure, not that it should make a difference because, like i said, it worked perfectly on 1.5.

Here is the stack trace.

java.sql.SQLException: [CEE9901] Application error. MCH1202 unmonitored by FEMEMSP at statement 0000000108, instruction X'0000'.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:621)
at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:915)
at com.ibm.as400.access.AS400JDBCPreparedStatement.executeQuery(AS400JDBCPreparedStatement.java:1111)
at vmbug.VMBugTester.main(VMBugTester.java:76)



Then I changed the value of the date field (defined above). I gave it a value, any old value. The stored proc now returned no results, but executed fine. This time however, it executed 48 times before getting an error, and always 48 times, here is that error / stack trace.

java.sql.SQLException: [SQL0180] Syntax of date, time, or timestamp value not valid.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:621)
at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:915)
at com.ibm.as400.access.AS400JDBCPreparedStatement.executeQuery(AS400JDBCPreparedStatement.java:1111)


If I run this program using the client VM, both instances work and never fall over with this error. So it looks to me like something is wrong with the Server VM...





Ok, that's that. Anyone have any ideas what might be causing this type of behaviour, or help me with the place/link to log the bug with Sun.

Thanks
cheers
Darryl

PS:
No attachment, I get the error

Files with the extension .zip are not allowed as attachment in the message.
or .txt, or .cfg or no extension.
What extensions are allowed.
11 years ago
Hey Karan,

If you look at line 44 on the code you posted of your faces-config file, you'll see that the reference to the approve.jsp file there is in the directory /faces/ whereas all the rest aren't?

Perhaps that is where your problem lies. Can you send your directory structure through. with all the files in each directory.

Tjeers
Darryl
11 years ago
JSF
It looks like there are a couple of errors here....

1) value="#backing_dummy_example.uploadedFilePath}"
--> looks like you're missing an open brace after the value="#

2) in your original post you said that the value change listeners were not firing when you select a file to upload, but you're not setting a value change listener in the definition of your upload file component...

you would need (I stand to be corrected because I'm not looking at the API for inputFileUpload) an onchange attribute in your component definition in order for the event to get fired...

By the way, What is a Partial Trigger?

Is the behaviour you want that when a file is selected for upload that something should happen?
11 years ago
JSF
Hey Rax,

Post your code. Let's have a look at it. Perhaps something else is going wrong.

cheers
Darryl
11 years ago
JSF
Howzit Rishi,

You can use tomahawk dataList component and set the attribute layout="simple".

It works exactly the same as h:dataTable, just the it can render the list accross the page, instead of top down.

I used it very effectively to develop a breadCrumb trail for my web app.

Cheers
Darryl
11 years ago
JSF
Hi Shasi,

What happens when you put commandAction in both views? Does it break?

It really is best to try these things out and show your output.

cheers
Darryl
11 years ago
JSF
Have you got the tomahawk jar in your classpath??

cheers
Darryl
11 years ago
JSF
Hello A,

Thanks for your comments. This is my original code. An action method does not need to return anything, all the happens if you return void, or String == null is that the return back to the page you were on.

Onto the solution. I found a solution to this. Sorry for not posting it earlier, but you know how it goes, work work work.

I don't know if this is a bug in the dataScroller, or if it has been intentionally coded this way, but when you change the underlying List, it does not reset itself. IE go back to page 1. We have to do it ourselves.

The way to do this is to bind the <t:dataScroller to a component on our bean. Create the necessary accessors and mutators for this component


Then in the search method, before each search we need to reset the dataScoller by executing this code, or rather calling a method passing in the value 0 (zero).


That's that. Bob's your uncle, and all that.

HTH
Cheers
Darryl
11 years ago
JSF
Hi there Subrahmanyam,

You need to look at <h:selectOneMenu> as well as <f:selectItem / selectItems.

Check out some samples of these and you'll get it. It's pretty easy. In your jsp you have a <h:selectOneMenu which contains a <f:selectItems whose value is an ArrayList on your bean of SelectItems.

cheers
Darryl
11 years ago
JSF
Hey Ash,

You're going to have to post your code mate. Stack traces mean very little with these massive frameworks. I have just done this successfully, and without your code, it's going to be tough to help you.

Cheers
Darryl
11 years ago
JSF
Howzit everyone,

Hopefully someone can help me here. Below is the code for a jsp and bean. Just a simple example trying to demonstrate how to use the dataScoller to help with pagination over a dataTable.

The problem is that when I run this code, and go to the page, first time the page displays correctly. When I click search all is still fine. If I click search again, all still remains fine. However, When I navigate to a page that is greater than my NEXT searches result that is when this thing starts going haywire.

So in other words, using this example, navigate to this page. You should see 1 result. Then click on search. You should now see 3 pages, with 5 results. Click on page 2 or 3 using the dataScroller. Then click search again, which should take you back to only 1 search result and check what happens. No error messages, or anything, just the dataScoller looks like it isn't reset, to show page 1, and is showing page 2 or 3, but these have no results.

Am I missing something here, or is this a bug in the dataScoller?

Cheers
Darryl

THE JSP PAGE:.
=====================



THE BEAN:.
=====================
11 years ago
JSF