Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6B27EA5E for ; Tue, 22 Jan 2013 12:36:08 +0000 (UTC) Received: (qmail 16451 invoked by uid 500); 22 Jan 2013 12:20:37 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 16104 invoked by uid 500); 22 Jan 2013 12:20:20 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 15918 invoked by uid 99); 22 Jan 2013 12:20:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 12:20:14 +0000 Date: Tue, 22 Jan 2013 12:20:13 +0000 (UTC) From: "TangYong (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-3958) Struts2 OSGi plugin does not work with GlassFish MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-3958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559584#comment-13559584 ] TangYong commented on WW-3958: ------------------------------ Now, I have tested in glassfish 3.1.2.2, and can access http://localhost:8080/osgi-2.3.1/osgi/admin/, although having a exception found in server.log. [#|2013-01-22T21:16:24.781+0900|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=88;_ThreadName=Thread-2;|StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception java.lang.NullPointerException at org.apache.struts2.osgi.DefaultBundleAccessor.loadResourceFromAllBundles(DefaultBundleAccessor.java:158) at org.apache.struts2.osgi.loaders.StaticContentBundleResourceLoader.findResource(StaticContentBundleResourceLoader.java:41) at org.apache.struts2.dispatcher.DefaultStaticContentLoader.findStaticResource(DefaultStaticContentLoader.java:163) ... > Struts2 OSGi plugin does not work with GlassFish > ------------------------------------------------ > > Key: WW-3958 > URL: https://issues.apache.org/jira/browse/WW-3958 > Project: Struts 2 > Issue Type: Bug > Components: Other > Affects Versions: 2.3.1 > Environment: GlassFish 3.1.2.2 > Reporter: Christina Kaskoura > Fix For: 2.3.9 > > Attachments: 2.3.8-error.txt, Struts2OSGi.zip > > > The OSGi plugin does not work with GlassFish where Felix is already included. When including in the Struts web application a bundle containing an activator class the following exception occurs: > java.lang.ClassCastException: myosgi.Activator cannot be cast to org.osgi.framework.BundleActivator > while when including a bundle with a class which implements BundleContextAware the following exception occurs: > Exception starting filter struts2 java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/felix/framework/searchpolicy/ContentClassLoader) previously initiated loading for a different type with name "org/osgi/framework/BundleContext" > It also seems that the plugin uses an old version of Felix which could be (at least partly) responsible for the errors since GlassFish uses a newer one. > More details on the errors also available in [this stackoverflow post|http://stackoverflow.com/questions/14200300/using-struts2-osgi-plugin-with-glassfish] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira