Skip to main content

asadmin add-resource not working in GFv3

6 replies [Last post]
wfsaxton
Offline
Joined: 2006-12-05

Hi all,

I've successfully run the following command in GFv2.1:

/bin/asadmin add-resources portal-resources.xml

Using the following xml file:

<?xml version="1.0" encoding="UTF-8"?>

This does not, however, work in GFv3. I get the following "empty" error message:

com.sun.enterprise.admin.cli.CommandException: remote failure: add-resources failed

Command add-resources failed.

Note the 2 empty lines where the errors, I think, should be.

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Vijayadiraju
Offline
Joined: 2011-08-24

ensure to have the following in your resource xml file.

<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">

if in windows environment, use '/' as folder separator in the path instead of '\' while providing relative path of resource xml file. otherwise the command prepends the ...domain/domain1/config/ directory.

check the above and then invoke add-resources command.

warning: this command will overwrite your domain.xml with the resources being added, am exploring to see how to append the resources instead of overwriting entire domain.xml.

Vijayadiraju
Offline
Joined: 2011-08-24

Hi wfsaxton,

The doctype mentioned in the porta-resources.xml should be as follows:

<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">

also ensure to provide relative path of the portal-resources.xml while invoking add-resources command. Otherwise by default the command prepends as-install/domains/domain1/config/ to the xml file. if it is in windows environment, you will have to provide '/' as folder separator while providing relative path instead of '\'.

check the above suggestions and let me know if it worked.

cheers!

jr158900
Offline
Joined: 2005-04-13

It does not seem to work. Please raise a bug under sub-category "jca"

jr158900
Offline
Joined: 2005-04-13
wfsaxton
Offline
Joined: 2006-12-05

Awesome, thanks!

Vijayadiraju
Offline
Joined: 2011-08-24

hi wfsaxton,

it worked ? based on my suggestions ?

cool..