Re: deploy OJB with web application
On Mon, 23 Feb 2004, marc salvetti wrote: i use the latest ojb version (rc5) See the answer from armin, this message seems not to be related with the current pb, it is apparently for sequence generation From what I gather, it seems as if there was a problem with the Resin build-in xml parser and xslt processor (at least in versions 2.1.6/7, but may still be present). These did not resolve entities correctly. Even if that is not your actual problem, you might want to try the solution: replace the xml parser (and xslt processor) that resin uses. Somewhere in the resin config (webapp config ?), you specify these system-properties: system-property javax.xml.transform.TransformerFactory= org.apache.xalan.processor.TransformerFactoryImpl/ system-property javax.xml.parsers.DocumentBuilderFactory= org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/ system-property javax.xml.parsers.SAXParserFactory= org.apache.xerces.jaxp.SAXParserFactoryImpl/ (these are for xerces/xalan). You also have to put the corresponding libraries into the lib folder of your webapp. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
On Mon, 23 Feb 2004, marc salvetti wrote: Thank you very much for this info, i will try to install resin on my local computer to check if it works with theses properties. But for now, i'm still stuck because i can't ask my isp to change the resin config, as i guess it could make problems with other people app. I'm not so sure about that. AFAIK, Resin allows you to put some non-standard (proprietary) config properties in the web.xml of your webapp. You should definitly check the doc about that. BTW it is always better to develop/debug a webapp using a local servlet container first (if possible) as it gives you much more freedom for experimentation and debugging. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
Thomas Dudziak wrote: On Mon, 23 Feb 2004, marc salvetti wrote: Thank you very much for this info, i will try to install resin on my local computer to check if it works with theses properties. But for now, i'm still stuck because i can't ask my isp to change the resin config, as i guess it could make problems with other people app. I'm not so sure about that. AFAIK, Resin allows you to put some non-standard (proprietary) config properties in the web.xml of your webapp. You should definitly check the doc about that. BTW it is always better to develop/debug a webapp using a local servlet container first (if possible) as it gives you much more freedom for experimentation and debugging. Actually you can put it in resin-web.xml, inside the WEB-INF along with web.xml and resin will merge both on startup, so that might be a place to try it. R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
On Sun, 22 Feb 2004, marc salvetti wrote: Tom, i finally got shell access from my isp, here is the interesting part of the log : [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: reference-descriptor [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: name: rootMessage [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: class-ref: bo. ForumMessage [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: refresh: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: auto-retrieve: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: auto-update: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: auto-delete: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: otm-dependent: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: foreignkey [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: field-ref: rootMessageID [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: foreignkey [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: reference-descriptor since the default value for auto-retrieve is true, do you think the auto-retrieve:null might be the cause of the problem ? and if so, is it a resin problem or an ojb problem ? There seems to be some trouble with parsing the class descriptor (and probably other parts of the configuration) which is likely to be some problem with the combo resin + ojb. Are there other messages from ojb like '... not found, using default values' or somesuch ? If you can, then you should try this with a local installation of resin 3.0.6 (should be no problem as you're allowed to use resin free of charge for development) or if you do not use specific features of resin, another servlet container like jetty or tomcat might do. This will enable you to debug this issue, and you can see where the problem is located (path issues, xml parsing problems etc.). Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
ZZZ Liu z2liu_work at yahoo.com writes: I am using OJB rc5. Everything is fine when I use it for stand alone program. But when I try to use it in a web application (applciation server is resin 2.1.10), I got following error. From the log, we can see that there is a NullPointerException at org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(Unknown Source) and from the debug message we can see that isolation-level: null. If I manually add isolation-level attribute to each class descriptor element in repository_internal.xml and all included repository_user.xml's, then it works. I don't think there is any document saying that we need to change repository_internal.xml. I am wondering whether anybody has ever had the same problem and what's the real cause and the soultion for it. Thanks in advance. Zhe === 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Get module name for path /core/domain/party/partySearchReport.jsp 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Module name found: default 84953 DEBUG [tcpConnection-9003-0] tiles.InsertTag - insert page='/core/fwk/mainLayout.jsp'. 88953 INFO [tcpConnection-9003-0] util.PropertyMessageResources - Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: startDoc [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: descriptor-repository [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: documentation [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG:class-descriptor [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null 89719 DEBUG [tcpConnection-9003-0] tiles.InsertTag - [ServletException in:/core/fwk/mainLayout.jsp] null' java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl. getDefaultKey(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl. defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory. defaultPersistenceBroker(Unknown Source) at com.gsnx.core.server.persistence.ojb.OjbPersistenceManager. init(OjbPersistenceManager.java) at com.gsnx.core.server.persistence.PersistenceManagerFactory. getPersistenceManager(PersistenceManagerFactory.java) at com.gsnx.core.server.util.lang.TranslationUtil. cacheTranslation(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.getTranslation(TranslationUtil. java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.webui.fwk.util.HtmlUtil.resolveLabel(HtmlUtil.java) at _core._fwk._mainlayout__jsp._jspService(_mainlayout__jsp.java:73) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:362) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:274) at com.caucho.jsp.QPageContext.include(QPageContext.java:547) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag. java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at _core._domain._party._partysearchreport__jsp. _jspService(_partysearchreport__jsp.java:82) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at
Re: deploy OJB with web application
Don't spin your wheels, I've already filed a bug with resin 3.0.6 where the repository won't parse right. Scott fixed it already for the next release, in the mean time use 3.0.4, it works fine. R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
Armin, i'm sorry i think i didn't understand your question in my last post i don't think there is a problem with entity elements because the objects are correctly loadeds, so the repository_user.xml is correctly parsed, the problem is that referenced objects and collections are null inside the created objects - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
Robert S. Sfeir robert at codepuccino.com writes: Don't spin your wheels, I've already filed a bug with resin 3.0.6 where the repository won't parse right. Scott fixed it already for the next release, in the mean time use 3.0.4, it works fine. R well in fact i don't have much choices as i don't control my host computer and resin versions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
marc salvetti wrote: Robert S. Sfeir robert at codepuccino.com writes: Don't spin your wheels, I've already filed a bug with resin 3.0.6 where the repository won't parse right. Scott fixed it already for the next release, in the mean time use 3.0.4, it works fine. R well in fact i don't have much choices as i don't control my host computer and resin versions You should tell your ISP then, because short of the OJB team figuring out their own workaround, and I don't think they should because the problem is in the parser not OJB, you're pretty much stuck until Scott Ferguson releases a build and your ISP upgrades to it. R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
Thomas Dudziak wrote: On Mon, 16 Feb 2004, marc salvetti wrote: well in fact i don't have much choices as i don't control my host computer and resin versions I wonder why this should have anything to do with resin ? From what you posted it seems more like a problem with the XML parser, as the isolation-level (which you probably didn't specify at first) wasn't read. If you don't specify an attribute value, the XML parser is supposed to fetch the default value from the DTD (if it exists), and if there is no default value (because e.g. it's CDATA) then a null is returned. So could it be that you either use an old repository.dtd (where there is no isolation-level attribute declared), or that the XML parser does not find the DTD (and is not configured to complain) ? You might want to try putting 'http://db.apache.org/ojb/repository.dtd' as the DTD location into your repository.xml. Tom Nope, I went through all that, clean install of everything, even outside my app. Scott Ferguson at Caucho figured it out and fixed it. It was the parser failing in a certain way, he's accounted for it. That same setup working fine in Tomcat 5. R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
Thomas Dudziak tomdz at first.gmd.de writes: On Mon, 16 Feb 2004, marc salvetti wrote: well in fact i don't have much choices as i don't control my host computer and resin versions I wonder why this should have anything to do with resin ? From what you posted it seems more like a problem with the XML parser, as the isolation-level (which you probably didn't specify at first) wasn't read. If you don't specify an attribute value, the XML parser is supposed to fetch the default value from the DTD (if it exists), and if there is no default value (because e.g. it's CDATA) then a null is returned. So could it be that you either use an old repository.dtd (where there is no isolation-level attribute declared), or that the XML parser does not find the DTD (and is not configured to complain) ? You might want to try putting 'http://db.apache.org/ojb/repository.dtd' as the DTD location into your repository.xml. Tom i think the parser problem with the isolation-level attribute is one issue, that i temporarily fixed by specifying the attribute on each class-descriptor, waiting for the next realease but the proble i encounter now is another issue, which prevent referenced objects and inverse-referenced collections to be loaded correctly i think if it was a parser problem, i would encounder an error in the initialisation, but this step works fine. the error occurs in my code because the referenced object (ie the author object in the ForumMessage class or the answers collection in the smae class and the messages collection in the User class) are set to null by ojb regards, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
tom, i tried to set the log level to debug in OJB.properties : ROOT.LogLevel=DEBUG but i don't understand how to access the log from my webapp, if i look to the error log of my isp, i only see the server errors, but not the output i can see on the console on my local computer the error occurs in my code because the referenced object (ie the author object in the ForumMessage class or the answers collection in the smae class and the messages collection in the User class) are set to null by ojb I have next to zero knowledge about the isolation level setting, but do you get the same behavior if you explicitly set the isolation level to the default value (read uncommited) ? Tom well it is actually set to read-uncommited, i've tried to set it to read-commited but it doesn't change anything, and if i don't set it explicitely, i get the same error as in the first message of the thread (parser error) marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
On Mon, 16 Feb 2004, marc salvetti wrote: but i don't understand how to access the log from my webapp, if i look to the error log of my isp, i only see the server errors, but not the output i can see on the console on my local computer Documentation on the Resin logging configuration can be found here : http://www.caucho.com/resin-3.0/config/log.xtp I think that means that you should use the CommonsLoggerImpl (with commons-logging). Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy OJB with web application
Thomas Dudziak tomdz at first.gmd.de writes: On Mon, 16 Feb 2004, marc salvetti wrote: but i don't understand how to access the log from my webapp, if i look to the error log of my isp, i only see the server errors, but not the output i can see on the console on my local computer Documentation on the Resin logging configuration can be found here : http://www.caucho.com/resin-3.0/config/log.xtp I think that means that you should use the CommonsLoggerImpl (with commons-logging). Tom tom, thank you for all the info, i changed the debug parameter, but still my problem is that i don't have access to resin config files, i only can configure my account through the cpanel interface. i guess i will have to ask my isp for the logs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: deploy OJB with web application
Armin. Thanks for your reply. We found the problem. It is because resin has it's own XML parser which is not exactly the same as apache's. And when resin starts, it loads its own library before loading from WEB-INF/lib. The problem can be solved by explicitly putting xerces.jar in the classpath. Thanks, Zhe -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 3:28 AM To: OJB Users List Subject: Re: deploy OJB with web application Hi, ZZZ Liu wrote: I am using OJB rc5. Everything is fine when I use it for stand alone program. But when I try to use it in a web application (applciation server is resin 2.1.10), I got following error. From the log, we can see that there is a NullPointerException at org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(Unknown Source) and from the debug message we can see that isolation-level: null. hmm, think something wrong with your file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml file. Should be something like that: descriptor-repository version=1.0 isolation-level=read-uncommitted proxy-prefetching-limit=50 !-- include all used database connections -- database; !-- include ojb internal mappings here -- internal; !-- include user defined mappings here -- user; /descriptor-repository regards, Armin If I manually add isolation-level attribute to each class descriptor element in repository_internal.xml and all included repository_user.xml's, then it works. I don't think there is any document saying that we need to change repository_internal.xml. I am wondering whether anybody has ever had the same problem and what's the real cause and the soultion for it. Thanks in advance. Zhe === 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Get module name for path /core/domain/party/partySearchReport.jsp 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Module name found: default 84953 DEBUG [tcpConnection-9003-0] tiles.InsertTag - insert page='/core/fwk/mainLayout.jsp'. 88953 INFO [tcpConnection-9003-0] util.PropertyMessageResources - Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: startDoc [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: descriptor-repository [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: documentation [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG:class-descriptor [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null 89719 DEBUG [tcpConnection-9003-0] tiles.InsertTag - [ServletException in:/core/fwk/mainLayout.jsp] null' java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.getDefaultKey(Un known Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersisten ceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn own Source) at com.gsnx.core.server.persistence.ojb.OjbPersistenceManager.init(OjbPersist enceManager.java) at com.gsnx.core.server.persistence.PersistenceManagerFactory.getPersistenceMan ager(PersistenceManagerFactory.java) at com.gsnx.core.server.util.lang.TranslationUtil.cacheTranslation(TranslationU til.java) at com.gsnx.core.server.util.lang.TranslationUtil.getTranslation(TranslationUti l.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.webui.fwk.util.HtmlUtil.resolveLabel(HtmlUtil.java) at _core._fwk._mainlayout__jsp._jspService(_mainlayout__jsp.java:73) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:36 2) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:27 4) at com.caucho.jsp.QPageContext.include(QPageContext.java:547) at org.apache.struts.tiles.TilesUtilImpl.doInclude
Re: FW: deploy OJB with web application
Hi, your log shows [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null ... [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null hmm, something wrong with your repository.xml file. Because when repository.xml looks like ... descriptor-repository version=1.0 isolation-level=read-uncommitted proxy-prefetching-limit=50 !-- include all used database connections -- database; ... OJB should find these properties. regards, Armin ZZZ Liu wrote: Armin, Thanks for your reply. Here is a portion of my repository.xml. I am not sure whether the missing attribute for proxy-prefetching-limit causes the problem? descriptor-repository version=1.0 isolation-level=read-uncommitted !-- include all used database connections -- database; !-- include ojb internal mappings here -- internal; Thanks, Zhe -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 3:28 AM To: OJB Users List Subject: Re: deploy OJB with web application Hi, ZZZ Liu wrote: I am using OJB rc5. Everything is fine when I use it for stand alone program. But when I try to use it in a web application (applciation server is resin 2.1.10), I got following error. From the log, we can see that there is a NullPointerException at org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(Unknown Source) and from the debug message we can see that isolation-level: null. hmm, think something wrong with your file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml file. Should be something like that: descriptor-repository version=1.0 isolation-level=read-uncommitted proxy-prefetching-limit=50 !-- include all used database connections -- database; !-- include ojb internal mappings here -- internal; !-- include user defined mappings here -- user; /descriptor-repository regards, Armin If I manually add isolation-level attribute to each class descriptor element in repository_internal.xml and all included repository_user.xml's, then it works. I don't think there is any document saying that we need to change repository_internal.xml. I am wondering whether anybody has ever had the same problem and what's the real cause and the soultion for it. Thanks in advance. Zhe === 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Get module name for path /core/domain/party/partySearchReport.jsp 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Module name found: default 84953 DEBUG [tcpConnection-9003-0] tiles.InsertTag - insert page='/core/fwk/mainLayout.jsp'. 88953 INFO [tcpConnection-9003-0] util.PropertyMessageResources - Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: startDoc [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: descriptor-repository [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: documentation [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG:class-descriptor [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null 89719 DEBUG [tcpConnection-9003-0] tiles.InsertTag - [ServletException in:/core/fwk/mainLayout.jsp] null' java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.getDefaultKey(Un known Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersisten ceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn own Source) at com.gsnx.core.server.persistence.ojb.OjbPersistenceManager.init(OjbPersist enceManager.java) at com.gsnx.core.server.persistence.PersistenceManagerFactory.getPersistenceMan ager(PersistenceManagerFactory.java) at com.gsnx.core.server.util.lang.TranslationUtil.cacheTranslation(TranslationU til.java) at com.gsnx.core.server.util.lang.TranslationUtil.getTranslation(TranslationUti l.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.webui.fwk.util.HtmlUtil.resolveLabel(HtmlUtil.java) at _core._fwk._mainlayout__jsp._jspService(_mainlayout__jsp.java:73) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182
Re: deploy OJB with web application
Hi, ZZZ Liu wrote: I am using OJB rc5. Everything is fine when I use it for stand alone program. But when I try to use it in a web application (applciation server is resin 2.1.10), I got following error. From the log, we can see that there is a NullPointerException at org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(Unknown Source) and from the debug message we can see that isolation-level: null. hmm, think something wrong with your file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml file. Should be something like that: descriptor-repository version=1.0 isolation-level=read-uncommitted proxy-prefetching-limit=50 !-- include all used database connections -- database; !-- include ojb internal mappings here -- internal; !-- include user defined mappings here -- user; /descriptor-repository regards, Armin If I manually add isolation-level attribute to each class descriptor element in repository_internal.xml and all included repository_user.xml's, then it works. I don't think there is any document saying that we need to change repository_internal.xml. I am wondering whether anybody has ever had the same problem and what's the real cause and the soultion for it. Thanks in advance. Zhe === 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Get module name for path /core/domain/party/partySearchReport.jsp 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Module name found: default 84953 DEBUG [tcpConnection-9003-0] tiles.InsertTag - insert page='/core/fwk/mainLayout.jsp'. 88953 INFO [tcpConnection-9003-0] util.PropertyMessageResources - Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: startDoc [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: descriptor-repository [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: documentation [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG:class-descriptor [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null 89719 DEBUG [tcpConnection-9003-0] tiles.InsertTag - [ServletException in:/core/fwk/mainLayout.jsp] null' java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.getDefaultKey(Unknown Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source) at com.gsnx.core.server.persistence.ojb.OjbPersistenceManager.init(OjbPersistenceManager.java) at com.gsnx.core.server.persistence.PersistenceManagerFactory.getPersistenceManager(PersistenceManagerFactory.java) at com.gsnx.core.server.util.lang.TranslationUtil.cacheTranslation(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.getTranslation(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.webui.fwk.util.HtmlUtil.resolveLabel(HtmlUtil.java) at _core._fwk._mainlayout__jsp._jspService(_mainlayout__jsp.java:73) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:362) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:274) at com.caucho.jsp.QPageContext.include(QPageContext.java:547) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at _core._domain._party._partysearchreport__jsp._jspService(_partysearchreport__jsp.java:82) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at
Re: FW: deploy OJB with web application
Armin, Thanks for your reply. Here is a portion of my repository.xml. I am not sure whether the missing attribute for proxy-prefetching-limit causes the problem? descriptor-repository version=1.0 isolation-level=read-uncommitted !-- include all used database connections -- database; !-- include ojb internal mappings here -- internal; Thanks, Zhe -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 3:28 AM To: OJB Users List Subject: Re: deploy OJB with web application Hi, ZZZ Liu wrote: I am using OJB rc5. Everything is fine when I use it for stand alone program. But when I try to use it in a web application (applciation server is resin 2.1.10), I got following error. From the log, we can see that there is a NullPointerException at org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(Unknown Source) and from the debug message we can see that isolation-level: null. hmm, think something wrong with your file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml file. Should be something like that: descriptor-repository version=1.0 isolation-level=read-uncommitted proxy-prefetching-limit=50 !-- include all used database connections -- database; !-- include ojb internal mappings here -- internal; !-- include user defined mappings here -- user; /descriptor-repository regards, Armin If I manually add isolation-level attribute to each class descriptor element in repository_internal.xml and all included repository_user.xml's, then it works. I don't think there is any document saying that we need to change repository_internal.xml. I am wondering whether anybody has ever had the same problem and what's the real cause and the soultion for it. Thanks in advance. Zhe === 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Get module name for path /core/domain/party/partySearchReport.jsp 84938 DEBUG [tcpConnection-9003-0] util.RequestUtils - Module name found: default 84953 DEBUG [tcpConnection-9003-0] tiles.InsertTag - insert page='/core/fwk/mainLayout.jsp'. 88953 INFO [tcpConnection-9003-0] util.PropertyMessageResources - Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO: OJB Descriptor Repository: file:/D:/gsnx/builds/hourly/dist/gsnx/conf/repository.xml [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: startDoc [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: proxy-prefetching-limit: null [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: descriptor-repository [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: documentation [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG:class-descriptor [org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null 89719 DEBUG [tcpConnection-9003-0] tiles.InsertTag - [ServletException in:/core/fwk/mainLayout.jsp] null' java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.getDefaultKey(Un known Source) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersisten ceBroker(Unknown Source) at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn own Source) at com.gsnx.core.server.persistence.ojb.OjbPersistenceManager.init(OjbPersist enceManager.java) at com.gsnx.core.server.persistence.PersistenceManagerFactory.getPersistenceMan ager(PersistenceManagerFactory.java) at com.gsnx.core.server.util.lang.TranslationUtil.cacheTranslation(TranslationU til.java) at com.gsnx.core.server.util.lang.TranslationUtil.getTranslation(TranslationUti l.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.server.util.lang.TranslationUtil.message(TranslationUtil.java) at com.gsnx.core.webui.fwk.util.HtmlUtil.resolveLabel(HtmlUtil.java) at _core._fwk._mainlayout__jsp._jspService(_mainlayout__jsp.java:73) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:36 2) at com.caucho.server.http.QRequestDispatcher.include(QRequestDispatcher.java:27 4) at com.caucho.jsp.QPageContext.include(QPageContext.java