Tuesday, October 30, 2012

The server does not support version 3.0 of the J2EE Web module specification - Eclipse

The server does not support version 3.0 of the J2EE Web module specification -  Eclipse

Sometimes we used to receive the following exception when running the web application in latest eclipse version.

The server does not support version 3.0 of the J2EE Web module specification.

The issue is when creating the web project in latest eclipse by default the web version  will be selected as 3.0 but the server what we are having is not supporting the web 3.0.

There is two options to fix this issue.

1. Upgrade your server to latest version
2.Open org.eclipse.wst.common.project.facet.core.xml file from /workspace/<Your project name>/.settings and change jst.web version to 2.5 instead 3.0

<installed facet="jst.web" version="2.5"/>





Monday, October 29, 2012

Oracle SOA Suite Composite Deployment - Global Type declaration/definition of name *are duplicated - Part1


Oracle SOA Suite Composite Deployment - Global Type declaration/definition of name *are duplicated - Part1

Sometimes we used to get the below error message while deploying the composites to theOracle SOA Suite  server.

oracle.fabric.common.wsdl.XSDException: Global element declaration/definition of name '{http://xmlns.oracle.com/GlobalDeclaration/employee}Employee' are duplicated at the following locations:

http://localhost:8000/soa-infra/services/default/EmployeeServer/employeeserver_client_ep?XSD=xsd/EmployeeServer.xsd [line#: 4]
http://localhost:8000/soa-infra/services/default/EmployeeServer/xsd/EmployeeServer.xsd [line#: 3]
file:/reuters/shared/11g/software/soa_deploy/code/Utilities/EmployeeClient/xsd/EmployeeClient.xsd [line#: 6]
There are at least two of them looking different:
http://localhost:8000/soa-infra/services/default/EmployeeServer/employeeserver_client_ep?XSD=xsd/EmployeeServer.xsd [difference starting at line#:7]
file:/reuters/shared/11g/software/soa_deploy/code/Utilities/EmployeeClient/xsd/EmployeeClient.xsd [difference starting at line#:9]

The exception states the definition of the element Employee with the names spaces “http://xmlns.oracle.com/GlobalDeclaration/employee” differs in the following location.


file:/code/Utilities/EmployeeClient/xsd/EmployeeClient.xsd

I am having two composites EmployeeClient and EmployeeServer, EmployeeClient invokes EmployeeServer via parnerlink, EmployeeClient and EmployeeServer composites are defined with the following xsd’s

EmployeeClient/EmployeeClient.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
                elementFormDefault="qualified"
                targetNamespace="http://xmlns.oracle.com/GlobalDeclaration/employee"
                xmlns="http://www.w3.org/2001/XMLSchema">
                <element name="Employee">
                                 <complexType>
                                                 <sequence>
                                                                 <element name="empid" type="string"/>
                                                 </sequence>
                                 </complexType>
                </element>               
</schema>

EmployeeServer/EmployeeServer.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
                elementFormDefault="qualified"
                targetNamespace="http://xmlns.oracle.com/GlobalDeclaration/employee"
                xmlns="http://www.w3.org/2001/XMLSchema">
                <element name="Employee">
                                 <complexType>
                                                 <sequence>
                                                                 <element name="empid" type="string"/>
                                <element name="empname" type="string"/>
                                <element name="contactno" type="string"/>
                                <element name="state" type="string"/>
                                                 </sequence>
                                 </complexType>
                </element>
               
</schema>



Thursday, October 25, 2012

Auto Submitting the HTML page on load

Auto Submitting the HTML page on load - Auto Submitting the HTML page on load:


<html>
<head>
<script>
window.onload = function()
{
 document.login.submit();
}
</script>
</head>
<body>
<FORM name="login" action="http://localhost:7001/analytics/saw.dll?bieehome" method="post">
    <INPUT type="hidden" name="nQUser" value="weblogic">
    <INPUT type="hidden" name="nQPassword" value="weblogic123">
   </FORM>
 </FRAMESET>
 </body>
</html>


Wednesday, October 24, 2012

ResourceLimitException : No resources currently available in pool to allocate to applications – Oracle SOA 11g

ResourceLimitException : No resources currently available in pool to allocate to applications – Oracle SOA 11g

You could have observed the below exception frequently in the weblogic server log file, weblogic server throws the below exception when there is not enough database connections in the pool to serve the incoming requests reporting increasing the connection pool count. This will affect the overall system  performance

java.sql.SQLException: Internal error: Cannot obtain XAConnection weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool SOADataSource to allocate to applications, please increase the size of the pool and retry..
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:577)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:342)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:329)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:417)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:324)


The above exception is due to there is not enough connections available in the pool to service the requests.

To identify which datasource / connection pool requires more connection do the following.

  • Go to Weblogic Admin console
  • Go to Environment -> Servers
  • Select the server on which the connection pool needs to be monitored
  • Go to Monitoring -> JDBC
  • Customize the table to add the below two properties
This page will list all the datasources/ connection pools targeted to that particular server and how many connections are waiting to get the connection. If more number of connections are waiting, that is not a good which will cause performance impact and also cause stuck threads on the server if the wait time is going to be beyond the thread stuck time (By default it's 10 mins).

(This screen shot taken by reducing the max capacity to 5 for blogging purpose, unfortunately I did not captured the actual screen shot)


Monday, October 15, 2012

Getting the SOAP Envelope of the request/response messages in Oracle SOA Suite


Getting the SOAP Envelope of the request/response messages in Oracle SOA Suite

This post will explain how to Get the SOAP Envelope of the request/response messages in Oracle SOA Suite 11g or Oracle SOA Suite 12c(screen will be little different in Oracle SOA Suite 12c )

The bpelx:inputHeaderVariable and bpelx:outputHeaderVariable attributes in invoke/receive activity will help us to add or retrieve the custom SOAP headers to SOAP message in oracle SOA.

If you want to see the whole SOAP message (header & body) it’s not possible out-of-the-box on the EM Console or in the logs.

 Steps to capture complete SOAP conversations for a SOA composite service

  • Open the Composite.xml
  • Attach the management policy named oracle/log_policy to the webservice reference to which the SOAP headers needs to be monitored.