[GLASSFISH-11581] asupgrade fails with "File source doesn't exist" Created: 17/Feb/10  Updated: 13/Dec/10

Status: Open
Project: glassfish
Component/s: upgrade_tool
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: kurti Assignee: tanujakotappa
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Linux


Issuezilla Id: 11,581
Tags: future-exclude

 Description   

I try to update from GF v2.1 to v2.1.1 and get this Exception:

java.lang.IllegalArgumentException: File source doesn't exist
at com.sun.enterprise.util.io.FileUtils.copy(FileUtils.java:957)
at com.sun.enterprise.util.io.FileUtils.copy(FileUtils.java:938)
at
com.sun.enterprise.tools.upgrade.common.UpgradeUtils.copyFile(UpgradeUtils.java:
928)
at
com.sun.enterprise.tools.upgrade.realm.RealmUpgrade.backup(RealmUpgrade.java:205
)
at
com.sun.enterprise.tools.upgrade.realm.RealmUpgrade.upgrade(RealmUpgrade.java:18
6)
at
com.sun.enterprise.tools.upgrade.UpgradeHarness.invokeModules(UpgradeHarness.jav
a:202)
at
com.sun.enterprise.tools.upgrade.UpgradeHarness.startUpgrade(UpgradeHarness.java
:116)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain.upgrade(UpgradeToolMain.java:17
9)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain.processUIEvent(UpgradeToolMain.
java:169)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain.access$000(UpgradeToolMain.java
:51)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain$1.dialogProcessed(UpgradeToolMa
in.java:142)
at
com.sun.enterprise.tools.upgrade.gui.MainFrame$UpgradeActionThread.run(MainFrame
.java:378)

This is in the server logs:

java.lang.IllegalArgumentException: File source doesn't exist
at com.sun.enterprise.util.io.FileUtils.copy(FileUtils.java:957)
at com.sun.enterprise.util.io.FileUtils.copy(FileUtils.java:938)
at
com.sun.enterprise.tools.upgrade.common.UpgradeUtils.copyFile(UpgradeUtils.java:
928)
at
com.sun.enterprise.tools.upgrade.realm.RealmUpgrade.backup(RealmUpgrade.java:205
)
at
com.sun.enterprise.tools.upgrade.realm.RealmUpgrade.upgrade(RealmUpgrade.java:18
6)
at
com.sun.enterprise.tools.upgrade.UpgradeHarness.invokeModules(UpgradeHarness.jav
a:202)
at
com.sun.enterprise.tools.upgrade.UpgradeHarness.startUpgrade(UpgradeHarness.java
:116)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain.upgrade(UpgradeToolMain.java:17
9)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain.processUIEvent(UpgradeToolMain.
java:169)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain.access$000(UpgradeToolMain.java
:51)
at
com.sun.enterprise.tools.upgrade.UpgradeToolMain$1.dialogProcessed(UpgradeToolMa
in.java:142)
at
com.sun.enterprise.tools.upgrade.gui.MainFrame$UpgradeActionThread.run(MainFrame
.java:378)

#]

[#|2010-02-17T17:43:53.819+0100|WARNING|sun-
appserver2.1|javax.enterprise.system.core.security|_ThreadID=10;_ThreadName=main
;SA-Shop-Realm;_RequestID=6da610cf-d12c-42d5-85fb-fcf6feb1c3a3;|SEC1100:
Disabled realm [SA-Shop-Realm] due to errors.|#]

[#|2010-02-17T17:43:53.820+0100|WARNING|sun-
appserver2.1|javax.enterprise.system.core.security|_ThreadID=10;_ThreadName=main
;_RequestID=6da610cf-d12c-42d5-85fb-fcf6feb1c3a3;|SEC1000: Caught exception.
com.sun.enterprise.security.auth.realm.BadRealmException:
com.sun.enterprise.security.auth.realm.BadRealmException:
java.io.FileNotFoundException: /opt/glassfish-v2.1.1/domains/domain1/config/SA-
Shop-Realm.keys (No such file or directory)
at
com.sun.enterprise.security.auth.realm.Realm.doInstantiate(Realm.java:239)
at
com.sun.enterprise.security.auth.realm.Realm.instantiate(Realm.java:165)
at
com.sun.enterprise.security.RealmConfig.createRealms(RealmConfig.java:93)
at
com.sun.enterprise.security.RealmConfig.createRealms(RealmConfig.java:163)
at
com.sun.enterprise.security.SecurityLifecycle.onInitialization(SecurityLifecycle
.java:113)
at
com.sun.enterprise.server.ApplicationServer.onInitialization(ApplicationServer.j
ava:265)
at
com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServe
r.java:103)
at com.sun.enterprise.server.PEMain.run(PEMain.java:399)
at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
Caused by: com.sun.enterprise.security.auth.realm.BadRealmException:
java.io.FileNotFoundException: /opt/glassfish-v2.1.1/domains/domain1/config/SA-
Shop-Realm.keys (No such file or directory)
at
com.sun.enterprise.security.auth.realm.file.FileRealm.loadKeyFile(FileRealm.java
:804)
at
com.sun.enterprise.security.auth.realm.file.FileRealm.init(FileRealm.java:217)
at
com.sun.enterprise.security.auth.realm.Realm.doInstantiate(Realm.java:233)
... 13 more

#]


 Comments   
Comment by tanujakotappa [ 22/Feb/10 ]

Pls elaborate the set-up details

Comment by tanujakotappa [ 22/Feb/10 ]

Assigning to Tanuja

Comment by kurti [ 22/Feb/10 ]

Pls elaborate, what you need.

I guess you want to know this:

The domain has a FileRealm "SA-Shop-Realm", which is configured with this key
file:

$

{com.sun.aas.instanceRoot}

/config/SA-Shop-Realm.keys

Comment by tanujakotappa [ 22/Feb/10 ]

I did the side-by-side upgrade successfully on Linux m/c without any Exception.
Pls give me the steps to reproduce this issues where i can face the given
Exception..

Comment by kurti [ 22/Feb/10 ]

I just deleted the FileRealm and upgraded without a problem, so this looks like
the problem. It has been created on 2.1 using this command:

asadmin create-auth-realm --classname
com.sun.enterprise.security.auth.realm.file.FileRealm --property
'file=$

{com.sun.aas.instanceRoot}

/config/SA-Shop-Realm.keys:jaas-
context=fileRealm' SA-Shop-Realm

Comment by tanujakotappa [ 22/Feb/10 ]

I did the side-by-side upgrade successfully on Linux m/c without any Exception.
Pls give me the steps to reproduce this issues where i can face the given
Exception..

Comment by tanujakotappa [ 22/Feb/10 ]

You mean to say upgrade works fine and after upgrade if i execute the following
command, i will hit the Exception???

asadmin create-auth-realm --classname
com.sun.enterprise.security.auth.realm.file.FileRealm --property
'file=$

{com.sun.aas.instanceRoot}

/config/SA-Shop-Realm.keys:jaas-
context=fileRealm' SA-Shop-Realm

Comment by kurti [ 22/Feb/10 ]

No, the other way round:

if the FileRealm exists in 2.1, then the upgrade fails

if I delete the FileRealm in 2.1, then it works

Comment by Bobby Bissett [ 08/Oct/10 ]

Adding future-exclude keyword as this issue does not apply to the 3.X upgrade
tool. The target milestone needs to be reset appropriately.





Generated at Sat Sep 24 23:15:20 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.