users@glassfish.java.net

Re: java.lang.ClassCastException in glassfish

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Fri, 13 Jan 2012 17:26:55 +0530

Looking at test-ear-1.0-SNAPSHOT.ear, I see that it contains a war and
an ejb-jar. Neither of them contain any OSGi metadata. So, you have to
first fix the pom.xml that are responsible for creating those jars to
add necessary OSGi metadata. Then instead of packaging them in the ear
file, you have to deploy them directly to GlassFish using "asadmin
deploy --type=osgi" command. Please take a look at [1] to learn more
about OSGi application development process. We have a lot of
ready-to-use sample applications available at [2]. You will find
information about them in that document as well. The samples have a
parent pom that you can use in your own example to take care of OSGi
packaging. Finally, look at samples in "uas" subdirectory which shows
you use of OSGi/CDI.

Sahoo
[1] http://glassfish.java.net/public/GF-OSGi-Features.pdf
[2] http://svn.java.net/svn/glassfish~svn/trunk/fighterfish/sample

On Friday 13 January 2012 04:12 PM, forums_at_java.net wrote:
> Thank you for the reply. I know that OSGI bundle can't be deployed within
> EAR package. Would you give me advice how to fix the code which I have
> developed as example, please?
>
> http://uploading.com/files/cf1ffd63/test.zip/ [1]
>
>
> [1]
> ../../../../../../external?url=http://uploading.com/files/cf1ffd63/test.zip/
>
> --
>
> [Message sent by forum member 'rcbandit']
>
> View Post: http://forums.java.net/node/882670
>
>