Friday, January 4, 2008

Error in OC4J Version 10.1.3.3.0 Ant Tasks

I have been trying to write Ant tasks to deploy, undeploy applications as well as create,delete and test data sources and connection pools using OC4J 10.1.3.3.0 for Oracle Application Server.

The deployment and undeployment went smoothly with no problems at all.

But, once I started working on Data Sources and connection factories, I started getting errors like the following:

Problem: failed to create task or type antlib:oracle:testDataSourceConnectionPool
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.

This appears to be an antlib declaration.


You will not find any documentation at all since these tasks are not in the Documentation. I looked at many samples provided and all of them had the old tasks. I finally looked at the Ant jar file and was able to find the correct task names.

The task addDataSourceConnectionPool was replaced with createJDBCConnectionPool, addManagedDataSource with createManagedDataSource, and testDataSourceConnectionPool with testConnectionPool.

I am not sure about other tasks, but these are the ones which I changed to get my build files working and happy.

You can find detailed documentation for OC4J Ant Tasks here.

4 comments:

  1. Hi,
    I am struggling to automate UAT/Prod deployment of ear using oc4j ant tasks. I am continuously getting [java] Failed at "Could not get DeploymentManager" and Invalid deployer URI. I am quite sure that my deployer URI is correct. But somehow it doesnt like the deployer URI in build.xml file. Its 10g AS 10.1.3.3. I am not sure that is there nay bug for this or workaround or does it expect the URI in some other format or so.

    Can you help me please?

    regards
    Raj

    ReplyDelete
  2. Raj,
    I have no clue. Are you using EJB 3.0?

    ReplyDelete
  3. deployer URL should work
    Is your deployer uri looks like below:

    Sample Deployer URI for clustered env:
    deployer:cluster:opmn://blogger.com/apphome

    Infact this will work for remote deployment as well as for local deployment

    thanks
    Sathya

    ReplyDelete
  4. Nice story as for me. I'd like to read more about this topic.
    BTW check the design I've made myself London escort

    ReplyDelete