|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How Resolve WXS exception in Global Cache |
« View previous topic :: View next topic » |
Author |
Message
|
mahesh2069 |
Posted: Fri Aug 09, 2013 3:22 am Post subject: How Resolve WXS exception in Global Cache |
|
|
Centurion
Joined: 26 Jun 2013 Posts: 103
|
Hi All,
I got Exception While insert data into Global Cache.
Code: |
l_prptyTmpList = new ArrayList<PropertyTypeLookupView>();
l_prptyTmpList.add(l_prptyViewObj);
//While putting data into GlobalMap, Here I got Exception
p_globalMap.put(l_key, l_prptyTmpList);
|
Exception :
Code: |
RecoverableException
File:CHARACTER:MbGlobalMapInternal.java
Line:INTEGER:381
Function:CHARACTER:put
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:7168
Text:CHARACTER:Unexpected WXS exception
Insert
Type:INTEGER:5
Text:CHARACTER:myMap
Insert
Type:INTEGER:5
Text:CHARACTER:put
Insert
Type:INTEGER:5
Text:CHARACTER:WMB
Insert
Type:INTEGER:5
Text:CHARACTER:ClassNotFoundException: com.walmart.utilities.global.PropertyTypeLookupView |
_________________ Thanks & Regards
Mahesh Mediboyina
WMB Developer |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 09, 2013 3:26 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
It seems the classloader cannot find the file specified. Did you ever attend the training? If so, send an email to your instructor so s/he can remind you what you need to do to have your custom classes be found by the classloader: which are : Configurable Service, Shared Classes, or Deployment. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mahesh2069 |
Posted: Fri Aug 09, 2013 5:17 am Post subject: It is Work of JVM ,Is Global Cache Generic? |
|
|
Centurion
Joined: 26 Jun 2013 Posts: 103
|
Hi All,
I mention code,that class also in same package "com.walmart.utilities.global" ,I wrote these code in JCN. May I know how to " classloader can find the file specified Class", that is work of JVM . How we can resolve this issue.
I need to store List of "PropertyTypeLookupView" objects in Global Cache.
add(Object ,Object) Right?
It able to hold List of "PropertyTypeLookupView" Objects also. Is global Cache Generic? _________________ Thanks & Regards
Mahesh Mediboyina
WMB Developer |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 09, 2013 5:29 am Post subject: Re: It is Work of JVM ,Is Global Cache Generic? |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mahesh2069 wrote: |
Hi All,
I mention code,that class also in same package "com.walmart.utilities.global" ,I wrote these code in JCN. May I know how to " classloader can find the file specified Class", that is work of JVM . How we can resolve this issue.
I need to store List of "PropertyTypeLookupView" objects in Global Cache.
add(Object ,Object) Right?
It able to hold List of "PropertyTypeLookupView" Objects also. Is global Cache Generic? |
An approach that has worked for me is to put common utilitarian classes in a POJO jar, and place that jar into the parent classpath. The classloaders of WMB have four levels (more if you define custom ones). If Level 3 needs that class, I find better success in placing the jar in the classloader just above it, Level 2 in this example. This is because using a class referenced by the same classloader depends on the classpath order: if the needed class appears after the using class (in the order of the classpath directory specification), you will get a class not found error.
Placing utilitarian classes in a JCN is not the best approach. For example, if you have multiple package names (or Broker schemas), then you have to call out specifically the package names in other JCNs that you want to use the class.
Have you attended the required training? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
iShakir |
Posted: Fri Aug 09, 2013 5:44 am Post subject: Re: It is Work of JVM ,Is Global Cache Generic? |
|
|
Apprentice
Joined: 07 Mar 2013 Posts: 47
|
mahesh2069 wrote: |
Hi All,
I mention code,that class also in same package "com.walmart.utilities.global" ,I wrote these code in JCN. May I know how to " classloader can find the file specified Class", that is work of JVM . How we can resolve this issue.
I need to store List of "PropertyTypeLookupView" objects in Global Cache.
add(Object ,Object) Right?
It able to hold List of "PropertyTypeLookupView" Objects also. Is global Cache Generic? |
Are you using IBM Integration Bus version 9? If so, this is the correct documentation, it tells you how to use the Java shared Classloader to store Serializable or Externalizable objects in the cache:
http://pic.dhe.ibm.com/infocenter/wmbhelp/v9r0m0/topic/com.ibm.etools.mft.doc/bn23780_.htm
Otherwise this behavior is not supported, and you'll need to find a way to Serialize the object yourself, before putting it to the cache.
Last edited by iShakir on Fri Aug 09, 2013 5:48 am; edited 1 time in total |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 09, 2013 5:48 am Post subject: Re: It is Work of JVM ,Is Global Cache Generic? |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
iShakir wrote: |
this behavior is not supported |
It seems the product author is not in agreement with you iShakir:
jhart wrote: |
values can be any Java serializable object. So it is quite feasible to use your own POJOs, as long as they are available to all Execution Groups that might be working with them.
Regarding storage of MQMDs, if you take a look at the Coordinated Request Reply sample in the product, this has been updated in v8.0.0.1 to demonstrate use of the Global Cache. This sample stores an MQMD as a byte array, having used the MbElement.toBitstream() method to serialize it. |
In addition, I use GlobalCache in all my flows daily, and have no issue with serialization. Works like a CHAMP. And since the GlobalCache is a Singleton pattern based on HashMap, the mechanics are easy to use and well-known for experienced and trained developers. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Last edited by lancelotlinc on Fri Aug 09, 2013 5:56 am; edited 1 time in total |
|
Back to top |
|
 |
iShakir |
Posted: Fri Aug 09, 2013 5:55 am Post subject: Re: It is Work of JVM ,Is Global Cache Generic? |
|
|
Apprentice
Joined: 07 Mar 2013 Posts: 47
|
lancelotlinc wrote: |
iShakir wrote: |
this behavior is not supported |
It seems the product author is not in agreement with you iShakir:
jhart wrote: |
values can be any Java serializable object. So it is quite feasible to use your own POJOs, as long as they are available to all Execution Groups that might be working with them.
Regarding storage of MQMDs, if you take a look at the Coordinated Request Reply sample in the product, this has been updated in v8.0.0.1 to demonstrate use of the Global Cache. This sample stores an MQMD as a byte array, having used the MbElement.toBitstream() method to serialize it. |
|
I think it would be fair to say that this counts as "finding a way to Serialize it yourself", as storing a byte array is supported. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Aug 09, 2013 5:57 am Post subject: Re: It is Work of JVM ,Is Global Cache Generic? |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
iShakir wrote: |
lancelotlinc wrote: |
iShakir wrote: |
this behavior is not supported |
It seems the product author is not in agreement with you iShakir:
jhart wrote: |
values can be any Java serializable object. So it is quite feasible to use your own POJOs, as long as they are available to all Execution Groups that might be working with them.
Regarding storage of MQMDs, if you take a look at the Coordinated Request Reply sample in the product, this has been updated in v8.0.0.1 to demonstrate use of the Global Cache. This sample stores an MQMD as a byte array, having used the MbElement.toBitstream() method to serialize it. |
|
I think it would be fair to say that this counts as "finding a way to Serialize it yourself", as storing a byte array is supported. |
For Java POJO objects, serialization is as easy as 1-2-3:
http://docs.oracle.com/javase/tutorial/jndi/objects/serial.html
What particular feature are you suggesting is not available in WMB V8? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
iShakir |
Posted: Fri Aug 09, 2013 6:03 am Post subject: Re: It is Work of JVM ,Is Global Cache Generic? |
|
|
Apprentice
Joined: 07 Mar 2013 Posts: 47
|
lancelotlinc wrote: |
iShakir wrote: |
lancelotlinc wrote: |
iShakir wrote: |
this behavior is not supported |
It seems the product author is not in agreement with you iShakir:
jhart wrote: |
values can be any Java serializable object. So it is quite feasible to use your own POJOs, as long as they are available to all Execution Groups that might be working with them.
Regarding storage of MQMDs, if you take a look at the Coordinated Request Reply sample in the product, this has been updated in v8.0.0.1 to demonstrate use of the Global Cache. This sample stores an MQMD as a byte array, having used the MbElement.toBitstream() method to serialize it. |
|
I think it would be fair to say that this counts as "finding a way to Serialize it yourself", as storing a byte array is supported. |
For Java POJO objects, serialization is as easy as 1-2-3:
http://docs.oracle.com/javase/tutorial/jndi/objects/serial.html
What particular feature are you suggesting is not available in WMB V8? |
I agree entirely, it's not hard. I am merely stating that a line of Java that attempts:
Code: |
MbGlobalMap.put(Serializable, Serializable) |
is not supported in WMB v8. In the sense that you won't find it written in the docs, nor will you get a response from a PMR saying anything other than "Upgrade to v9 if you want this functionality" or "You'll need to serialize it yourself".
Those are the two options in front of the OP (unless they're already on v9) as I was trying to suggest. |
|
Back to top |
|
 |
mahesh2069 |
Posted: Fri Aug 09, 2013 6:58 am Post subject: Need Serialization |
|
|
Centurion
Joined: 26 Jun 2013 Posts: 103
|
Hi All,
As my knowledge , The Object which we put it into cache,It should be serialize, Otherwise ,it shown Exception.If your Class would be Wrapper Class ,it is already Serialize So no need of Serialization. _________________ Thanks & Regards
Mahesh Mediboyina
WMB Developer |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|