Tags down


adding resource files to karaf classpath

By : Nuttha Non Piza
Date : October 16 2020, 03:08 PM
it fixes the issue
I have been given a client jar that I'm using to invoke the server side classes and methods (containing code that I cannot update). The required property files are present in the provided client jar, but their code still doesn't locate and load them.
code :

Share : facebook icon twitter icon

jar bundle and its classpath in ServiceMix-karaf

By : Nathaniel
Date : March 29 2020, 07:55 AM
wish helps you i also posted my question on ServiceMix forum and i have got the answer from Freeman-2. Here is the answer
code :
You can try to put  FactoryContext.xml in a unique folder like META- 
INF/MyFactoryContext/FactoryContext.xml, then jar2 also export package   
META-INF.MyFactoryContext, and jar1 import package META- 
INF.MyFactoryContext, and  then should be able to use code like 
context = new ClassPathXmlApplicationContext("META-INF/ 
in jar1.

Add resource files to classpath using daemon(jsvc)

By : Luke Lau
Date : March 29 2020, 07:55 AM
will be helpful for those in need One thing you can do is use the Maven Shade plugin. This is used to create a SuperJAR of everything in your build profile — dependent JARs from Apache and Spring, as well as your own code. The Shade Plugin can that add a Classpath entry of "." into the Manifest of the SuperJAR, this is precisely how you will be able to run the Main class of the SuperJAR, but have the classloader look in both a local directory as well as a JAR for all your components.
You'll have to adjust your build a bit so that things like log4j.properties and application-context.xml, and other files you wish to have sysadmins/customers modifer after build are kept out of the resources/path — otherwise they will get baked into the build.

How to walk a directory tree on the classpath looking resource files?

Date : March 29 2020, 07:55 AM
With these it helps You can use the Reflections library if I am not mistaken.
code :
public static void main(String[] args) {
    Reflections reflections = new Reflections(new ConfigurationBuilder()
    .setScanners(new ResourcesScanner()));

    Set<String> textFiles = reflections.getResources(Pattern.compile(".*\\.txt"));

    for (String file : textFiles){

org.eclipse.xtext.resource.FileNotFoundOnClasspathException: Couldn't find resource on classpath. URI was 'classpath:/..

By : user4870863
Date : March 29 2020, 07:55 AM
This might help you I know it's a late reply, but I met the same problem and it took some time to find the problem root.
The error message actually points to the grammarURI in **.mwe2 file.

Adding a resource directory to classpath of greety (Gradle Plugin)

By : user5495187
Date : March 29 2020, 07:55 AM
This might help you I just found the solution looking into the gretty opened issues. According to the author, this is a feature not documented yet. Here is the solution:
Related Posts Related Posts :
  • android error: The RealmClass annotation does not support nested classes
  • Hadoop: There are 0 datanodes running and no nodes & cannot connect to namenode
  • Return Response arraylist and 1 attribute
  • Java, why do my lines always white out in BlueJ?
  • starting apache drill process with java API?
  • Configuring a Maven plugin twice in a pom.xml
  • How to work with Lombok?
  • How to parse list of object from Json Object
  • Adding certificate in .cer format into to .bks keystore
  • String array initialization using for loop
  • Dynamic element inside several 'li'
  • Unable to upload a file to Spring REST service via RestTemplate
  • Scala: Why java.lang.IllegalArgumentException: Cannot format given Object as a Date?
  • How does CoreOS allocates memory to a Docker container?
  • Repaint never reaches paintComponent();
  • Instantiating a generic class in a generic class
  • Case insensitive path startsWIth endsWith
  • Deleting directory in finally block?
  • How to include resources from src/main/java
  • Cant assign found item to variable as array
  • add(T) in List cannot be applied to Java.lang.Number
  • Spring Data JPA Many to Many with extra column
  • How to index a boolean @Field in Hibernate Search if the field is not in the db table
  • Modify and access value outside a thread class
  • How to skip @Param in @Query if is null or empty in Spring Data JPA
  • Using AssertJ, how do I perform complex assertions on the contents of a list?
  • Get the corner value of dienantion array in java
  • How can I delete the available state in a local cache?
  • Can't get rid of the ugly border around ImageButton
  • Togglez feature activation based on input parameters from call
  • Passing confirmation to JSP from servlet, getting errors
  • How to check the date and timestamp is before 20mins
  • Java: How does a call to the super class constructor inside of a child class constructor work?
  • Strategy pattern, pass function into parent method
  • How to send large files to ActiveMQ using camel
  • How to get selected item from the listView
  • SWT Text field: make text focused at the end of the line
  • Int Def declaration Java
  • SonarQube API Docs for custom rules
  • Vert.x chunked answer with data from database using BLOB and hibernate
  • Maven build fails, because it does not recognize a .jar added to the build path
  • Keycloak force refresh token
  • How to get the Future list in order when calling the executorService.invokeAll(callables)?
  • How to parse a particular array of object using gson?
  • How to split a string with recurrent characters in java
  • Convert HTML with images to PDF using iText
  • RxJava: How to make observable to create on different thread than main thread
  • Creating a java bean from a clojure map
  • Difference between creating a class and extending fragment and just creating a fragment
  • Can SchemaCrawler transfer data to another database?
  • decreasing in size when reversing and storing text from a file to another using Java
  • Spring Command Line App hangs after Async method calls complete
  • How to exit parent / ancestor frame on click of new frame
  • Creating a run time array that takes user input and creates array at run time & accepts 3 variables to calculate sum
  • I am expecting my boolean to be saved in shared preferences as true, however it always saves as false
  • Selenium - Testng : SoftAssert to be called inside each method or inside @afterTest
  • add java 9 system modules to compile in eclipse
  • Multiple JsonCreator annotated methods
  • How to get data from response body
  • Parsing nested elements with Spring Boot RestTemplate gives JSON parse error
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com