RE: Binding JDBCPersistenceManagerFactory to JNDI.

Abe,
Do you mean I need to serialize it and store bytes in JNDI myself?
-----Original Message-----
From: White, Abe [mailto:[email protected]]
Sent: Friday, August 03, 2001 1:28 PM
To: Roytman, Alex; White, Abe; JDO-ListServ
Subject: RE: Binding JDBCPersistenceManagerFactory to JNDI._
All PersistenceManagerFactories are Serializable, and can be stored in
JNDI through serialization. The Kodo factories implement their own
readObject/writeObject methods to handle maintaining state and
connection pools correctly through the serialization process.
We would have liked to have used the Referenceable interface instead,
but Weblogic 5's JNDI implementation has a known bug where the interface
is completely ignored and objects are always Serialized anyway. Because
Weblogic is the most popular application server, we couldn't ignore it.
-----Original Message-----_
From: Roytman, Alex_
To: White, Abe; JDO-ListServ_
Sent: 8/3/01 1:18 PM_
Subject: Binding JDBCPersistenceManagerFactory to JNDI._
Abe,_
In your readme file you stated that PersistenceManagerFactory_
implementations can be stored in JNDI however neither of implementations
(JDBC or EE) implement References or Referenceable. Am I missing_
something?_
Alex_

Abe,
Do you mean I need to serialize it and store bytes in JNDI myself?
-----Original Message-----
From: White, Abe [mailto:[email protected]]
Sent: Friday, August 03, 2001 1:28 PM
To: Roytman, Alex; White, Abe; JDO-ListServ
Subject: RE: Binding JDBCPersistenceManagerFactory to JNDI._
All PersistenceManagerFactories are Serializable, and can be stored in
JNDI through serialization. The Kodo factories implement their own
readObject/writeObject methods to handle maintaining state and
connection pools correctly through the serialization process.
We would have liked to have used the Referenceable interface instead,
but Weblogic 5's JNDI implementation has a known bug where the interface
is completely ignored and objects are always Serialized anyway. Because
Weblogic is the most popular application server, we couldn't ignore it.
-----Original Message-----_
From: Roytman, Alex_
To: White, Abe; JDO-ListServ_
Sent: 8/3/01 1:18 PM_
Subject: Binding JDBCPersistenceManagerFactory to JNDI._
Abe,_
In your readme file you stated that PersistenceManagerFactory_
implementations can be stored in JNDI however neither of implementations
(JDBC or EE) implement References or Referenceable. Am I missing_
something?_
Alex_

Similar Messages

  • Unable to bind EEPersistenceManagerFactory to JNDI

    I get the following exception trying to bind EEPersistenceManagerFactory to
    JNDI with Kodo 2.2.3 (running with Weblogic 6.1 SP1):
    javax.naming.ConfigurationException. Root exception is
    java.rmi.MarshalException: failed to marshal
    bind(Ljava.lang.String;Ljava.lang.Object;Ljava.util.Hashtable;); nested
    exception is:
    java.io.NotSerializableException:
    com.solarmetric.kodo.impl.jdbc.JDBCPrefsConfiguration
    java.io.NotSerializableException:
    com.solarmetric.kodo.impl.jdbc.JDBCPrefsConfiguration
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
    Anyone else run into this?

    Sasha-
    That exception indicates that your PersistenceManagerFactory has not
    yet been configured with the proper driver information. Note that the
    JDOConnectionFactory does not use the system.prefs information by
    default: it is designed to be configured internally as per
    the JCA specification.
    I'm sorry to say, but it actually looks like there is no way to bind
    either the EEPersistenceManagerFactory or the JDOConnectionFactory into
    JNDI (unless you extends the EEPersistenceFactory with your own
    Referenceable implementation).
    I have made a bug report about this:
    https://bugzilla.solarmetric.com/show_bug.cgi?id=117
    We will certainly try to have this fixed as soon as possible. Can you
    please add a comment to the bug report with how urgently this is
    affecting you?
    Sasha Haghani <[email protected]> wrote:
    Patrick,
    I get a different problem with JDOConnectionFactory (in 2.2.3)...calling
    getPersistenceManager() on it throws this exception:
    Exception in thread "main" javax.jdo.JDODataStoreException: The JDBC driver
    name "null" is not a valid class.
    NestedThrowables:
    java.lang.NullPointerException
    at com.solarmetric.kodo.impl.jdbc.schema.DB.<init>(DB.java:62)
    at com.solarmetric.kodo.impl.jdbc.schema.DB.getInstance(DB.java:37)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.initConfigurati
    on(JDBCPersistenceManagerFactory.java:155)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.setup(JDBCPersi
    stenceManagerFactory.java:265)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.privateSetup(Pers
    istenceManagerFactoryImpl.java:810)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
    ager(PersistenceManagerFactoryImpl.java:53)
    "Patrick Linskey" <[email protected]> wrote:
    Sasha,
    This is a known problem with Kodo JDO 2.2.3 EE, caused by a bug in our
    JCA implementation.
    You should be able to work around this problem by binding a
    JDOConnectionFactory instead of an EEPersistenceManagerFactory.
    com.solarmetric.kodo.impl.jdbc.ee.JDOConnectionFactory extends
    EEPersistenceManagerFactory.
    Unfortunately, JDOConnectionFactory implements Serializable although it
    is not actually serializable. However, as JDOConnectionFactory also
    implements javax.resource.Referenceable, the JNDI bind should succeed.
    Finally, one other alternative is to use Kodo's JCA support to locate
    the PersistenceManagerFactory. Unfortunately, you are using WebLogic 6.1
    SP1, which has a flaky JCA implementation. Weblogic 6.1 SP2 resolves
    these problems. So, your best option is probably to upgrade your
    Weblogic install to SP2 and use JCA (as outlined in our docs).
    JDBCPrefsConfiguration will properly serialize in the next patch release
    of Kodo JDO.
    -Patrick
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

  • WARNING: Could not bind factory to JNDI

    Hi i am using tomcat server5.5
    Eclipse 3.2 and adding tomcat plug-in's to my Eclipse
    i created JNDI on tomcat server i got this type of error
    plez any one can help me
    i got this type WARNING
    WARNING: Could not bind factory to JNDI
    javax.naming.NamingException: Context is read only
    how can i over come this worning
    the server show message like
    INFO: Factory name: java:hibernate/SessionFactory
    May 2, 2007 9:12:24 AM org.hibernate.util.NamingHelper getInitialContext
    INFO: JNDI InitialContext properties:{}
    May 2, 2007 9:12:24 AM org.hibernate.util.NamingHelper bind
    INFO: Creating subcontext: java:hibernate
    May 2, 2007 9:12:24 AM org.hibernate.impl.SessionFactoryObjectFactory addInstanc
    e
    WARNING: Could not bind factory to JNDI
    javax.naming.NamingException: Context is read only
    at org.apache.naming.NamingContext.checkWritable(NamingContext.java:901)
    at org.apache.naming.NamingContext.createSubcontext(NamingContext.java:5
    15)
    at org.apache.naming.NamingContext.createSubcontext(NamingContext.java:5
    36)
    at org.apache.naming.SelectorContext.createSubcontext(SelectorContext.ja
    va:421)
    at javax.naming.InitialContext.createSubcontext(InitialContext.java:423)
    at org.hibernate.util.NamingHelper.bind(NamingHelper.java:69)
    at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFac
    toryObjectFactory.java:90)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:
    303)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
    a:1213)
    at com.gssamerica.expensereporting.business.dao.HibernateUtil.<clinit>(H
    ibernateUtil.java:38)
    at com.gssamerica.expensereporting.business.dao.RoleHome.roleList(RoleHo
    me.java:159)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .cacheRoles(LookupCacheListener.java:168)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .contextInitialized(LookupCacheListener.java:48)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
    t.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    343)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    May 2, 2007 9:12:24 AM org.hibernate.cache.UpdateTimestampsCache <init>
    INFO: starting update timestamps cache at region: org.hibernate.cache.UpdateTime
    stampsCache
    May 2, 2007 9:12:24 AM org.hibernate.cache.EhCacheProvider buildCache
    WARNING: Could not find configuration [org.hibernate.cache.UpdateTimestampsCache
    ]; using defaults.
    May 2, 2007 9:12:24 AM org.hibernate.cache.StandardQueryCache <init>
    INFO: starting query cache at region: org.hibernate.cache.StandardQueryCache
    May 2, 2007 9:12:24 AM org.hibernate.cache.EhCacheProvider buildCache
    WARNING: Could not find configuration [org.hibernate.cache.StandardQueryCache];
    using defaults.
    Roles Cached......
    ##################>.SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=
    []];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] col
    lectionRemovals=[] collectionUpdates=[]])
    Currencies Cached.......
    Countries Cached.......
    JNDI DATASOURCE USED ........................................
    Instance Created .................
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
    ' for connect URL 'null'
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:780)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
    .java:540)
    at com.gssamerica.expensereporting.ui.common.SQLManager.getConnection(SQ
    LManager.java:93)
    at com.gssamerica.expensereporting.business.dao.CacheHome.getExpenseIds(
    CacheHome.java:63)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .cacheExpenseId(LookupCacheListener.java:191)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .contextInitialized(LookupCacheListener.java:51)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
    t.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    343)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:243)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:773)
    ... 20 more
    Connection Error - Exchange Rates cannot be Stored in Database
    Expense Ids Cached......
    Statuses Cached......
    May 2, 2007 9:12:27 AM org.apache.catalina.startup.ContextConfig applicationConf
    ig
    INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].
    StandardHost[localhost].StandardContext[SCWCDProj]
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    log4j:ERROR Could not read configuration file from URL [file:E:/WebExpenses/Test
    ValidationsTomcat/WEB-INF/classes/log4j.properties].
    java.io.FileNotFoundException: E:\WebExpenses\TestValidationsTomcat\WEB-INF\clas
    ses\log4j.properties (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
    .java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
    nection.java:161)
    at java.net.URL.openStream(URL.java:1007)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurato
    r.java:433)
    at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.
    java:336)
    at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.
    java:70)
    at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebC
    onfigurer.java:151)
    at org.springframework.web.util.Log4jConfigListener.contextInitialized(L
    og4jConfigListener.java:51)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
    t.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    343)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    log4j:ERROR Ignoring configuration file [file:E:/WebExpenses/TestValidationsTomc
    at/WEB-INF/classes/log4j.properties].
    May 2, 2007 9:12:30 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    May 2, 2007 9:12:31 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    May 2, 2007 9:12:32 AM org.apache.catalina.loader.WebappClassLoader validateJarF
    ile
    INFO: validateJarFile(E:\WebExpenses\JSFDataBaseConnection\WEB-INF\lib\servlet-a
    pi.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
    javax/servlet/Servlet.class
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    May 2, 2007 9:12:35 AM org.apache.catalina.startup.ContextConfig applicationConf
    ig
    INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].
    StandardHost[localhost].StandardContext[WebServicesApp]
    May 2, 2007 9:12:37 AM org.apache.catalina.loader.WebappClassLoader validateJarF
    ile
    INFO: validateJarFile(E:\WebExpenses\JSFApplication\WEB-INF\lib\servlet-api.jar)
    - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/s
    ervlet/Servlet.class
    May 2, 2007 9:12:39 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    May 2, 2007 9:12:39 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\admin.xml
    May 2, 2007 9:12:40 AM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
    e
    May 2, 2007 9:12:40 AM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
    l=true
    May 2, 2007 9:12:40 AM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
    nNull=true
    May 2, 2007 9:12:42 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\balancer.xml
    May 2, 2007 9:12:43 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\jsp-examples.xml
    May 2, 2007 9:12:43 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\manager.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\ROOT.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\servlets-examples.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\tomcat-docs.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\TomcatJNDIProj.xml
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    May 2, 2007 9:12:45 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\webdav.xml
    May 2, 2007 9:12:46 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /struts2-blank-2.0.1 from URL f
    ile:C:/Tomcat 5.0/webapps/struts2-blank-2.0.1
    May 2, 2007 9:12:47 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization started
    May 2, 2007 9:12:47 AM org.springframework.core.CollectionFactory <clinit>
    INFO: JDK 1.4+ collections available
    May 2, 2007 9:12:47 AM org.springframework.core.CollectionFactory <clinit>
    INFO: Commons Collections 3.x available
    May 2, 2007 9:12:47 AM org.springframework.beans.factory.xml.XmlBeanDefinitionRe
    ader loadBeanDefinitions
    INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applic
    ationContext.xml]
    May 2, 2007 9:12:47 AM org.springframework.context.support.AbstractRefreshableAp
    plicationContext refreshBeanFactory
    INFO: Bean factory for application context [Root WebApplicationContext]: org.spr
    ingframework.beans.factory.support.DefaultListableBeanFactory defining beans [];
    root of BeanFactory hierarchy
    May 2, 2007 9:12:48 AM org.springframework.context.support.AbstractApplicationCo
    ntext refresh
    INFO: No beans defined in application context [Root WebApplicationContext]
    May 2, 2007 9:12:48 AM org.springframework.context.support.AbstractApplicationCo
    ntext initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using default [o
    [email protected]]
    May 2, 2007 9:12:48 AM org.springframework.context.support.AbstractApplicationCo
    ntext initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMu
    lticaster': using default [org.springframework.context.event.SimpleApplicationEv
    entMulticaster@2f7cfe]
    May 2, 2007 9:12:48 AM org.springframework.ui.context.support.UiApplicationConte
    xtUtils initThemeSource
    INFO: Unable to locate ThemeSource with name 'themeSource': using default [org.s
    [email protected]3]
    May 2, 2007 9:12:48 AM org.springframework.beans.factory.support.DefaultListable
    BeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory
    .support.DefaultListableBeanFactory defining beans []; root of BeanFactory hiera
    rchy]
    May 2, 2007 9:12:48 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Using context class [org.springframework.web.context.support.XmlWebApplica
    tionContext] for root WebApplicationContext
    May 2, 2007 9:12:48 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization completed in 1638 ms
    May 2, 2007 9:12:49 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /HibElearning from URL file:C:\
    Tomcat 5.0\webapps\HibElearning
    May 2, 2007 9:12:50 AM org.apache.catalina.loader.WebappClassLoader validateJarF
    ile
    INFO: validateJarFile(C:\Tomcat 5.0\webapps\HibElearning\WEB-INF\lib\servlet-api
    .jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: ja
    vax/servlet/Servlet.class
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    May 2, 2007 9:12:51 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /reddy from URL file:C:\Tomcat
    5.0\webapps\reddy
    May 2, 2007 9:12:52 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization started
    May 2, 2007 9:12:52 AM org.springframework.core.CollectionFactory <clinit>
    INFO: JDK 1.4+ collections available
    May 2, 2007 9:12:52 AM org.springframework.core.CollectionFactory <clinit>
    INFO: Commons Collections 3.x available
    May 2, 2007 9:12:52 AM org.springframework.beans.factory.xml.XmlBeanDefinitionRe
    ader loadBeanDefinitions
    INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applic
    ationContext.xml]
    May 2, 2007 9:12:52 AM org.springframework.context.support.AbstractRefreshableAp
    plicationContext refreshBeanFactory
    INFO: Bean factory for application context [Root WebApplicationContext]: org.spr
    ingframework.beans.factory.support.DefaultListableBeanFactory defining beans [];
    root of BeanFactory hierarchy
    May 2, 2007 9:12:52 AM org.springframework.context.support.AbstractApplicationCo
    ntext refresh
    INFO: No beans defined in application context [Root WebApplicationContext]
    May 2, 2007 9:12:53 AM org.springframework.context.support.AbstractApplicationCo
    ntext initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using default [o
    [email protected]]
    May 2, 2007 9:12:53 AM org.springframework.context.support.AbstractApplicationCo
    ntext initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMu
    lticaster': using default [org.springframework.context.event.SimpleApplicationEv
    entMulticaster@fae78f]
    May 2, 2007 9:12:53 AM org.springframework.ui.context.support.UiApplicationConte
    xtUtils initThemeSource
    INFO: Unable to locate ThemeSource with name 'themeSource': using default [org.s
    [email protected]3]
    May 2, 2007 9:12:53 AM org.springframework.beans.factory.support.DefaultListable
    BeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory
    .support.DefaultListableBeanFactory defining beans []; root of BeanFactory hiera
    rchy]
    May 2, 2007 9:12:53 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Using context class [org.springframework.web.context.support.XmlWebApplica
    tionContext] for root WebApplicationContext
    May 2, 2007 9:12:53 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization completed in 1279 ms
    May 2, 2007 9:12:53 AM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    May 2, 2007 9:12:54 AM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    plez any one can help me as early as possible

    Maybe this resoruce will be helpful.

  • JDBCPersistenceManagerFactory and JNDI

    Hi,
    I'm currently working on kodo v2.2.1. I have a problem if I use kodo with
    jndi.
    Everything is working fine if I just create a
    JDBCPersistenceManagerFactory with
         new JDBCPersistenceManagerFactory()
    save it in jndi and access it later under the name I bound the factory. It
    is even running on predefined DataSources.
    The system.prefs is in the classpath. It looks like
    <?xml version="1.0"?>
    <prefs>
    <db>
    <!-- konfiguration -->
    </db>
    </prefs>
    One step further, if I need to work on different databases. This feature is
    described in the kodo-documentation.
    I create two instances of JDBCPersistenceManagerFactory like
         new JDBCPersistenceManagerFactory("DATABASE_A")
         new JDBCPersistenceManagerFactory("DATABASE_B")
    and save them in the jndi under different names.
    The system.prefs now looks like
    <?xml version="1.0"?>
    <prefs>
    <db>
    <DATABASE_A>
    <!-- konfiguration -->
    </DATABASE_A>
    <DATABASE_B>
    <!-- konfiguration -->
    </DATABASE_B>
    </db>
    </prefs>
    But on accessing the JDBCPersistenceManagerFactory in jndi, in this case I
    get a MissingResourceException because kodo looks for db/url, not for
    db/DATABASE_A/url.
    It seems that the database name on that I created the
    JDBCPersistenceManagerFactory before it was saved in jndi is no more
    available.
    Any ideas?
    Cheers,
    Christian

    Hi,
    I'm currently working on kodo v2.2.1. I have a problem if I use kodo with
    jndi.
    Everything is working fine if I just create a
    JDBCPersistenceManagerFactory with
         new JDBCPersistenceManagerFactory()
    save it in jndi and access it later under the name I bound the factory. It
    is even running on predefined DataSources.
    The system.prefs is in the classpath. It looks like
    <?xml version="1.0"?>
    <prefs>
    <db>
    <!-- konfiguration -->
    </db>
    </prefs>
    One step further, if I need to work on different databases. This feature is
    described in the kodo-documentation.
    I create two instances of JDBCPersistenceManagerFactory like
         new JDBCPersistenceManagerFactory("DATABASE_A")
         new JDBCPersistenceManagerFactory("DATABASE_B")
    and save them in the jndi under different names.
    The system.prefs now looks like
    <?xml version="1.0"?>
    <prefs>
    <db>
    <DATABASE_A>
    <!-- konfiguration -->
    </DATABASE_A>
    <DATABASE_B>
    <!-- konfiguration -->
    </DATABASE_B>
    </db>
    </prefs>
    But on accessing the JDBCPersistenceManagerFactory in jndi, in this case I
    get a MissingResourceException because kodo looks for db/url, not for
    db/DATABASE_A/url.
    It seems that the database name on that I created the
    JDBCPersistenceManagerFactory before it was saved in jndi is no more
    available.
    Any ideas?
    Cheers,
    Christian

  • How do I bind something into JNDI?

    I want to bind something into JNDI so that my application can access it. Not a jdbc datasource, just a generic value (just a String, actually).
    How do I do this in SunOne? Seems like it should be simple, but I am confused.

    It depends on what type of object you are binding.
    If you are binding a simple (supported) Object like String. You can directly use the bind methods on the Context object.
    If you are binding the custom objects, you have to mark the object as Referenceable and also may need to implement the state factories.
    Should you have any queries, please get back.
    Have a look at the JNDI tutorial @ http://java.sun.com/products/jndi/tutorial

  • Conflicts binding EJB to JNDI names

    Hi everyone, I'm having a problem to run an application client due to JNDI errors during the binding of EJB modules.
    I'm using NetBeans 5.5 and Sun Java Application Server 9 PE.
    the server log shows these messages:
    SEVERE| Exception in creating EJB container [javax.naming.NameAlreadyBoundException: Use rebind to override]
    SEVERE| appId=+CorpTour+ moduleName=+Tour+_jar ejbName=+reservationBean+
    SEVERE| Jndi name conflict found in [+CorpTour+]. Jndi name [+reservationRemote+] for bean [+reservationBean+] is already in use.
    SEVERE| Naming exception while creating EJB container: javax.naming.NameAlreadyBoundException: Use rebind to override
    here the components are:
    Enterprise application: CorpTour
    EJB: Tour
    Session Bean: reservationBean
    Session Bean remote interface: reservationRemote
    I created all the EJB calls using the IDE assitant so I don't know what's wrong.
    Another thing is that the IDE created the application-client.xml file but not the ejb-jar file.
    I would reeeeally appreciate any help on this problem. Thanks in advance

    What version of WLS are you using?
    Bart Jenkins, Globeflow SA
    "Rafal Mantiuk" <[email protected]> wrote in message
    news:[email protected]..
    Can I do a thing like this:
    -) I deploy an EJB on a server A.
    -) I bind the EJB that is deployed on the server A to jndi on a server
    B. The EJB is not deployed on server B.
    -) Web client that runs on server B can lookup the EJB in its local
    jndi. However all calls go to the server A.
    Server A and B are not in the cluster.
    Rafal

  • J2SE and binding Datasource to JNDI

    Hi all,
    I am trying to create a ODBC-Bridge datasource as per :http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/bridge.html
    I get the initailContect not defined with the following code
    InitialContext ic = new InitialContext();
    ic.bind("jdbc/OdbcDB1",ds);
    so tried adding this :
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial");
    Context ctx = new InitialContext(env);
    This also produces an error as LDAP not running i guess??
    I do not understand the initial context, and am not sure the type i should use (LDAP / DNS / CORBA) etc.
    I guess when running a web or J2EE the JNDI is already running and the initial contect is already setup?

    Here is the whole piece of code. I need the program to be a standalone Java program. wlclient.jar is in the classpath.
    It works when binding strings and looking up existing objects registered to JNDI.
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import com.mockrunner.mock.jdbc.JDBCMockObjectFactory;
    import com.mockrunner.mock.jdbc.MockDataSource;
    JDBCMockObjectFactory factory = getJDBCMockObjectFactory();
    MockDataSource ds = factory.getMockDataSource();
    Properties env = new Properties();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put( Context.PROVIDER_URL, "t3://localhost:7001" );
    InitialContext context = new InitialContext(env);
    context.rebind("MockDataSource", ds);

  • Binding JavaBeans In JNDI in WLS 6.1

    I am attempting to bind a simple JavaBean in the JNDI tree in WLS 6.1 but I
    get
    a NamingException with the message 'null'. It works if I use a simple String
    class
    but anything other than a primitive fails.
    I want to store basic lookup data in the JNDI tree. I am replacing a caching
    package
    that used workspaces to use JNDI. Otherwise I will need to resort to
    Javaspaces
    instead,....?
    Any help would be appreciated....
    [email protected]

    Thanks for your response.
    The plugin inexplicably starts to work again after several days
    without changes to obj.conf file but the webserver was restarted.
    However, when I first spotted the problem, I restarted the webserver several
    times with no visible effect on the problem. I need to trace this
    and see if I can duplicate the problem again, but for now, the
    problem has gone away.
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]..
    This may be a netscape issue since, from what you are saying, the weblogic
    plugin gets invoked on any request.
    The only time the plugin gets invoked is if it goes into the object tag.
    Can you paste your full obj.conf?
    Thanks,
    Eric
    "newsgroups.bea.com" <[email protected]> wrote in message
    news:3e63bef3$[email protected]..
    I recently upgraded our dev weblogic 6.1 to SP4. Around the same time,the
    netscape plugin inexplicably starts to behave differently.
    I have the following configuration lines in the obj.conf file
    <Object name="test" ppath="*/apps/*">
    Service fn=wl_proxy WebLogicHost=appserver.mycompany.com
    WebLogicPort=7001
    </Object>
    I did not configure the plugin to proxy by mime type.
    But no matter what I put in the url, it automatically gets proxied to
    appserver host.
    I tried:
    http://web.mycompany.com/index.html - I see the WebLogic Index page
    instead
    of the default Netscape Webserver home page.
    http://web.mycompany.com/test/test.jsp - I see the test jsp page, even
    though it is not a path that I configured to proxy over to weblogic.
    Anybody experience this before?
    TIA,
    John

  • Unable to bind object in JNDI tree.

    While I try to bind a simple object in JNDI tree I get the following error.
    I have not used any cluster .
    Server : Web Logic 8.1 SP 6
    Jdk version 1.4.2 comes along with bea weblogic 8.1 sp 6
    Javax.naming.communicationException[
    Root exception is java.rmi.unmarshalException:
    Error unmarshalling arguments; nested exception is :
    Java.lang.ClassNotFoundException: com.examples.person : This error could indicate that a compound was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on a server that is part of a cluster is also deployed on all other member of that cluster.

    Is this somehow being called from the parameterless constructor?
    You sometimes have to wrap bits of code with in designer checks to stop em running.
    In c# that would be:
    if (!DesignerProperties.GetIsInDesignMode(this))
    // do your stuff only at runtime
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • How to bind ConenctionFactoy in JNDI

              Hi,
              How can i change the default connection factory "weblogic.jms.ConnectionFactory"
              to a new one.. basically i want to know that how can i bind new weblogic conenction
              factory in JNDI? nees sample code???
              I m using Weblogic 7.0 JMS Server..
              Thanks,
              Rakesh
              

    You can not changfe the default connection factory settings or name.
              Instead, you can create your own connection factory. Use the console
              and be sure to remember to remember to set the target of the
              connection factory at the desired servers or cluster.
              Tom
              Arvind wrote:
              > Hi,
              > How can i change the default connection factory "weblogic.jms.ConnectionFactory"
              > to a new one.. basically i want to know that how can i bind new weblogic conenction
              > factory in JNDI? nees sample code???
              > I m using Weblogic 7.0 JMS Server..
              >
              > Thanks,
              > Rakesh
              

  • Cannot bind Referenceable in JNDI?

    When I try to bind the following Referenceable object to the JNDI tree in
    WL 6.0 SP2, I get the following exception:
    public class Foo
    implements javax.naming.Referenceable
    public javax.naming.Reference getReference ()
    // just a test
    return new javax.naming.Reference (Foo.class.getName ());
    javax.naming.ConfigurationException. Root exception is java.rmi.MarshalException:
    failed to marshal public abstract void
    weblogic.jndi.internal.NamingNode.bind(
    java.lang.String,java.lang.Object,java.util.Hashtable)
    throws javax.naming.NamingException,java.rmi.RemoteException; nested exception is:
    java.io.NotSerializableException: com.techtrader.modules.jdo.impl.jdbc.Foo
    java.io.NotSerializableException: com.techtrader.modules.jdo.impl.jdbc.Foo
    at java.lang.Throwable.<init>(Throwable.java:96)
    at java.lang.Exception.<init>(Exception.java:44)
    at java.io.IOException.<init>(IOException.java:49)
    at java.io.ObjectStreamException.<init>(ObjectStreamException.java:31)
    at java.io.NotSerializableException.<init>(NotSerializableException.java:35)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1161)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372)
    at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:102)
    at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:108)
    at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
    at weblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:246)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.bind(ServerNamingNode_WLStub.java:436)
    at weblogic.jndi.internal.WLContextImpl.bind(WLContextImpl.java:337)
    at javax.naming.InitialContext.bind(InitialContext.java:359)
    at com.techtrader.modules.jdo.impl.jdbc.JNDIJDOFactory.<init>(JNDIJDOFactory.java:36)
    at com.techtrader.modules.jdo.impl.jdbc.JNDIJDOFactory.main(JNDIJDOFactory.java:77)
    Why can't I bind a referenceable object?
    -Marc

    Your class Foo needs to implement java.io.Serializable interface.
    Shiva.
    Marc Prud'hommeaux wrote:
    When I try to bind the following Referenceable object to the JNDI tree in
    WL 6.0 SP2, I get the following exception:
    public class Foo
    implements javax.naming.Referenceable
    public javax.naming.Reference getReference ()
    // just a test
    return new javax.naming.Reference (Foo.class.getName ());
    javax.naming.ConfigurationException. Root exception is java.rmi.MarshalException:
    failed to marshal public abstract void
    weblogic.jndi.internal.NamingNode.bind(
    java.lang.String,java.lang.Object,java.util.Hashtable)
    throws javax.naming.NamingException,java.rmi.RemoteException; nested exception is:
    java.io.NotSerializableException: com.techtrader.modules.jdo.impl.jdbc.Foo
    java.io.NotSerializableException: com.techtrader.modules.jdo.impl.jdbc.Foo
    at java.lang.Throwable.<init>(Throwable.java:96)
    at java.lang.Exception.<init>(Exception.java:44)
    at java.io.IOException.<init>(IOException.java:49)
    at java.io.ObjectStreamException.<init>(ObjectStreamException.java:31)
    at java.io.NotSerializableException.<init>(NotSerializableException.java:35)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1161)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:372)
    at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:102)
    at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:108)
    at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
    at weblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:246)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.bind(ServerNamingNode_WLStub.java:436)
    at weblogic.jndi.internal.WLContextImpl.bind(WLContextImpl.java:337)
    at javax.naming.InitialContext.bind(InitialContext.java:359)
    at com.techtrader.modules.jdo.impl.jdbc.JNDIJDOFactory.<init>(JNDIJDOFactory.java:36)
    at com.techtrader.modules.jdo.impl.jdbc.JNDIJDOFactory.main(JNDIJDOFactory.java:77)
    Why can't I bind a referenceable object?
    -Marc

  • RE: JDBCPersistenceManagerFactory and JNDI

    Hello Elsen -
    It seems that the database name on that I created the
    JDBCPersistenceManagerFactory before it was saved in jndi is no more
    available.This was certainly a bug. It was caused by a nuance of the
    deserialization process:
    A base class of JDBCPersistenceManagerFactory implemented its own
    readObject() method which called a setup() method after using
    defaultReadObject() to read its fields. The JDBC factory overrode the
    setup() method and used it to access the database whose name it was
    constructed with. Unfortunately, at this point in the deserialization
    process, the fields of JDBCPersistenceManagerFactory had not been read
    yet, which caused the factory to 'think' it was using the default
    database.
    This problem has been fixed internally and will be corrected in the next
    public Kodo release.
    Thanks for the report!
    -- Abe White

    Hey Shane -
    Am I glad you're here!
    Hmmm....you didn't rename any of them when you first imported, right?
    No, I didn't rename any of the clips.
    How did you import the first time? This time? Was P2 log used? How did you import the files this time?
    I did not use the P2 log. Originally, the .mxf files were simply copied to our NAS server using the P2 "Library" card reader. To this day, they haven't been moved or modified from that location. In both instances, I imported directly from the NAS into fcp by using the "File>Import>Panasonic P2" command. The "Import P2" dialogue window opened, and from there, I would select the folder with the .mxf files I wanted to import, and I'd choose, "Open." I'd select all of the files in the folder and add them to the import que (I noticed that the import interface has changed a lot from ver 5.0.4 - but I'm certain that isn't causing problems.)
    Another related issue - I've gone through and reconnected all my clips manually. During the re-connect, I got a warning message on each of the clips that said that certain attributes had changed - the reel #, the rate (is that the frame rate, data rate, or what?) and the media in/out points. I told it to continue on each clip. But once reconnected, the in and out points on most - if not all - of the clips has slipped about 3 frames.
    In the words of a co-worker - this is a big monkey on my back!
    I'm really baffled here.
    Tim
    Dual 2.0ghz G-5   Mac OS X (10.4.4)   FCS 5.1.2

  • How to delete conext entries in JNDI tree after undeployment?

    Hi,
    When I deploy an EAR or JAR file with EJBs, they bind in the JNDI server.
    When I undeploy the application the beans are no longer bound to the JNDI
    tree, but the contexts they created remain.
    For example, I deploy a bean that binds its home object to the following
    entry in the JNDI:
    myapp/mymodule/MyBean
    When I undeploy MyBean, the context myapp/mymodule remain.
    Is there an utility to remove these entries or do I have to develop my own
    utility? I did not find anything in the administration console to do this.
    This has been a source of some trouble, because sometimes I get error
    messages when I want to redeploy the beans.
    Thanks in advance,
    Vegeta

    Please don't cross post. see my reply in the ejb newsgroup.
    Thanks,
    Michael
    Vegeta wrote:
    Hi,
    When I deploy an EAR or JAR file with EJBs, they bind in the JNDI server.
    When I undeploy the application the beans are no longer bound to the JNDI
    tree, but the contexts they created remain.
    For example, I deploy a bean that binds its home object to the following
    entry in the JNDI:
    myapp/mymodule/MyBean
    When I undeploy MyBean, the context myapp/mymodule remain.
    Is there an utility to remove these entries or do I have to develop my own
    utility? I did not find anything in the administration console to do this.
    This has been a source of some trouble, because sometimes I get error
    messages when I want to redeploy the beans.
    Thanks in advance,
    Vegeta--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Clustered Remote Object Bound To JNDI

    Hello,
              I'd like to know if Weblogic 5.1 (service pack 10) supports
              clusterable remote objects.
              What I am trying to do is to implement a remote object that extends
              UnicastRemoteObject interface and bind it to JNDI. When the client
              needs the services, it will lookup that object in JNDI and call its
              methods remotely.
              What happens to my test implementation is that it all works well when
              I run Weblogic locally, but if it is run on the remote server, it
              gives me the exception to the extend that the stub for my remote
              object is not found (although it is in the classpath). I understand
              that this is because I should be using weblogic.rmic instead of
              regular rmic, is that right?
              Thanks,
              Eugene Kononov.
              

    Hello,
              I'd like to know if Weblogic 5.1 (service pack 10) supports
              clusterable remote objects.
              What I am trying to do is to implement a remote object that extends
              UnicastRemoteObject interface and bind it to JNDI. When the client
              needs the services, it will lookup that object in JNDI and call its
              methods remotely.
              What happens to my test implementation is that it all works well when
              I run Weblogic locally, but if it is run on the remote server, it
              gives me the exception to the extend that the stub for my remote
              object is not found (although it is in the classpath). I understand
              that this is because I should be using weblogic.rmic instead of
              regular rmic, is that right?
              Thanks,
              Eugene Kononov.
              

  • Object GC'ed out of JNDI?

    Folks,
    We've experienced some bizarre behavior within one of our EJB's and its
    interactions with JNDI during our performance testing effort. We've
    developed a theory, and we're currently developing a test case for it, but I
    wanted to post it here and see if anybody has encountered similar issues, or
    if anybody from BEA can confirm our theory.
    The ejbCreate() method for the EJB in question instantiates an object and
    binds it into JNDI, as follows:
    try {
    Context ctx = new InitialContext();
    ProblemObject obj = new ProblemObject();
    ctx.rebind("problemObject", obj);
    ctx.close();
    } catch(Exception e) {}
    Another class, unrelated to the EJB, then looks up the bound object at some
    unspecified later point in time, and tries to use it. In about half of our
    load tests, one of the lookups will return null (i.e., the lookup succeeds,
    but the result is null, and the target object for the assignment is assigned
    null). Thereafter, all lookups return null, and all attempts to use the
    problem object fail with a NullPointerException.
    Our theory is that, since the object initially bound into JNDI was a local
    variable, it is subject to GC. The randomness could be caused by
    coincidence--specifically, if the problem object is in use when a major GC
    occurs, it won't get collected. If, however, it's not being used (and
    therefore not referenced) when GC occurs, it gets collected.
    Thoughts?
    I'll post the results of our test, as well.
    Thanks,
    cramer

    "Steve Cramer" <[email protected]> writes:
    try {
    Context ctx = new InitialContext();
    ProblemObject obj = new ProblemObject();
    ctx.rebind("problemObject", obj);
    ctx.close();
    } catch(Exception e) {}
    Another class, unrelated to the EJB, then looks up the bound object at some
    unspecified later point in time, and tries to use it. In about half of our
    load tests, one of the lookups will return null (i.e., the lookup succeeds,
    but the result is null, and the target object for the assignment is assigned
    null). Thereafter, all lookups return null, and all attempts to use the
    problem object fail with a NullPointerException.
    Our theory is that, since the object initially bound into JNDI was a local
    variable, it is subject to GC. The randomness could be caused by
    coincidence--specifically, if the problem object is in use when a major GC
    occurs, it won't get collected. If, however, it's not being used (and
    therefore not referenced) when GC occurs, it gets collected.If I understood JNDI halfway right, it'll store (typically) a
    serialized version of your object in the directory. So that should
    depend at all on the existence of the original object that was
    bound. A lookup will re-instatiate it anyway.
    So GC shouldn't matter in this case.
    But unfortunately, I don't have any idea what could really be the
    cause. Does the failure happen only in one specific client
    JVM-instance, and others keep getting the object correctly at the same
    time. E.g. ist the object still bound when you check in the
    weblogic.Console?
    -- joe

Maybe you are looking for