I don't get any log messages from  OJB.  Where are those output to?

>  -----Original Message-----
>  From: Wayne Kidd [mailto:[EMAIL PROTECTED] 
>  Sent: Friday, September 19, 2003 2:52 PM
>  To: OJB Users List
>  Subject: Re: OJB and Oracle 9ias
>  
>  
>  This is the right place OJB instead of ojb.  I am sorry if I 
>  misled you.
>  
>  The place to understand is in the CVS for the following 2 classes
>  
>  org.apache.ojb.broker.util.configuration.impl.ConfigurationAb
>  stractImpl
>  
>  and
>  
>  org.apache.ojb.broker.util.configuration.impl.OjbConfiguration
>  
>  They actually do this stuff. 
>  
>  You will get an error message if that file is not found
>  
>          catch (Exception ignore)
>          {
>              LoggerFactory.getBootLogger().error("Cannot get 
>  OJB properties file, use default settings!");
>              properties.put("valid", "false");
>          }
>      }
>  
>  If you do not get this error, the properties file is found 
>  and the next thing to be concerned about is whether the 
>  following parameter was found in the properties file.  If 
>  not, it will default to repository.xml as shown in the code below
>  
>  
>  
>  repositoryFilename = getString("repositoryFile", "repository.xml");
>  
>          
>  It will then try to read that file.
>  
>  
>  
>  
>  
>  
>  Durham David Contr 805 CSPTS/SCBE wrote:
>  
>  >I have it in WEB-INF/classes.  Is it possible that it's not 
>  being found 
>  >because the file is OJB.properties instead of ojb.properties?
>  >
>  >  
>  >
>  >> -----Original Message-----
>  >> From: Wayne Kidd [mailto:[EMAIL PROTECTED]
>  >> Sent: Friday, September 19, 2003 2:22 PM
>  >> To: OJB Users List
>  >> Subject: Re: OJB and Oracle 9ias
>  >> 
>  >> 
>  >> The real question is where do you put ojb.properties.  
>  Nothing else
>  >> really matters.  Once the system can find that, it can be 
>  >> told to find 
>  >> anything.  It must be in the direct classpath of OC4J.  If 
>  >> you put it in 
>  >> a package structure (lower than classes), it will not be 
>  >> found because 
>  >> the property loader needs the fully qualified "classname" of the 
>  >> properties file.  This is a strange sounding term, but it 
>  means that 
>  >> when reading properties from the classpath, the loader of 
>  properties 
>  >> works a lot like a class loader.  What it does is take 
>  the file name 
>  >> (first part).  and uses it like a class name (case is 
>  >> important).  It 
>  >> assumes that the filetype (in MS terms) is .properties instead of 
>  >> .class.  It treats the folder structure like a package name. 
>  >>  You could 
>  >> set a startup parameter to change the "fully qualified 
>  >> "classname"" to 
>  >> something else.  But, if you want to do it vanilla, then you must 
>  >> arrange that the ojb.properties file does not have a package 
>  >> (is not in 
>  >> a folder structure).
>  >> 
>  >> Wayne
>  >> 
>  >> Durham David Contr 805 CSPTS/SCBE wrote:
>  >> 
>  >> >I definitely appreciate that bit of information.  
>  However, I don't
>  >> >think that OJB.properties file is found, so whatever I put 
>  >> in there is
>  >> >moot at this point.  Do I need to setup the system property for
>  >> >OJB.properties too?
>  >> >
>  >> >Thanks,
>  >> >
>  >> >Dave
>  >> >
>  >> >  
>  >> >
>  >> >> -----Original Message-----
>  >> >> From: Wayne Kidd [mailto:[EMAIL PROTECTED]
>  >> >> Sent: Friday, September 19, 2003 12:39 PM
>  >> >> To: OJB Users List
>  >> >> Subject: Re: OJB and Oracle 9ias
>  >> >> 
>  >> >> 
>  >> >> I use OJB with 9ias.   Here are the special things that I do 
>  >> >> to make it
>  >> >> happen.
>  >> >> 
>  >> >> 1).  I place ojb.properties into WEB-INF/classes
>  >> >> 2).  I also place xxx.xml (repository.xml) into the 
>  same directory 
>  >> >> and I describe it in ojb.properties as:
>  >> >> repositoryFile=/xxx.xml   The forward slash there is required.
>  >> >> 
>  >> >> With these parameters set, you can get your system 
>  running. If you 
>  >> >> are working with standalone and you are using eclipse, then you
>  >> >> must place 
>  >> >> your ojb.properties in the top level of the java source 
>  >> >> folder.  That 
>  >> >> will cause it to end up in classes.
>  >> >> 
>  >> >> If you are trying to run some of your code (probably for
>  >> testing or
>  >> >> something) from a java application (main), you will need
>  >> to have an
>  >> >> ojb.properties that specifies a repository that does not
>  >> >> haave the slash 
>  >> >> (differences in classloaders for app servers)
>  >> >> 
>  >> >> Wayne
>  >> >> 
>  >> >> Danilo Tommasina wrote:
>  >> >> 
>  >> >> > did you try to set the system property 'OJB.properties'
>  >> pointing to
>  >> >> > your  OJB.properties file (using forward slashes)?
>  >> >> >
>  >> >> > bye
>  >> >> > danilo
>  >> >> >
>  >> >> >>> if the OJB.properties wouldn't be found, you would
>  >> see a message
>  >> >> >>> like this:
>  >> >> >>>
>  >> >> >>> Cannot get OJB properties file, use default settings
>  >> >> >>
>  >> >> >>
>  >> >> >>
>  >> >> >> I'm not sure where this would be logged to in Oracle
>  >> 9ias.  When
>  >> >> >> running tomcat it is sent to Tomcat's console.  Anyway,
>  >> >> I'm pretty
>  >> >> >> sure that it doesn't load OJB.properties because it is
>  >> >> defaulting to
>  >> >> >> repository.xml of current working directory.
>  >> >> >>
>  >> >> >>
>  >> >> >>> slash '\\' instead of '/' however i see no reason for
>  >> doing that)
>  >> >> >>
>  >> >> >>
>  >> >> >>
>  >> >> >> Good call.  Alas, it doesn't matter until I can get 
>  this 9ias 
>  >> >> >> classloading issue resolved.
>  >> >> >>
>  >> >> >>
>  >> >> >>> bye
>  >> >> >>> danilo
>  >> >> >>
>  >> >> >>
>  >> >> >>
>  >> >> >> Thanks,
>  >> >> >>
>  >> >> >> Dave
>  >> >> >>
>  >> >> >> 
>  >> >> 
>  >> 
>  ---------------------------------------------------------------------
>  >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>  >> >> >>
>  >> >> >>
>  >> >> >
>  >> >> >
>  >> >> > 
>  >> >> 
>  >> 
>  ---------------------------------------------------------------------
>  >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>  >> >> 
>  >> >> 
>  >> >> 
>  >> >> 
>  >> 
>  ---------------------------------------------------------------------
>  >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>  >> >> 
>  >> >> 
>  >> >>    
>  >> >>
>  >> >
>  >> >------------------------------------------------------------
>  >> ---------
>  >> >To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >> >For additional commands, e-mail: [EMAIL PROTECTED]
>  >> >  
>  >> >
>  >> 
>  >>    
>  >>
>  >
>  >------------------------------------------------------------
>  ---------
>  >To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >For additional commands, e-mail: [EMAIL PROTECTED]
>  >  
>  >
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to