Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7514169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:24:59+00:00 2026-05-30T00:24:59+00:00

Is it possible to use spring inside war bundle on felix? I use spring

  • 0

Is it possible to use spring inside war bundle on felix? I use spring 3.0.5 with felix on glassfish 3.1

I tried to enter component-scan tag inside OSGI war bundle in felix, and I’m getting the below exception.

I saw that a similar bug was solved for Equinox, and what about felix? Is there a workaround or solution to this problem?

P.S: the same exception is thrown if I define path with * in web.xml contextConfigLocation, for example:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:META-INF/spring/*.xml</param-value>
</context-param>

Exception:

2012-02-08 18:30:23,194 [pool-28-thread-1] (PathMatchingResourcePatternResolver.java:532) WARN - Cannot search for matching files underneath URL [bundle://275.0:2/examples/services/] because it does not correspond to a directory in the file system 
java.io.FileNotFoundException: URL [bundle://275.0:2/examples/services/] cannot be resolved to absolute file path because it does not reside in the file system: bundle://275.0:2/examples/services/ 
at org.springframework.util.ResourceUtils.getFile(Res ourceUtils.java:204) 
at org.springframework.core.io.AbstractFileResolvingR esource.getFile(AbstractFileResolvingResource.java :52) 
at org.springframework.core.io.UrlResource.getFile(Ur lResource.java:168) 
at org.springframework.core.io.support.PathMatchingRe sourcePatternResolver.doFindPathMatchingFileResour ces(PathMatchingResourcePatternResolver.java:528) 
... 
2012-02-08 18:30:23,194 [pool-28-thread-1] (PathMatchingResourcePatternResolver.java:353) DEBUG - Resolved location pattern [classpath*:examples/services/**/*.class] to resources [] 

applicationContext.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx">

    <context:annotation-config/>

    <tx:annotation-driven />

    <context:component-scan base-package="examples.services" />

</beans>

thank you for any tip

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:25:02+00:00Added an answer on May 30, 2026 at 12:25 am

    There are 2 workarounds I found to solve it. Still I’ll be glad to hear a real solution for felix.

    The workarounds are:

    1. Use equinox instead of felix 🙂
    2. (an ugly one) Create a temporary folder and extract all the classes into it. Create a class org.eclipse.core.runtime.FileLocator with a function

    public static URL resolve(URL url) throws IOException

    and return the url of content from this folder, for example:

        String path = url.getPath(); 
        String str;
        if(path.contains("com")){
            str = path.substring(path.indexOf("com"));
        }
        return new URL("file:\\c:\\temp_classes\\"+str);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to use a Spring container for DI from inside Eclipse plugins?
Is it possible to use Java FutureTask with a Spring TaskExecutor to get a
I would like to know if it's possible to use Spring to resolve the
Is it possible to use a query string inside an XML file? I did
Helo! Is this possible to use string value of one node which tells what
Is it possible to use the ASP.Net Range validator when the format string is
I'm trying to use std::string instead of char* whenever possible, but I worry I
In eclipse, is it possible to use the matched search string as part of
Possible Duplicate: Escape string for use in Javascript regex I have a msg like
Is it possible use mod_rewrite to resolve addresses hosted on another server? Say I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.