Posted by Albin Joseph | Posted in Apache | Posted on 08-12-2008
Tagged Under : Apache
Command to find out apache version
A small tip – how to find the version of apache web server? To find the version of Apache web server use -v switch ie,
/usr/local/apache/bin/httpd -v
Where /usr/local/apache/bin/ is your apache installation directory.
Posted by Albin Joseph | Posted in Tomcat | Posted on 29-11-2008
Today I was trying to deploy a web application to Tomcat server. Publishing went smoothly with no errors. So I thought everything will work fine. But when I tried to access the application, page was not coming. On further study of the log files I could see a warning message in Tomcat console. The error message was
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AppName' did not find a matching property.
The solution to this problem is very simple. Double click on your tomcat server. It will open the server configuration. Under server options check ‘Publish module contents to separate XML files’ checkbox. Restart your server. This time your page will come without any issues.

Posted by Albin Joseph | Posted in WebSphere Commerce | Posted on 19-11-2008
Creating a new Key in WCS
In WebSphere Commerce, tables that need a unique primary key, the keys are not auto generated. They are coming from the KEYS table. The WCS table KEYS defines the range of key values for all tables that require a unique key. So always new key generated will be using values of KEYS table.
Any time if you need this value programmatically, you can get it using ECKeyManager class. So the code for getting the next keys table for a table is
com.ibm.commerce.key.ECKeyManager keyMgr = com.ibm.commerce.key.ECKeyManager.singleton();
Long key = keyMgr.getNextKey("tablename");
Where tablename is your table’s name. Table name is case sensitive. If your primary key is defined as long data type use getNextKeyAsLong instead of getNextKey method.
In order to work the above code, we need to have an entry in the KEYS table.
Posted by Albin Joseph | Posted in GlassFish | Posted on 13-11-2008
Yesterday I was trying to integrate GlassFish Application server with Apache in a Linux box. I was following my Integrating Apache with GlassFish tutorial which I tried in my local windows box. When I restarted my Apache web server, the server was throwing some error message and mod_jk did not work. This time the error was
/usr/sbin/apachectl restart: configuration broken, ignoring restart
/usr/sbin/apachectl restart: (run 'apachectl configtest' for details)
[root@www mod_jk]# apachectl configtest
Syntax error on line 735 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/mod_jk.so into server: /etc/httpd/modules/mod_jk.so: undefined symbol: apr_sockaddr_ip_get
This time the problem was the version of mod_jk and Apache server. My local box’s Apache version was 2 and Linux box apache version was 1.3 and I was using the same mod_jk which is compiled for Apache 2. Yeah that was the problem. I was using a mod_jk which was compiled for a different version of Apache server. So anytime if you are getting the same error check your mod_jk version and Apache web server version.
Yesterday one of my readers ping me in Google talk and said that he is facing some issues in WebSphere Integration Developer. He was getting an exception while trying to call a WID web service from a web application. The exception was
com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Bean)ejb/com/ibm/events/bus/EventBus createEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent):3 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: eventAdministrator eventCreator catalogAdministrator
at com.ibm.ws.monitoring.core.EventPointImpl$1.run(EventPointImpl.java:388)
at java.security.AccessController.doPrivileged(AccessController.java:197)
at com.ibm.ws.monitoring.core.EventPointImpl.fire(EventPointImpl.java:386)
at com.ibm.bpe.monitor.EventEvaluationResult.fireEvent(EventEvaluationResult.java:148)
at com.ibm.bpe.engine.observer.ProcessInstanceEventTypeHandler.processBPELEvent(ProcessInstanceEventTypeHandler.java:240)
at com.ibm.bpe.engine.observer.CEMSOPContextRestored.processInstanceEvent(CEMSOPContextRestored.java:188)
at com.ibm.bpe.engine.observer.BpelStateObserverContextImpl.restoreContextAndFireProcessInstanceEvent(BpelStateObserverContextImpl.java:1024)
at com.ibm.bpe.engine.observer.CEMStateObserverPlugin.processInstanceEvent(CEMStateObserverPlugin.java:212)
at com.ibm.bpe.engine.observer.BpelStateObserver.observe(BpelStateObserver.java:989)
... 71 more
Caused by: com.ibm.ws.monitoring.core.CEIEmitRuntimeException: com.ibm.events.emitter.SendFailureException: CEIEM0025E The emitter failed to send the events to the event server. The local event bus enterprise bean on the event server failed during event processing.
This is because the user is not authenticated and hence he does not have any required roles to invoke the specified service. To resolve this exception either authenticates your user who is trying to call the web service or logon to admin console and make the following changes.
Click on Service Integration from Left hand side menu of admin console. Click on Common Event Infrastructure -> Event service -> Map security roles to users or groups and select the ‘Everyone’ checkbox for all the required roles. Save the changes and restart your server. You are done.