Uploaded image for project: 'Snowdrop'
  1. Snowdrop
  2. SNOWDROP-4

Classpath scanning in Spring-based web applications and VFS using Spring 2.5.x and JBoss 5.0/5.1

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.1.CR1
    • Fix Version/s: 1.0.0.GA
    • Component/s: None
    • Labels:
      None

      Description

      As reported in the forum issue, classpath scanning in Spring does not work properly in conjunction with VFS. A fix has been created, in the form of the VFSResourceResolver, but there are still issues reported against it.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            enricogiurin enrico giurin added a comment -

            I have used those two jars to solve the problem I had when deploying Spring Component annotated application to JBoss 5.1.
            Here you can find the post in my blog which shows all the steps to follow.
            http://enricogi.blogspot.com/2009/12/deploying-spring-autowired-application.html

            Show
            enricogiurin enrico giurin added a comment - I have used those two jars to solve the problem I had when deploying Spring Component annotated application to JBoss 5.1. Here you can find the post in my blog which shows all the steps to follow. http://enricogi.blogspot.com/2009/12/deploying-spring-autowired-application.html
            Hide
            marius.bogoevici Marius Bogoevici added a comment -

            Just a quick comment on this issue: with Snowdrop 1.0.0.GA being released, please do not use the attached jars, which contain some older code, but rather download the release (and read the documentation) available at:

            http://jboss.org/snowdrop

            Show
            marius.bogoevici Marius Bogoevici added a comment - Just a quick comment on this issue: with Snowdrop 1.0.0.GA being released, please do not use the attached jars, which contain some older code, but rather download the release (and read the documentation) available at: http://jboss.org/snowdrop
            Hide
            nikhildamle Nikhil Damle added a comment -

            The VFSResource implementation is not able to find relative URLs that do not start with a "." . We are using XFire-Spring jars (xfire-spring-1.2.6.jar). The xfire.xml in this jar has the below import:
            ----------------------------------------------------------------------------------------------------------------
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

            <beans>
            <import resource="customEditors.xml"/>
            ....
            ....
            ----------------------------------------------------------------------------------------------------------------

            The VFSResource is not able to find the "customEditors.xml". We fixed the problem in VFSResource as follows:

            ****************************************************************************
            public Resource createRelative(String relativePath) throws IOException
            {
            //VirtualFile.findChild will not scan the parent or current directory
            //if (relativePath.startsWith("."))

            try

            { return new VFSResource(VFS.getRoot(new URL(getURL(), relativePath))); }

            catch (FileNotFoundException fe)

            { return new VFSResource(file.findChild(relativePath)); }

            }
            ****************************************************************************

            Can you please consider reopening this issue and fixing it. Thanks.

            Show
            nikhildamle Nikhil Damle added a comment - The VFSResource implementation is not able to find relative URLs that do not start with a "." . We are using XFire-Spring jars (xfire-spring-1.2.6.jar). The xfire.xml in this jar has the below import: ---------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <import resource="customEditors.xml"/> .... .... ---------------------------------------------------------------------------------------------------------------- The VFSResource is not able to find the "customEditors.xml". We fixed the problem in VFSResource as follows: **************************************************************************** public Resource createRelative(String relativePath) throws IOException { //VirtualFile.findChild will not scan the parent or current directory //if (relativePath.startsWith(".")) try { return new VFSResource(VFS.getRoot(new URL(getURL(), relativePath))); } catch (FileNotFoundException fe) { return new VFSResource(file.findChild(relativePath)); } } **************************************************************************** Can you please consider reopening this issue and fixing it. Thanks.
            Hide
            marius.bogoevici Marius Bogoevici added a comment -

            OK, thanks for pointing out this issue.

            Show
            marius.bogoevici Marius Bogoevici added a comment - OK, thanks for pointing out this issue.
            Hide
            marius.bogoevici Marius Bogoevici added a comment -

            I'd rather not continue by reopening this issue. I'll track this SNOWDROP-10 (https://jira.jboss.org/jira/browse/SNOWDROP-10) instead.

            Show
            marius.bogoevici Marius Bogoevici added a comment - I'd rather not continue by reopening this issue. I'll track this SNOWDROP-10 ( https://jira.jboss.org/jira/browse/SNOWDROP-10 ) instead.

              People

              • Assignee:
                marius.bogoevici Marius Bogoevici
                Reporter:
                marius.bogoevici Marius Bogoevici
              • Votes:
                8 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development