Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring 3 classpath scanning fails on JBoss AS 6.0.0.M3 [SPR-7197] #11856

Closed
spring-issuemaster opened this issue May 12, 2010 · 10 comments
Closed

Spring 3 classpath scanning fails on JBoss AS 6.0.0.M3 [SPR-7197] #11856

spring-issuemaster opened this issue May 12, 2010 · 10 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented May 12, 2010

Marius Bogoevici opened SPR-7197 and commented

Context scanning fails in JBoss AS 6.0.0.M3 due to VFS issues. The VFS classes have moved from org.jboss.virtual to org.jboss.vfs. As well, a few methods have changed their names. Therefore, the fixes provided for #9793 need an update to match the current package structure.

I will attached a patch that abstracts the VFS2 and VFS3 code so that Spring 3 can detect the VFS version and run in either environments (JBoss AS 5 and JBoss AS 6).


Affects: 3.0.2

Attachments:

Referenced from: commits cbb9023, d9a664a, 578e80c, e9ecf5d

1 votes, 3 watchers

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 12, 2010

Marius Bogoevici commented

An explanatory note about the issue: After deploying on JBoss AS 6.0.0.M3, applications that use CP scanning will fail with an error like:

04:48:24,881 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed: java.lang.NoClassDefFoundError: org/jboss/virtual/VirtualFileVisitor

which indicates the package renaming that took place in the server (should be org/jboss/vfs/VirtualFileVisitor

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 12, 2010

Marius Bogoevici commented

Attached a patch for fixing the issue. Introduces an abstraction layer that detects the VFS version on the CP. As the operations are performed by reflection, it is not necessary to compile against the JBoss VFS jars anymore. The patch is produced by svn diff and has picked up some ipr changes as well. The latter can be discarded.

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 13, 2010

Juergen Hoeller commented

Thomas, any chance that you could have a look at this for 3.0.3 still? At least for an initial cut that works across JBoss AS 5 and 6?

Juergen

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 13, 2010

Marius Bogoevici commented

Jürgen, Thomas,

Thanks for looking into this so quickly. If the fix could be done for 3.0.3 it would be awesome. Let me know if I can be of any help.

Marius

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 13, 2010

Juergen Hoeller commented

I've changed this issue to an improvement since it's not really Spring's fault that JBoss AS changed its VFS package - and we didn't have a chance know about it upfront (i.e. at 3.0 GA time). JBoss 6 simply wasn't fully supported before.

In any case, it would be great if we could provide a painless user experience on JBoss 6 for Spring 3.0.3 already. That said - I am concerned that the integration testing effort might not easily fit into the 3.0.3 timeframe anymore...

Juergen

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 14, 2010

Costin Leau commented

Committed the fix - tested it on JBoss 6 M3 and 5.1. Additional testing is welcome.

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jun 11, 2010

Juergen Hoeller commented

I'll consider this as finished, with just some smoke re-testing to be done from our side before the 3.0.3 release.

Would be great to have this tested in others' JBoss environments as well, of course...

Juergen

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jun 14, 2010

Marius Bogoevici commented

Costin, Juergen,

I have tested tonight's trunk version of Spring 3 against JBoss AS 5.1 and 6(M3/trunk) and it everything looks fine.

Thanks for applying the patch!

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Feb 10, 2011

Nick Williams commented

Just for the benefit of replication, I have confirmed that this is no longer a problem. I had 3.0.1 and was getting this error, but when I upgraded the libraries to 3.0.5 the error went away.

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jan 23, 2017

Zheng Yang commented

Can I ask a simple question? How can I use this patch. I mean import into my current project.

I have an old project with spring framework 3.0.2 while it's hard to upgrade to a newer version.

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.