Skip to main content

OSGI WAB Fragments stop working on Glassfish 3.1.2.2

4 replies [Last post]
cameronr
Offline
Joined: 2006-07-27
Points: 0

I spent quite some time trying to get WAB Fragments to work in Glassfish 3.1.2.2 (as specified in http://glassfish.java.net/public/GF-OSGi-Features.pdf) without any luck. Out of frustration I tried Glassfish 3.1.1 and 3.1.2 and it worked first time.

I have attached the war (I had to change the extension wabtest.jar given the restrictions on the upload for this forum) and the associated fragment.

After installing the war (via autodeploy/bundles or asadmin) you can go to

http://host:port/wabtest/index.jsp

After installing the fragment you should be able to see

http://host:port/wabtest/test.jsp

With GF 3.1.1 and 3.1.2 this works. With 3.1.2.2 it does not, the bundle installs fine according to the server.log, I just can't access the page.

Is there some config that needs to change for 3.1.2.2 to allow this to work?

Regards
Cameron

AttachmentSize
wabtest-1.0-SNAPSHOT.jar3.35 KB
wabtest-fragment-1.0-SNAPSHOT.jar1.59 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ss141213
Offline
Joined: 2005-03-30
Points: 0

I will look into it and get back. We will try with our existing WAB
fragment test to begin with. If possible, share your test case just case
it is specific to a given test case.

Thanks,
Sahoo

On Friday 07 September 2012 07:00 AM, forums@java.net wrote:
> I spent quite some time trying to get WAB Fragments to work in Glassfish
> 3.1.2.2 (as specified in
> http://glassfish.java.net/public/GF-OSGi-Features.pdf) without any
> luck. Out
> of frustration I tried Glassfish 3.1.1 and 3.1.2 and it worked first
> time. I
> have attached the war (I had to change the extension wabtest.jar given
> the
> restrictions on the upload for this forum) and the associated
> fragment. After
> installing the war (via autodeploy/bundles or asadmin) you can go to
> http://host:port/wabtest/index.jsp After installing the fragment you
> should
> be able to see http://host:port/wabtest/test.jsp With GF 3.1.1 and
> 3.1.2 this
> works. With 3.1.2.2 it does not, the bundle installs fine according to
> the
> server.log, I just can't access the page. Is there some config that
> needs to
> change for 3.1.2.2 to allow this to work? Regards Cameron
>
> --
>
> [Message sent by forum member 'cameronr']
>
> View Post: http://forums.java.net/node/889931
>
>
>

ss141213
Offline
Joined: 2005-03-30
Points: 0

I just tried our own WAB Fragment test with 3.1.2.2 and it works. When I
look at your test case, I see that you are bundling
wabtest-fragment-1.0-SNAPSHOT.jar in WEB-INF/lib of
wabtest-1.0-SNAPSHOT.jar. When I modify the host bundle to not include
this fragment jar, things worked as expected. I first installed and
started host and got HTTP-404 for wabtest/test.jsp resource. Then I
installed the fragment and updated the host and the above resource is
available.

Thanks,
Sahoo

On Friday 07 September 2012 08:28 AM, Sahoo wrote:
> I will look into it and get back. We will try with our existing WAB
> fragment test to begin with. If possible, share your test case just
> case it is specific to a given test case.
>
> Thanks,
> Sahoo
>
> On Friday 07 September 2012 07:00 AM, forums@java.net wrote:
>> I spent quite some time trying to get WAB Fragments to work in Glassfish
>> 3.1.2.2 (as specified in
>> http://glassfish.java.net/public/GF-OSGi-Features.pdf) without any
>> luck. Out
>> of frustration I tried Glassfish 3.1.1 and 3.1.2 and it worked first
>> time. I
>> have attached the war (I had to change the extension wabtest.jar
>> given the
>> restrictions on the upload for this forum) and the associated
>> fragment. After
>> installing the war (via autodeploy/bundles or asadmin) you can go to
>> http://host:port/wabtest/index.jsp After installing the fragment you
>> should
>> be able to see http://host:port/wabtest/test.jsp With GF 3.1.1 and
>> 3.1.2 this
>> works. With 3.1.2.2 it does not, the bundle installs fine according
>> to the
>> server.log, I just can't access the page. Is there some config that
>> needs to
>> change for 3.1.2.2 to allow this to work? Regards Cameron
>>
>> --
>>
>> [Message sent by forum member 'cameronr']
>>
>> View Post: http://forums.java.net/node/889931
>>
>>
>>
>

cameronr
Offline
Joined: 2006-07-27
Points: 0

Thanks for the quick reply Sahoo,

Unfortunately I had attached the wrong war as I had tried without the fragment bundled in the host without luck. I tried so many combinations that no doubt I have got confused about what I had/hadn't tried and will need to try again after the weekend.

What does this comment mean?

"Then I installed the fragment and updated the host and the above resource is
available."

Installing the fragment is obvious (via autodeploy/bundles or asadmin) but what do you mean by updated the host? Is there something that needs to happen to the host bundle as well?

Cheers
Cameron

ss141213
Offline
Joined: 2005-03-30
Points: 0

On Friday 07 September 2012 08:28 AM, Sahoo wrote:
> If possible, share your test case just case it is specific to a given
> test case.
Sorry, I see you have already attached. Thanks much.