Glassfish 4 deployment error
Solution 1
I Had the same error. I stopped the GLassfish server and then I cleaned the project (Project -> Clean... ). Started the server and worked
Solution 2
I also had this issue, and I was also using the SVNKit library plus its dependencies so it looks like there is some kind of conflict there. I can get around it by cleaning out the osgi-cache folder & restarting glassfish, but I have to do this every time I want to deploy, so not a great solution.
Solution 3
In my Glassfish log file it says:
Application with name ws is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name
Following my logs instructions I deployed the app with --force
option:
asadmin deploy --force=true ws.war
and it worked. More info on deploy --force=true
Solution 4
Try to remove all the files under osgi-cache and generated directories. It worked for me.
Arnold Galovics
Updated on June 14, 2022Comments
-
Arnold Galovics almost 2 years
I added some libraries to my JavaEE project and then deploy the application works. I modified something and I got this error message in Eclipse:
Cannot Deploy ProjectName deploy is failing=Error occurred during deployment: Keys cannot be duplicate. Old value of this key property, nullwill be retained. Please see server.log for more details. java.lang.LinkageError: loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate class definition for name: "org/glassfish/web/loader/JdbcLeakPrevention" loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate class definition for name: "org/glassfish/web/loader/JdbcLeakPrevention"
I made some research and I found out that it is not an Eclipse bug. I'm working with Kepler but I tested with Juno too. Got the same error message. I downloaded Glassfish 3.1.2.2 and the message gone.
Why am I getting this message?
-
shareef almost 8 years
-
DaRich over 6 yearsThe linked article is empty (see comment under the article). New solution appreciated.