apache shiro 404 and 500

in java web application you can easily set 400 and 500 error pages via web.xml like this

this means when someone clicks on a url which is 404 or 500 server will show them the pages you got in your app. this is better then showing them default server error pages. you can see good 404 examples from here

anyway while I was developing a web application with apache shiro I could not show my 404 or 500 pages and it was throwing a no securitymanager at this thread exceptions. after I research on this I find out that the example of shiro is not enough. because there was just a filter and it points /*. I tought that was enough but its not. you should change your apache shiro filter map like this.

after this change on web xml I finally got my error pages from my application..

varnish performance problems

I was reading a forum post at linked in. and I saw someone having some performance issues at low level server. and I have one server too 4gb ram and 8 core cpu. anyway this is how he solved that problem .connect_timeout = 500s; .first_byte_timeout = 500s; .between_bytes_timeout = 500s; echo ‘fs.file-max=1000000’ >> /etc/sysctl.conf echo ‘net.ipv4.ip_local_port_range = 1024 65535’ >> /etc/sysctl.conf echo ‘* soft nofile 1000000’ >> /etc/security/limits.conf echo ‘* hard nofile 1000000’ >> /etc/security/limits.confecho ‘session required pam_limits.so’ >> /etc/pam.d/loginulimit -n 1000000 and another suggestion was DAEMON_OPTS=”-a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -p thread_pools=8 -p thread_pool_max=2500 -p thread_pool_min=200 -p thread_pool_add_delay=2 -p listen_depth=2048 -p session_linger=100 -p connect_timeout=600 -s malloc,4G” just a personal note if I have any performance problem at varnishd.

oracle coherence and clustering

I have been configuring this oracle coherence more then 2 weeks. and I must say its been a pleasure. I love clustered things. they mostly does not work and hard to figure out. but oracle coherence is not that complicated.

one thing. in our production environment I could not use multi casters and convert configuration to unicast stuff. its a p2p based tcmp network and solid work. I can say oracle coherence is something like memcached. and its easy to figure out. because it can run under tomcat and deployed to weblogic servers with our application.

while production tests I saw that if you change any simple detail in tangosol-coherence-override.xml I need to restart weblogic instances. because when coherence started it could not change its configuration on the fly. I think if we used coherence jar out of our war it would be more flexible. but our cache system does not need to configured every one day or so. so we keep those xmls(tangosol-coherence-override.xml,coherence-cache-config.xml) inside our war.

another thing. if I add well-known-addresses to tangosol xml it trys to connect while starting the war. and if there is no localhost coherence does not look for it. so I need to change tangosol like this.


this configuration looks for localhost and runs well in redhat enterprise linux. coherence version:3.7.1.0

akşam akşam hataya gel

Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can’t find
referenced pointcut

li bir exception alınıyor springin aop sinden beri patlıo. ulan altına bakıom üstüne bakıom yok. tomcati ipv4 ile çalıştırıom bind adresi olarak 127 li veriom yemio. derken derken buldum meğer makineye java 1.7 kurulmuş.

http://issues.opennms.org/browse/NMS-4350

burdada şikayetler listelenmiş. sonuçda 1.7 kapsar 1.6 olması gerekmezmiydi. neyse 1.6 kurduk geçti ama nedir bizim çilemiz 🙂 güle güle 1 saat.

axis log4j

log4j ile axis gelen gidenleri görmenin en uygun yolu log4j.xml

buyrun örnek configürasyon:

mecidiyeköy şampiyon kokoreç

verdiğim siparişde ayvalık tostu vardı siz sucuklu kaşarlı tost yollamışsınız. allahtan etrafta başka eve servis tuzlama bulamıom yoksa töbe sizden bişe istemezdim 🙂 neyse tuzlama yine iyiydi çok seviom sirke sarımsak limon sakatataı ya.

tuzlama dışında hiçbişey alınmicak dükkan mecidiyeköy şampiyon kokoreç bilgilerinize sunarım.

burger kinge bu sıralar neler oluyor

şu anda maltepedeyim saat 8 de yakalamayı planladığım bir servis vardı. saat 7 de verdiğimiz sipariş tam 8 e beş kala geldi ve ben servisi kaçırdım.

 sonuç: burgerlerin güzel olsada servisiniz gerçekten rezalet. bu durumun aynısı şişli tarafındada oluyor. 1 saat 15 dk sonra gelen burgerleri almamak durumunda kalıyorum. sebep buza kesmiş olmaları. çok gıcık durum.

paranla rezil olmak bu =)