This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!

Haris Karameh

Ranch Hand
+ Follow
since Oct 17, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Haris Karameh

So, it's client being developed/debugged in Eclipse. What do I do to get rid of the error.
5 years ago
I built ws client and it seems to be working ok, except annoying warning:
Jan 23, 2013 12:15:16 PM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

I do have activation.jar and mail.jar in build path and warning is still here. I tried moving it in hierarchy up and down, did not change a thing.
How do I fix this?
5 years ago
sorry for the confusion.
If your request.getParameter("name") contains '%' characters , they should be escaped - replaced with '\%'. Then you query will work
I see problem here:

queryTeste.append("FROM status s, fabric f ").append("s.descricao like '%"+request.getParameter("name")+"%' ")
your query misses WHERE keyword, it should be:

queryTeste.append("FROM status s, fabric f WHERE ").append("s.descricao like '%"+request.getParameter("name")+"%' ")

single % acts as wildcard %% acts as literal %, so you may want to filter value of request.getParameter("name") and make sure it does not have any '%' inside. If it does you need to prefix them with another '%' or '\%'
Yes, it is possible
Change output file with -r option
and set your where clause with -w
to get only inserts use
--all=FALSE --complete-insert=TRUE

run mysqldump --help for details
I created a custom resource environment provider with appropriate factory and everything works great.
All custom properties are marked as 'Required = false'. How do I make some of them required and is there any way to define some of them in advance with default values, so they appear in console as soon as provider is defined?
9 years ago
Never, mind. I found out : There is a bug in version of WAS I am using ( that ignores all defined listeners exept the last defined.

I made a workaround, I define only my listener, and changed the code to call ibm defined one by itself.
9 years ago
I am rather new in JSF development. I am using Rational 6/WAS Express 6.0 and am trying to implement phase-listener.
I added a classs :
package hcode.beans;
public class PhaseTracker implements
javax.faces.event.PhaseListener {

public PhaseTracker(){
System.out.println("NEW PHASETRACKER CREATED");
public void afterPhase(PhaseEvent event) {
System.out.println("AFTER - "+ event.getPhaseId());
public void beforePhase(PhaseEvent event) {
System.out.println("BEFORE - "+ event.getPhaseId());
public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;

and changed /WebContent/WEB-INF/faces-config.xml to include
<phase-listener>hcode.beans.PhaseTracker</phase-listener> <!-- my adition -->
<phase-listener></phase-listener> <!-- the original entry -->

However, after publishing the app and restarting sthe server nothing happens. The listener is never loaded/called, I do not see any messages on the console or the log. What am I doing wrong ? The rest of the app works fine.
9 years ago
Tnx Darryl,
that is what I was looking for. I do not use regex frequently .
Your solution is more elegant.
10 years ago
never mind, figured it out:
String SEP=";|\\||,";
[ October 28, 2008: Message edited by: Haris Karameh ]
10 years ago
I have this fragment of the code:
String SEP=";\\|,";
String q="2000|3000|1000";
String[] sp=q.split(SEP);

I expected to get a '3' as result. But I am getting '1'.
I wanted to split 'q' on '|'.
What am I doing wrong. I tried :
SEP=";|," and SEP=";\\\\|," with the same result
10 years ago
This is not really programming question, rather product inquiry.
I need a simple application/component which will read a messages from WS MQSeries running on Unix and put them into table hosted on MS SQL server.
Is there IBM or 3rd party product which will allow me to do this doing simple 'configuration'?
I understand it is not difficult to develop simple JAVA program to do this, but I have to use something available over the counter.
10 years ago
Thanks for the reply.
I'll try suggested. I am positive that I did not implement anything which would intentionally interrupt the tread. Maybe servlet container or some other part of WAS has to do something with it. The only thing which comes to my mind is SOAPConnection, which I did not close in the main loop.
This is kind a hard to catch because it happens only when the main part fails.
Thanks once again
In thread object instantiated in WebSphere servlet the code goes:
public status=IDLE;
public void run(){
int cnt=3;
while (cnt>0)
try {
SOAPConnection con=...
catch(Exception x){
if (--cnt==0){
else {
try {
catch (InterruptedException e) {

Well, it is supposed to try 3 times to do the job and give up, waiting 1500ms in between tries.
Everytime it reachec sleep() it is 'Interrupted' by something right away.
What am I doing wrong and how to make it sleep?
After some digging I found the answer.
"validate()" should be called in JFrame to revaluate complete UI.
11 years ago