For anyone following the discussion on this forum, I've made a few changes to
the project structure, moving the context classes in the vfs module and leaving
the deployers to deal with deployment only.
A few hints:
1. context class is org.jboss.spring.vfs.context.VFSXmlWebApplicationContext
This is the contents of my deployers directory
$ ls
META-INFspring-context-support-2.5.6.jar
jboss-spring-int-deployers.jar spring-core-2.5.6.jar
jboss-spring-int-vfs.jarspring-orm-2.5.6.jar
jboss-spring.jarspring-tx-2.5.6.jar
spring-2.5.6.jar
thats hard to read ... better
| $ ls
| META-INF
| jboss-spring-int-deployers.jar
| jboss-spring-int-vfs.jar
| jboss-spring.jar
| spring-2.5.6.jar
| spring-beans-2.5.6.jar
| spring-context-2.5.6.jar
| spring-context-support-2.5.6.jar
| spring-core-2.5.6.jar
|
Hi Marius
I have another quick question, I've tried putting the new jars in the
deployers dir and the jboss lib/endorsed dir but this fix only seems to work
with the jars in the lib of my war. Is this expected are is it a simple JBoss
classpath config issue that I don't know about.
Thanks
marius.bogoevici wrote :
| Can you be a bit more specific and describe: what jars did you put in those
locations and what problems did you encounter?
| Marius
Also, please note that in this case, replacing just the
jboss-spring-int-vfs.jar will not help, you will need to use the new
Well I'm having all sorts of problems :-)
My main problem at the moment (which I should open a seperate thread either
here or on the spring forums) is dependency injection has stopped working for
me.
What I had working in a single war was a data access object defined like so
| @Repository
If I don't include int-vfs and int-deployers in the war/lib directory (but I do
have them in the spring.deployers directory) I get the following exception
| 15:16:26,116 INFO [TomcatDeployment] deploy, ctxPath=/common-mgt-fw-war,
vfsUrl=common-mgt-fw.spring/common-mgt-fw.war
|
It looks like you're also including spring.jar in your .war?
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4240073#4240073
Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4240073
Thanks for the update.
The problem seems to be that spring-web.jar is included in both the web app and
the deployer, where it does not really belong. Try removing the spring-web.jar
from the deployer and give it another try.
I'll fix the build not to it.
Generally speaking, try to make sure
Thanks alot guys ... duplicate jars was the answer to ALL my problems.
I was porting a sample app that was working on tomcat so I suppose its my own
fault. But my dependency injection problem was cleaned up (by removing the
hibernate jar) as well.
Thanks again. That was driving me CRA
Ok still have a (small) problem with these spring jars, when I access the jsp,
the war isn't picking up the spring tag libraries from the spring.jar
(spring-2.5.6.jar) thats contained in the deployer directory, if I remove the
tag definition everything is fine, I don't particularly need spring
Mike,
Can you be a bit more specific and describe: what jars did you put in those
locations and what problems did you encounter?
Thanks,
Marius
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4240013#4240013
Reply to the post :
I think you can somehow link these tlds/tags by declaring them in web.xml.
But I might be wrong since it's been ages when I last did www ui. :-)
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4240160#4240160
Reply to the post :
Mike,
You need spring-mvc.jar on the classpath (contents of which are not included in
spring.jar) if you want to reference the spring taglibs.
Are you sure that you added that particular jar to the deployer?
Marius
View the original post :
Just a heads-up: if you get the latest sources, you only need the
jboss-spring-int-vfs jar, and please use:
org.jboss.spring.vfs.context.VFSXmlWebApplicationContext
A complete example is to be found here:
Hi ...
I'm a bit of a noob w.r.t. alot of this so apologies if this question is
obvious or silly.
I've been trying to get a simple sample application running with JBoss 5.0 and
Spring 2.5.6. I have used the fix provided in
https://jira.jboss.org/jira/browse/JBSPRING-4 and my Root
Mike,
What you need to do is to add a similar contextClass configuration to your
DispatcherServlet. There are two application contexts that get created with
your Spring application, and in your case you need to deal with both.
Marius
View the original post :
Hmm, but ... you did too much research on this for a n00b ;)
Thanks for posting the complete configuration - as a side note, we will provide
shortly a release build with these libraries and some documentation on how to
use them, hopefully that will make things easier.
Marius
View the
marius.bogoevici wrote : Mike,
|
| What you need to do is to add a similar contextClass configuration to your
DispatcherServlet. There are two application contexts that get created with
your Spring application, and in your case you need to deal with both.
|
| Marius
Firstly Marius ...
Marcin,
Yes, that is correct. Unfortunately, ContextSingletonBeanFactoryLocator uses a
ClassPathXmlApplicationContext internally.
For having the whole functionality working properly we'll need another locator
class.
Marius
View the original post :
Tried it, works fine! Thank you, Marius!
There is still one thing pending, though. It is not something I need, but it
might be an issue for someone else.
I am talking about scanning for beanRefContext.xml files - see my post on Mon
May 11, 2009 10:13 AM.
As I mentioned, I do not need it, since
Marcin,
I added VFSClassPathXmlApplicationContext. Please give it a try.
Marius
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4231177#4231177
Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4231177
Thank you, Marius.
Once you add a JIRA, please let me know the link, so I can track it (and vote
for it!)
I hope a good solution can be found for GA version of JBoss 5 or preferably
earlier.
Marcin
View the original post :
Hello,
I am trying to make LAMS project work on JBoss 5.
Recently we started using ContextSingletonBeanFactoryLocator in Spring. So we
declared in our WARs:
| param-namecontextConfigLocation/param-name
|
Martin,
I see what you mean. We currently have the NamedXmlApplicationContext, but that
will accept a single Resource as an argument, and an XmlWebApplicationContext
(or subclass thereof) won't do it in your case.
We need to factor out something to that effect. I'll add a JIRA item.
Marius
David,
I added your fixes for scanning directories to
VFSResourcePatternResolvingHelper.
Also, as a note: JBossEnabledResourcePatternResolver will work with Spring
2.5.5, but will have problems on 2.5.6 (because vfszip resources are now
assumed to be jars).
So, for achieving the same
David,
This is awesome. I added a fix in pretty much the same vein
(subclassing XmlWebApplicationContext, deferring to VFS-based resource pattern
resolution), although there are some differences in the actual implementation.
Our goal is to support:
- pattern-based resource resolution
-
Great, thanks for the info!
Marius, can you please look at how we can use this?
Or how to apply David's fixes to our code.
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4227533#4227533
Reply to the post :
At Alfresco we also struggled getting our Spring-based framework working on
JBoss 5. We have lots of bean definition files using classpath-based pattern
matching. E.g.:
import resource=classpath*:alfresco/patch/*-context.xml/
We think we now have a solution and your feedback is welcome. I
Hi,
the issue remains with JBoss 5.0.1.GA and Spring 2.5.6. No problem with JBoss
4.x.
We have a web application and initialize the spring context with a
ContextLoaderListener (referenced in web.xml). The spring-beans-config (in the
classpath) uses context:component-scan.
For a spring
khoerder wrote :
| In my opinion, such issues should be fixed in JBoss or Spring, but not by
customers using these two wide-spread frameworks! - I'd rather use another
application sever than fixing these kind of things for production use, making
version upgrades a potential problem.
|
Please track https://jira.jboss.org/jira/browse/JBMICROCONT-411 for updates on
this.
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=4213448#4213448
Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4213448
ratheesh.nair wrote :
| I am wondering whether this fix is released, I ran into similar problem
with RichFaces 3.2.2, Jboss Portal 2.7.0 GA and Spring 2.5 version (pls dont
ask y not Seam :) ).
I didn't work on this any further since I don't know how to reproduce it.
Like I posted previously,
Hi,
I am wondering whether this fix is released, I ran into similar problem with
RichFaces 3.2.2, Jboss Portal 2.7.0 GA and Spring 2.5 version (pls dont ask y
not Seam :) ).
context:component-scan.../ tags are not processed and I had to change the
entire annotations in my beans to context
I've added the following test to VFS
|public void testDirectoryFind() throws Throwable
|{
| URL url = getResource(/vfs/test/outer.jar);
| String urlString = url.toExternalForm();
| int p = urlString.indexOf(:);
| URL rootURL = new URL(vfszip +
I doubt updating other files will help,
since it definitely looks to me as a VFS issue.
I'll try to recreate error, mocking your config.
Just can't promise when will that be - busy integrating Seam with JBoss5.
But you're welcome to give it a crack yourself, at VFS. ;-)
Since I think the part
Hi There again,
I am trying to deploy a jar with the spring beans and I get this error:
Caused by: java.lang.IllegalArgumentException: Cannot find entry: [EMAIL
PROTECTED], za/ac/wits/batch/aop
at
org.jboss.virtual.plugins.context.zip.ZipEntryContext.findEntry(ZipEntryContext.java:338)
Can you post the whole config?
And describing your app structure a bit.
I'll try to reproduce it, eventually fixing it. :-)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4171201#4171201
Reply to the post :
zithuba wrote :
| Caused by: java.lang.IllegalArgumentException: Cannot find entry: [EMAIL
PROTECTED], za/ac/wits/batch/aop
| at
org.jboss.virtual.plugins.context.zip.ZipEntryContext.findEntry(ZipEntryContext.java:338)
| at
Thanks
I have the old installation version. I will try it.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4171223#4171223
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171223
___
Hi,
The jboss-spring.xml:
?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.springframework.org/schema/beans
Did you try if it might work with VFS 2.0.0.Beta21?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4171246#4171246
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171246
___
in jboss-spring.xml I import the two files I use, the first being the
a-email*.xml.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4171247#4171247
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4171247
alesj wrote :
| It should work, otherwise I wouldn't commit - specially so close to CR1
release. ;-)
|
It does work, but with prior versions of Spring. I am using 2.5.3 in JBoss AS
CR1 and Spring has added a method called 'isReadable' in Resource. I have added
the method in my local
I updated the trunk to use 2.5.5.
And I added this
|public boolean isReadable()
|{
| try
| {
| return file.getSize() 0;
| }
| catch (IOException e)
| {
| throw new RuntimeException(e);
| }
|}
|
instead of
I get an error when building the classes, it is on the 'VFSResource.java' on
the line with 'getCompatibleURL(file)' method call on VFSUtils. I was using the
JBoss source I downloaded to compile.
How can I build from the trunk and have all the dependencies?
anonymous wrote : Or, can you
zithuba wrote :
| How can I build from the trunk and have all the dependencies?
|
It should work, otherwise I wouldn't commit - specially so close to CR1
release. ;-)
Do a clean checkout.
Go to build dir.
Simply run 'build clean most'.
This does everything, downloads all dependencies via
alesj wrote : Or, can you explain me what I need to do to create an example
that is gonna use that?
I've changed my Spring-deployer tests to use @Component scanning, and they
pass. :-)
I'll release new deployer right after JBoss5_CR1.
But you can already build it yourself from the trunk.
View
OK, this is not really the topic of this forum (see sticky), but since it's an
interesting topic, and I (re)wrote most of VFS, I'll help you. :-)
anonymous wrote :
| Where can I find the VFS spec?
|
There is no spec.
This is JBoss custom virtual-file-system.
Try here:
-
Thanks for the pointers.
Here is the stack trace:
2008-06-27 09:41:32,514 DEBUG
[org.springframework.core.io.support.PathMatchingResourcePatternResolver]
Cannot search for matching files underneath URL
I guess we'll be seeing a lot of these in new JBoss5. :-(
Since not a lot of frameworks out there knows how to handle anything else
besides plain JDK url/uri stuff, which is a shame.
I already provided a patch for Facelets, so that our Seam could work.
I suggest you go ahead, try how far you can
alesj wrote : OK, this is not really the topic of this forum (see sticky),
but since it's an interesting topic, and I (re)wrote most of VFS, I'll help
you. :-)
|
| at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
| at
Sorry for not mentioning that, I wanted to be short, but I missed the important
part.
I am looking at it, I will surely ask about what I will come up with as the fix.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4161094#4161094
Reply to the post :
zithuba wrote : Sorry for not mentioning that, I wanted to be short, but I
missed the important part.
|
Nah, np, just kiddin'. :-)
zithuba wrote :
| I am looking at it, I will surely ask about what I will come up with as the
fix.
|
I'm looking too.
I already have a few ideas, but you
alesj wrote :
| I'm looking too.
| I already have a few ideas, but you go ahead.
|
OK, this is what I came up with:
-
http://anonsvn.jboss.org/repos/jbossas/trunk/spring-int/src/main/org/jboss/spring/io
If you can pull this down, add the missing bit, in NamedXmlApplicationContext
|
Or, can you explain me what I need to do to create an example that is gonna use
that?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4161164#4161164
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4161164
56 matches
Mail list logo