My Quotes


When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY






Wednesday, October 10, 2012

EhCache and Hibernate issue

Session factory issue in setting up hibernate distributed ehcache with terracotta.

If you want the cache (or the caches) to be available from different JVMs you will need Terracotta; ehCache alone cannot do that. 

EhCache is not a distributed solution. So you need to use it with Terracotta to obtain the result you want. 

You can use Hazelcast, but also Infinispan to obtain this result



a.      Add the following jar files
<dependency>
  <groupId>net.sf.ehcache</groupId>
  <artifactId>ehcache-core-ee</artifactId>
  <version>2.5.2</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>net.sf.ehcache</groupId>
  <artifactId>ehcache-terracotta-ee</artifactId>
  <version>2.5.2</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.terracotta</groupId>
  <artifactId>terracotta-toolkit-1.5-runtime-ee</artifactId>
  <version>4.2.0</version>
  <scope>compile</scope>
</dependency>

Tuesday, October 2, 2012

Tomcat locks Drools jar files

I was deploying my application with Tomcat and Drools 5. But most of the time, it seems that Tomcat locks the Drools jar files.

I was trying to unlock it but every time I had to do a complete Tomcat shut down wait for 5-10 mins and bring it up.

I was searching for an appropriate answer but the closest one was the one from the threads in Stack Overflow.

It solved my problem immediately.

"Try using antiResourceLocking='true' in your$tomcat_home/conf/context.xml. This should at least help to release the locks"

Hopefully some one gets this benefit from my forum.

Thursday, September 13, 2012

there is no wsdl-file element for webservice-deployment descriptor number

When I deployed a web services developed using RAD 7 using JAX-WS into websphere environment , I get the following error message


Additional Return Codes: com.ibm.ws.scripting.ScriptingException: com.ibm.websphere.management.ap  
plication.client.AppDeploymentException: com.ibm.websphere.management.application.client.AppDeploymentException: ADMA0093E: An unexp
ected exception occurred while completing task GetServerName. Check the server machine First Failure Data Capture tool (FFDC) for mo
re information. [Root exception is com.ibm.websphere.management.application.client.AppDeploymentException: WSWS0021E: In the Web ser
vices Deployment Descriptor for module "ALSWebService.war,WEB-INF/web.xml", there is no wsdl-file element for webservice-deployment
descriptor number 0.]
com.ibm.websphere.management.application.client.AppDeploymentException: com.ibm.websphere.management.application.client.AppDeploymen
tException: WSWS0021E: In the Web services Deployment Descriptor for module "ALSWebService.war,WEB-INF/web.xml", there is no wsdl-fi
le element for webservice-deployment descriptor number 0.

I searched for multiple forums and they keep saying that I need to fix my deployment descriptor, but none told me how.

Even though my web.xml had the tag <wsdl-file>

I figured it myself. Hope this helps some one

1) Open the webservices.xml in webservice editor
2) Go to the Design View
3) Go to the "Web Service Overview" 
4) Expand Web Services --> WebService Description 
5) On the Right Hand side you will see Web Service Description Implementation Details
6) Besides the "WSDL File" you will see a BROWSE window.
7) Select the WSDL file from your workspace and save this file.
8) On to the Source view you should see  the tag 
    <wsdl-file> added as below

<webservice-description>
<webservice-description-name>XXX</webservice-description-name>
<wsdl-file>WEB-INF/wsdl/myappWSDL.wsdl</wsdl-file>


Save this file and now if you deploy this EAR into websphere, it will go thru seamlessly.

Hope this helps some one.

Friday, September 7, 2012

Force Axis2 as web service runtime in eclipse



  1. Put your WSDL file somewhere in your project. 
  2. I created a wsdl folder and put it there. 
  3. Once that is done, right click on the project and select New > Other > Web Service. 
  4. In the next dialog box, choose "Top down Java bean web service" from the first menu, then browse to your WSDL file. 
  5. I then hit next a few times, and got the following error.  
  6. IWAB0489E Error when deploying Web service to Axis runtime   axis-admin failed with  http://schemas.xmlsoap.org/soap/envelope/}Client The service cannot be found for the endpoint reference (EPR) http://localhost:8080/... and so on

To fix this, I had to change the server runtime to Axis2 (Eclipse should warn you about this when you add the Axis2 facet, but it doesn't). Do this by going to the Window menu, select Preferences > Web Services > Server and Runtime. Choose your server (Tomcat 5.5 in my case), then select Apache Axis2 as the web service runtime


URISyntaxException at index 18 of WSDL

Boy I had to suffer a lot. Figured that Eclispe behaves differently when the path of the WSDL your are loading has SPACES.

So virtually had to move the WSDL file to a location without SPACES.

Then Do File --> New --> Other --> Web Service and then it worked like CHARM

Disable WS-I validation in WSDL and Eclipse

Whenever I imported a WSDL file into eclipse and try to generate the web services out of it, I get the following WARNINGS in eclipse WSDL editor.

wsdl:types element contained a data type definition that is not an XML schema definition

The errors you're seeing are Web Service Interoperability (WS-I) 
compliance errors. Your WSDL document is valid. You can disable WS-I 
validation under Window->Preferences->Web Services->Profile Compliance and 
Validation. Set both WS-I AP and WS-I SSBP to Ignore compliance.

Thursday, April 19, 2012

Create SSL cert in Websphere 7


Click on the Serveres --> Server Types --> Web Servers--> <<your web server name>>
Get the *Conf File Name

Edit this file and add the following at the end of the file

LoadModule ibm_ssl_module modules/mod_ibm_ssl.so

<IfModule mod_ibm_ssl.c>
  Listen *:8080 (This is the port number that is opened for SSL. Check with your sys admin)
  <VirtualHost *:8080>
    SSLEnable
    SSLClientAuth None
    DocumentRoot "/app/IHSv7/htdocs"
    ServerName localhost:8080
    ServerAdmin root@localhost
    ErrorLog /apps/WasApps/<<myapp>>/logs/ssl_error.log
    TransferLog /apps/WasApps/<<myapp>>/logs/ssl_access.log
    KeyFile "/apps/WasApps/<<myapp>>/<<myappCerts>>/myapp_key.kdb"
    <Directory /app/IHSv7/htdocs/en_US>
        SSLVersion SSLV3
    </Directory>
    SSLClientAuth   0
    SSLCipherSpec 3A
    SSLCipherSpec 35b
    SSLCipherSpec 2F
  </VirtualHost>
</IfModule>