John Foley

Greenhorn
+ Follow
since Oct 26, 2009
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 Foley

I apologize if this is the wrong place for my question. Please feel free to move it if needed. It was the closest one I could find related to my issue.

Sorry for the long description, I wanted to give you a little background of the issue. My question is at the bottom above the code examples.

In our production environment we are experiencing an intermittent issue where our client application will time out while trying to retrieve data from our object cache. We can see that we are getting the data and putting it on the cache, but occasionally the client application has already timed out and moved on. We are using the Websphere 7 application server.

We are seeing this error message in our trace logs:

[7/3/12 11:10:08:018 PDT] 00001dff Cache 3 updatePeerCaches() DRS is not ready!! - CE will be sent during bootstrap CE=

I've embedded a link which explains this error; however to summarize:

Messages like "updatePeerCaches() DRS is not ready!! - CE will be sent during bootstrap CE=" in the dynamic cache trace log indicate that replication has not been initialized and setup is not complete for this cache instance. All the cache data put into this cache instance cannot be sent immediately to the servers. The cache data will be sent to other servers during the process of bootstrap. The cache data for bootstrap is only limited to the memory cache but not the disk cache, if disk offload is enabled.


This initialization only happens for the first look-up operation after server start. Subsequent access of cache instance should not have this issue.


(http://www-01.ibm.com/support/docview.wss?uid=swg21313480)

So based on the above information it appears we could be attempting to get data from the cache when it hasn't been completely initialized; which would explain our intermittent timeouts. It says that this should only occur on the first initialization; however we're seeing it multiple times after the server has been started and our application has been running.

Now the way it is setup a InitialContext.lookup() is done for every get/put. I'm wondering if this could cause the multiple replications with the object cache. Can anyone with more expertise confirm if that is possible?

Thank you for your assistance.

Here is the code:

getCacheMap() Method


get Method:


put Method:
11 years ago
Thank you for replying. I'll implement this and see how it does.
We just started seeing this exception crop up in our production environment.

I've been searching and I have not been able to find a whole lot of information on this error. Can anyone shed some light as to what could be causing this and if possible any steps to correct it?

java.lang.ArrayIndexOutOfBoundsException
at com.sun.xml.internal.bind.v2.util.CollisionCheckStack.pushNocheck(CollisionCheckStack.java:110)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:475)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:314)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:243)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:87)
at com.ibm.xml.xlxp2.jaxb.marshal.MarshallerProxy.marshal(MarshallerProxy.java:100)
at com.sbc.cctp.easl.crm.jaxb.CrmEaslJaxbUtil.javaObject2Xml(CrmEaslJaxbUtil.java:116)
at com.sbc.cctp.easl.crm.jaxb.EaslCreateCaseImpl.generateCreateCaseRequestXML(EaslCreateCaseImpl.java:71)
at com.sbc.cctp.easl.crm.jaxb.EaslCreateCaseImpl.generateCreateCaseRequestWebServiceXML(EaslCreateCaseImpl.java:48)
at com.sbc.cctp.easl.dao.adapter.ClarifyJmsAdapter.buildCreateCaseRequestXmlMessage(ClarifyJmsAdapter.java:399)
at com.sbc.cctp.easl.dao.adapter.ClarifyJmsAdapter.invoke(ClarifyJmsAdapter.java:113)
at com.sbc.cctp.easl.dao.adapter.AbstractAdapterDispatch.dispatchAdapter(AbstractAdapterDispatch.java:106)
at com.sbc.cctp.easl.dao.work.AdapterDispatchWorkManager.invoke(AdapterDispatchWorkManager.java:24)
at com.sbc.cctp.easl.dao.work.WorkImpl.run(WorkImpl.java:117)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:782)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:159)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1563)

the method call


the getMarshaller() method
So I guess the short question is, when I use SimpleDateFormat(yyyy-MM-dd'T'HHmm) to parse "2010-03-05T0901" the date I get back is "Fri Mar 05 11:01:00 CST 2010" and not "Fri Mar 05 09:01:00 CST 2010"?

14 years ago
Thanks for the reply Paul, I'll shorten everything down to where the issue is. Unfortunately, I have to use the Calendar object because that's what is being given to me.

I need to get the time from the calendar and that will give me the Date Object.

I then use SimpleDateFormat on the new date object to get me the time as "HHmm". I create a String buffer to concatenate the date I'm given (String) along with the time(hours and minutes) I just pulled out (via SimpleDateFormat) to parse a new date object.

the string buffer will have this value: "2010-03-05T0901".

I will then use another SimpleDateFormat object setup as "yyyy-MM-dd'T'HHmm" to parse the StringBuffer I just created above into a new date object.

Now in debug mode I can see the StringBuffer is set to 2010-03-05T0901, however, after I parse that into another date object, Debug is showing the time for that object as 11:01, which doesn't look right. I'm not sure where the extra 2 hours are coming from. I would think that the time in the date object would stay at 0901. Am I misunderstanding something?

Thanks,

14 years ago
I've been playing around with this some more and have more details. I can see where the problem is, but I don't know what is causing it.


Can anyone explain why when I parse the new Date Object below (located in 2nd code structure below on this line

apptDateTime = sdfDateTime.parse(sb.toString());

: , my time changes from 09:01 to 11:01? The conversion to Pacific time looks to be working correctly it's just converting it from 11:01 and not the 09:01.

Here is the code I'm using to build my test case (With notes):



I then pass that calendar to my method which also takes in a date field to perform the logic to convert this to local time (in this example Pacific). Here is the code which does the conversion (with notes and findings):



14 years ago
Hello everyone. I've been working on this for a while today and I've hit a wall as to what the issue is.

Basically, I need to convert to a local time from GMT time. I am using a Calendar object, (which will contain the time in GMT format that I need to convert to local time). I am using a date (String) formatted as yyyy-MM-dd that I need to use in the conversion process. I will also have the timezone I need to convert to (IE America/Chicago etc...). I've posted my code below but here is a summary of what I'm trying to do:

I need to convert the time in the Calendar Object to local time using the timezone I have and return a String with the time formated as HHmm. What I've been trying to do is to build a Date object by using SimpleDateFormat.parse() that will contain the date from the string, and the time from the calendar. I will then use SimpleDateFormat to format that date into the proper String with the correct converted local time. However, when I run this, it doesn't seem to convert my time. It looks like it's not using the Timezone I provide it, but keeps it at the default CENTRAL time (my local machine).

I pull the date String and build the SimpleDateFormat object as "yyyy-MM-ddTHHmm". After I build the SimpleDateFormat object, I set it's timezone to something like America/Los_Angeles and I'll put 0900 in my calendar and use 2010-03-05 for the date. I would exepect my 0900 to change to 0700 after my conversion, however it doesn't. It stays at 0900. I hope i've explained everything clearly enough, please let me know if I need to elaborate anymore.



Thank you.

Edited to remove un-necessary parts in code - can add them back if needed.
14 years ago