PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

Connector instance properties are stored before they are validated. #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In the GSA admin console, click Add New Connector.
2. Give the connector a name, say "foo".
3. Click Get Configuration Form.
4. Enter some invalid parameter values.
5. Click Save Configuration.
6. Get the Add Connector form back again with a validation error.
7. Restart Tomcat or reload the connector-manager application.
8. Follow steps 1-5 again, using valid parameter values.

What is the expected output? What do you see instead?

Instead of adding the connector, you get an error on the Add Connector page:

No connector configuration returned by the connector manager.
null

with no form snippet. 

What version of the product are you using? On what operating system?

Connector Manager R449, GSA 4.6.4 G54.

Please provide any additional information below.

The connector manager stores the "foo.properties" file in the configuration
directory before calling validateConfig. So even though validateConfig has
returned a non-null ConfigureResponse, the properties file has been saved
to disk.

This seems to work OK, but there is a hitch. We have a properties file on
the Connector Manager side but no connector known to the GSA. Suppose that
the Connector Manager application is reloaded (explicitly, or Tomcat is
restarted, or the host is rebooted, etc.), and then you try to create a
connector of the same name, "foo". Then InstanceMap.updateConnector will
throw a ConnectorExistsException. This "wild" exception leads to the error
on the Add Connector page.

The only workaround I know of is to manually delete the connector
configuration directory and restart the Connector Manager before attempting
to add the connector instance through the GSA admin console.

This is happening because instantiation or validateConfig failures will
prevent the InstanceInfo from being added to the map at the bottom of
resetConfig, but when the class is reloaded, the processTypeDirectory
method will add the bogus configuration to the map. That will later force
us down the other path in updateConnector, which leads to the exception.

Original issue reported on code.google.com by jl1615@gmail.com on 16 Jun 2007 at 12:25

GoogleCodeExporter commented 8 years ago

Original comment by donald.z...@gmail.com on 18 Apr 2008 at 10:16

GoogleCodeExporter commented 8 years ago

Original comment by jl1615@gmail.com on 10 Jul 2008 at 9:52

GoogleCodeExporter commented 8 years ago
Fixed in conjunction with Issue 80 in revision r925.

Original comment by Brett.Mi...@gmail.com on 28 Aug 2008 at 7:31

GoogleCodeExporter commented 8 years ago
I am seeing this issue with a private 2-day old build.
I tried the work-around suggested in the issue description, the issue persists.
I built CM using JDK 6, running CM from Tomcat 6.

Original comment by lzvoya...@gmail.com on 25 Oct 2008 at 1:01

GoogleCodeExporter commented 8 years ago
lzvoyager,

Which connector are you using that exhibits the failure.
If the workaround (deleting the connector instance directory
or the property file) does not work, it is very unlikely that
you are encountering the same problem, although the 
symptoms may be similar.  ValidateConfig or connector
instantiation may be failing for some other reason.

Original comment by Brett.Mi...@gmail.com on 27 Oct 2008 at 6:12

GoogleCodeExporter commented 8 years ago

Original comment by jl1615@gmail.com on 12 Jan 2009 at 3:16

GoogleCodeExporter commented 8 years ago
Google Bug #891615 is a duplicate of this issue.

Original comment by jl1615@gmail.com on 31 Jan 2009 at 4:42