Showing posts with label JDeveloper 11g. Show all posts
Showing posts with label JDeveloper 11g. Show all posts

Saturday, March 1, 2014

JDeveloper Deployment to SSL Configured WebLogic (SSL Handshake Failure)

If you have configured SSL keystore on your WebLogic application server, you might face SSL Handshake error while trying to deploy any application from Oracle JDeveloper.

To overcome this issue, download the SSL certificate and import it to your JDeveloper java keystore.

1. Open your browser and establish an SSL connection to your server. For eg., https://hostname:port/console

2. Click on the green padlock sign -> Connection tab and click on Certificate Information

3. In the Certificate dialog, click on "Copy to File.."

4. In the resulting "Certificate Export Wizard", choose Next


5. Leave the default selection (DER encoded binary X.509) and click Next

6. Provide a filename where the certificate file will be exported and saved

Import certificate into the Java keystore: [Ensure that this is the java that JDeveloper points at]

1. Open command prompt, go to <Java_Home>\jre\bin

2. Issue the following command to import the server SSL certificate to java keystore for successful handshake;

keytool -import -v -file C:\Temp\root.cer -keypass password -keystore C:\Java\jdk6u33\jre\lib\security\cacerts -alias mykey

3. When prompted, provide the keystore password [Default password is changeit]

Voila, now you are all set to deploy applications from JDeveloper !!

Wednesday, April 24, 2013

JDeveloper SOA Deployment Error: Unable to find a WSDL that has a definition for service

This is one of the strange errors that I encountered recently. While trying to deploy a SOA project, JDeveloper reported the following error;


Received HTTP response from the server, response code=500
Error deploying archive sca_CreditCardProcess_rev1.0.jar to partition "default" on server soa_server1 [http://bpmsrv.example.com:8001] 
HTTP error code returned [500]
Error message from server:
There was an error deploying the composite on soa_server1: Deployment Failed: Unable to find a WSDL that has a definition for service {http://xmlns.oracle.com/bpmn/bpmnProcess/CreditCardProcess}CreditCardProcess.service and port CreditCardProcessPort.  Please make sure that the port attribute for the binding defined in the composite file is correct by checking the namespace, service name, and port name.  In addition, check that the WSDL associated with the binding namespace is imported and currently reachable (check the import nodes at the top of the composite file). Finally, validate the HTTP proxy settings for the server..

Check server log for more details.
Error deploying archive sca_CreditCardProcess_rev1.0.jar to partition "default" on server soa_server1 [http://bpmsrv.example.com:8001] 
####  Deployment incomplete.  ####

The error reported in JDeveloper is very misleading and it took me significant amount of time & effort to figure out the actual root cause. This was particularly strange in my case because the code was deployed multiple times successfully without errors in my dev environment.

Root Cause:

On closer observation into the soa server logs, I noted that a webservice reference was not "reachable" by the SOA composite and hence this error. This had nothing to do with the "exposed" service, its port or definitions whatsoever.

Fix:

In my case, the referenced webservice's hostname mapping was missing in my "new" environment because of which the SOA composite was unable to find the WSDL during deployment. It is fair for JDeveloper not to complain because it usually runs on client machine/laptop where the hostname mappings might exist. The deployment error is thrown at the server side and hence the key is to analyze the SOA server logs to figure the actual issue for a fix.

Hope this will help users with similar issues.

Saturday, November 3, 2012

SOA 11g MDS - Share Common Artifacts

As promised on my previous post, I am detailing the step-by-step instructions which allows for sharing of common artifacts (schema files/WSDLs) among SOA projects and more importantly helps in loose coupling of service bindings & remove service dependencies.

A typical use case is where the abstract WSDL definition of an external service can be stored in MDS and referenced from the SOA composite which will loosely couple the services and also guard against 'SOA Composite Invalidation' issues.

SOA 11g provides us with MDS repository (both file based & DB based) where common artifacts can be stored and referenced by all projects in the SOA infrastructure.

File based MDS is used during design/deploy time where as DB based MDS is used at run-time by the SOA infra. A configuration file named adf-config.xml that is part of every SOA project manages this partition mapping to be used by JDeveloper during design/deploy time.


All SOA projects that are deployed on the SOA infrastructure are stored in the MDS repository. If you create a connection from the JDeveloper 'Resource Palette' to the SOA MDS, there will be a 'deployed composites' folder which will contain all deployed artifacts.

Connection Information for the MDS connection:
username: XXX_MDS (usually DEV_MDS)
password: xxxxxxxxx
MDS Partition: soa-infra


The file based MDS repository is generally the 'seed' partition under a typical JDeveloper install;

<JDev_Home>\integration\seed


Under this partition there is a root folder (soa) available by default which contains all the configuration files, schemas & WSDLs required by various different SOA components during design time. These files are also pre-deployed on the database MDS repository.

We are now free to create custom folders under the 'seed' partition to hold artifacts that are common references in a SOA environment. Generally, we create an 'apps' folder under the 'seed' partition which in turn holds various folders to hold various artifact types;
 Once the artifacts that needs to be shared/referenced are placed under the appropriate namespace (in this case 'apps'), we can let the SOA project in JDeveloper to point to MDS for these artifacts from a common location.

adf-config.xml configuration:


As noted earlier, adf-config.xml is an important configuration file which holds the details regarding the MDS (both file based & DB based). By default, this file declares the 'seed' partition & the metadata store for 'soa' namespace.

This file can be found under <YourApplication>\.adf\META-INF.
Alternatively, in JDeveloper, expand the 'Application Resources' panel; drill through Descriptors -> ADF META-INF to find this file


Step 1: Just add the metadata store namespace for '/apps' in additions to default '/soa/shared' namespace - This is to let the JDeveloper reference the artifacts under the '/apps' during the design time from the file system metadata store.

<adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
      <persistence-config>
        <metadata-namespaces>
          <namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/>
          <namespace path="/apps" metadata-store-usage="mstore-usage_1"/>
        </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_1">
            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
              <property name="metadata-path"
                        value="${oracle.home}/integration"/>
              <property name="partition-name" value="seed"/>
            </metadata-store>
          </metadata-store-usage>
        </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config> 


Step 2: In the SOA composite, reference the common artifacts from MDS as shown below;

 <import namespace="http://xmlns.oracle.com/bpmn/bpmnProcess/CreditCardProcess"
          location="oramds:/apps/orderprocess/common/CreditServiceProcess.wsdl"
          importType="wsdl"/>



Now that we have successfully referenced the SOA project to refer the file based MDS it is barely enough only during design time. For deploy time & run time, these artifacts must be made available in the DB based MDS.

There are two methods available for us to deploy the artifacts in SOA DB based MDS;

Approach 1: Ant based script which allows to deploy the artifacts into SOA MDS. I am not going to get to the details of this as this has been blogged in detail by Edwin Biemond; Reference below;

http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html

Approach 2: For a simple JDeveloper based SOA deployment follow the steps below;

Step 1: Create a new application (Generic Application)

Step 2: Name the application (eg., OrderProcessMDSApp) and click 'Next'
 Step 3: Provide a name to the project (eg., OrderProcessMDSProj) and click 'Finish'

 Step 4: Now, right click on the OrderProcessMDSProj and choose 'Project Properties'. In the 'Project Properties' dialog, choose 'Deployment' and create a new deployment profile by clicking on 'New...' button

 Step 5: In the 'Create Deployment Profile' dialog, leave the default 'Archive Type' to 'JAR File' and name the deployment profile (eg., soamdsarchive) and click 'OK'

 Step 6: This will open up the 'Edit JAR Deployment Profile Properties' dialog. Click on the 'Contributors' section under 'File Groups -> Project Output'.
Step 7: Click on the 'Add..' button and choose the folder where the 'content to be deployed' is present. Here the '/apps' namespace under the file based MDS can be chosen where the content is already placed & available.
Step 8: Now, click on the 'Filters' section and choose the artifacts under the '/apps' that you would like to deploy or upload to MDS database repository
Step 9: Click on OK to complete the deployment profile creation process. Now, we have created a project JAR deployment profile which contains the artifacts to be deployed on to the SOA MDS. Now, we will have to create a application deployment profile of 'soa bundle' type which will be deployed to the soa-infra.

Step 10: From the 'Application Menu', choose 'Deploy' -> 'New Deployment Profile..' option
Step 11: Under the 'New Gallery' go to 'Deployment Profiles' choose 'SOA Bundle' and click OK
Step 11: Under the 'Create Deployment Profile', provide a name to the application deployment profile (eg., soabundle1) and click OK.
Step 12: In the 'SOA Bundle Deployment Profile Properties' go to 'Dependencies' and choose the JAR archive that we created earlier eg., soamdsarchive and click OK
Finally, deploy the application to the soa server. This will ensure that the artifacts under the '/apps' metadata namespace is deployed on to the SOA MDS database repository.
You can verify the same from the SOA MDS connection created under the 'Resource Palette'. This should now reflect the 'apps' folder at the same level as 'soa' metadata store.

Now, if you try to deploy the SOA project which references MDS you may hit a deployment error complaining that the resource referenced is not found. This is because the JDeveloper consults adf-config.xml configuration file during design & deploy time (refer back to the initial architecture diagram). Since there is no information about the DB based MDS in the adf-config the deployer complains.

To fix this, go back to the adf-config.xml file and add the DB metadata store information so that the deployer can read & locate the referenced resources from MDS.


<adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
      <persistence-config>
        <metadata-namespaces>
          <namespace path="/soa/shared" metadata-store-usage="mstore-usage_2"/>
          <namespace path="/apps" metadata-store-usage="mstore-usage_2"/>
        </metadata-namespaces>
        <metadata-store-usages>
          <metadata-store-usage id="mstore-usage_2">
            <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
              <property value="DEV_MDS" name="jdbc-userid"/>
              <property value="xxxxxxx" name="jdbc-password"/>
              <property value="jdbc:oracle:thin:@hostname:1521:orcl"
                        name="jdbc-url"/>
              <property value="soa-infra" name="partition-name"/>
            </metadata-store>
          </metadata-store-usage>
        </metadata-store-usages>
      </persistence-config>
    </mds-config>
  </adf-mds-config>

That completes our configuration and eventually this elaborate post. Now, the deployment will be smooth as we have referenced the DB MDS in the adf-config.xml file.

Hope this post helped you understand & implement the SOA MDS related activities. Let me know your feedback through comments.

Monday, September 10, 2012

Oracle ADF BI Integration

This blog post will guide through the process of embedding OBIEE analytics (reports/dashboards) on an ADF application. Also hoping that this resource will act as a reference material for future.

There are multiple ways in which we can achieve BI integration with ADF. The illustrated version on this post is one that I found very sophisticated.

The reasons for OBIEE integration could be manifold. The default DVT features available within ADF can be used to build reports however not as sophisticated as BI does. In such cases, it would be a great time-saver plus a great way to show analytics to the user on a jspx page.

In a more interesting use case, I have used this feature within a BPM process user task - where the reviewer/approver can see the BI analytics on the UI along with process parameters before taking an action.

Products/Versions:

JDeveloper/ADF: 11.1.1.6
OBIEE: 11.1.1.5

Step 1: Download the following JDev extensions

1
bi-adf_bundle
Provides the ability to browse the BI Catalog through the JDeveloper resource catalog and add BI objects to an ADF page.
2
bi-adf-taskflow-extension_bundle
Provides the ability to browse the BI Catalog through the WebCenter resource catalog and add BI objects to a webCenter page.
3
bi-soap-cn_bundle
Provides the ability to create a BI Soap Connection.
4
bi-vo_bundle
Provides the ability to create a View Object that can query Oracle BI using logical SQL.
5
oracle.webcenter.customization_bundle
Provides design time capabilities for the WebCenter Customization Framework.
6
oracle.webcenter.framework_bundle
Provides design time capabilities for the WebCenter Framework and Services.

Links for download:

http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/131167.xml
http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/156082.xml

I know it is a quite a list - but can't get away from this :)

Step 2: Install these extensions to your JDeveloper

Help -> Check for Updates... -> Choose "Install From Local File" option, select the extensions one-by-one and let JDeveloper install them. JDeveloper will prompt for restarts for every extension install.

Step 3: After installing all the BI extensions, under the "Application Resources" panel of the ADF application (where you want to integrate the OBIEE reports), right click on the "Connections" -> "New Connection" -> "BI Presentation Services..."

Step 4: Provide the OBIEE analytics environment information in the wizard and proceed to complete connection creation. If you have not enable 'impersonation' in BI, change this option to 'false' in the following screen. Ensure that the connection is successfully established to the BI server.
Step 5: Now, this connection should appear automatically in the "IDE Connections" panel under the "Resource Pallete". This can be used to browse through the BI analytics for available dashboards/reports.
Now that the BI presentation services is available, all that remains is integrating the available BI reports into the ADF page

Step 6: First step towards ensuring that the ADF project is BI technology enabled. To do this, right click on the ADF project -> Project Properties

Under "Technology Scope" option ensure that the "Business Intelligence ADF View Components" is selected.
Step 7: We are almost there! Browse through the BI presentation services catalog from under the "Resource Pallete", drag & drop the required reports on to the ADF page.

Common Impediments & Resolutions:

I1: Unable to drag & drop the reports to ADF page

Resolution: Initially I was not able to drag and drop the BI reports on to the ADF page successfully. I had to manually include the following element to my ADF page source to force ADF to recognize the BI reports;

<adfbi:content id="content1" value="#{bindings.biExecBinding1}"/>

After doing this the BI technology binding was enabled on my ADF project. Then I removed the element which I added manually.

I2: At runtime, OBIEE reports were not displayed. The following error was reported on the ADF page;

Unable to connect to the BI Presentation Server. Please ensure that it is running, configured properly, and that the connection details within this application are correct.Please check the log file for more details.

The server logs reported the following error;

Cannot lookup the connection, BI using fallbacks[[
oracle.bi.presentation.soap.connection.BISoapException: No credentials found for this connection - please check that your connection credentials were deployed properly.
at oracle.bi.presentation.soap.connection.impl.BaseBISoapConnection.setReference(BaseBISoapConnection.java:216)
at oracle.bi.presentation.soap.connection.impl.RTBISoapConnection.(RTBISoapConnection.java:58)
at oracle.bi.presentation.soap.connection.BISoapConnectionFactory.getObjectInstance(BISoapConnectionFactory.java:715)
at oracle.adf.share.jndi.ReferenceStoreHelper.getObjectForReference(ReferenceStoreHelper.java:295)

................................................................................................
................................................................................................
................................................................................................
................................................................................................
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Resolution: To resolve this error, ensure that the "Credentials" option is unchecked under the "Security Deployment Options" of the "Application Properties".
This config ensured that the credentials are not overwritten and are picked up from the cwallet.sso file under the EAR package. The issue was resolved and the BI reports were displayed on the ADF page as expected.

Write back if you have any thoughts/suggestions/clarifications :)

Tuesday, July 17, 2012

Refresh ADF table after a popup message/confirmation

In this blog post, I am demonstrating a way to refresh the contents of an ADF table after a certain action (any CRUD operation) especially when a confirmation popup or message has to be displayed.

Just creating an invokeAction on the binding to refresh the table works if there are no popups or message dialogs on button action. However, if you have a situation to refresh the table AND display the popup, you will just have to do an additional config. There could be other ways to solve this, but I found the following approach easy to work with.

The solution is to disable the 'cacheResults' property of the iterator to which the ADF table is bounded to and ensure that an "invokeAction" executable is created on the binding to refresh it (say prepareModel stage or renderModel stage for example). To do this,
  • Go to the page definition file and edit the source view
  • Find the iterator to which the ADF table is bounded with
  • Add the additional property cacheResults and set its value to false
<iterator Binds="AdminVO1" RangeSize="25" DataControl="AppModuleDataControl"
              id="AdminVO1Iterator" CacheResults="false"/>

Let us find out why this additional config is required? Why does the invokeAction which is set to re-execute on page render does not work when a popup/message is displayed?

By default, whenever an ADF table is created on a datacontrol it cache the results in memory in order to save on performance. Let us see what ADF documentation has to offer in this regard; (Highlighted portions that is of importance to this case)

When a data control modifies a collection, the data control must instantiate a new instance of the collection in order for the ADF Model layer to understand that it has been modified. In other words, although some action in the client may change the collection, that change will not be reflected in the UI unless a new instance of the collection is created. However, for performance reasons, accessor and method iterators cache their results set (by default, the cacheResults attribute on the iterator is set to true). This setting means that the iterator is refreshed and a new instance of the collection is created only when the page is first rendered. The iterator is not refreshed when the page is revisited, for example, if the page is refreshed using partial page rendering, or if the user navigates back to the page.

Since the popup/message dialog is displayed on action and the page refresh is interrupted midway, the refresh is not actually happening on just invokeAction and the table displays the cached results. However, if the iterator is set to not cache results, in a way we are forcing it to execute again for fetching the results when the page is rendered after the popup/message dialog display.

Thursday, July 12, 2012

ADF 11g WebService Data Control JBO-25080 and JBO-25058

I recently encountered a strange error while using a WebService Data Control on ADF. Since, I could not find any documentation or reference on this issue easily available on the web I thought of posting it here.

At runtime, the following error was logged in my console;

oracle.jbo.NoDefException: JBO-25080: Definition name: CancelRequest does not match the file in which it is loaded from: com.oracle.Requests.CancelRequest
at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:999)
at oracle.jbo.mom.DefinitionManager.loadParent(DefinitionManager.java:1228)
at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:933)
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:482)
at oracle.jbo.mom.DefinitionManager.findDefinitionObjectDontCheckName(DefinitionManager.java:433)
at oracle.adf.model.bean.DCBeanDataControl.findStructureDef(DCBeanDataControl.java:1884)
at oracle.adf.model.bean.DCBeanDataControl.getAttributeDefs(DCBeanDataControl.java:1936)
...........................................................
...........................................................

Supplementing to the above error the following error was also logged;

oracle.security.jazn.JAZNRuntimeException: JBO-25058: Definition RequestId of type Attribute not found in RequestId

Even on repeated analysis (including the case sensitivity), everything seemed fine and the error message did not make sense.

After lots of googling around, I stumbled upon an Oracle forum where it noted a critical ADF bug.

"The package name CANNOT be the same as the class name". This will sound like a very ridiculous bug but that's the way it is at least for now (I am seeing this error in JDev 11.1.1.6). Since my class name and the package name were both 'CancelRequest', ADF data control went weird and complained with the JBO errors JBO-25080 & JBO-25058.

This can happen with EJB data controls as well!

I had to resolve the error the hard way. Had to go back and change my Web Service to reflect a different name (different name for the root node and operation). Operation name will be the package name and the parameter root element name will be thei class name when the WebService data control is generated.

Although you can do very little in a production scenario to handle this bug, you can probably take a different approach beforehand like using a WS Proxy or a POJO data control instead of a WebService data control if you see that the package name and class names are identical.

Saturday, July 7, 2012

ADF 11g "Cannot convert -2 of type class java.lang.String to class oracle.jbo.domain.DBSequence"

Have you ever encountered the above error? The reason for this could be manifold. Go through the following list and hopefully should resolve it if everything is 'as expected'.

1. Check whether you have any validators on the ADF component

2. Check for any 'Converters' that might run

3. Remove the mandatory, maximumLenght properties of the ADF component and check if this resolves the issue

4. Finally, go to the source view of the Entity Object attribute which is modified to DBSequence and check if the columnType, Type, SQLType properties are fine which could cause the casting error. A valid attribute can be as shown below;

<Attribute
    Name="RequestId"
    ColumnName="EQUEST_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.DBSequence"
    ColumnType="NUMBER"
    TableName="REQUESTS"
    PrimaryKey="true"
    IsUpdateable="false"
    Domain="oracle.jbo.domain.DBSequence"
    RetrievedOnInsert="true">
    <DesignTime>
        <Attr Name="_DisplaySize" Value="39"/>
    </DesignTime>
</Attribute>
 
On a side note, more often than not, if the primary key is generated by a DBSequence using the trigger approach, it often shows a negative integer value in the element on the UI. Oncommit, the value gets replaced with the DB sequence. In many cases this might look ugly to show a negative number to the user. To overcome this, check for the "Default Value" property for the attribute in the entity object and remove it.
 
Usually, the DefaultValue property will have a value as "@0" which causes the VO to render a temporary negative integer value on the UI.

ADF DB Sequence - Using DB Trigger approach

In this post I am going to show another more sophisticated way to generate a unique number (generated by a database sequence) and display it on the ADF UI if needed. The advantage of this approach over the previous technique (using the View Object create() method) is that the DB sequence is not wasted - The sequence number gets generated only on commit.

Let us take an use-case and see how this can be achieved through a step-by-step illustration;

1. For this use-case assume the following database table; where REQUEST_ID is the primary key column for which we would insert value dynamically from a DB sequence through ADF
2. Now, create a Fusion Web Application (ADF) in JDeveloper - Provide a name for the ADF app and accept the defaults in the create wizard

3. Now, right click on the model project and choose 'New'. Choose the 'ADF Business Components' under the 'Business Tier' and select 'Business Components from Tables' option
 4. Choose the 'Requests' table as the entity object on the first screen and select the RequestsView entity as the 'Updatable View Object'. Accept defaults in the following screens to complete creation of the model layer business components

5. This will automatically create the data control for the Requests view object.

6. Let us now create a DB sequence which will provide values to be inserted into the REQUEST_ID column and a DB trigger on the REQUEST_ID column under the REQUESTS table. The idea of db trigger is to ensure that the sequence id gets generated whenever there is an insert request on the table. This way the sequence numbers are not lost even if the transaction is rolled back before commit.

If you are not familiar with DB sequence or DB trigger creation, don't worry. JDeveloper can help you to create these declaratively in no-time.

7. Go to the Database Navigator view -> Right click on the Sequences and create a sequence as shown below

8. Similarly, right click on the REQUESTS table and create a DB trigger as shown below. Enter the trigger name and choose the sequence name (created in step 7) and the column name (REQUEST_ID)
 
9. Now, go to the ADF model project -&gt; open the Requests entity object. Under the 'Attributes' section, edit the 'RequestId' attribute as shown below;

  • Change the type to DBSequence (oracle.jbo.domain.DBSequence) - If this is not showing up by default, you can browse & select this class
  • Updatable property - Never
  • Refrest After - Insert

10. Time to create the UI. Right click on the ViewController project and create a JSF page.

11. Let us now drag and drop the RequestsView1 data control from the 'Data Controls' panel on to the JSF page that we created as an ADF table component

12. Now, drag and drop the 'CreateInsert' operation on to the page as an ADF button

13. Similarly drag and drop the 'Commit' and 'Rollback' operations as ADF buttons as shown below



PS: Note that 'CreateInsert' operation is available under the 'RequestsView1' data control where as 'Commit' and 'Rollback' operations which are common across all VOs are available at the root level (AppModuleDataControl)

14. Now, let us run this page and observe the results. Click on the 'CreateInsert' button to create a new row. Enter values for RequestType and Description columns. Notice that the RequestId column is read only as modelled. This column will get a value once the commit button is hit. Behind the scenes, when commit button is pressed, a record is inserted into the REQUESTS table which will invoke the trigger to get a unique number from the DB sequence. After insert the ADF UI is refreshed partially to reflect the primary key value.

Hope this helps.

There are some tips & solutions here. Take a look.

Tuesday, June 5, 2012

JDeveloper 11g Cannot Establish App Server Connection

Very often I see people bump into this error and thought I should make some notes here which might help someone in need.

First of all, I would like to make some inferences from the JDeveloper documentation;

"By default, JDeveloper uses the proxy settings from the default browser on the same machine, adding localhost and 127.0.0.1 to the list of proxy exceptions. If you have problems making connections from JDeveloper, for example, connecting to an application server or a SOAP server that is on the same machine as JDeveloper, you may need to change the proxy server settings you use."

Pre-Requisite:
While trying to establish a connection to the App server from JDeveloper, ensure that the following settings are correct;

1. Weblogic Hostname : resolves to the actual IP address of the server
2. Port: 7001 (default admin server port) or as per your admin port configuration during install. Remember you should only use the admin server port of your WebLogic server here even if you have an architecture where you front end the app server with a HTTP server like OHS
3. Domain: Use the domain name that was created during the WLS configuration

Check 1: Check whether the proxy settings are disabled in JDeveloper. Go to Tools -> Preferences -> Web Browser & Proxy section and ensure that no HTTP proxy server is setup. If already configured, uncheck the check box and click OK

Check 2: Test whether the port 7001 on the WLS host is accessible from the machine where JDeveloper is installed. You can test this with a simple telnet command;

telnet hostname 7001

If this test doesn't succeed then there can be two possible reasons;

1. There can be a network firewall or firewall enabled on the server which blocks this admin port from being accessed from a client machine. If this is the case, then ask your network administrator to open the port. This can be done by adding the port to the ip6tables on the linux server or similar.

2. Do a netstat on the linux server where WebLogic is installed to find out whether the port is open and is available (LISTEN mode). Ensure that your admin server is running when you run this command

eg., netstat -apn | grep 7001

This will show up the ip addresses from which the host can accept requests. Some common causes that I have identified is that the /etc/hosts file contains the ip - hostname mapping as follows;

127.0.0.1          hostname1

When the WebLogic server starts up, it will start all services properly but a closer look at the netstat command reveals that the host accepts connections only from within the server (127.0.0.1). This means that the port is virtually blocked for any requests coming from outside the machine/host itself. To resolve this issue, change the /etc/hosts file entry as follows;

<ip address of host >       hostname1

Now, stop all services and restart the services. This enables all WebLogic ports and accessible from outside the server.

Sunday, January 29, 2012

JDeveloper "oramds" protocol support not available error

Recently I stumbled upon an issue in JDeveloper where 'execData' element under the 'Data Associations' of user task activity would show an 'error'. This means that none of the process runtime variables available within this element could be used within the process.

On closer observation, I noticed that there were warnings when JDeveloper is booted as shown below;

"oramds" protocol support not available because no application was associated with IDE context.
Unable to open an input stream for ORAMDS URL "/soa/shared/workflow/WorkflowTask.xsd".
"oramds" protocol support not available because no application was associated with IDE context.
Unable to open an input stream for ORAMDS URL "/soa/shared/workflow/WorkflowCommon.xsd".
"oramds" protocol support not available because no application was associated with IDE context.
Unable to open an input stream for ORAMDS URL "/soa/shared/workflow/TaskEvidenceService.xsd".
"oramds" protocol support not available because no application was associated with IDE context.
Unable to open an input stream for ORAMDS URL "/soa/shared/workflow/TaskEvidenceService.xsd".

However, I was not using any MDS connections in my BPM process. Issue was that if there is any open project in JDeveloper which uses MDS and if it is not the first project to load while JDeveloper starts, other projects are unable to load the execData information.

Solution is to either close the BPM project that uses MDS connection or ensure that it is the first project to load when JDeveloper loads. Now, there would be no warnings during JDeveloper boot and execData elements are accessible within user tasks.

Friday, September 16, 2011

JDeveloper 11g: Error Finding SOA configured servers to deploy archive

While deploying a SOA composite in the SOA server, sometime the following error is encountered.

"Error finding SOA configured servers to deploy archive. Deployment cannot continue. java.lang.NullPointerException".

At first instinct, re-visiting the 'App Server Connection' and running the server connection tests in JDeveloper did not reveal any issues and all the test results were successful.

On closer observation, we can notice that proxy server settings are turned on in JDeveloper which is causing the issue during the actual SOA deployment. Disable the proxy settings Tools -> Preferences -> Web Browser and Proxy -> Uncheck 'Use HTTP Proxy Server' option.

Restart JDeveloper and deploy the SOA composite. Voila, it got deployed this time perfectly.