John Norris

Greenhorn
+ Follow
since Jul 22, 2008
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Norris

Cameron Wallace McKenzie wrote:Could there be a proxy server limiting the size of packets or content going across the network? Looks like perhaps the message is being truncated mid-stream.

Just an idea.

-Cameron McKenzie



Thanks for the tip. That could definitely be the problem as the payload is rather large. I'll let you know what I find out

-John
14 years ago
Hi,
I've got an error that's been showing up on my production servers but not in the stage servers. So far I've had very little luck researching this issue. Based on some documentation from IBM, they refer to web services problem and recommend making WAS configuration changes. However, this application is not using web services.

Any help would be greatly appreciated!

[5/11/09 8:09:15:611 EDT] 000009fa SRTServletReq E SRVE0133E: An error occurred while parsing parameters. java.io.IOException: Connection close: Read failed. Possible end of stream encountered.
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:725)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
14 years ago
I have to build a class(s) to implement an adapter for a web services cot. I only have the binary ear along with the necessary binary jar files to work with. I'm able to include the jars in the build path to build my jar and/or class(s).
The vendor recommends that I just put the class in the classpath. The problem I'm having is in class visibility. If I build the class into a jar and reference that jar file in the classpath then when running the code I get NoClassDefFoundError for any of the referenced classes within my class.

I know the preferred way to do this would be to include these jars/classes in the ear but since I don't have the source I'm not sure if I can insert them into the ear. Any ideas would be greatly appreciated.

Thanks
15 years ago
I want to thank all of you for your help on this topic. I finally located the problem and developed a work around. When I have time I'll try to go back and understand exactly what happened. For some reason the logging logic broke between going to the static method and returning. It was completing all along but stopped logging progress when it came back with the returnCode. Found it by using logic to give me the calling method along with using System.out as opposed to the vendor logger.

Thanks again for your help.
15 years ago
Debugging mode...That's something I can only dream about. This is the only shop I've been in where I can neither get to nor control a dev region. I could go on and on...
Anyway, the last comment, along with the one about no jumping, peaked my interest as refreshData() was only catching a Runtime exception. I've modified this to catch an exception and given the ear to the was admins to deploy and will let you know the results.

Thanks
15 years ago
The basis of this code is vendor specific and was written in '02. There are many things which I would like to change but my goal is to stay as close to baseline as possible. My call to loadData() is shoe horned into the current framework and any other calls are generated from an outside http call, which is why I chose to write this method.
This is my attempt at refreshing the data daily without user input. If it fails, I still have the option of refreshing it manually.
Yes, I removed considerable vendor specific code from the example given. There are vendor specific debug statements in each of the catches, which is why I'm sure none of them are being triggered.
15 years ago
Here's a bit of the complicated code



and


The code never reaches the returnCode logic in refreshData(). The last entries will be "TestDataLoader successful." followed by "returnCode: 0"

Thanks in advance,
15 years ago
Yes, sorry about the compile errors.
It is my experience that this works also. This occurs in a front end method that references a public class with a static method. This method makes a call to a mainframe application that updates files on the server. Once complete it should return back to the calling method to finish some cleanup. What appears to be happening is that the static method returns control to the parent of the calling method. No errors appear to be thrown.

Can you think of any instance where a completed return does not actually go back to the caller?

Thanks in advance.
15 years ago
Not sure if this would start here but will give it a shot.

I have the following code snippet:



The static method in class Test is


Trying to figure out why when load completes, it does not return to callTest. I see "returnCode: 1" instead. The actual code is more complex than this but still can't figure why it doesn't return.

Thanks in advance.

[edit]Add code tags. CR[/edit]
[ August 13, 2008: Message edited by: Campbell Ritchie ]
15 years ago
Thanks, That's exactly what I was looking for.
15 years ago

But SMPTAppender only logs and sends events of level error and higher. however i'm also interested to get other logs (debug,warn ,info) b/c these infos will help me track the issue in my app .


The default behavior of log4j will handle this. The parm <param name="BufferSize" value="1" /> is what you want to set. The value is the number of messages that will be buffered until an ERROR or FATAL message is received.
If you have BufferSize set to 10 and you get 20 messages of info, debug or warn before the error occurs then the last 10(including the error message) will be included in the email.

HTH
15 years ago
I have a servlet will not stop/start when the application is reloaded. The only way to currently get rid of it is to cycle the JVM. Currently each time I attempt to reload the application, I get an additional servlet running. The premise of this servlet is to process a resend queue every 5 minutes. The servlet starts onload, creates a thread that sleeps for 5 minutes then runs the resend logic.
This is old code that I'm maintaining and if there is a better way to activate the resend logic, I'm all ears. Here's the current code:

public class MgBridgeResendHelper extends HttpServlet {
private static final long serialVersionUID = 6047999961405830191L;

private static String MG_BRIDGE_MESSAGE_HANDLER_HOME = "MG_BRIDGE_MESSAGE_HANDLER_HOME";

private static long RESEND_INTERVAL;

private ResendThread thread;

MgBridgeMessageHandlerHome aiMsgHome = null;

public void init() throws ServletException {
super.init();
ResourceBundle resourceBundle = PropertyResourceBundle
.getBundle("MgBridge");
MG_BRIDGE_MESSAGE_HANDLER_HOME = resourceBundle
.getString("MG_BRIDGE_MESSAGE_HANDLER_HOME");
logger = Logger.getLogger(MgBridgeResendHelper.class);
logger
.info("Got the JNDI name MG_BRIDGE_MESSAGE_HANDLER_HOME from Resoucebundle");
String resendInterval = resourceBundle
.getString("MgBridge.cacsSend.resendInterval");
if (resendInterval == null) {
RESEND_INTERVAL = 3000 * 60;
} else {
RESEND_INTERVAL = Long.valueOf(resendInterval).longValue();
}
try {
Context ctx = new InitialContext();
aiMsgHome = (MgBridgeMessageHandlerHome) ctx
.lookup(MG_BRIDGE_MESSAGE_HANDLER_HOME);
thread = new ResendThread();
thread.setDaemon(true);
thread.start();
} catch (NamingException e) {
e.printStackTrace();
}
}

public void destroy() {
thread.interrupt();
super.destroy();
}

private class ResendThread extends Thread {
public void run() {
while (true) {
try {
Thread.sleep(RESEND_INTERVAL);
serviceResends();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doPost(req, resp);
}

public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
}

private void serviceResends() {
}
}
15 years ago
I'm having a similar problem in that I'm trying to use the SMTPAppender property set as
log4j.appender.E.SMPTHost=smtp.test.com and with the following error messagelog4j:WARN No such property [SMPTHost] in org.apache.log4j.net.SMTPAppender.

All references I've seen also use SMPTHost, so not sure yet why it won't except it.
I have an application showing odd behavior. I have servlet that calls a resend bean every 5 minutes, this bean checks a queue for messages to process. The Bean is a stateless CMT bean. All works normally well except under a large load. When I process 2000+ messages, the bean will take 15+ minutes to process all messages successfully. It then closes the connection to the queue and 15 seconds later the servlet throws
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException and then proceeds to rollback all the successful messages back on the queue to be processed again in 5 minutes.

Any ideas?
Thanks in advance