While creating BAM connection from JDeveloper 11.1.1.x version If you faced any problem just like below :-
Testing HTTP connection ... success.
Testing Data Object browsing ... success.
Testing JNDI connection ... failed.
Failed to establish a connection to "localhost" at port 9001;
Please verify BAM Server Host & JNDI Port.
2 of 3 tests successful..
For Example if BAM server is installed on the port 7001, Whereas by default BAM server configuration files used to point to the port 9001. That's why above stated error used to come due to wrong configuration port in connection detail:-
As in the above screen shot JNDI port also need to give the 7001 as BAM server is installed on 7001 and port number need to change as 7001 in the following BAM server Configuration files(BAMICommandConfig.xml, BAMCommonConfig.xml, BAMServerConfig.xml and BAMWebConfig.xml ) which are pointing to default port 9001.
Following steps need to follow :-
Step 1:- Manually change the port number from 9001 to the new port number in the SOA_ORACLE_HOME\bam\config\BAMICommandConfig.xml (on Windows operating systems) file. The parameter that needs to be changed is shown below:
<ADCServerPort>9001</ADCServerPort> (Put here the configured port 7001)
Step2:- Oracle BAM single-instance web application configuration information is maintained in MW_HOME\user_projects\domains\domain_name\servers\BAM_server_name\tmp\_WL_user\oracle-bam_11.1.1\yhryfp\APP-INF\classes\config (on Windows operating systems) directory. Note:The folder name under oracle-bam_11.1.1 is randomly generated (in this case, it is yhryfp). When you are looking for this directory on your system, then the name can be any generated alphanumeric character
a. Changes in BAMCommonConfig.xml:
The <ApplicationURL> parameter should contain the new URL.
b. Changes in BAMServerConfig.xml:
<ADCServerName>localhost</ADCServerName>
<ADCServerPort>9001</ADCServerPort>
c. Changes in BAMWebConfig.xml:
<ServerName>localhost</ServerName>
<ServerPort>9001</ServerPort>
After that restart the BAM manage server. It should work.