| Author | 
		  Message
		 | 
		
		  | fpg8 | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 5:58 am    Post subject: cacheConfig configuration problem | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 26 Mar 2012 Posts: 15
  
  | 
		  
		    
			  
				Hello, I have a problem with the configuration of node support pack IA91 cacheConfig.
 
 
It does not work or does not understand how it should work, I have a node cacheConfig to read a properties file. for example:
 
 
My flow test: soapInput -> cacheConfig -> cacheGet -> soapReply
 
 
Some important item in my setup (cacheConfig): 
 
 
Does the cache need to be initialized : yes
 
JDBC URL: file:///c:/brokerFiles/mensaje.xml
 
 
Problem: No information retrieved from the cache
 
 
Property file (mensaje.xml): 
 
<go>
 
<key>test</key>
 
<data>valores</data>
 
</go>
 
 
Trace file:
 
2012-03-28 10:40:44.252 T1    CacheConfigN setupTrace    } 
 
2012-03-28 10:40:44.252 T1    CacheConfigN setHost       ] 127.0.0.1
 
2012-03-28 10:40:44.252 T1    CacheConfigN setInitCache  ] true
 
2012-03-28 10:40:44.252 T1    CacheConfigN setinterval = | 3600000
 
2012-03-28 10:40:44.252 T1    CacheConfigN setKey        ] 
 
2012-03-28 10:40:44.252 T1    CacheConfigN setLocalGloba ] t=Execution-group
 
2012-03-28 10:40:44.252 T1    CacheConfigN setPort       ] 1506
 
2012-03-28 10:40:44.252 T1    CacheConfigN setReconnectP ] -1
 
2012-03-28 10:40:44.252 T1    Publisher                  ] getInstance
 
2012-03-28 10:40:44.252 T1    Publisher    setReconnectP ] -1
 
2012-03-28 10:40:44.252 T1    CacheConfigN setUrl =      ] file:///c:/brokerFiles/mensaje.xml
 
2012-03-28 10:40:44.252 T1    CacheGetNode CacheNode     { 
 
2012-03-28 10:40:44.252 T1    CacheGetNode CacheNode     } 
 
2012-03-28 10:40:44.268 T1    CacheGetNode CacheGetNode  ] Constructor
 
2012-03-28 10:40:44.268 T1    CacheGetNode setAllowNullD ] true
 
2012-03-28 10:40:44.268 T1    CacheGetNode setAllowNullK ] true
 
2012-03-28 10:40:44.268 T1    CacheGetNode setDataPath   ] Root.XML.go.data
 
2012-03-28 10:40:44.268 T1    CacheGetNode setFrequency  ] 1000
 
2012-03-28 10:40:44.268 T1    CacheGetNode setGetOption  ] Non-destructive
 
2012-03-28 10:40:44.268 T1    CacheGetNode setKeyPath    ] Root.XML.go.key
 
2012-03-28 10:40:44.268 T1    CacheGetNode setLocalGloba ] t=Broker-domain, hash=496115090
 
2012-03-28 10:40:44.268 T1    CacheGetNode setLocalGloba ] type now 1
 
2012-03-28 10:40:44.268 T1    Publisher                  ] getInstance
 
2012-03-28 10:40:44.268 T1    Publisher    isInitialized ] true
 
2012-03-28 10:40:44.268 T1    CacheGetNode setTimedPerio ] -1
 
2012-03-28 10:40:44.268 T1    CacheConfigN getCheckConne ] <== 60000
 
2012-03-28 10:40:44.268 T1    CacheConfigN getData       ] <== 
 
2012-03-28 10:40:44.268 T1    CacheConfigN getDestinatio ] <== 2
 
2012-03-28 10:40:44.268 T1    CacheConfigN getDriver     ] <== COM.ibm.db2.jdbc.app.DB2DRIVER
 
2012-03-28 10:40:44.268 T1    CacheConfigN getFilePath   ] <== c:/brokerFiles/traceConfig.txt
 
2012-03-28 10:40:44.268 T1    CacheConfigN getHost       ] <== 127.0.0.1
 
2012-03-28 10:40:44.268 T1    CacheConfigN getInitCache  ] <== true
 
2012-03-28 10:40:44.268 T1    CacheConfigN getInterval   ] <== 3600000
 
2012-03-28 10:40:44.268 T1    CacheConfigN getKey        ] <== 
 
2012-03-28 10:40:44.268 T1    CacheConfigN getType       ] <== local
 
2012-03-28 10:40:44.268 T1    CacheConfigN getPasswd     ] <== 
 
2012-03-28 10:40:44.268 T1    CacheConfigN getPort       ] <== 1506
 
2012-03-28 10:40:44.268 T1    CacheConfigN getReconnectP ] <== -1
 
2012-03-28 10:40:44.268 T1    CacheConfigN               ] getStrHost host=127.0.0.1
 
2012-03-28 10:40:44.268 T1    CacheConfigN getTable      ] <== STAFF
 
2012-03-28 10:40:44.283 T1    CacheConfigN getUrl        ] <== file:///c:/brokerFiles/mensaje.xml
 
2012-03-28 10:40:44.283 T1    CacheConfigN getUserid     ] <== wbiadmin
 
2012-03-28 10:40:44.283 T1    CacheGetNode getAllowNullD ] <== true
 
2012-03-28 10:40:44.283 T1    CacheGetNode getAllowNullK ] <== true
 
2012-03-28 10:40:44.283 T1    CacheGetNode getDataPath   ] <== Root.XML.go.data
 
2012-03-28 10:40:44.283 T1    CacheGetNode getFrequency  ] <== 1000
 
2012-03-28 10:40:44.283 T1    CacheGetNode getGetOption  ] <== Non destructive
 
2012-03-28 10:40:44.283 T1    CacheGetNode getKeyPath    ] <== Root.XML.go.key
 
2012-03-28 10:40:44.283 T1    CacheGetNode getType       ] <== global
 
2012-03-28 10:40:44.283 T1    CacheGetNode getTimedPerio ] <== -1
 
2012-03-28 10:40:49.252 D3    RecacheTask  run           { Recache: started for CacheConfig
 
2012-03-28 10:40:49.252 D3    CacheConfigN recache         { 
 
2012-03-28 10:40:49.252 D3    Publisher                      ] getInstance
 
2012-03-28 10:40:49.252 D3    Publisher    isUsingV7         ] true
 
2012-03-28 10:40:49.252 D3    Publisher                      ] getInstance
 
2012-03-28 10:40:49.252 D3    Publisher    isInitialized     ] true
 
2012-03-28 10:40:49.252 D3    CacheConfigN recache           | forEvaluate=false, isForRetry=false
 
2012-03-28 10:40:49.252 D3    CacheConfigN recache           | doRecache =true
 
2012-03-28 10:40:49.252 D3    InitCacheSam initCache         ] pub?=false, driver=COM.ibm.db2.jdbc.app.DB2DRIVER, url=file:///c:/brokerFiles/mensaje.xml, userid=wbiadmin, passwd=, table=STAFF, key=, data=, name=default
 
2012-03-28 10:40:49.252 D3    InitCacheSam initCacheProp     { pub?=false, url=file:///c:/brokerFiles/mensaje.xml, name=default
 
2012-03-28 10:40:49.252 D3    InitCacheSam initCacheProp       | java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
 
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
 
	at com.goakes.Cache.InitCacheSample.initCacheProperties(InitCacheSample.java:340)
 
	at com.goakes.Cache.InitCacheSample.initCache(InitCacheSample.java:219)
 
	at com.goakes.CacheNode.CacheConfigNode.recache(CacheConfigNode.java:274)
 
	at com.goakes.CacheNode.RecacheTask.run(RecacheTask.java:42)
 
	at java.util.Timer$TimerImpl.run(Timer.java:293)
 
Class path is: C:\Program Files\IBM\MQSI\7.0\classes\bipbroker.jar;C:\Program Files\IBM\MQSI\7.0\classes\bootstrap.jar;
 
 
Any help is appreciated.
 
Tks.
 
Federico.[/img] | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 6:03 am    Post subject: Re: cacheConfig configuration problem | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| fpg8 wrote: | 
   
  
	| I have a node cacheConfig to read a properties file | 
   
 
 
 
I'll ask the obvious question before anyone else does: why are you using a properties file with WMB? There are any number of discussions in here about why it's not a good idea (or at least not best practice).
 
 
If the answer is "because we use a properties file with all our WAS / Java apps", that's not an answer. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 6:09 am    Post subject: Re: cacheConfig configuration problem | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| Vitor wrote: | 
   
  
	
   
	| fpg8 wrote: | 
   
  
	| I have a node cacheConfig to read a properties file | 
   
 
 
 
I'll ask the obvious question before anyone else does: why are you using a properties file with WMB? There are any number of discussions in here about why it's not a good idea (or at least not best practice).
 
 
If the answer is "because we use a properties file with all our WAS / Java apps", that's not an answer. | 
   
 
 
 
fpg8 is using the IA91 supportPac.  It uses a properties file, not fpg8's application.
 
 
fpg8 - you should contact the author/maintainer of the supportPac directly. There should be contact information either in the documentation that comes with the supportpac or on the supportpac download page.
 
 
You should get a relatively fast response and good advice and support. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 6:12 am    Post subject: Re: cacheConfig configuration problem | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mqjeff wrote: | 
   
  
	
   
	| Vitor wrote: | 
   
  
	
   
	| fpg8 wrote: | 
   
  
	| I have a node cacheConfig to read a properties file | 
   
 
 
 
I'll ask the obvious question before anyone else does: why are you using a properties file with WMB? There are any number of discussions in here about why it's not a good idea (or at least not best practice).
 
 
If the answer is "because we use a properties file with all our WAS / Java apps", that's not an answer. | 
   
 
 
 
fpg8 is using the IA91 supportPac.  It uses a properties file, not fpg8's application. | 
   
 
 
 
So this isn't decaff then?    
 
 
It's so going to be one of those days.    _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fpg8 | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 6:25 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 26 Mar 2012 Posts: 15
  
  | 
		  
		    
			  
				Victor. Yes, I know, but unfortunately I need to have a properties file to hold keys and that these can be configured from outside. 
 
On several occasions I have explained to the customer on the correct 'use' of WMB, but ....     
 
My only way out is to find a solution.
 
You tell me, "use database".
 
The customer says "yes but only MYSQL".
 
IBM WBM says: "We do not support MySQL database."
 
 
My choices:
 
1. IA91
 
2. A web service that queries on MYSQL (not performant at all)
 
My times are shortened and start going crazy .. 
 
 
greetings.
 
Federico. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 6:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| fpg8 wrote: | 
   
  
	| You tell me, "use database". | 
   
 
 
 
I never said database. I was thinking of a UDP or other configurable broker property. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Wed Mar 28, 2012 8:57 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				Your index out of bounds exception  is correct.
 
In java you start with 0, not with 1. So if you have only one element and you start with 1 you get an index out of bounds exception...
 
 
Have fun   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fpg8 | 
		  
		    
			  
				 Posted: Thu Mar 29, 2012 4:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 26 Mar 2012 Posts: 15
  
  | 
		  
		    
			  
				I know, but do not understand why (cacheNode) does not process the file with the information mensaje.xml.
 
Thank you very much for the reply. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Thu Mar 29, 2012 4:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| fpg8 wrote: | 
   
  
	I know, but do not understand why (cacheNode) does not process the file with the information mensaje.xml.
 
Thank you very much for the reply. | 
   
 
 
 
Contact the maintainer of the supportPac.
 
 
Tony will be very nice and helpful.
 
 
If he is not, please respond here. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fpg8 | 
		  
		    
			  
				 Posted: Thu Mar 29, 2012 4:59 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 26 Mar 2012 Posts: 15
  
  | 
		  
		    
			  
				Intente buscar su dirección de email, pero no tuve suerte.
 
 
Muchas gracias. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tfhays | 
		  
		    
			  
				 Posted: Thu Mar 29, 2012 5:12 am    Post subject: IA91 Properties file format | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 18 Jan 2006 Posts: 8
  
  | 
		  
		    
			  
				Hi, I'm the author of IA91.
 
 
The problem is the file format you're trying to read from.
 
 
The format is the same as a Java properties file, which in XML looks like this for your data:
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
 
<properties>
 
<comment>Java properties for IA91</comment>
 
<entry key="test">valores</entry>
 
</properties>
 
 
This format is set by Java, not by me.
 
 
Regards, T. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fpg8 | 
		  
		    
			  
				 Posted: Thu Mar 29, 2012 5:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 26 Mar 2012 Posts: 15
  
  | 
		  
		    
			  
				Tony, first of all, thank you very much for the reply.
 
 
Fails to work with the xml file. As would be the configuration with a flat file?
 
How do I set the node cacheGet then.
 
 
tks.
 
Federico. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vgm27 | 
		  
		    
			  
				 Posted: Mon May 21, 2012 9:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 21 May 2012 Posts: 2
  
  | 
		  
		    
			  
				Hi Federico,
 
 
Any luck with this, i am getting the same ArrayIndexOutOfBoundsException with the xml property file..
 
 
thx, vgm | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Mon May 21, 2012 6:14 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				Looks to me like Tony said it all... your input file has an invalid format:
 
   
	| Quote: | 
   
  
	<go>
 
<key>test</key>
 
<data>valores</data>
 
</go> | 
   
 
 
Should, if I understood correctly, look more like this:
 
   
	| Code: | 
   
  
	<go>
 
  <entry key="test">valores</entry>
 
</go> | 
   
 
 
and please note the quotes around test...
 
 
Have fun   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vgm27 | 
		  
		    
			  
				 Posted: Tue May 22, 2012 5:56 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 21 May 2012 Posts: 2
  
  | 
		  
		    
			  
				The issue is when the cache is being initialized i.e reading the property file, even before a test xml is sent to get from cache, tried it for both cacheConfig and namedCacheConfig. same results.
 
 
 
   
	| Code: | 
   
  
	
 
2012-05-22 09:41:52.805 D2    RecacheTask  run           { Recache: started for NamedCacheConfig
 
2012-05-22 09:41:52.805 D2    NamedCacheCo recache         { 
 
2012-05-22 09:41:52.805 D2    Publisher                      ] getInstance
 
2012-05-22 09:41:52.805 D2    Publisher    isUsingV7         ] false
 
2012-05-22 09:41:52.805 D2    Publisher                      ] getInstance
 
2012-05-22 09:41:52.805 D2    Publisher                      ] getHost host=127.0.0.1
 
2012-05-22 09:41:52.805 D2    Publisher                      ] getInstance
 
2012-05-22 09:41:52.805 D2    Publisher                      ] getPort port=1506
 
2012-05-22 09:41:52.805 D2    NamedCacheCo recache           | forEvaluate=false, isForRetry=true
 
2012-05-22 09:41:52.805 D2    NamedCacheCo recache           | doRecache =true
 
2012-05-22 09:41:52.805 D2    InitCacheSam initCache         ] pub?=false, driver=COM.ibm.db2.jdbc.app.DB2Driver, url=file:///home/myhome/cacheInput.xml, userid=, passwd=, table=, key=, data=, name=profile
 
2012-05-22 09:41:52.805 D2    InitCacheSam initCacheProp     { pub?=false, url=file:///home/myhome/cacheInput.xml, name=profile
 
2012-05-22 09:41:52.805 D2    InitCacheSam initCacheProp       | java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
 
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
 
   at com.goakes.Cache.InitCacheSample.initCacheProperties(InitCacheSample.java:340)
 
   at com.goakes.Cache.InitCacheSample.initCache(InitCacheSample.java:219)
 
   at com.goakes.CacheNode.CacheConfigNode.recache(CacheConfigNode.java:274)
 
   at com.goakes.CacheNode.RecacheTask.run(RecacheTask.java:42)
 
   at java.util.Timer$TimerImpl.run(Timer.java:291)
 
Class path is: /opt/ibm/mqsi/7.0/classes/bipbroker.jar:/opt/ibm/mqsi/7.0/classes/bootstrap.jar:
 
2012-05-22 09:41:52.806 D2    InitCacheSam initCacheProp     } 
 
2012-05-22 09:41:52.806 D2    NamedCacheCo recache           | scheduling a retry task
 
2012-05-22 09:41:52.806 D2    RecacheTask  RecacheThread     { Constructor
 
2012-05-22 09:41:52.806 D2    RecacheTask  RecacheThread     } 
 
2012-05-22 09:41:52.806 D2    NamedCacheCo recache         } 
 
2012-05-22 09:41:52.806 D2    RecacheTask  run           } Recache: ending for NamedCacheConfig
 
 | 
   
 
 
 
here is the contents of the property file (cacheInput.xml)
 
 
   
	| Code: | 
   
  
	
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
 
<properties>
 
   <comment>Java properties for IA91</comment>
 
   <entry key="myKey1">myData1</entry>
 
   <entry key="myKey2">myData2</entry>
 
   <entry key="myKey3">myData3</entry>
 
</properties> 
 
 | 
   
 
 
 
for the request xml tried both formats.
 
   
	| Code: | 
   
  
	
 
<go>
 
  <entry key="myKey1">getdata</entry>
 
</go>
 
 | 
   
 
 
 
   
	| Code: | 
   
  
	
 
<go>
 
<key>myKey1</key>
 
<data>getdata</data>
 
</go>
 
 | 
   
 
 
 
May be I am still missing something not sure, anyways I moved on to use a db, which seem to work fine, was rather curious to see it work for property file.
 
 
Thanks for the reply.. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |