Hi Judy,Wim,
I have submitted a issue to glassfish issue tracker.
The issue number is 7299.
https://glassfish.dev.java.net/issues/show_bug.cgi?id=7299
Maybe my poor english ... :).
--Mike Tang
----- Original Message -----
From: "Tang Yong" <tangyong_at_cn.fujitsu.com>
To: <quality_at_glassfish.dev.java.net>
Sent: Wednesday, March 11, 2009 11:47 AM
Subject: Re: [Problem]Spring In Glassfish
> Hi Wim,Judy,
>
> I have tested the spring web sample in non-clustering profile(standalone module).
>
> The result is the same as the clustering profile.
>
> The following is my test step:
> Enviroment:Windows XP Sp2
> JRE 5.0
> Glassfish V2.1 b60e
> Spring 2.5
> 1 Installing glassfish V2.1 b60e with non-clustering profile
> 2 Place the spring.jar and commons-logging.jar into the "${com.sun.aas.instanceRoot}/lib/"
> 3 Execut "asadmin start-domain domain1"
> 4 Turn on the server's SM
> 5 Restart the domain1
> 6 Deploy the spring sample war into server
> 7 Running the spring sample war
>
> The above steps all runned well.
>
> So, in my view,if theSM is turned on, when deploying the spring sample war into glassfish,
> the error should happen if server.policy is not modified. Because in deploying,Servlet Context
> will load Spring XML Bean Definition using XmlWebApplicationContext.
>
> Regards
> --Mike Tang
>
> Hi Mike, Vince,
>
> I wasn't able to follow the thread realtime, but just did some catching up
> on the last 15 posts or so, since we might have a problem here:). I could do
> some further testing if you like on the subject (in a couple off days
> though, really busy at the moment). But please fill me in on the current
> situation.
>
> I've made the following resume trying to make an overview of the test
> results. Please correct or add inline in case something is wrong or
> inaccurate.
>
> One big question though : has this been tested in a non-clustered
> environment? In case yes, with same results or not.
>
> Please fill me in, and I'll see what I can do.
>
> Thanks,
>
> Wim
>
>
>
> RESUME OF CURRENT TEST RESULTS :
> Spring 2.5.5 or 2.5.6 + Glassfish V3 Prelude b39
>
>
> Environm :
> - Clustered glassfish b39 + spring 2.5.5 ; web application
> - DEFAULT Domain server.policy which does NOT include permission for
> instanceroot/lib
> grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-
> - Spring.jar placed under instanceRoot/lib, NOT installRoot/lib
>
> Reproduction:
>
> CASE 1 : Security manager is turned ON in domain.xml
> --------------
>
> 1) Starting server with
> asadmin start-domain domain
> yields an error (please attach clean server.log and jvm.log)
>
> 2) Starting server with
> asadmin create-jvm-options --user admin -Djava.security.manager
> yields the same error
>
>
> CASE 2 : Security manager is turned OFF in domain.xml (DEFAULT)
> --------------
>
> 1) Starting server with
> asadmin start-domain domain
> works fine
>
> 2) Starting server with
> asadmin create-jvm-options --user admin -Djava.security.manager
> works fine, but SHOULD yield error cause of missing permission in
> server.policy
>
> NOTE here : have to look into, but could be expected behaviour.
>
>
> -----Original Message-----
> From: Tang Yong [mailto:tangyong_at_cn.fujitsu.com]
> Sent: dinsdag 10 maart 2009 7:29
> To: quality_at_glassfish.dev.java.net
> Subject: Re: [Problem]Spring In Glassfish
>
> Hi Judy,
>
> Thanks for your reply!
>
> My problem is still open, and I will do some investigation about this
> problem,
> on the other hand, I also request gf team to look into the issue.
>
> Best Regard!
>
> --Mike Tang
>
>
>> Hi Mike,
>>
>> You have asked many good questions and thank you so much for testing
>> Spring In GlassFish. It is a very helpful testing. If your question
>> is still open, let's look into this more.
>>
>>
>> "When I have seen the server.policy file, I did not find the sentence
>> related "grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-" {
>> permission java.security.AllPermission;
>> };"
>> BTW: my spring.jar is placed in the "${com.sun.aas.instanceRoot}/lib/"
>> which is valid for the whole domain."
>>
>> Thanks Vince and Jagadesh for the help !
>>
>> Judy
>>
>> Tang Yong wrote:
>>> Hi Kraemer,
>>>
>>> Thanks your reply very much. Response in-line, below....
>>>
>>>> Which version of GF are you using?
>>> GF V2.1 b60 cluster profile.
>>>> I would assume there is some other entry in the server.policy file that
>>>> is granting the necessary permissions.
>>> Kraemer, I also think so,and I try finding these entries,but I did not
> get my expected result.
>>> Maybe my knowledge on 'SM' is not well.
>>>
>>>> What is the full path to:
>>>>
>>>> 1. asadmin
>>>> 2. your spring.jar
>>>>
>>>> My guess is that you put spring.jar in the installRoot, not the
>>>> instanceRoot.
>>> I have placed the spring.jar into the instanceRoot, rather than
> installRoot.
>>> I know that the app can have access to the jar in the installRoot/lib.
>>>
>>> Best Regard!
>>> --Mike Tang
>>>
>>>> thanks,
>>>> vbk
>>>>
>>>> Tang Yong wrote:
>>>>> Hi Kraemer,
>>>>>
>>>>> I am sorry for interupting your work again.
>>>>>
>>>>> According your reply, I do some investigating on the 'SM' and try the
> spring web sample again.
>>>>>
>>>>> The result is as following:
>>>>> 1 Because my GF's profile is cluster(not enterprise profile), by
> default, 'SM' is disabled.
>>>>> So, I turned on the 'SM' by means of "asadmin create-jvm-options
> --user admin -Djava.security.manager",
>>>>> Then, I restarted the GF. (The above config info is from "GF
> Enterprise Server 2.1 Developer's Guide".
>>>>> 2 I redeployed the spring web sample.
>>>>> 3 Running is still well.
>>>>>
>>>>> Although the result displayed that Kraemer's "Probably", I have a
> problem related the result:
>>>>>
>>>>> When I have seen the server.policy file, I did not find the sentence
> related "grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-" {
>>>>> permission java.security.AllPermission;
>>>>> };"
>>>>> BTW: my spring.jar is placed in the "${com.sun.aas.instanceRoot}/lib/"
> which is valid for the whole domain.
>>>>>
>>>>> So, I want to know why spring.jar has been granted?
>>>>>
>>>>> Regard!
>>>>>
>>>>> --Mike Tang.
>>>>>
>>>>>
>>>>>
>>>>>> Response in-line, below....
>>>>>>
>>>>>> vbk
>>>>>>
>>>>>> Tang Yong wrote:
>>>>>>
>>>>>>> Hi Kraemer,
>>>>>>>
>>>>>>> Thanks for your reply, and I indeedly expected your reply.
>>>>>>>
>>>>>>> Your explaination is very detailed and I have knowed a lot.
>>>>>>>
>>>>>>> However, due to my poor English, I want to confirm my understanding
> with you:
>>>>>>>
>>>>>>> 1 Whether or not glassfish version changed, if I turn on the 'SM', I
> will run into
>>>>>>> the similar issues related 'SM'.
>>>>>>> (BTW: I will try it.)
>>>>>>>
>>>>>>>
>>>>>> I can only say, "Probably". I haven't tried it for a long time (in
> terms
>>>>>> of software 'years')
>>>>>>
>>>>>>
>>>>>>> 2 For current glassfish version, 'SM' is disabled by default.
>>>>>>>
>>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>>
>>>>>>> Kraemer, I have a suggestion:
>>>>>>> Although the blog is not a formal document, I (we) still
> believe/respect the sun's blog.(:).
>>>>>>> However, I wish that to some blog's content, you/experts can update
> the content a litter.
>>>>>>> Even adding some more valuable materials.
>>>>>>>
>>>>>>>
>>>>>> Hmm... I have to disagree with you on this... Blogs are 'stuff I
>>>>>> learned... that I am sharing with you'. The power of a blog comes from
>>>>>> others (like yourself) doing the same.. learning something and then
>>>>>> sharing it, via a blog (or e-mail list or social network or...)
>>>>>>
>>>>>> You see, I WAS an expert on this topic... at that time... since I was
>>>>>> working on it actively. At this point, you are the expert... not me...
>>>>>> since YOU are working actively in this area.
>>>>>>
>>>>>> By sharing what you know, NOW, you will spur others to make their own
>>>>>> discoveries and publish them... to the benefit of all of us.
>>>>>>
>>>>>> vbk
>>>>>>
>>>>>>
>>>>>>> In addition, Spring on GF is an important topic, if you know the
> weblogic ejb container implementation(using pitchfork).
>>>>>>> Because Spring on GF may be let us make more valuable decisions in
> designing mission-critical enterprise app.
>>>>>>>
>>>>>>> Thanks again!
>>>>>>>
>>>>>>> Best Regard!
>>>>>>>
>>>>>>> --Mike Tang, MiddleWare Developer,From Fujitsu China
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi Mike,
>>>>>>>>
>>>>>>>> The problem that you are referring to was due to the fact that the
>>>>>>>> Security manager was enabled by default when the blog entries were
>>>>>>>> written. The default state (on or off) of the SM was changed very
> early
>>>>>>>> in the v1 development cycle... (to OFF)... due to the errors that
> Matt
>>>>>>>> and Jerome encountered.
>>>>>>>>
>>>>>>>> Note: if the 'turn on the SM' you will run into issues similar to
> those
>>>>>>>> discussed in the blogs entries...
>>>>>>>>
>>>>>>>> Since blogs are not 'documentation' in the formal sense, you have to
>>>>>>>> consider their age as you read their content.
>>>>>>>>
>>>>>>>> The blog entries you cite were about experiences with a server that
>>>>>>>> existed a couple years ago... that was changing on a daily basis...
>>>>>>>>
>>>>>>>> that said, I am gald to hear that you are making progress with
> Spring on GF.
>>>>>>>>
>>>>>>>> vbk
>>>>>>>>
>>>>>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>
>
>