8 Replies Latest reply on Apr 9, 2013 3:37 AM by loky

    properties file not found

    loky

      Hey !

       

      I am a newbie with fuse esb entreprise.

       

      I have a mediation router jar which contains a camel spring POC project. In this project I am using a properties :

       

      <util:properties id="appProps" location="classpath:mediation.properties" />

       

      Which is used in camel route builder. This file has to be out of jar for production maintenance, and I don't understand where I have to put it in fuse esb entreprise for resolve the error :

       

      Error creating bean with name 'appProps': Invocation of init method failed; nested exception is java.io.FileNotFoundException: OSGi resource[mediation.properties|bnd.id=250|bnd.sym=camel-context.xml]

       

      thks !

       

      Jeff

        • 1. Re: properties file not found
          loky

          It is a realy academic project

          • 2. Re: properties file not found
            paul.h

            Use osgi config files instead.

             

            Context example:

             

            Where ${project.artifactId}, ${project.version} and ${osgi.configName} is maven project properties.

             

             

            In more detail see documentation.

            • 3. Re: properties file not found
              loky

              Thanks Paul for your help,

               

              I have an error :

               

              Caused by: java.lang.IllegalArgumentException: bundleContext property is required

              • 4. Re: properties file not found
                paul.h

                Show your maven POM, features.xml and spring context files.

                 

                1) copy cfg file to /etc/ folder

                2) install feature on fuse esb

                3) start bundle

                • 5. Re: properties file not found
                  loky

                  Thks Paul to help me !

                   

                  After a second test I have found how to solve my problem with properties in Fuse esb entreprise environnement.

                  with a :

                        

                            <property name="outDir" value="$"></property>

                       </bean>

                   

                  and a file  in /etc/com.ericsson.mediation.cfg !

                   

                  When I ask propertiesKeys.outDir values come from com.ericsson.mediation.cfg.

                   

                   

                  But I steel haven't found how to manage it with eclipse which still make a :

                   

                  Caused by: java.lang.IllegalArgumentException: bundleContext property is required

                   

                  For <osgic:cm-properties id="props" persistent-id="com.ericsson.mediation" />

                   

                  Any idea  ?

                   

                  Edited by: loky on Mar 4, 2013 1:51 PM

                  • 6. Re: properties file not found
                    loky

                    I have found a trick with a different camel context file for eclipse with :

                     

                         <!--      <osgic:cm-properties id="props" persistent-id="com.mycomp.mediation" /> -->

                         <!--      <context:property-placeholder properties-ref="props"></context:property-placeholder> -->

                     

                     

                         <context:property-placeholder location="file:C:\Users\com.mycomp.mediation.cfg" ></context:property-placeholder>

                     

                    Not really clean but I haven't found better solution ...

                    • 7. Re: properties file not found
                      paul.h

                      Show me full stack trace, spring context and cfg file please.

                       

                      Try replace $ to ${out.dir} both in cfg file and spring context.

                       

                      On future. If you change bundle and cfg file, then do update bundle_id in fuse esb console. If you only change cfg file do refresh bundle_id in fuse esb console.

                      • 8. Re: properties file not found
                        loky

                        Thanks

                         

                        Edited by: loky on Apr 9, 2013 7:37 AM