Hi Armin, I've actually been able to get OJB completely up and running in the portal. I had to hack the OJB source though to do so. In org/apache/ojb/broker/metadata/RepositoryPersistor.java, I hardcoded the SAXParserFactory to be an instance of com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl(); Any thoughts on making this configurable through OJB.properties?
-----Original Message----- From: Bob Damato Sent: Friday, September 16, 2005 11:36 AM To: 'OJB Users List' Subject: RE: Weird BOOT issue Hi Armin, I've come a little farther on this issue. I've promoted the jars to the system level instead of running them as a portalapp and that allowed me a little progress. But, it turns out that SAP has a bit of an odd classloading scheme and worse, they have a weird SAXParserFactory implementation that doesn't play well with others. I've managed my way through some of the classloading issues, but I'm struggling now with dealing with this SAX issue (happens when the repository.xml is read): Caused by: java.lang.ClassCastException: com.inqmy.lib.jaxp.SAXParserFactoryImpl at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryPersistor.readMetadataFromXML(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(Unknown Sour .... Unfortunately, I can't set the system property "javax.xml.parsers.SAXParserFactory" to something like xerces because it will cause problems for the rest of the portal. Here's a thread on the same problem with a different library: https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=http%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D24988 The developer said he was able to make his own classloader to work around it, but what I'm wondering is if there is a simpler solution. Would it be possible (appropriate?) to add an optional property to the OJB.properties file to specify the SAXParserFactory implementation to use in OJB? Any other thoughts on how to approach this? Thanks!! -----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 6:09 PM To: OJB Users List Subject: Re: Weird BOOT issue Bob Damato wrote: > I don't think so. There's only one copy of the jar on the system. The app is > a portal app, and I've tried the following scenarios: > > 1. db-ojb.jar in /PORTAL-INF/lib > OJB.properties and repository.xml in /PORTAL-INF/classes > > 2. db-ojb.jar in /PORTAL-INF/lib > OJB.properties and repository.xml in a jar in /PORTAL-INF/lib > > 3. db-ojb.jar unjarred under /PORTAL-INF/classes > OJB.properties and repository.xml in /PORTAL-INF/classes > I agree. The first one seems to be the correct way to specify an api and resources for use between portals. http://help.sap.com/saphelp_erp2004/helpdata/en/f9/561140d72dc442e10000000a1550b0/content.htm Think the class calling OJB use a ClassLoader which doesn't have access to the OJB classes. The OJB warn message isn't helpfully (will fix this for next version), because it catch the ClassNotFoundException without printing the stack trace and only return the warn messages you get (see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl line 337). I don't know the ClassLoader hierarchy used in the sap portal, maybe it's an issue with the Application-Config element properties (That's anyone's guess ;-)). Additionally in class ...broker.util.ClassHelper you can specify the ClassLoader used by OJB. regards, Armin > > > -----Original Message----- > From: Armin Waibel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 13, 2005 3:02 PM > To: OJB Users List > Subject: Re: Weird BOOT issue > > > Hi Bob, > > Bob Damato wrote: > >>We're using OJB 1.0.1 successfully in many different scenarios (different >>jvm's, ide's and app servers). We are experimenting with integrating it with >>SAP's Application Server for a portal and I'm getting the error below. I'm >>using the same configuration files that I'm successfully using elsewhere, so >>I'm at a loss for what could be causing the issue. >> >>Any ideas? >> > > > seems to be a ClassLoader issue. Does the appServer load the ojb.jar (or > some OJB classes) twice? E.g. one jar is in appServer > system/common/shared lib, the other one is in the webApp > (/WEB-INF/classes directory). > > regards > Armin > > > >>-------------------------------- >> >>[BOOT] WARN: Value "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl" is >>illegal for key "ObjectCacheClass" >>(should be a class, using default value class >>org.apache.ojb.broker.cache.ObjectCacheDefaultImpl) >>[BOOT] WARN: Value >>"org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl" is illegal >>for key "ConnectionFactoryClass" (should be a class, using default value >>class org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl) >>[BOOT] WARN: Value "org.apache.ojb.odmg.locking.LockManagerDefaultImpl" is >>illegal for key "LockManagerClass" >>(should be a class, using default value class >>org.apache.ojb.odmg.locking.LockManagerDefaultImpl) >>[BOOT] WARN: Value "org.apache.ojb.odmg.locking.InMemoryLockMapImpl" is >>illegal for key "LockMapClass" (should be a class, using default value class >>org.apache.ojb.odmg.locking.InMemoryLockMapImpl) >>[BOOT] WARN: Value >>"org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImplNew" >> is illegal >>for key "PersistentFieldClass" (should be a class, using default value class >>org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl) >>[BOOT] WARN: Value "org.apache.ojb.broker.core.PersistenceBrokerImpl" is >>illegal for key "PersistenceBrokerClass" (should be a class, using default >>value class org.apache.ojb.broker.core.PersistenceBrokerImpl) >>[BOOT] WARN: Value "org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl" is >>illegal for key "ListProxyClass" (should be a class, using default value >>class org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl) >>[BOOT] WARN: Value "org.apache.ojb.broker.core.proxy.SetProxyDefaultImpl" is >>illegal for key "SetProxyClass" (should be a class, using default value class >>org.apache.ojb.broker.core.proxy.SetProxyDefaultImpl) >>[BOOT] WARN: Value >>"org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl" is illegal for >>key "CollectionProxyClass" (should be a class, using default value class >>org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl) >>[BOOT] WARN: Value >>"org.apache.ojb.broker.core.proxy.IndirectionHandlerDefaultImpl" is illegal >>for key "IndirectionHandlerClass" (should be a class, using default value >>class org.apache.ojb.broker.core.proxy.IndirectionHandlerDefaultImpl) >>[BOOT] WARN: Value "org.apache.ojb.odmg.collections.DListImpl_2" is illegal >>for key "OqlCollectionClass" (should be a class, using default value class >>org.apache.ojb.odmg.collections.DListImpl) >>[BOOT] WARN: Value >>"org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl" is illegal >>for key "PersistenceBrokerFactoryClass" (should be a class, using default >>value null) >>[BOOT] ERROR: Creation of PersistenceBrokerFactory (PBF) instance failed, >>can't get PBF class object >> >>_____________________________________________________________________________________ >>Bob Damato >> Cox Target Media >>Internet Technology Manager >> Largo, Florida >> >>The thought manifests as the word. The word manifests as the deed. The deed >>develops into habit. And >>the habit hardens into character. So watch the thought and its ways with >>care. And let it spring from love, >>born out of concern for all beings. -- Buddha >> >> > > > --------------------------------------------------------------------- > 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]