Error on creating/editing AD account on different domain but same forest

We get strange problem on IDM 5.5 for AD account. we have two group users on different domains. One is in ou=users, dc=abc, dc=ad, the other is ou=users, ou=subcomp, dc=defg, dc=internal. They both are in same forest. When we create two AD resource adapters with same host name and port number but different container, assign/unassign user account on the first has no any problem. But same operation via second adapter most time give us error. Unable to set user info:

'SetInfo(): 0X80070005: , 00000005: SecErr: DSID-03151E04, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0 , Access is denied.

or

no error but the account is not created in AD, idm does not give error.

or

sometimes it works.

The gaveway logs saying error to get attribute.

Does anyone know what is going on?

[824 byte] By [janexa] at [2007-11-27 1:00:37]
# 1
Looks like userid the AD resource uses needs to be granted privileges to both parts of the forest.Jason
jsalleea at 2007-7-11 23:35:18 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2
Thank you. That was the first thing we checked. After I restarted the gateway, then it worked. Then I tried to assign a new user again, it worked fine too but when I unassign this new user, IDM said fine but that user was still in AD. The gateway log already indicated error message
janexa at 2007-7-11 23:35:18 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3
Do you have a gateway installed on a member server of each domain? You indicated you are using the "same host name and port number", but this should point to a different gateway for each domain I believe.Bev.
BevRichardsona at 2007-7-11 23:35:18 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4
According to the documentation you don't have to have the gw machine in the same domain but the domain of the gw has to be trusted by the domain you want to provision to. Makes sense to me.Regards,Patrick
Patrick.Wehingera at 2007-7-11 23:35:19 > top of Java-index,Web & Directory Servers,Directory Servers...
# 5
The machine which the gateway running is trusted machine by domain. We have ticket with SUN now.
janexa at 2007-7-11 23:35:19 > top of Java-index,Web & Directory Servers,Directory Servers...
# 6
It is resolved by filling the second LDAP IP address on "LDAP Hostname" on the the Resource Wizard page.
janexa at 2007-7-11 23:35:19 > top of Java-index,Web & Directory Servers,Directory Servers...