classpath « Core « Spring Q&A





1. Spring classpath prefix difference    stackoverflow.com

Documented here it states

This special prefix specifies that all classpath resources that match the given name must be obtained (internally, this essentially happens ...

2. Is the "classpath:" prefix specific to Spring, or is this a JVM concept?    stackoverflow.com

I have this in my web.xml:

<context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>classpath:spring-config.xml</param-value>
</context-param>
I suspect this is a convention used only by Spring? If it is, will it take ...

3. project layout and spring-test support issues    stackoverflow.com

We have project layout as below. src src/test/java src/test/resources and we cant add src/main/(java, resources) for code, because of earlier developemnt done. src/test/java is having both unit and integration tests in same package as class under ...

4. Classpath problem    stackoverflow.com

In my application there are three seperate projects for task specifics:

  1. One Java project for service layer and dao layer (using Spring DI) - business.jar
  2. One Java project for WS clients - WSClient.jar
  3. Web ...

5. Spring - relative path in classpath resource    stackoverflow.com

I'm wondering if if (and how) I could use relative classpath resource paths within spring. I've following application structure:

src/
  org/me/
    mainContext.xml
    app1/
   ...

6. classpath:/ and mappingDirectoryLocations under solaris    forum.springsource.org

classpath:/ and mappingDirectoryLocations under solaris I seem to have no problem on windows,linux, or parts of our application that load under tomcat(on any os). i.e. tomcat is loading the classpath. However, ...

7. Class"com.iccemail.web.SendMailController"was not found in CLASSPATH    forum.springsource.org

I am new to spring roo. I am creating maven project in google app engine to send email. But it is giving me error as ERROR DataNucleus.MetaData - Class "com.iccemail.web.SendEmailController" was ...

8. Unable to load schema extensions from classpath    forum.springsource.org

Unable to load schema extensions from classpath Hi, I have defined a XML schema extension and created the following artifacts: XSD containing xml extensions NamespaceHandler implementation BeanDefinitionParser implementation META-INF/spring.schemas META-INF/spring.handlers When ...

9. PropertyPlaceHolderConfigurration Classpath Problem    forum.springsource.org

PropertyPlaceHolderConfigurration Classpath Problem Hi, I am using PropertyPlaceHolderConfiguration to read the property outside the war file. To do so I used the code ...





10. Spring resource classpath issue    forum.springsource.org

Spring resource classpath issue Hi, I'm trying to deploy a spring based bundle in osgi (fuse esb).In spring context, I'm referring to a db4o file which is inside resources folder. As ...

11. classpath not working    forum.springsource.org

classpath not working Below is a snippet of a spring file used for ActiveMQ. When I use classpath for the context property-placeholder it is properly converted to the desired path location. ...

12. Spring - relative path in classpath resource    forum.springsource.org

13. Classpath definition    forum.springsource.org

Hi I have a strange problem when starting Spring in Jboss, I have defined a bean ( Bean A ) which appears to get instantiated correctly and is used during the ...

14. Using classpath* for resource bundles?    forum.springsource.org

classpath*:/META-INF/messages

15. classpath* and running the spring app in WAS problem    forum.springsource.org

classpath* and running the spring app in WAS problem Hello, With reference to packaging spring config files, I have the following scenario: My project architecture is like: MyProj JavaSource/... WebContent/WEB-INF/config/some_config.xml I ...

16. I need to add a classpath entry for a class to work    forum.springsource.org

methodbeforeadvice implemented and i'm trying to see if I can add create the affect of a -D by adding the entry in the System class. But the method I need aspected ...





17. classpath*: in contextConfigLocation    forum.springsource.org

I have several jars in a war that all contain a conf/spring/applicationContext.xml. In the web.xml, I try: contextConfigLocation classpath*:conf/spring/applicationContext.xml but it seems to only load the first one that ...

18. classpath*: problems    forum.springsource.org

classpath*: problems I have three jars each of which have an applicationContext.xml in a conf/spring directory (along with a few other applicationContext*.xml files). To initialize the BeanFactory, I do: String[] configLocations ...

19. classpath*: in not working?    forum.springsource.org

classpath*: in not working? In my app, I have several configuration files contained in the root of a particular .jar. One of these files is the application-context.xml file, which ...

20. How to make classpath*: work?    forum.springsource.org

How to make classpath*: work? Hi,All: I am using spring 1.2.5.Now I move my ApplicationContext*.xml to a jar file,as document said,I config in web.xml like: contextConfigLocation classpath*:com/power/spring/applicationContext*.xml Now the ...

21. Classpath Error in WAS 5.1.1.6+    forum.springsource.org

Classpath Error in WAS 5.1.1.6+ I have a Spring-based application that functioned perfectly until the WebSphere server it runs on was updated to 5.1.1.6. Now I am getting FileNotFoundExceptions (usually about ...

22. classpath not work    forum.springsource.org

classpath:/hibernate.cfg.xml If I hibernate.cfg.xml into package, for example, org/ak/hibernate.cfg.xml classpath:org/ak/hibernate.cfg.xml is not work too.

23. Classpath Error Help Me !!    forum.springsource.org

Classpath Error Help Me !! nested exception is org.hibernate.MappingException: Resource: classpath:org/prc/jsf/AQH/Usuarios.hbm.xml not found HIBERNATE.CFG.XML

24. what is the meaning of classpath resource    forum.springsource.org

what is the meaning of classpath resourcerelated to org.springframework.core.io.Resource please do not use to many technical words i am new to this framework please explain in plain english explanation with example ...

25. Complex classpath lookups    forum.springsource.org

hi all, in my app I have multiple folders referencing different sub-projects (I'm using eclipse) in my classpath. It looks like: app/conf app/build app/src app/sub/build/hibernate <--- desired path app/sub/src now, when ...

26. problem classpath of springframework is not effection    forum.springsource.org

problem classpath of springframework is not effection sir i download the springframework source from www.springframework.org i just build it with Ant i execute three command 1-- ant build // comments(it is ...

27. Should classpath* work for getConfigLocations?    forum.springsource.org

Should classpath* work for getConfigLocations? I have a class that extends AbstractTransactionalDataSourceSpringContextTests, and has this for its getConfigLocations impl: protected String[] getConfigLocations() { return new String[] { "classpath*:/**/local-dataSource.xml", "classpath*:/**/applicationContext.xml" }; } ...

28. Classpath within application    forum.springsource.org

Classpath within application I'm new to Spring and I've been assigned the task of incorporating an application (which isn't a true bean - which may be part of my problem) to ...

29. Classpath Question    forum.springsource.org

Hi all, I'd like to know how to define more than one classpath value into my applicationContext.xml file. Actually, I need to use into mappingLocations bracket. I have done something like ...

30. classpath*:** doesn't work in version 2.0?    forum.springsource.org

hmm, I have never seen **/* working 100% in any version of Spring, because the handling of such wildcards depends rather on container packaging, than on srping. For example, in Jboss ...

31.     forum.springsource.org

I have a config that imports a file from the classpath: The file lives in a jar that is included as a Maven dependency. Spring IDE ...

32. Overriding classpath resource    forum.springsource.org

Overriding classpath resource Hi all: Ive got several applications packed as jar and war files, im using ClassPathXmlApplicationContext to load configuration and in my xml files ive defined a PropertyPlaceHolderConfigurer this ...

33. FileNotFound when using classpath in mappingJarLocations?    forum.springsource.org

FileNotFound when using classpath in mappingJarLocations? Hi, I've defined a Hibernate SessionFactory bean that is used in both standalone (test) and webapps. When trying to init the webapp I get: Caused ...

34. Question on Import Resource using Classpath    forum.springsource.org

Is it considered good or bad to use import resource to initialize all beans in the classpath for example, I have one spring context per bean (for dao, service, controller) com.mycompany.theapp.example.service.UserService ...

35. Autowire primitives with classpath scanning for managed components    forum.springsource.org

Autowire primitives with classpath scanning for managed components I have several classes that I want to manage by classpath scanning using the @Component annotation. These classes have primitive fields that contain ...

36. Using Spring without having it in the classpath    forum.springsource.org

Using Spring without having it in the classpath Hi together, I am a Spring newbie and I want to use the Spring framework within an OpenOffice extension. The difficulty is, that ...

37. First time classpath? problem    forum.springsource.org

First time classpath? problem Hello First time using Spring-ws. Probably having a dumb error that I can't work through yet...help appreciated! deploying war under tomcat 6.0.16,, problem manifests as: SEVERE: Servlet ...

38. NAMESPACE_ERR after adding Xalan to classpath    forum.springsource.org

May 2nd, 2008, 09:20 AM #1 Domchi View Profile View Forum Posts Private Message Junior Member Join Date Oct 2007 Posts 14 NAMESPACE_ERR after adding Xalan to classpath Adding Xalan to ...

39. classpath resources for an InputStream parameter    forum.springsource.org

classpath resources for an InputStream parameter I have a class which is constructed using an InputStream parameter. What I would like to do in my xml bean configuration file is something ...

40. Problem with classpath URI    forum.springsource.org

Since the computer my application is deployed to has no connection to the internet I need to find a way to load the XSD from a resource. I tried the following ...

41. how can i get real path of "classpath:" ??    forum.springsource.org

hi. every one. our project is had some property like this. "classpath:" in spring-framework. so, sometimes i need to make some files in same directory like "classpath:", but, i don't know ...

42. Classpath cycle    forum.springsource.org

Classpath cycle Hi, I am not entirely sure this is the right forum to ask this question, so please let me know if a different forum is better suited. I have ...

43. Classpath issue by configuring LocalPersistenceManagerFactory    forum.springsource.org

Classpath issue by configuring LocalPersistenceManagerFactory Hi, I discovered a FileNotFoundException by configuring the LocalPersistenceManagerFactory. Spring is instantiating a specific PersistenceManagerFactory from my persistence framework, which is attempting to load a properties ...

44. Can Spring Ioc be used in a dynamic classpath environment?    forum.springsource.org

Can Spring Ioc be used in a dynamic classpath environment? Given an environment that uses custom class loaders to load modules using jar files, is it possible to have Spring first ...

45. problem with Bundle-Classpath    forum.springsource.org

problem with Bundle-Classpath Hello. I'm having a problem with reading resources from bundle. My jar structure: META-INF/MANIFEST.MF META-INF/spring/appContext.xml META-INF/spring/sqlMapConfig.xml x/xx/xxx.class In MANIFEST.MF i've got entry: Bundle-Classpath:.,META-INF/spring In appContext i have: Code: ...

46. classpath*: work across bundles when using DM    forum.springsource.org

classpath*: work across bundles when using DM I am still working on converting to DM. I have also switched to EBR's spring bundles. Previously, I had created a bundle using spring ...

47. ClassPathXmlApplicationContext with classpath*    forum.springsource.org

ClassPathXmlApplicationContext with classpath* Hi, I was trying integrate our Spring based application with Tibco Active Matrix. I am facing some fundamental problems. I have my application in jars and all the ...

48. .project and .classpath and java dependencies    forum.springsource.org

.project and .classpath and java dependencies Hi, I downloaded the spring toolsuite springsource-tool-suite-2.0.2-e3.4-win32.zip and am using it. Its working quite well. Just two small issues: 1) In my regular eclipse I ...

49. web-inf/lib not in classpath?    forum.springsource.org

web-inf/lib not in classpath? Hi all, I have a web app running under tomcat 6 and I need to scan all jars contained under web-inf/lib to get the ones having a ...

50. 3.0.0 RC2 import resource issue with classpath wildcards    forum.springsource.org

There seems to be a (rather severe) regression from RC1. importing resources from classpath with wildcards such as Code: stopped working. As a matter of fact, it seems ...

51. filepaths in constructors, add them to classpath?    forum.springsource.org

52. Classpath* and Classpath:*    forum.springsource.org

Classpath* and Classpath:* Part 1: Difference between classpath*: and classpath;* Ex classpath*:app*.xml && classpath:app*.xml is With xmls, app1.xml and app2.xml and beans in app2.xml referring to app1.xml - classpath:app*.xml will give ...

53. Unbound classpath variable error    forum.springsource.org

Unbound classpath variable error hi everyone, i just download the spring source code from SVN,and i want to do some test in the source code,because i want to know how does ...

54. classpath*: resource path not working with a VelocityEngineFactoryBean    forum.springsource.org

classpath*: resource path not working with a VelocityEngineFactoryBean I have a VelocityEngineFactoryBean I use when sending emails in a web app thats a multimodule maven war project like this: mywar.war - ...

55. How to write a custom classpath scanner?    forum.springsource.org

How to write a custom classpath scanner? Hi All, I want to write my own classpath scanner, as Spring's default doesn't suit my needs (even with custom filters). Simply put, I ...

56. Classpath issues    forum.springsource.org

Classpath issues Hi I am having some problems getting spring to work inside an eclipse plugin. I am sure I am doing something wrong, but I can't figure out what. I ...

57. Log4JConfigServlet unable to locate classpath:/META-INF/lo4j    forum.springsource.org

Log4JConfigServlet unable to locate classpath:/META-INF/lo4j Since the 'classpath' feature became available, I have placed all my config files: applicationContext.xml, myapp-servlet.xml, views.xml, validator-rules.xml, validation.xml etc... under src/META-INF. If I specify a context ...

58. classpath: unknown protocol    forum.springsource.org

Hi, I'm trying to have my mappings loaded by doing this which I have seen in examples: Code:

59. Can we specify the classpath in spring ?    forum.springsource.org

Can we specify the classpath in spring ? When spring makes the use of tag in the XML files, it generally look for all the locations in class path to ...

60. classpath resource change from 3.0.2 to 3.0.5?    forum.springsource.org

classpath resource change from 3.0.2 to 3.0.5? Hi all, I have an application built using spring 3.0.2, which works fine. The problem is it craps out when I attempt to update ...

61. Bundle Classpath Container not populated    forum.springsource.org

Bundle Classpath Container not populated Hi, I am using STS 2.5.1 and the "Bundle Dependencies" are not being populated from the Virgo v2.1 repository. I have found that I can force ...

62. "classpath" keyword    forum.springsource.org

Hi Everybody, I am new at spring and have a question about the implication of the "classpath" keyword in a bean configuration file. 1- Let us say, I have the following ...