tag:blogger.com,1999:blog-2664528635822406543.post2989459791660636851..comments2023-05-17T19:00:04.398+10:00Comments on IMHO: Spring 2.0 schemas not found? And the solution is...Alex Weihttp://www.blogger.com/profile/16196507572911120081noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-2664528635822406543.post-77764000298998138912011-03-02T04:31:48.427+11:002011-03-02T04:31:48.427+11:00I had a similar problem, involving a servlet.
I w...I had a similar problem, involving a servlet.<br /><br />I was using AbstractApplicationContext ctx = new ClassPathXmlApplicationContext("context.xml"); to obtain the spring context.<br /><br />I tried using the code below inside the servlet's doGet <br /><br />ClassPathResource res = new ClassPathResource("context.xml");<br />ApplicationContext ctx = (AbstractApplicationContext) WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());<br /><br />and it worked! (spring context was obtained without any issue)<br /><br />Perhaps your context is not the same as mine, but this approach could help...Alejandro Gomezhttps://www.blogger.com/profile/08691459955772646258noreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-40703919491769628002011-03-02T04:30:46.214+11:002011-03-02T04:30:46.214+11:00This comment has been removed by the author.Alejandro Gomezhttps://www.blogger.com/profile/08691459955772646258noreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-6056314220358469172010-11-26T03:52:47.639+11:002010-11-26T03:52:47.639+11:00I have the same problem in my Jboss Server and you...I have the same problem in my Jboss Server and your workaround works also well for me.<br />But I really don't understand actually the root cause.......?Patricknoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-14065885820466369712009-07-28T01:54:12.444+10:002009-07-28T01:54:12.444+10:00We are not connected to the internet and under loa...We are not connected to the internet and under load this is causing a train wreck.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-87480498814334482722009-02-05T20:14:00.000+11:002009-02-05T20:14:00.000+11:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-83055716012361598192009-01-30T01:51:00.000+11:002009-01-30T01:51:00.000+11:00I'm sorry to ask but y tried to do your solution. ...I'm sorry to ask but y tried to do your solution. I used spring security aswell and it has its own schemas and handlers. so I put them all in one file (spring schemas and spring security schemas) and then generate the .jar file.<BR/>Then copy the jar file in two parts WEB-INF/lib and the lib/ directory of my tomcat server and it still doesn't find the schema declaration. Can you specify in which directory it should be.<BR/><BR/>thanks in advancedAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-8226550218535120682008-11-20T20:53:00.000+11:002008-11-20T20:53:00.000+11:00The problem is probably Sun Application Server 8.x...The problem is probably Sun Application Server 8.x specific. I wouldn't think SpringSource would release Spring in such a manner that it wouldn't work in any EJB 2.1 container.<BR/><BR/>nitinpai,<BR/>What we did was extending Spring's AbstractStatelessSessionBean, which will load the application context. It can share the same application context across all EJB instances and can shutdown properly when all EJB instances are destroyed. We'd rather not to load the application context inside our code...Alex Weihttps://www.blogger.com/profile/16196507572911120081noreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-3976447943118016872008-11-20T20:44:00.000+11:002008-11-20T20:44:00.000+11:00I think instead of doing this you can try out chan...I think instead of doing this you can try out changing the way you access the beans xml file. Try this:<BR/><BR/>ClassPathResource res = new ClassPathResource("beans.xml");<BR/><BR/>I did not have to add any extra jar file.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-67745125757870734312008-10-31T11:59:00.000+11:002008-10-31T11:59:00.000+11:00Awesome! This is really helpful.Awesome! This is really helpful.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-64895420909819701392008-06-13T22:44:00.000+10:002008-06-13T22:44:00.000+10:00Thanks a lot. We wasted lots of time for same prob...Thanks a lot. We wasted lots of time for same problem.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2664528635822406543.post-38878234846374164452008-04-04T00:04:00.000+11:002008-04-04T00:04:00.000+11:00Good information, actually i was facing such an is...Good information, actually i was facing such an issue.Anonymousnoreply@blogger.com