dev@glassfish.java.net

Re: doc error in add-resources?

From: Chinmayee Srivathsa <Chinmayee.Srivathsa_at_Sun.COM>
Date: Wed, 19 Mar 2008 08:18:28 +0530

The command i used is:

cd /home/cs194067/SUNWappserver/bin
./asadmin
asadmin> add-resources --user admin --port 4848 chin.xml
Please enter the admin password>
Operation 'createResource' failed in 'resources' Config Mbean.
Target exception message:
/home/cs194067/SUNWappserver/domains/domain1/config/chin.xml (No such
file or directory)
CLI137 Command add-resources failed.

(There was no chin.xml at
/home/cs194067/SUNWappserver/domains/domain1/config)


Prashanth Abbagani wrote:
> Chinmay,
>
> Did you give an absolute path of your home directory? Can you show me
> your command line
>
> thanks
> Prashanth
>
> Chinmayee Srivathsa wrote:
>> Yes, I saw that.
>> I have the sample XML file saved as chin.xml in my home directory and
>> I still got the "No such file or directory" error ie it did prepend
>> <install-dir>/domains/domain1/config.
>>
>> However, I need to replace <install-dir>/domains/domain1/config with
>> <install-dir>/domains/<domain-name>/config or <domain-dir>/config.
>>
>> - Chinmayee
>>
>> vince kraemer wrote:
>>> Chinmayee Srivathsa wrote:
>>>> Hi Vince,
>>>>
>>>> The description of xml-file-path in the add-resources man page says "
>>>> The path to the XML file containing the resource(s) to be created.
>>>> The XML file must reside in the
>>>> <install-dir>/domains/domain1/config directory. If you specify a
>>>> relative path or simply provide the name of the XML file, this
>>>> command will prepend <install-dir>/domains/domain1/config to this
>>>> operand."
>>>>
>>>> I tried the command with the relative path to a (non-existent) xml
>>>> file. As specified in this description. the command did prepend
>>>> <install-dir>/domains/domain1/config.
>>>
>>> I guess that is why I am confused... I never give it the relative
>>> path of a file that doesn't exist.
>>>
>>> When you give the command a relative path to a file that does exist,
>>> it does the right thing, but the description of xml-file-path makes
>>> it sound like it should not...
>>>
>>> See my example further down... (I have edited out some of the
>>> intermediate responses for brevity...
>>>>
>>>> asadmin> add-resources --user admin --port 4848 chin.xml
>>>> Please enter the admin password>
>>>> Operation 'createResource' failed in 'resources' Config Mbean.
>>>> Target exception message:
>>>> /home/cs194067/SUNWappserver/domains/domain1/config/chin.xml (No
>>>> such file or directory)
>>>> CLI137 Command add-resources failed.
>>>>
>>>> Thanks,
>>>> Chinmayee
>>>>
>>>>
>>>>
>>>> [snip]
>>>>>> Vince Kraemer wrote:
>>>>>>> I was reading the 9.1 docs on add-resources... and it looks
>>>>>>> suspect.
>>>>>>>
>>>>>>> My main area of concern is the description of xml_file_path...
>>>>>>>
>>>>>>> Is that description actually correct?
>>>>>>>
>>>>>>> This snippit from my terminal window seems to say NO, to me.
>>>>>>>
>>>>>>> > pe/6/sailfin/bin/asadmin add-resources this-name-is-unique.txt
>>>>>>> Operation 'createResource' failed in 'resources' Config Mbean.
>>>>>>> Target exception message: DOCTYPE is not present in xml
>>>>>>> /export/home/vbk/sf/this-name-is-unique.txt. Please correct the
>>>>>>> issue.
>>>>>>> CLI137 Command add-resources failed.
>>>
>>> In the example above...
>>>
>>> The file doesn't exist in <install-dir>/domains/domain1/config.
>>>
>>> The command did not append <install-dir>/domains/domain1/config to
>>> the aperand to create an absolute path.
>>>
>>> Based on the description of xml-file-path... I was expecting to see
>>> something like
>>>
>>> Operation 'createResource' failed in 'resources' Config Mbean.
>>> Target exception message:
>>> /export/home/vbk/v21/pe/6/glassfish/domains/domain1/config/this-name-is-unique.xml
>>> (No such file or directory)
>>> CLI137 Command add-resources failed.
>>>
>>> Since I did not see that... I was a bit confused... Is the
>>> implementation of add-resources incorrect?
>>>
>>> vbk
>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> vbk
>>>>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>