Re: OJB + tomcat + OJB.properties
WHIRLYCOTT wrote: Yes, I have the repository.dtd in my WEB-INF/classes dir as well. I'm using that in Eclipse to validate my repository.xml file. One difference is that I'm using Tomcat 5.0.18. Would you mind repeating your experiment using a version of Tomcat 5? I'm trying to figure out what I know at this point: 1) when working on the command line, I can use my OJB.properties and repository.xml file just fine (and can pass 12 junit tests against my database) 2) when running inside Tomcat, OJB.properties is being read 3) when running inside Tomcat, repository.xml is being read 4) the error message that OJB is giving is either incorrect or not very useful If you can try your test out in Tomcat 5, I'd love to know if that makes a difference. Works also under Tomcat 5.0.25 freshly downloaded from Jakarta without any configuration of Tomcat. I'll send you the webapp directly so you can test for yourself. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
Running on WinXP Pro, not as a service. I'm just starting it up from the command line. Regarding file permissions, I'm pretty certain that these aren't causing any problems because the relevant files are apparently being read... as I mentioned before, I know this because if I put some bad markup into the files, I get exceptions telling me so. phil. Daniel Perry wrote: I have it working in tomcat 5 and 4. Is this under linux or windows? Have you checked file permissions? (especially if XP and tomcat service ?) Have you tried running tomcat in user mode rather than service? Daniel. -Original Message- From: WHIRLYCOTT [mailto:[EMAIL PROTECTED] Sent: 24 June 2004 14:19 To: OJB Users List Subject: Re: OJB + tomcat + OJB.properties Yes, I have the repository.dtd in my WEB-INF/classes dir as well. I'm using that in Eclipse to validate my repository.xml file. One difference is that I'm using Tomcat 5.0.18. Would you mind repeating your experiment using a version of Tomcat 5? I'm trying to figure out what I know at this point: 1) when working on the command line, I can use my OJB.properties and repository.xml file just fine (and can pass 12 junit tests against my database) 2) when running inside Tomcat, OJB.properties is being read 3) when running inside Tomcat, repository.xml is being read 4) the error message that OJB is giving is either incorrect or not very useful If you can try your test out in Tomcat 5, I'd love to know if that makes a difference. phil. Thomas Dudziak wrote: WHIRLYCOTT wrote: I have this in my OJB.properties file: repositoryFile=repository.xml I purposely put some jibberish in the repository.xml file earlier on and I did indeed get an exception indicating that there was a problem reading the file. Based on this, I am assuming that the file is accessible and is being read. I also know that the repository.xml file is valid because when I run my test cases inside Eclipse, I'm able to insert/update/select/delete from the database using the default connection. It's very odd, but I'm thinking that there is a bug somewhere in the OJB code that loads the file. I started poking around the source earlier on and will try to get into it more later. If you have more ideas, I'd love to hear them and try them out. I just tried a very simple servlet that uses PB-Api with OJB, Tomcat 4.1.18, JDK 1.4.2 on WinXP, and it works. One thing I stumbled upon was that I forgot to put the repository.dtd into the classes folder. Since OJB parses XML files with validation turned on, this lead to an error in the XML parser. This is the layout that worked for me: \ \WEB-INF web.xml \classes OJB.properties repository.dtd repository.xml repository_user.dtd repository_database.dtd The connection descriptor is: Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - 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] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OJB + tomcat + OJB.properties
I have it working in tomcat 5 and 4. Is this under linux or windows? Have you checked file permissions? (especially if XP and tomcat service ?) Have you tried running tomcat in user mode rather than service? Daniel. > -Original Message- > From: WHIRLYCOTT [mailto:[EMAIL PROTECTED] > Sent: 24 June 2004 14:19 > To: OJB Users List > Subject: Re: OJB + tomcat + OJB.properties > > > Yes, I have the repository.dtd in my WEB-INF/classes dir as well. I'm > using that in Eclipse to validate my repository.xml file. > > One difference is that I'm using Tomcat 5.0.18. Would you mind > repeating your experiment using a version of Tomcat 5? > > I'm trying to figure out what I know at this point: > > 1) when working on the command line, I can use my OJB.properties and > repository.xml file just fine (and can pass 12 junit tests against my > database) > > 2) when running inside Tomcat, OJB.properties is being read > > 3) when running inside Tomcat, repository.xml is being read > > 4) the error message that OJB is giving is either incorrect or not very > useful > > If you can try your test out in Tomcat 5, I'd love to know if that makes > a difference. > > phil. > > Thomas Dudziak wrote: > > > WHIRLYCOTT wrote: > > > >> I have this in my OJB.properties file: > >> > >> repositoryFile=repository.xml > >> > >> I purposely put some jibberish in the repository.xml file earlier on > >> and I did indeed get an exception indicating that there was a problem > >> reading the file. Based on this, I am assuming that the file is > >> accessible and is being read. > >> > >> I also know that the repository.xml file is valid because when I run > >> my test cases inside Eclipse, I'm able to insert/update/select/delete > >> from the database using the default connection. > >> > >> It's very odd, but I'm thinking that there is a bug somewhere in the > >> OJB code that loads the file. I started poking around the source > >> earlier on and will try to get into it more later. > >> > >> If you have more ideas, I'd love to hear them and try them out. > > > > > > I just tried a very simple servlet that uses PB-Api with OJB, Tomcat > > 4.1.18, JDK 1.4.2 on WinXP, and it works. One thing I stumbled upon was > > that I forgot to put the repository.dtd into the classes folder. Since > > OJB parses XML files with validation turned on, this lead to an > error in > > the XML parser. This is the layout that worked for me: > > > > \ > > \WEB-INF > > web.xml > > \classes > > > > OJB.properties > > repository.dtd > > repository.xml > > repository_user.dtd > > repository_database.dtd > > > > The connection descriptor is: > > > > >jcd-alias="default" > >default-connection="true" > >platform="MySQL" > >jdbc-level="3.0" > >driver="com.mysql.jdbc.Driver" > >protocol="jdbc" > >subprotocol="mysql" > >dbalias="//localhost/test" > >username="***" > >password="***" > > eager-release="false" > >batch-mode="false" > > useAutoCommit="1" > > ignoreAutoCommitExceptions="false" > > /> > > > > > > Tom > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- >Whirlycott >Philip Jacob >[EMAIL PROTECTED] >http://www.whirlycott.com/phil/ > > - > 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]
Re: OJB + tomcat + OJB.properties
WHIRLYCOTT wrote: Yes, I have the repository.dtd in my WEB-INF/classes dir as well. I'm using that in Eclipse to validate my repository.xml file. One difference is that I'm using Tomcat 5.0.18. Would you mind repeating your experiment using a version of Tomcat 5? I'm trying to figure out what I know at this point: 1) when working on the command line, I can use my OJB.properties and repository.xml file just fine (and can pass 12 junit tests against my database) 2) when running inside Tomcat, OJB.properties is being read 3) when running inside Tomcat, repository.xml is being read 4) the error message that OJB is giving is either incorrect or not very useful If you can try your test out in Tomcat 5, I'd love to know if that makes a difference. Mhmm, don't know whether I be able to do so today, but I'll try. Have you tried a 4.1.x Tomcat ? Since you're using Eclipse, you could also debug OJB+Tomcat. So try the following: 1. Install and configure the Sysdeo Tomcat plugin if you haven't done so already 2. Using the OJB source dist or (preferably) a CVS checkout, build OJB with 'ant jar-debug'. This builds a debug version which can be used to debug. 3. Import the Eclipse workspace that comes with OJB 4. Put a breakpoint at the beginning of org.apache.ojb.broker.metadata.RepositoryPersistor#readMetadataFromXML(InputSource, Class) 5. Deploy your project into Tomcat and start Tomcat using the Sysdeo Tomcat (which automatically starts Tomcat in debug mode and connects to it) Now you can step through the loading of the repository.xml. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
Yes, I have the repository.dtd in my WEB-INF/classes dir as well. I'm using that in Eclipse to validate my repository.xml file. One difference is that I'm using Tomcat 5.0.18. Would you mind repeating your experiment using a version of Tomcat 5? I'm trying to figure out what I know at this point: 1) when working on the command line, I can use my OJB.properties and repository.xml file just fine (and can pass 12 junit tests against my database) 2) when running inside Tomcat, OJB.properties is being read 3) when running inside Tomcat, repository.xml is being read 4) the error message that OJB is giving is either incorrect or not very useful If you can try your test out in Tomcat 5, I'd love to know if that makes a difference. phil. Thomas Dudziak wrote: WHIRLYCOTT wrote: I have this in my OJB.properties file: repositoryFile=repository.xml I purposely put some jibberish in the repository.xml file earlier on and I did indeed get an exception indicating that there was a problem reading the file. Based on this, I am assuming that the file is accessible and is being read. I also know that the repository.xml file is valid because when I run my test cases inside Eclipse, I'm able to insert/update/select/delete from the database using the default connection. It's very odd, but I'm thinking that there is a bug somewhere in the OJB code that loads the file. I started poking around the source earlier on and will try to get into it more later. If you have more ideas, I'd love to hear them and try them out. I just tried a very simple servlet that uses PB-Api with OJB, Tomcat 4.1.18, JDK 1.4.2 on WinXP, and it works. One thing I stumbled upon was that I forgot to put the repository.dtd into the classes folder. Since OJB parses XML files with validation turned on, this lead to an error in the XML parser. This is the layout that worked for me: \ \WEB-INF web.xml \classes OJB.properties repository.dtd repository.xml repository_user.dtd repository_database.dtd The connection descriptor is: Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
WHIRLYCOTT wrote: I have this in my OJB.properties file: repositoryFile=repository.xml I purposely put some jibberish in the repository.xml file earlier on and I did indeed get an exception indicating that there was a problem reading the file. Based on this, I am assuming that the file is accessible and is being read. I also know that the repository.xml file is valid because when I run my test cases inside Eclipse, I'm able to insert/update/select/delete from the database using the default connection. It's very odd, but I'm thinking that there is a bug somewhere in the OJB code that loads the file. I started poking around the source earlier on and will try to get into it more later. If you have more ideas, I'd love to hear them and try them out. I just tried a very simple servlet that uses PB-Api with OJB, Tomcat 4.1.18, JDK 1.4.2 on WinXP, and it works. One thing I stumbled upon was that I forgot to put the repository.dtd into the classes folder. Since OJB parses XML files with validation turned on, this lead to an error in the XML parser. This is the layout that worked for me: \ \WEB-INF web.xml \classes OJB.properties repository.dtd repository.xml repository_user.dtd repository_database.dtd The connection descriptor is: Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
I have this in my OJB.properties file: repositoryFile=repository.xml I purposely put some jibberish in the repository.xml file earlier on and I did indeed get an exception indicating that there was a problem reading the file. Based on this, I am assuming that the file is accessible and is being read. I also know that the repository.xml file is valid because when I run my test cases inside Eclipse, I'm able to insert/update/select/delete from the database using the default connection. It's very odd, but I'm thinking that there is a bug somewhere in the OJB code that loads the file. I started poking around the source earlier on and will try to get into it more later. If you have more ideas, I'd love to hear them and try them out. phil. Thomas Dudziak wrote: WHIRLYCOTT wrote: The pathnames below that point to the repository.xml file are correct. Apart from that, the error messages aren't very useful. Where do you keep your OJB.properties and repository.xml files? The place should be ok for both files. phil. INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersistor : OJB Descriptor Repository: file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersis tor : Building repository from : file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml DEBUG (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersis tor : RespostoryPersistor using SAXParser : org.apache.xerces.jaxp.SAXParserImpl DEBUG (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.RepositoryXmlHandler : startDoc INFO (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.MetadataManager : No repository.xml file found, starting with empty metadata and connection configuration Here's the problem: either OJB does not find the repository.xml file, or it could not read/parse the file because of some parsing error (though that should have resulted in an exception). Is the filename stated a couple of lines above correct ? What repository location did you specify in your OJB.properties: 'repository.xml' or 'file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml' (the former should suffice) ? Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
WHIRLYCOTT wrote: The pathnames below that point to the repository.xml file are correct. Apart from that, the error messages aren't very useful. Where do you keep your OJB.properties and repository.xml files? The place should be ok for both files. phil. INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersistor : OJB Descriptor Repository: file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersis tor : Building repository from : file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml DEBUG (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersis tor : RespostoryPersistor using SAXParser : org.apache.xerces.jaxp.SAXParserImpl DEBUG (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.RepositoryXmlHandler : startDoc INFO (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.MetadataManager : No repository.xml file found, starting with empty metadata and connection configuration Here's the problem: either OJB does not find the repository.xml file, or it could not read/parse the file because of some parsing error (though that should have resulted in an exception). Is the filename stated a couple of lines above correct ? What repository location did you specify in your OJB.properties: 'repository.xml' or 'file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml' (the former should suffice) ? Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
The pathnames below that point to the repository.xml file are correct. Apart from that, the error messages aren't very useful. Where do you keep your OJB.properties and repository.xml files? phil. INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersistor : OJB Descriptor Repository: file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml INFO (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersis tor : Building repository from : file:/C:/jakarta-tomcat-5.0.18/webapps/cct/WEB-INF/classes/repository.xml DEBUG (2004-06-23) 17:17:25.094 org.apache.ojb.broker.metadata.RepositoryPersis tor : RespostoryPersistor using SAXParser : org.apache.xerces.jaxp.SAXParserImpl DEBUG (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.RepositoryXmlHandler : startDoc INFO (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.MetadataManager : No repository.xml file found, starting with empty metadata and connection configuration INFO (2004-06-23) 17:17:25.124 org.apache.ojb.broker.metadata.MetadataManager : No 'default-connection' attribute set in jdbc-connection-descriptors, thus it's currently not possible to use 'defaultPersistenceBroker()' convenience method to lookup PersistenceBroker instances. But it's possible to enable this at runtime using 'setDefaultKey' method. Thomas Dudziak wrote: WHIRLYCOTT wrote: I just ran a little test here. I put some invalid markup at the beginning of my repository.xml file in order to see if I would get an error message about it not being parsed correctly, and I did. So it appears that the repository.xml file is being read. But this is quite puzzling, because my OJB.properties and repository.xml files are indeed working when I run my code inside Eclipse. Still puzzled. Anyone have any ideas I could try? Please set the log level of the repository handler to INFO or DEBUG. Somewhere in the properties file there is a line org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN simply replace the WARN with DEBUG, and you should see a bit more info about the repository.xml parsing. You could also set the default log level to INFO to get more info. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
WHIRLYCOTT wrote: I just ran a little test here. I put some invalid markup at the beginning of my repository.xml file in order to see if I would get an error message about it not being parsed correctly, and I did. So it appears that the repository.xml file is being read. But this is quite puzzling, because my OJB.properties and repository.xml files are indeed working when I run my code inside Eclipse. Still puzzled. Anyone have any ideas I could try? Please set the log level of the repository handler to INFO or DEBUG. Somewhere in the properties file there is a line org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN simply replace the WARN with DEBUG, and you should see a bit more info about the repository.xml parsing. You could also set the default log level to INFO to get more info. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
I just ran a little test here. I put some invalid markup at the beginning of my repository.xml file in order to see if I would get an error message about it not being parsed correctly, and I did. So it appears that the repository.xml file is being read. But this is quite puzzling, because my OJB.properties and repository.xml files are indeed working when I run my code inside Eclipse. Still puzzled. Anyone have any ideas I could try? phil. Armin Waibel wrote: Hi, I think it could be more simple. You lookup the PB instance via the convenience method PBF#.defaultPersistenceBroker(). To use this method you have to specify one connection-descriptor as default one. http://db.apache.org/ojb/docu/faq.html#lookupPB regards, Armin Thomas Dudziak wrote: WHIRLYCOTT wrote: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) OJB.properties seem to have been read, but there is a problem with the connection descriptor. The message says that there is no jdbc-connection-descriptor that is configured to be the default connection. This can either mean that you have an error in your connection descriptor(s), or that OJB did not find the repository metadata. You can increase the logging level of OJB to INFO or DEBUG (in OJB.properties) to get some more info on what OJB does. Also please post you repository_database.xml file which contains the jdbc-connection-descriptor. Tom - 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] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
Yes, they are. phil. Brian McCallister wrote: Are the repository xml files all in WEB-INF/classes/ as well? -Brian On Jun 23, 2004, at 4:12 PM, WHIRLYCOTT wrote: Actually, there is a default descriptor in my repository.xml file. I know that these files are well formed and contain valid information because I'm using them as-is within my dev environment without any problems. It seems to be some kind of an issue of the files not being loaded properly...? _ dbalias="//xxx:1433" username="xxx" password="xxx"> _ phil. Charles N. Harvey III wrote: Just like it says. There is no "default" descriptor. Somewhere in repository.xml there are s. One of them must have: default="true". If not, OJB complains. Charlie WHIRLYCOTT said the following on 6/23/2004 4:00 PM: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPe rsistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBrok er(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(Reques tProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - 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] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
Are the repository xml files all in WEB-INF/classes/ as well? -Brian On Jun 23, 2004, at 4:12 PM, WHIRLYCOTT wrote: Actually, there is a default descriptor in my repository.xml file. I know that these files are well formed and contain valid information because I'm using them as-is within my dev environment without any problems. It seems to be some kind of an issue of the files not being loaded properly...? _ dbalias="//xxx:1433" username="xxx" password="xxx"> _ phil. Charles N. Harvey III wrote: Just like it says. There is no "default" descriptor. Somewhere in repository.xml there are s. One of them must have: default="true". If not, OJB complains. Charlie WHIRLYCOTT said the following on 6/23/2004 4:00 PM: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPe rsistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBrok er(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(Reques tProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java: 1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - 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]
Re: OJB + tomcat + OJB.properties
Actually, there is a default descriptor in my repository.xml file. I know that these files are well formed and contain valid information because I'm using them as-is within my dev environment without any problems. It seems to be some kind of an issue of the files not being loaded properly...? _ dbalias="//xxx:1433" username="xxx" password="xxx"> _ phil. Charles N. Harvey III wrote: Just like it says. There is no "default" descriptor. Somewhere in repository.xml there are s. One of them must have: default="true". If not, OJB complains. Charlie WHIRLYCOTT said the following on 6/23/2004 4:00 PM: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
Hi, I think it could be more simple. You lookup the PB instance via the convenience method PBF#.defaultPersistenceBroker(). To use this method you have to specify one connection-descriptor as default one. http://db.apache.org/ojb/docu/faq.html#lookupPB regards, Armin Thomas Dudziak wrote: WHIRLYCOTT wrote: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) OJB.properties seem to have been read, but there is a problem with the connection descriptor. The message says that there is no jdbc-connection-descriptor that is configured to be the default connection. This can either mean that you have an error in your connection descriptor(s), or that OJB did not find the repository metadata. You can increase the logging level of OJB to INFO or DEBUG (in OJB.properties) to get some more info on what OJB does. Also please post you repository_database.xml file which contains the jdbc-connection-descriptor. Tom - 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]
Re: OJB + tomcat + OJB.properties
Just like it says. There is no "default" descriptor. Somewhere in repository.xml there are s. One of them must have: default="true". If not, OJB complains. Charlie WHIRLYCOTT said the following on 6/23/2004 4:00 PM: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB + tomcat + OJB.properties
WHIRLYCOTT wrote: Greetings, I'm working away quite happily here with some code using OJB from inside Eclipse. However, now that I've started integrating this code into a webapp using Struts, I'm getting an exception that indicates that OJB is having some trouble reading the OJB.properties file. It's located in $TOMCAT/webapps/appname/WEB-INF/classes/OJB.properties, which I believe is correct. I also have my repository.xml file in the same directory. Ideas? phil. 2004-06-23 15:51:40 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.ojb.broker.PBFactoryException: There was no default-PBKey specified at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at com.something.lst.AbstractBaseFacade.(Unknown Source) at com.something.lst.LetterDefinitionFacade.(Unknown Source) at com.something.appname.actions.LetterLibraryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) OJB.properties seem to have been read, but there is a problem with the connection descriptor. The message says that there is no jdbc-connection-descriptor that is configured to be the default connection. This can either mean that you have an error in your connection descriptor(s), or that OJB did not find the repository metadata. You can increase the logging level of OJB to INFO or DEBUG (in OJB.properties) to get some more info on what OJB does. Also please post you repository_database.xml file which contains the jdbc-connection-descriptor. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]