0
votes

When I want to deploy my war in glassfish v3 (Hot deploy / autodeploy) an error raised.

Because of I am using database resource in my project. It's JNDI is stored in the sun-resources.xml file so when I drag & drop the war to autodeploy I take the Error.

But when I use of Netbeans deploy ant script all things happens properly.

My question is how to deploy with autodeploy folder in Glassfish V3 if the project using JNDI in the sun-resources.xml?

Thanks

1
more details about the error that you get would make this easier to answer. - vkraemer
Error tells me, data source <name> could not be found. It is because sun-resources should be import to domain.xml. - Nav

1 Answers

0
votes

use this here on the remote server:

asadmin --host yourhost --port yourport add-resources sun-resources.xml

This has to be done before you deploy your *.war file.