You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dino Di Cola <di...@yahoo.it> on 2006/03/15 15:33:34 UTC

ojb 1.0.4 and org.apache.ojb.broker.PBFactoryException: There was no 'default-connection'...

Dear Armin and all OJB users,
long time has passed since my last help request and
ojb worked gracefully till now.

I am porting my j2ee application correctly deployed in
oracle as oc4j 9.0.4.x.x 
to oracle as oc4j 10.1.2.x.x. At the beginning I was
using db-ojb-1.0.3.jar but 
now I moved to the db-ojb-1.0.4.jar version. During DB
opening I can see the following 
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' 
attribute enabled in the jdbc connection descriptor...

Clearly the 'default-connection' attribute is set to
*true* in the repository_database.xml:

<!-- @version $Id: repository_database.xml,v 1.3
2005/04/21 12:24:57 d.dicola Exp $ -->

    <jdbc-connection-descriptor
   		jcd-alias="dsOJB"
   		default-connection="true"
   		platform="Oracle9i"
   		jdbc-level="2.0"
		  jndi-datasource-name="jdbc/OracleXXX-DS"   		
   		username="xxxxx"
		  password="xxxxx"
		  eager-release="false"
      batch-mode="false"
      useAutoCommit="0"
      ignoreAutoCommitExceptions="false"
    >

		  <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
			  <attribute attribute-name="autoNaming"
attribute-value="true"/>
   	  </sequence-manager>

    </jdbc-connection-descriptor>


I also updated all the other configuration files from
db-ojb-1.0.4 distribution.
Here below the OJB.properties.

#<!--
#/* Copyright 2002-2004 The Apache Software Foundation
# *
# * Licensed under the Apache License, Version 2.0
(the "License");
# * you may not use this file except in compliance
with the License.
# * You may obtain a copy of the License at
# *
# *     http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in
writing, software
# * distributed under the License is distributed on an
"AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.
# * See the License for the specific language
governing permissions and
# * limitations under the License.
# */
#-->
# OJB.properties -- configuration of the OJB runtime
environment
# Version: 1.0
# (c) 2001, 2002, 2003 Apache Software Foundation
# Author: Thomas Mahler and many others
# @version $Id: OJB.properties,v 1.75.2.13 2005/10/12
00:06:49 arminw Exp $
#
#----------------------------------------------------------------------------------------
# repository file settings
#----------------------------------------------------------------------------------------
# The repositoryFile entry tells OJB to use this file
as as its standard mapping
# repository. The file is looked up from the
classpath.
#
repositoryFile=repository.xml
#
# If the useSerializedRepository entry is set to true,
OJB tries to load a
# serialized version of the repository for performance
reasons.
# if set to false, OJB always loads the xml file.
# Setting this flag to true will accelerate the
startup sequence of OJB.
# If set to true changes to the repository.xml file
will only be detected
# after maually deleting the repository.xml.serialized
file.
useSerializedRepository=false
#
# If Repository serialization is used the entry
serializedRepositoryPath defines the
# directory where the Repository is written to and
read from.
# this entry is used only when the
useSerializedRepository flag is set to true
#
serializedRepositoryPath=.
#
#----------------------------------------------------------------------------------------
# PersistenceBrokerFactory / PersistenceBroker
#----------------------------------------------------------------------------------------
# The PersistenceBrokerFactoryClass entry decides
which concrete
# PersistenceBrokerFactory implemention is to be used.
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
# If in managed environment *only* the PB-api was used
it's recommended to use this factory
# to enable the PersistenceBroker instances to
participate in the JTA transaction. This makes
# e.g. PBStateListener work properly in managed
environments.
#PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
#
#
# The PersistenceBrokerClass entry decides which
concrete PersistenceBroker
# implementation is to be served by the
PersistenceBrokerFactory.
# This is the singlevm implementation:
PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
#
# This is an implementation that uses Prevayler
(prevayler.sf.net) as the persistent storage.
# Using this implementation OJB works as a simple
OODBMS
#PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
#
#
# This setting can be helpful during development if
the PersistenceBroker transaction
# demarcation was used (this is true in most cases).
If set 'true' on PB#store(...)
# and PB#delete(...) methods calls OJB check for
active PB-tx and if no active tx is
# found a error is logged. This can help to avoid
store/delete calls without a running
# PB-tx while development. Default setting is 'false'.
(Note: When using OJB in a managed
# environment *without* OJB-caching, it's valid to use
store/delete calls without a running PB-tx)
TxCheck=false
#
#----------------------------------------------------------------------------------------
# PersistenceBroker pool
#----------------------------------------------------------------------------------------
# PersistenceBroker pool configuration
# This pool uses the jakarta-commons-pool api.
# There you can find things described in detail.
#
# maximum number of brokers that can be borrowed from
the
# pool at one time. When non-positive, there is no
limit.
maxActive=100
#
# controls the maximum number of brokers that can sit
idle in the
# pool (per key) at any time. When non-positive, there
is no limit
maxIdle=-1
#
# max time block to get broker instance from pool,
after that exception is thrown.
# When non-positive, block till last judgement
maxWait=2000
#
# indicates how long the eviction thread should sleep
before "runs" of examining
# idle objects. When non-positive, no eviction thread
will be launched.
timeBetweenEvictionRunsMillis=-1
#
# specifies the minimum amount of time that an broker
may sit idle
# in the pool before it is eligable for eviction due
to idle time.
# When non-positive, no object will be dropped from
the pool due
# to idle time alone (depends on
timeBetweenEvictionRunsMillis > 0)
minEvictableIdleTimeMillis=1000000
#
# specifies the behaviour of the pool when broker
capacity is
# exhausted (see maxActive above)
# 0 - fail
# 1 - block
# 2 - grow
whenExhaustedAction=0
#
#
#----------------------------------------------------------------------------------------
# ConnectionFactory / Default ConnectionPool
#----------------------------------------------------------------------------------------
# The ConnectionFactoryClass entry determines which
kind of ConnectionFactory
# is to be used within org.apache.ojb as connection
factory.
# A ConnectionFactory is responsible for creating
# JDBC Connections. Current version ships four
implementations:
#
# 1. ConnectionFactoryNotPooledImpl
#    No pooling, no playing around.
#    Every connection request returns a new
connection,
#    every connection release close the connection.
# 2. ConnectionFactoryPooledImpl
#    This implementation supports connection pooling.
# 3. ConnectionFactoryDBCPImpl
#    Using the jakarta-DBCP api for connection
management, support
#    connection- and prepared statement-pooling,
abandoned connection handling.
# 4. ConnectionFactoryManagedImpl
#    Connection factory for use within managed
environments - e.g. JBoss.
#    Every obtained DataSource was wrapped within OJB
(and ignore
#    e.g. con.commit() calls within OJB).
#    Use this implementation e.g if you use
Datasources from an application server.
#
# Use the OJB performance tests to decide, which
implementation is best for you.
# The proper way of obtaining a connection is
configured in
# JDBCConnectionDescriptor entries in the
repository.xml file.
# If want a more fine grained control of each
connection pool used by OJB,
# take a look at the repository.dtd, there was a
possibility to override
# this default connection factory entry in each
JDBCConnectionDescriptor.
#
#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
# Only needed when using OJB 1.0.3 or earlier in
managed environments. Since version
# 1.0.4 OJB detects datasources from managed
environments automatically.
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
#
#
#----------------------------------------------------------------------------------------
# ConnectionManager
#----------------------------------------------------------------------------------------
# The ConnectionManagerClass entry defines the
ConnectionManager implemementation to be used
ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
#
#
#----------------------------------------------------------------------------------------
# SqlGenerator
#----------------------------------------------------------------------------------------
# The SqlGeneratorClass entry defines the SqlGenerator
implemementation to be used
SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl
#
#
#----------------------------------------------------------------------------------------
# ProxyFactory and IndirectionHandler
#----------------------------------------------------------------------------------------
# The ProxyFactoryClass entry defines which
ProxyFactory implementation is to be used.
# By default, a 1.0 compatiable, JDK-based version is
used. However, a the CGLIB based entry 
# is available.
#
#	- ProxyFactoryCGLIBImpl: Refernece proxies are
generated using bytecode manipulation
#			from the CGLIB library. Any class can become a
dynamic proxy, and not just ones
#			that implement an interface.
#   - ProxyFactoryJDKImpl: OJB 1.0 compatiable Proxy
implementation. Proxies in this method 
#			can only be generated from classes that implement
an interface, and the generated
#			Proxy will implement all methods of that
interface.
#
# NOTE: The appropriate cooresponding
IndirectionHandler must be choosen as well
#
#ProxyFactoryClass=org.apache.ojb.broker.core.proxy.ProxyFactoryCGLIBImpl
ProxyFactoryClass=org.apache.ojb.broker.core.proxy.ProxyFactoryJDKImpl
#
# The IndirectionHandlerClass entry defines the class
to be used by OJB's proxies to
# handle method invocations
#
#IndirectionHandlerClass=org.apache.ojb.broker.core.proxy.IndirectionHandlerCGLIBImpl
IndirectionHandlerClass=org.apache.ojb.broker.core.proxy.IndirectionHandlerJDKImpl
#
#----------------------------------------------------------------------------------------
# ListProxy
#----------------------------------------------------------------------------------------
# The ListProxyClass entry defines the proxy class to
be used for collections that
# implement the java.util.List interface.
#
ListProxyClass=org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl
#
#----------------------------------------------------------------------------------------
# SetProxy
#----------------------------------------------------------------------------------------
# The SetProxyClass entry defines the proxy class to
be used for collections that
# implement the java.util.Set interface.
#
SetProxyClass=org.apache.ojb.broker.core.proxy.SetProxyDefaultImpl
#
#----------------------------------------------------------------------------------------
# CollectionProxy
#----------------------------------------------------------------------------------------
# The CollectionProxyClass entry defines the proxy
class to be used for collections that
# do not implement java.util.List or java.util.Set.
#
CollectionProxyClass=org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl
#
#----------------------------------------------------------------------------------------
# StatementManager
#----------------------------------------------------------------------------------------
# The StatementManagerClass entry defines the
StatementManager implemementation to be used
StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
#
#
#----------------------------------------------------------------------------------------
# StatementsForClass
#----------------------------------------------------------------------------------------
# The StatementsForClassClass entry defines the
StatementsForClass implemementation to be used
# to implement cached statements.
StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl
#
#
#----------------------------------------------------------------------------------------
# JdbcAccess
#----------------------------------------------------------------------------------------
# The JdbcAccessClass entry defines the JdbcAccess
implemementation to be used
JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
#
#
#----------------------------------------------------------------------------------------
# RowReader
#----------------------------------------------------------------------------------------
# Set the standard RowReader implementation. It is
also possible to specify the
# RowReader on class-descriptor level.
RowReaderDefaultClass=org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl
#
#
#----------------------------------------------------------------------------------------
# Object cache
#----------------------------------------------------------------------------------------
# NOTE: ObjectCacheClass declaration in OJB.properties
file was removed (since OJB 1.0.2).
# The concrete ObjectCache implementation has to
specified in the repository file using
# the 'object-cache' element. See documentation for
more detailed info.
#
# This property is only relevant if the per
class-descriptor object-cache
# declaration was used in conjunction with metadata
runtime changes.
# If set 'flase' the class name of the object is used
# to find a per class ObjectCache implementation.
# If set 'true' the ObjectCacheDescriptor instance is
used as key to
# find a per class ObjectCache, this enables to use
different ObjectCache
# instances for the same class.
descriptorBasedCaches=false
#
# NOTE: CacheFilters declaration was removed (since
OJB 1.0.2). To exclude
# object of whole packages from being cache use a
specific property in
# cache declaration - see caching guide in reference
docs.
#----------------------------------------------------------------------------------------
# Locking
#----------------------------------------------------------------------------------------
# The 'LockManagerClass' specify the internal used
LockManager implementation.
# If OJB is running in distributed environment it is
recommended to use the remote
# lock manager. It guarantees to provide
Lockmanagement across multiple JVM's.
#
# The deprecated odmg locking implementation. Needs
enabled 'LockMapClass' too.
#@deprecated
LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
# A servlet based lock implementation for distributed
environments, needs enabled
# property 'LockServletUrl' too.
#LockManagerClass=org.apache.ojb.broker.locking.LockManagerRemoteImpl
# Lock manager implementation using apache's
commons-transaction locking api
#LockManagerClass=org.apache.ojb.broker.locking.LockManagerCommonsImpl
LockManagerClass=org.apache.ojb.broker.locking.LockManagerInMemoryImpl
#
# The LockServletUrl entry points to the Lockserver
servlet.
# This Servlet is addressed by all distributed JVMs if
the RemoteLockMapImpl
# is used.
#LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
#
# The LockTimeout entry defines the maximum time in
milliseconds
# that a lock may be hold. Defaults to 60000 = 1
minute
LockTimeout=60000
#
#
# ------ deprecated ------
# The LockMapClass entry tells OJB which concrete
LockMap
# implementation is to be used.
# If OJB is running on multiple concurrent clients it
is recommended
# to use the LockMapRemoteImpl. It guarantees to
provide
# Lockmanagement across multiple JVMs.
# This Implemenation relies on a Servlet based
Lockserver. To use it you have to
# deploy the ojb-lockserver.war into a Servlet engine.
# and you have to set the Property LockServletUrl to
point to this servlet.
# (see LockServletUrl section below).
# If OJB is running in a single JVM (e.g. in a desktop
app, or in a servlet
# engine) it is save to use the LockMapInMemoryImpl.
Using it will result
# in a large performance gain.
# These settings are deprecated, only needed in
conjunction with the old odmg 'LockManagerClass'
# @deprecated
LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
# @deprecated
LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
#
#
#----------------------------------------------------------------------------------------
# OQL / SQL settings
#----------------------------------------------------------------------------------------
# The OqlCollectionClass entry defines the collection
type returned
# from OQL queries. By default this value is set to a
List.
# This will be good for most situations. If you need
the additional features of
# DList (DList itself is persistable, support of
predicate) comment in the DList
# implementation. See also section 'ODMG settings'
(DListClass entry).
# Using DLists for large resultsets may be bad for
application performance.
# For these scenarios you can use ArrayLists or
Vectors.
# Important note: the collections class to be used
MUST implement the
# interface
'org.apache.ojb.broker.ManageableCollection'.
#
OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList
#
OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl
#
OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableVector
#
# The SqlInLimit entry limits the number of values in
IN-sql statement,
# -1 for no limits. This hint is used in Criteria.
SqlInLimit=200
#
#
#----------------------------------------------------------------------------------------
# ODMG-api settings
#----------------------------------------------------------------------------------------
# Specify the used base class for ODMG API
# - ImplementationDefaultImpl is the default class
# - ImplementationJTAImpl is for use in managed
environments like J2EE conform
# Application Server
#
#ImplementationClass=org.apache.ojb.odmg.ImplementationImpl
ImplementationClass=org.apache.ojb.odmg.ImplementationJTAImpl
#
# Specify the used tx handling.
# - LocalTxManager use if you want the transaction to
be associated by a thread
# - JTATxManager use if you want the transaction to be
associated via the Transaction
# manager that is in your application server.
#
#OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
#
#
# The ImplicitLocking entry defines if implicit lock
acquisition is
# to be used. If set to 'true' OJB implicitly locks
objects to ODMG
# transactions after performing OQL queries.
# Also if implicit locking is used locking objects is
recursive, that is
# associated objects are also locked.
# If ImplicitLocking is set to 'false', no locks are
obtained in OQL
# queries, lookup objects and there is also no
recursive locking.
# This setting can be changed at runtime using OJB's
ODMG extensions.
ImplicitLocking=true
#ImplicitLocking=false
#
# The LockAssociations entry defines the behaviour for
the OJB
# implicit locking feature. If set to WRITE (default)
acquiring a write-
# lock on a given object x implies write locks on all
objects associated
# to x. If set to READ implicit read-locks are
acquired.
# Acquiring a read-lock on x allways results in
implicit read-locks
# on all associated objects (if 'implicit locking' is
enabled).
# This setting can be changed at runtime using OJB's
ODMG extensions.
#LockAssociations=READ
LockAssociations=WRITE
#
# Enable/Disable OJB's persistent object ordering
algorithm on commit
# of a transaction. If enabled OJB try to calculate a
valid order for
# all new/modified objects (and referenced objects).
# If the used databases support 'deferred checks' it's
recommended to use this
# feature and to disable OJB's object ordering.
# This setting can be changed at runtime using OJB's
ODMG extensions.
Ordering=true
#
#
# Used ODMG collection implementation classes
# (e.g. when do a Implementation#newDlist() call)
#
# org.odmg.DList implementation class
DListClass=org.apache.ojb.odmg.collections.DListImpl
#
# org.odmg.DArray implementation class
DArrayClass=org.apache.ojb.odmg.collections.DListImpl
#
# org.odmg.DMap implementation class
DMapClass=org.apache.ojb.odmg.collections.DMapImpl
#
# org.odmg.DBag implementation class
DBagClass=org.apache.ojb.odmg.collections.DBagImpl
#
# org.odmg.DSet implementation class
DSetClass=org.apache.ojb.odmg.collections.DSetImpl
#
#
# @deprecated property for backward compatibility.
# If set 'true' the behavior of method
# ImplementationImpl#setImplicitLocking(...) will be
the same as
# in OJB <=1.0.3 (set the implicit locking behavior of
the current used transaction)
# and disable the new possibility of global 'implicit
locking'
# setting at runtime with
ImplementationExt#setImplicitLocking.
# This is only for backward compatibility and will
# be removed at a later date.
ImplicitLockingBackward=false
#----------------------------------------------------------------------------------------
# Meta data / mapping settings
#----------------------------------------------------------------------------------------
# The PersistentFieldClass property defines the
implementation class
# for PersistentField attributes used in the OJB
MetaData layer.
# By default the best performing attribute/refection
based implementation
# is selected (PersistentFieldDirectAccessImpl).
#
# - PersistentFieldDirectAccessImpl
#   is a high-speed version of the access strategies.
#   It does not cooperate with an AccessController,
#   but accesses the fields directly. Persistent
#   attributes don't need getters and setters
#   and don't have to be declared public or protected
# - PersistentFieldPrivilegedImpl
#   Same as above, but does cooperate with
AccessController and do not
#   suppress the java language access check (but is
slow compared with direct access).
# - PersistentFieldIntrospectorImpl
#   uses JavaBeans compliant calls only to access
persistent attributes.
#   No Reflection is needed. But for each attribute
xxx there must be
#   public getXxx() and setXxx() methods.
# - PersistentFieldDynaBeanAccessImpl
#   implementation used to access a property from a
#   org.apache.commons.beanutils.DynaBean.
# - PersistentFieldAutoProxyImpl
#   for each field determines upon first access how to
access this particular field
#   (directly, as a bean, as a dyna bean) and then
uses that strategy
#
PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectImpl
#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl
#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl
#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanImpl
#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl
#(DynaBean implementation does not support nested
fields)
#
#----------------------------------------------------------------------------------------
# Component Intercepting for Profiling and Tracing
#----------------------------------------------------------------------------------------
# By enabling an InterceptorClass all OJB components
will use
# this Interceptor. Interceptors allow advanced
tracing and Profiling
# of all component method calls.
# This is currently an experimental feature useful
only for OJB kernel developers.
#
#InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor
#
#----------------------------------------------------------------------------------------
# Transaction Management and assocation
#----------------------------------------------------------------------------------------
# (optional, only used when OJB runs within managed
environments)
# To praticipate in JTA transaction OJB needs access
to the underlying transaction manager.
# The TransactionManager is acquired in different ways
dependent on the application server.
# The JTATransactionManagerClass property allows you
to specify the class that implements
# the proper behaviour for finding the transaction
manager. Only use when OJBTxManagerClass
# is set to a factory that uses the application server
transaction manager
# (org.apache.ojb.odmg.JTATxManager)
#
# JBoss Transaction Manager Factory
#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.JBossTransactionManagerFactory
# Weblogic Transaction Manager Factory
#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.WeblogicTransactionManagerFactory
# WebSphere transaction manager factory
#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.WebSphereTransactionManagerFactory
# Orion transaction manager factory
JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.OrionTransactionManagerFactory
# SunOne transaction manager factory
#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.SunOneTransactionManagerFactory
# JOnAs transaction manager factory
#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.JOnASTransactionManagerFactory
#
#
#----------------------------------------------------------------------------------------
# Logging settings are now in their own file,
OJB-logging.properties
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
# End of OJB.properties file
#----------------------------------------------------------------------------------------


Here below the log file with the exception

2006-03-15 15:14:19,135 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter()
2006-03-15 15:14:19,145 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] -
DefaultComponentManager - sessionCreated()
2006-03-15 15:14:19,145 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] -
DefaultComponentManager - sessionCreated(): added the
ComponentManager to the session
2006-03-15 15:14:19,145 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): Session attribute username not found.
2006-03-15 15:14:19,145 [INFO ][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): Session attribute username set as null
2006-03-15 15:14:19,145 [INFO ][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): User information not found. Public
resource!!
2006-03-15 15:14:19,145 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter()
2006-03-15 15:14:19,145 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): Session attribute username not found.
2006-03-15 15:14:19,155 [INFO ][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): Session attribute username set as null
2006-03-15 15:14:19,155 [INFO ][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): User information not found. Public
resource!!
2006-03-15 15:14:19,155 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - TemplateServlet -
process(): called with selectedUrl:
/xxx/xxx-entry.screen
2006-03-15 15:14:19,155 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - TemplateServlet -
insertTemplate()
2006-03-15 15:14:19,215 [INFO ][xxx.j2ee.web]
[HttpRequestHandler-21362147] - xxx-entry.jsp
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter()
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): Session attribute username not found.
2006-03-15 15:14:26,465 [INFO ][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): Session attribute username set as admin
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - xxxComponentManager -
getUserAccount()
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - xxxComponentManager -
getEJBController()
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.web]
[HttpRequestHandler-21362147] - xxxComponentManager -
getEJBController(): getting a reference to the
EJBController
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
ejbCreate(): creating an instance of xxxEjbController
bean
2006-03-15 15:14:26,465 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getLoggedApplicationUser()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] -
LoggedApplicationUserBean - ejbCreate()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getControllerHome()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getControllerHome()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getControllerHome()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getControllerHome()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getControllerHome()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
ejbCreate(): Set attribute on StateMachine
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - xxxEjbControllerBean -
getLoggedApplicationUser()
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] -
LoggedApplicationUserBean - getUserAccount(): called
with: admin
2006-03-15 15:14:26,475 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] -
LoggedApplicationUserBean - getUserAccount(): user
information not found: loading it...
2006-03-15 15:14:26,486 [INFO ][xxx.j2ee.ojb]
[HttpRequestHandler-21362147] - ODMGConnection -
init(): found odmg factory:
it.xxxxxxx.xxx.ojb.ODMGFactory@24e801 and get
Implementation instance:
org.apache.ojb.odmg.ImplementationJTAImpl@fba502[
  implicitLocking=true
  implicitWriteLocks=true
  ordering=true
  oqlCollectionClass=class
org.apache.ojb.broker.util.collections.ManageableArrayList
  txManager=org.apache.ojb.odmg.JTATxManager@1d31859
 
lockManager=org.apache.ojb.odmg.locking.LockManagerOdmgImpl@1e3a0ec
]
2006-03-15 15:14:26,486 [INFO ][xxx.j2ee.ojb]
[HttpRequestHandler-21362147] - ODMGConnection -
init(): open new database
org.apache.ojb.odmg.DatabaseImpl@10e4fd7 using
databaseName name dsOJB
2006-03-15 15:14:26,486
[ERROR][org.apache.ojb.odmg.DatabaseImpl]
[HttpRequestHandler-21362147] - Open database failed:
Borrow broker from pool failed, using PBKey
org.apache.ojb.broker.PBKey: jcdAlias=dsOJB,
user=null, password=null
org.apache.ojb.broker.PBFactoryException: Borrow
broker from pool failed, using PBKey
org.apache.ojb.broker.PBKey: jcdAlias=dsOJB,
user=null, password=null
	at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(Unknown
Source)
	at
org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(Unknown
Source)
	at org.apache.ojb.odmg.DatabaseImpl.open(Unknown
Source)
	at
it.xxxxxxx.xxx.ojb.ODMGConnection.init(ODMGConnection.java:43)
	at
it.xxxxxxx.xxx.ojb.ODMGSessionImpl.ejbCreate(ODMGSessionImpl.java:29)
	at
it.xxxxxxx.xxx.ejb.account.AccountControllerBean.ejbCreate(AccountControllerBean.java:58)
	at
AccountControllerHome_StatelessSessionHomeWrapper19.callCreate(AccountControllerHome_StatelessSessionHomeWrapper19.java:185)
	at
com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:271)
	at
AccountController_StatelessSessionBeanWrapper18.loadProfile(AccountController_StatelessSessionBeanWrapper18.java:2004)
	at
it.xxxxxxx.xxx.ejb.account.LoggedApplicationUserBean.getUserAccount(LoggedApplicationUserBean.java:82)
	at
LoggedApplicationUser_StatefulSessionBeanWrapper22.getUserAccount(LoggedApplicationUser_StatefulSessionBeanWrapper22.java:109)
	at
it.xxxxxxx.xxx.web.xxxComponentManager.getUserAccount(xxxComponentManager.java:59)
	at
it.xxxxxxx.xxx.web.LoginFilter.doFilter(LoginFilter.java:67)
	at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
	at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.ojb.broker.PBFactoryException:
Given PBKey org.apache.ojb.broker.PBKey:
jcdAlias=dsOJB, user=null, password=null does not
match in metadata configuration
	at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.createNewBrokerInstance(Unknown
Source)
	at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl$PBKeyedPoolableObjectFactory.makeObject(Unknown
Source)
	at
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:792)
	... 20 more
2006-03-15 15:14:26,496 [ERROR][xxx.j2ee.ojb]
[HttpRequestHandler-21362147] - ODMGConnection -
init(): database open failed
org.odmg.DatabaseNotFoundException: OJB can't open
database dsOJB
Borrow broker from pool failed, using PBKey
org.apache.ojb.broker.PBKey: jcdAlias=dsOJB,
user=null, password=null
	at org.apache.ojb.odmg.DatabaseImpl.open(Unknown
Source)
	at
it.xxxxxxx.xxx.ojb.ODMGConnection.init(ODMGConnection.java:43)
	at
it.xxxxxxx.xxx.ojb.ODMGSessionImpl.ejbCreate(ODMGSessionImpl.java:29)
	at
it.xxxxxxx.xxx.ejb.account.AccountControllerBean.ejbCreate(AccountControllerBean.java:58)
	at
AccountControllerHome_StatelessSessionHomeWrapper19.callCreate(AccountControllerHome_StatelessSessionHomeWrapper19.java:185)
	at
com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:271)
	at
AccountController_StatelessSessionBeanWrapper18.loadProfile(AccountController_StatelessSessionBeanWrapper18.java:2004)
	at
it.xxxxxxx.xxx.ejb.account.LoggedApplicationUserBean.getUserAccount(LoggedApplicationUserBean.java:82)
	at
LoggedApplicationUser_StatefulSessionBeanWrapper22.getUserAccount(LoggedApplicationUser_StatefulSessionBeanWrapper22.java:109)
	at
it.xxxxxxx.xxx.web.xxxComponentManager.getUserAccount(xxxComponentManager.java:59)
	at
it.xxxxxxx.xxx.web.LoginFilter.doFilter(LoginFilter.java:67)
	at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
	at java.lang.Thread.run(Thread.java:534)
2006-03-15 15:14:26,496 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - AccountControllerBean
- ejbCreate()
2006-03-15 15:14:26,496 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - AccountControllerBean
- loadProfile(): called with userName: admin
2006-03-15 15:14:26,516 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] -
LoggedApplicationUserBean - getUserAccount():
Exception in LoggedApplicationUserBean :Transaction
was rolled back:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor; nested exception is: 
	org.apache.ojb.broker.PBFactoryException: There was
no 'default-connection' attribute enabled in the jdbc
connection descriptor
2006-03-15 15:14:26,516 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] - Transaction was rolled
back: org.apache.ojb.broker.PBFactoryException: There
was no 'default-connection' attribute enabled in the
jdbc connection descriptor; nested exception is: 
	org.apache.ojb.broker.PBFactoryException: There was
no 'default-connection' attribute enabled in the jdbc
connection descriptor
com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor
	at
AccountController_StatelessSessionBeanWrapper18.loadProfile(AccountController_StatelessSessionBeanWrapper18.java:2064)
	at
it.xxxxxxx.xxx.ejb.account.LoggedApplicationUserBean.getUserAccount(LoggedApplicationUserBean.java:82)
	at
LoggedApplicationUser_StatefulSessionBeanWrapper22.getUserAccount(LoggedApplicationUser_StatefulSessionBeanWrapper22.java:109)
	at
it.xxxxxxx.xxx.web.xxxComponentManager.getUserAccount(xxxComponentManager.java:59)
	at
it.xxxxxxx.xxx.web.LoginFilter.doFilter(LoginFilter.java:67)
	at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
	at java.lang.Thread.run(Thread.java:534)

	Nested exception is:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor
	at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown
Source)
	at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
	at
it.xxxxxxx.xxx.ojb.manager.ApplicationUserManager.findApplicationUser(ApplicationUserManager.java:87)
	at
it.xxxxxxx.xxx.ejb.account.AccountControllerBean.loadProfile(AccountControllerBean.java:286)
	at
AccountController_StatelessSessionBeanWrapper18.loadProfile(AccountController_StatelessSessionBeanWrapper18.java:2014)
	at
it.xxxxxxx.xxx.ejb.account.LoggedApplicationUserBean.getUserAccount(LoggedApplicationUserBean.java:82)
	at
LoggedApplicationUser_StatefulSessionBeanWrapper22.getUserAccount(LoggedApplicationUser_StatefulSessionBeanWrapper22.java:109)
	at
it.xxxxxxx.xxx.web.xxxComponentManager.getUserAccount(xxxComponentManager.java:59)
	at
it.xxxxxxx.xxx.web.LoginFilter.doFilter(LoginFilter.java:67)
	at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
	at java.lang.Thread.run(Thread.java:534)
2006-03-15 15:14:26,546 [DEBUG][xxx.j2ee.ejb]
[HttpRequestHandler-21362147] -
LoggedApplicationUserBean - ejbRemove()
[UserAccountBean, Account oid: null]
2006-03-15 15:14:26,546 [ERROR][xxx.j2ee.web]
[HttpRequestHandler-21362147] -
it.xxxxxxx.xxx.framework.j2ee.GeneralFailureException:
EJBControllerBean: Failed to Use AccountController:
caught com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor; nested exception is: 
	org.apache.ojb.broker.PBFactoryException: There was
no 'default-connection' attribute enabled in the jdbc
connection descriptor; nested exception is: 

it.xxxxxxx.xxx.framework.j2ee.GeneralFailureException:
EJBControllerBean: Failed to Use AccountController:
caught com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor; nested exception is: 
	org.apache.ojb.broker.PBFactoryException: There was
no 'default-connection' attribute enabled in the jdbc
connection descriptor
com.evermind.server.rmi.OrionRemoteException:
it.xxxxxxx.xxx.framework.j2ee.GeneralFailureException:
EJBControllerBean: Failed to Use AccountController:
caught com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor; nested exception is: 
	org.apache.ojb.broker.PBFactoryException: There was
no 'default-connection' attribute enabled in the jdbc
connection descriptor
	at
com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:275)
	at
LoggedApplicationUser_StatefulSessionBeanWrapper22.getUserAccount(LoggedApplicationUser_StatefulSessionBeanWrapper22.java:126)
	at
it.xxxxxxx.xxx.web.xxxComponentManager.getUserAccount(xxxComponentManager.java:59)
	at
it.xxxxxxx.xxx.web.LoginFilter.doFilter(LoginFilter.java:67)
	at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
	at java.lang.Thread.run(Thread.java:534)

	Nested exception is:
it.xxxxxxx.xxx.framework.j2ee.GeneralFailureException:
EJBControllerBean: Failed to Use AccountController:
caught com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' attribute enabled in the jdbc
connection descriptor; nested exception is: 
	org.apache.ojb.broker.PBFactoryException: There was
no 'default-connection' attribute enabled in the jdbc
connection descriptor
	at
it.xxxxxxx.xxx.ejb.account.LoggedApplicationUserBean.getUserAccount(LoggedApplicationUserBean.java:98)
	at
LoggedApplicationUser_StatefulSessionBeanWrapper22.getUserAccount(LoggedApplicationUser_StatefulSessionBeanWrapper22.java:109)
	at
it.xxxxxxx.xxx.web.xxxComponentManager.getUserAccount(xxxComponentManager.java:59)
	at
it.xxxxxxx.xxx.web.LoginFilter.doFilter(LoginFilter.java:67)
	at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
	at java.lang.Thread.run(Thread.java:534)
2006-03-15 15:14:26,556 [ERROR][xxx.j2ee.web]
[HttpRequestHandler-21362147] - LoginFilter -
doFilter(): User logged but his information not
found... Username filled in the autentication form
is:admin


Here below the ODMGConnection in charge of opening DB.

public class ODMGConnection { //implements
Serializable{
    
	  protected Implementation odmg;
    protected Database db;

    public static final String ODMG_FACTORY_LOOKUP =
"java:/ojb/defaultODMG";
    public static final String DEF_DATABASE_NAME =
"dsOJB";

    public ODMGConnection() {
    }

    public void init() {
        try {
            Context context = new InitialContext();
            ODMGFactory factory = new ODMGFactory(); 
            odmg = factory.getInstance();
            OJBLogger.logger.info("ODMGConnection -
init(): found odmg factory: " + factory + " and get
Implementation instance: " + odmg);
        } catch (NamingException e) {
            OJBLogger.logger.error("ODMGConnection -
init(): Lookup for ODMGFactory failed", e);
        }

        db = odmg.newDatabase();

        try {
            OJBLogger.logger.info("ODMGConnection -
init(): open new database " + db + " using
databaseName name " + DEF_DATABASE_NAME);
            db.open(DEF_DATABASE_NAME,
Database.OPEN_READ_WRITE);
        } catch (ODMGException e) {
            OJBLogger.logger.error("ODMGConnection -
init(): database open failed", e);
        }
    }

    public Transaction currentTransaction() {
        return odmg.currentTransaction();
    }

    public Database getDatabase() {
        return db;
    }

    public Implementation getImplementation() {
        return odmg;
    }

    public void close() {
        try {
            db.close();
        } catch (ODMGException e) {
            OJBLogger.logger.error("ODMGConnection -
init(): closing of database failed", e);
        }

        db = null;
        odmg = null;
    }
}


I found a similar thread on mailing list archive

http://mail-archives.apache.org/mod_mbox/db-ojb-user/200412.mbox/%3C6FB083FB72EFD21181D30004AC4CA18A04A0DA35@SRV002%3E

but I cannot undertand what's going on in my
configuration. 
Note that the same application is working fine on the
oc4j 90410.

I am blocked by this problem. 
Do you have any idea?
Any help is really appreciated!!!

Thanks!




	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org