Lazy associations

We understand that FDS supports lazy associations, but the
documentation is unclear about whether it's necessary and in what
manner to partially initialize an array which is not empty but in
the "lazy" state, as opposed to the fully initialized state, and
the empty state.
We are using the Java adapter, so our application is
responsible for how data comes out of the DAO layer.
Any information would be appreciated - thank you.

If you are returning collections where the set of ids is too
large to be returned all at once, you should implement that
relationship using a fill method, not using an association
property. In this case, usually the id of the related item is at
least one of the fill parameters. For example, I have reimplemented
the crm demo in beta 2 so that it returns the list of employees for
a given company as a fill method which takes the company id as a
parameter. This allows you to either use fill parameters to
demarcate pages (i.e. you might have a page number parameter), or
to use flex's built in paging support.
Currently in FDMS, the fill method must return all of the
items to be returned in the fill so if the fill is too large to be
returned as a single result set even for the server, you need to
split it up using fill parameters to control the paging (in other
words, you have to do paging yourself and can't use fdms' builtin
paging support to do this automatically). Though we wanted to
support complete 'client controlled' paging all the way through to
the database, it is fairly challenging to keep a list sync'd
between two clients when you do not even know the complete contents
of the list, how big it is, the ways the client can access pages
etc. We might be able to support a variant of the fill method which
implements paging only for the auto-sync-enabled=false case (where
you are not sync'ing changes between clients) but it sounds like
you need clients to be kept in sync even on these large lists as
they change?
I think that in the general case of client controlled but
server performed filtering and sorting, you pass in the sorting and
filtering criteria (including ranges) via fill parameters. The
server performs the operation and returns that set of items so you
get an ArrayCollection on the client which contains just a page of
data at a time. If you want to implement a virtual array collection
on top of that which represents the entire data set that will then
make fill calls as needed to fetch pages you'd have to do that
yourself in action script code. Another strategy would be to make
the paging controls explicit in the UI (ie. have a next page button
which fetches the next page instead of scrolling through the list)
and that would make it easier.
In terms of caching, when you have auto-sync-enabled set to
true, FDMS must at least cache the graph of ids of all of the
managed items by all active managed clients. By default, it caches
the items too but you can turn this off with
<cache-items>false</cache-items>. If you need to keep
your clients up-to-date with changes performed by code that
accesses the DB directly or is just not going through flex, you can
use the 'server push api' to tell flex about these changes, or just
use this api to periodically refresh your clients. If your clients
do not need to be made aware of these changes, you can just let
them drift out of sync and use the conflict detection facilities to
deal with stale updates. If you are using timestamps for your
version numbers, you could probably implement a "get me a list of
everything that has changed" query in a scheduled task which then
uses the server push api to keep clients in sync.

Similar Messages

  • [JPA] Manually instantiating entities with lazy associations. How?

    Hi,
    I need to construct a dynamic native query.
    (I can't use JPQL, because I need to call stored procedures. I can't use a named native query because I'm working on a Search Page and the users may enter various search criteria. A static named query won't be flexible enough for me. I must generate a query on-the-fly.)
    So, I don't know how to make the dynamic native query to produce entities for me, because I don't know how to specify resultSetMapping for it. So, I'm forced to instantiate the entities manually.
    But now I've run upon another problem. The entities have associations. I need them to be LAZY associations. So, how can I manually instantiate an entity in which the associations aren't triggered yet? I think it's not possible but I figured that it doesn't hurt to ask.
    I seem to have a HUGE problem in my hands.
    (If only JPQL could call stored procedures, I'd have constructed a JPQL dynamic query and that would be it. Come to think of it, it all boils down to generating a SQL string from the JPQL string. And generating a stored procedure call inside that SQL string shouldn't be that hard, especially having in mind how many other hurdles have already been overcome by the JPQL parsers. But alas, it's not possible. At least I don't know of a way to do it.)
    Best regards,
    Bisser

    Ooops, sorry about my post above. I just noticed that I can specify the resultClass or the resultSetMapping as a parameter to the EntityManager.createNativeQuery(...) method.

  • BUG REPORT: new 10g Driver throws SQLExcpetion

    So far, i just replaced my old ORACLE JDBC driver jar file with a new version. Of course, i use the classes12.jar to be used by JDK 1.3. This worked for all the 9.xxx Drivers. Now, i tried to use the classes12.jar from the new "10g" Driver (10.1.0.2.0) but it doesn't work anymore. The first simple SELECT statement throws this error:
    java.sql.SQLException: Typlänge größer als Höchstwert
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
         at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:884)
         at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2230)
         at oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1047)
         at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:111)
         at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:94)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:590)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:111)
         at oracle.jdbc.driver.T4CStatement.execute_for_describe(T4CStatement.java:350)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:895)
         at oracle.jdbc.driver.T4CStatement.execute_maybe_describe(T4CStatement.java:382)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:985)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1124)
    For the simple select statement:
    select REF_CLASS, REF_CODE, REF_TEXT_DE from refset order by REF_CLASS,REF_CODE
    so, nothing special. Going back to the last 9.x driver, it works again. Is the 10g driver knwon to be buggy?
    Is there an official bug report web page on the ORACLE site (similar to the sun Java bug database)?

    Hi all,
    I am seeing following exception while using Oracle 10.2.0.3 base release with WebSphere 6.1.0.9.
    ------Start of DE processing------ = [2/3/08 12:59:14:698 CST] , key = java.sql.SQLException com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery 1315
    Exception = java.sql.SQLException
    Source = com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery
    probeid = 1315
    Stack Dump = java.sql.SQLException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
         at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:801)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:841)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1274)
         at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery(WSJdbcStatement.java:1381)
         at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:754)
         at com.filenet.engine.dbpersist.DBContext.determineDatabaseType(DBContext.java:418)
         at com.filenet.engine.context.ServerCallContext._getDBContext(ServerCallContext.java:611)
         at com.filenet.engine.context.ServerCallContext.getDBContextFromJNDIValues(ServerCallContext.java:783)
         at com.filenet.engine.dbpersist.DBContext.determineDatabaseType(DBContext.java:380)
         at com.filenet.engine.gcd.GCDDBPersistence.<init>(GCDDBPersistence.java:135)
         at com.filenet.engine.gcd.GCDPersistence.getGCDPersistence(GCDPersistence.java:171)
         at com.filenet.engine.gcd.GCD.initialize(GCD.java:226)
         at com.filenet.engine.gcd.GCD.domainAvailable(GCD.java:183)
         at com.filenet.engine.gcd.GCD.isDomainAvailable(GCD.java:119)
         at com.filenet.engine.gcd.GCD.getContextInfo(GCD.java:142)
         at com.filenet.engine.init.StartupUtility.start(StartupUtility.java:136)
         at com.filenet.engine.init.StartupUtility.access$000(StartupUtility.java:39)
         at com.filenet.engine.init.StartupUtility$1.run(StartupUtility.java:68)
         at java.security.AccessController.doPrivileged(AccessController.java:274)
         at javax.security.auth.Subject.doAs(Subject.java:573)
         at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:168)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:615)
         at com.filenet.apiimpl.util.J2EEUtilWS.doAs(J2EEUtilWS.java:207)
         at com.filenet.engine.context.CallState.doAsSystem(CallState.java:385)
         at com.filenet.engine.init.StartupUtility.startASSystem(StartupUtility.java:63)
         at com.filenet.engine.jca.impl.ConnectionFactoryImpl.start(ConnectionFactoryImpl.java:120)
         at engine.EngineInit._init(EngineInit.java:60)
         at engine.EngineInit.init(EngineInit.java:132)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:190)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:317)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1142)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:150)
         at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:99)
         at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:787)
         at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:467)
         at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:304)
         at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:285)
         at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
         at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
         at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
         at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608)
         at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
         at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
         at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2131)
         at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:341)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    Dump of callerThis =
    Object type = com.ibm.ws.rsadapter.jdbc.WSJdbcStatement
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.jdbc.WSJdbcStatement@53385338
    Displaying FFDC information for wrapper hierarchy,
    beginning from the Connection...
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@7c9e7c9e
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@7c9e7c9e
    Transaction Manager global transaction status is
    STATUS NO TRANSACTION (6)
    Underlying Connection: oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    Key Object:
    [B@14f414f4
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    Connection Manager:
    [ConnectionManager]@4ee24ee2
    JNDI Name <FNGCDDS>
    shareable <true>
    ConnectionManager supports lazy association?
    true
    ConnectionManager supports lazy enlistment?
    true
    Handle is reserved? false
    AutoCommit value tracked by handle: true
    Detection of multithreaded access is:
    DISABLED
    Thread id:
    null
    Wrapper State:
    ACTIVE
    Parent wrapper:
    null
    Child wrapper:
    null
    # of Child Wrappers 1
    Child wrappers:
    com.ibm.ws.rsadapter.jdbc.WSJdbcStatement@53385338
    ConnectionRequestInfo:
    null
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl@63666366
    Detection of multithreaded access is
    DISABLED
    Resource Adapter:
    null
    Hash Code:
    -1131425938 (0xbc8fcf6e)
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    Database Type:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    Description:
    null
    InternalDataStoreHelper:
    [email protected]8
    Log Writer:
    null
    Performance Monitoring Instrumentation:
    com.ibm.ws.pmi.server.modules.J2CModule@46cc46cc
    Statement Cache Size (maximum):
    10
    Transaction Branches are set to be Loosely Coupled:
    false
    Counter of fatal connection errors on ManagedConnections created by this MCF:
    0
    Validate existing connections on cleanup after a fatal connection error is detected?
    true
    ResetConnectionByBackendDatabase:
    false
    Backend id checking is:
    true
    JMSOnePhaseOptimization:
    false
    Reauthentication:
    false
    newDBConnectionValidationEnabled:
    false
    connectionRetriesDuringDBFailover:
    100
    connRetryDurationDuringDBFailover:
    3000
    Connection Factory Type:
    com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
    Listing PropertyChangeListeners:
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbDataSource@34003400
    DataSource Implementation Class Name:
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    DataSource Name:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    ONE PHASE ENABLED
    Underlying DataSource Object: oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    Counter of unique, modified DataSource configurations: 0
    DynamicDSConfigManager
    null
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@3f023f02
    ONE PHASE ENABLED
    Database Type:
    null
    Transaction State:
    NO_TRANSACTION_ACTIVE
    Statement Cache Size (maximum):
    10
    Key:
    [B@14f414f4
    Performance Monitoring Instrumentation:
    com.ibm.ws.pmi.server.modules.J2CModule@46cc46cc
    Log Writer:
    null
    Subject:
    null
    ManagedConnection:
    WSRdbManagedConnectionImpl@3f023f02
    Counter of fatal connection errors for the ManagedConnectionFactory as of the most recent getConnection on this ManagedConnection:
    0
    Default AutoCommit:
    true
    Current AutoCommit:
    true
    AutoCommit reported by the JDBC driver:
    true
    Current Isolation:
    READ COMMITTED (2)
    Isolation level has changed? :
    false
    Support isolation level switching:
    false
    Isolation reported by the JDBC driver:
    READ COMMITTED (2)
    Catalog, IsReadOnly, or TypeMap has changed? :
    false
    Default Holdability:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Current Holdability:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Holdability value has changed? :
    false
    Holdability reported by the JDBC driver:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Thread ID:
    null
    Lazily enlisted in the current transaction? :
    false
    Underlying Connection Object: oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    Underlying PooledConnection Object: oracle.jdbc.pool.OraclePooledConnection@64ec64ec
    oracle.jdbc.pool.OraclePooledConnection@64ec64ec
    SQLJ Default Context: null
    null
    Is statement caching enabled? :
    true
    Fatal connection error was detected? :
    false
    Currently cleaning up handles? :
    false
    Last ConnectionEvent sent for this ManagedConnection:
    com.ibm.ws.rsadapter.spi.WSConnectionEvent@3f583f58
    Connection Handle: null
    Event ID: UNKNOWN CONNECTION EVENT CONSTANT (0)
    Exception: null
    Driver version:
    10.2.0.3.0
    Database version:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Connection Event Listeners:
    com.ibm.ejs.j2c.ConnectionEventListener@6f306f30
    Interaction Metrics:
    com.ibm.ejs.j2c.ConnectionEventListener@6f306f30
    Maximum Handle List Size: 15
    Handle Count: 1
    Handles:
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@7c9e7c9e
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    State Manager:
    com.ibm.ws.rsadapter.spi.WSStateManager@6ec46ec4
    XA Resource:
    null
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl@7c827c82
    Connection:
    oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    ManagedConnection:
    WSRdbManagedConnectionImpl@3f023f02
    Detection of multithreaded access is:
    DISABLED
    ManagedConnectionMetaData:
    null
    Statement Cache:
    com.ibm.ws.rsadapter.spi.CacheMap@6d486d48
    Number of entries: 0
    Maximum entries: 10
    Number of buckets: 13
    Maximum bucket size: 5
    Number of discards: 0
    BUCKET SIZE PREV NEXT
    000 000 013 013
    001 000 013 013
    002 000 013 013
    003 000 013 013
    004 000 013 013
    005 000 013 013
    006 000 013 013
    007 000 013 013
    008 000 013 013
    009 000 013 013
    010 000 013 013
    011 000 013 013
    012 000 013 013
    013 LRU 014
    014 MRU 013
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSConnectionRequestInfoImpl@345e345e
    extention DS properties =
    null
    extention DS properties key =
    0
    useHetrogeneous =
    false
    changable CRI =
    false
    optimizeForGetUseCloseUsage =
    false
    User Name:
    null
    Password:
    null
    Isolation Level:
    READ COMMITTED (2)
    Catalog:
    null
    Is Read Only?
    null
    Type Map:
    null
    Cursor Holdability:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Config ID: 0
    Hash Code:
    0
    Support isolation switching on connection:
    false
    NoEnlistment:
    false
    ShareWithCMPOnly:
    false
    Handle type:
    java.sql.Connection
    TrustedContext_name:
    null
    TrustedContext_realm:
    null
    TrustedContext_userSecToken:
    null
    TrustedContext_originalUser:
    null
    trustedContextIdentityAttributesAreSet =
    false
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl@63666366
    Detection of multithreaded access is
    DISABLED
    Resource Adapter:
    null
    Hash Code:
    -1131425938 (0xbc8fcf6e)
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    Database Type:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    Description:
    null
    InternalDataStoreHelper:
    [email protected]8
    Log Writer:
    null
    Performance Monitoring Instrumentation:
    com.ibm.ws.pmi.server.modules.J2CModule@46cc46cc
    Statement Cache Size (maximum):
    10
    Transaction Branches are set to be Loosely Coupled:
    false
    Counter of fatal connection errors on ManagedConnections created by this MCF:
    0
    Validate existing connections on cleanup after a fatal connection error is detected?
    true
    ResetConnectionByBackendDatabase:
    false
    Backend id checking is:
    true
    JMSOnePhaseOptimization:
    false
    Reauthentication:
    false
    newDBConnectionValidationEnabled:
    false
    connectionRetriesDuringDBFailover:
    100
    connRetryDurationDuringDBFailover:
    3000
    Connection Factory Type:
    com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
    Listing PropertyChangeListeners:
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbDataSource@34003400
    DataSource Implementation Class Name:
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    DataSource Name:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    ONE PHASE ENABLED
    Underlying DataSource Object: oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    Counter of unique, modified DataSource configurations: 0
    DynamicDSConfigManager
    null
    ==> Performing default dump from com.ibm.ws.rsadapter.DiagnosticModuleForAdapter = Sun Feb 03 12:59:15 CST 2008
    This is a FFDC log generated for the Default Resource Adapter from source = com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery
    The exception caught = java.sql.SQLException: ORA-00942: table or view does not exist
    SQL Error Code is 942 SQL State is = 42000
    Operating System = Windows Server 2003 5.2 build 3790 Service Pack 2 x86
    Classpath = C:\Program Files\IBM\WebSphere\AppServ\profiles\AppSrv02/properties;C:/Program Files/IBM/WebSphere/AppServ/properties;C:/Program Files/IBM/WebSphere/AppServ/lib/startup.jar;C:/Program Files/IBM/WebSphere/AppServ/lib/bootstrap.jar;C:/Program Files/IBM/WebSphere/AppServ/lib/j2ee.jar;C:/Program Files/IBM/WebSphere/AppServ/lib/lmproxy.jar;C:/Program Files/IBM/WebSphere/AppServ/lib/urlprotocols.jar;C:/Program Files/IBM/WebSphere/AppServ/deploytool/itp/batchboot.jar;C:/Program Files/IBM/WebSphere/AppServ/deploytool/itp/batch2.jar;C:/Program Files/IBM/WebSphere/AppServ/java/lib/tools.jar
    Ext dirs = C:\Program Files\IBM\WebSphere\AppServ\java\jre\lib\ext
    Other related data. If null, nothing was passed in =
    null
    The Objects' instance variables are printed below recursively 2 levels deep =
    Object type = com.ibm.ws.rsadapter.jdbc.WSJdbcStatement
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.jdbc.WSJdbcStatement@53385338
    Displaying FFDC information for wrapper hierarchy,
    beginning from the Connection...
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@7c9e7c9e
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@7c9e7c9e
    Transaction Manager global transaction status is
    STATUS NO TRANSACTION (6)
    Underlying Connection: oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    Key Object:
    [B@14f414f4
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    Connection Manager:
    [ConnectionManager]@4ee24ee2
    JNDI Name <FNGCDDS>
    shareable <true>
    ConnectionManager supports lazy association?
    true
    ConnectionManager supports lazy enlistment?
    true
    Handle is reserved? false
    AutoCommit value tracked by handle: true
    Detection of multithreaded access is:
    DISABLED
    Thread id:
    null
    Wrapper State:
    ACTIVE
    Parent wrapper:
    null
    Child wrapper:
    null
    # of Child Wrappers 1
    Child wrappers:
    com.ibm.ws.rsadapter.jdbc.WSJdbcStatement@53385338
    ConnectionRequestInfo:
    null
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl@63666366
    Detection of multithreaded access is
    DISABLED
    Resource Adapter:
    null
    Hash Code:
    -1131425938 (0xbc8fcf6e)
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    Database Type:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    Description:
    null
    InternalDataStoreHelper:
    [email protected]8
    Log Writer:
    null
    Performance Monitoring Instrumentation:
    com.ibm.ws.pmi.server.modules.J2CModule@46cc46cc
    Statement Cache Size (maximum):
    10
    Transaction Branches are set to be Loosely Coupled:
    false
    Counter of fatal connection errors on ManagedConnections created by this MCF:
    0
    Validate existing connections on cleanup after a fatal connection error is detected?
    true
    ResetConnectionByBackendDatabase:
    false
    Backend id checking is:
    true
    JMSOnePhaseOptimization:
    false
    Reauthentication:
    false
    newDBConnectionValidationEnabled:
    false
    connectionRetriesDuringDBFailover:
    100
    connRetryDurationDuringDBFailover:
    3000
    Connection Factory Type:
    com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
    Listing PropertyChangeListeners:
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbDataSource@34003400
    DataSource Implementation Class Name:
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    DataSource Name:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    ONE PHASE ENABLED
    Underlying DataSource Object: oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    Counter of unique, modified DataSource configurations: 0
    DynamicDSConfigManager
    null
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@3f023f02
    ONE PHASE ENABLED
    Database Type:
    null
    Transaction State:
    NO_TRANSACTION_ACTIVE
    Statement Cache Size (maximum):
    10
    Key:
    [B@14f414f4
    Performance Monitoring Instrumentation:
    com.ibm.ws.pmi.server.modules.J2CModule@46cc46cc
    Log Writer:
    null
    Subject:
    null
    ManagedConnection:
    WSRdbManagedConnectionImpl@3f023f02
    Counter of fatal connection errors for the ManagedConnectionFactory as of the most recent getConnection on this ManagedConnection:
    0
    Default AutoCommit:
    true
    Current AutoCommit:
    true
    AutoCommit reported by the JDBC driver:
    true
    Current Isolation:
    READ COMMITTED (2)
    Isolation level has changed? :
    false
    Support isolation level switching:
    false
    Isolation reported by the JDBC driver:
    READ COMMITTED (2)
    Catalog, IsReadOnly, or TypeMap has changed? :
    false
    Default Holdability:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Current Holdability:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Holdability value has changed? :
    false
    Holdability reported by the JDBC driver:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Thread ID:
    null
    Lazily enlisted in the current transaction? :
    false
    Underlying Connection Object: oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    Underlying PooledConnection Object: oracle.jdbc.pool.OraclePooledConnection@64ec64ec
    oracle.jdbc.pool.OraclePooledConnection@64ec64ec
    SQLJ Default Context: null
    null
    Is statement caching enabled? :
    true
    Fatal connection error was detected? :
    false
    Currently cleaning up handles? :
    false
    Last ConnectionEvent sent for this ManagedConnection:
    com.ibm.ws.rsadapter.spi.WSConnectionEvent@3f583f58
    Connection Handle: null
    Event ID: UNKNOWN CONNECTION EVENT CONSTANT (0)
    Exception: null
    Driver version:
    10.2.0.3.0
    Database version:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Connection Event Listeners:
    com.ibm.ejs.j2c.ConnectionEventListener@6f306f30
    Interaction Metrics:
    com.ibm.ejs.j2c.ConnectionEventListener@6f306f30
    Maximum Handle List Size: 15
    Handle Count: 1
    Handles:
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@7c9e7c9e
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    State Manager:
    com.ibm.ws.rsadapter.spi.WSStateManager@6ec46ec4
    XA Resource:
    null
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl@7c827c82
    Connection:
    oracle.jdbc.driver.LogicalConnection@3dfc3dfc
    ManagedConnection:
    WSRdbManagedConnectionImpl@3f023f02
    Detection of multithreaded access is:
    DISABLED
    ManagedConnectionMetaData:
    null
    Statement Cache:
    com.ibm.ws.rsadapter.spi.CacheMap@6d486d48
    Number of entries: 0
    Maximum entries: 10
    Number of buckets: 13
    Maximum bucket size: 5
    Number of discards: 0
    BUCKET SIZE PREV NEXT
    000 000 013 013
    001 000 013 013
    002 000 013 013
    003 000 013 013
    004 000 013 013
    005 000 013 013
    006 000 013 013
    007 000 013 013
    008 000 013 013
    009 000 013 013
    010 000 013 013
    011 000 013 013
    012 000 013 013
    013 LRU 014
    014 MRU 013
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSConnectionRequestInfoImpl@345e345e
    extention DS properties =
    null
    extention DS properties key =
    0
    useHetrogeneous =
    false
    changable CRI =
    false
    optimizeForGetUseCloseUsage =
    false
    User Name:
    null
    Password:
    null
    Isolation Level:
    READ COMMITTED (2)
    Catalog:
    null
    Is Read Only?
    null
    Type Map:
    null
    Cursor Holdability:
    DEFAULT CURSOR HOLDABILITY VALUE (0)
    Config ID: 0
    Hash Code:
    0
    Support isolation switching on connection:
    false
    NoEnlistment:
    false
    ShareWithCMPOnly:
    false
    Handle type:
    java.sql.Connection
    TrustedContext_name:
    null
    TrustedContext_realm:
    null
    TrustedContext_userSecToken:
    null
    TrustedContext_originalUser:
    null
    trustedContextIdentityAttributesAreSet =
    false
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl@63666366
    Detection of multithreaded access is
    DISABLED
    Resource Adapter:
    null
    Hash Code:
    -1131425938 (0xbc8fcf6e)
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    Database Type:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    Description:
    null
    InternalDataStoreHelper:
    [email protected]8
    Log Writer:
    null
    Performance Monitoring Instrumentation:
    com.ibm.ws.pmi.server.modules.J2CModule@46cc46cc
    Statement Cache Size (maximum):
    10
    Transaction Branches are set to be Loosely Coupled:
    false
    Counter of fatal connection errors on ManagedConnections created by this MCF:
    0
    Validate existing connections on cleanup after a fatal connection error is detected?
    true
    ResetConnectionByBackendDatabase:
    false
    Backend id checking is:
    true
    JMSOnePhaseOptimization:
    false
    Reauthentication:
    false
    newDBConnectionValidationEnabled:
    false
    connectionRetriesDuringDBFailover:
    100
    connRetryDurationDuringDBFailover:
    3000
    Connection Factory Type:
    com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource
    Listing PropertyChangeListeners:
    First Failure Data Capture information for
    com.ibm.ws.rsadapter.spi.WSRdbDataSource@34003400
    DataSource Implementation Class Name:
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    DataSource Name:
    null
    DataStoreHelper:
    com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@3ebc3ebc
    DataSource properties:
    {enable2Phase=false, serverName=localhost, statementCacheSize=10, user=gcduser, dataStoreHelperClass=com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper, URL=jdbc:oracle:thin:@localhost:1521:orcl, databaseName=orcl, selectMethod=direct, dataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource, password=******, portNumber=1521}
    ONE PHASE ENABLED
    Underlying DataSource Object: oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    oracle.jdbc.pool.OracleConnectionPoolDataSource@39703970
    Counter of unique, modified DataSource configurations: 0
    DynamicDSConfigManager
    null
    +Data for directive [defaultadapter] obtained. =
    ==> Dump complete for com.ibm.ws.rsadapter.DiagnosticModuleForAdapter = Sun Feb 03 12:59:15 CST 2008
    Any Ideas?
    Thanks in advance.
    Regards,
    Rajan

  • Need you help

    errors occurred using Hibernate to load a persistence object by identifier, but no errors occur using Hibernate to make a transient object persistent.
    Development environment: Tomcat+Hibernate
    Pool of connections is c3p0.
    Database is Mysql.
    error messages are below:
    org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
         at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:53)
         at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:84)
         at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:134)
         at quickstart.User$$EnhancerByCGLIB$$360d995d.getUsername()
         at org.apache.jsp.jsp1_jsp._jspService(jsp1_jsp.java:52)

    errors occurred using Hibernate to load a persistence
    object by identifier, but no errors occur using
    Hibernate to make a transient object persistent.
    Development environment: Tomcat+Hibernate
    Pool of connections is c3p0.
    Database is Mysql.
    error messages are below:
    org.hibernate.LazyInitializationException: could
    uld not initialize proxy - the owning Session was
    closed
    at
    t
    org.hibernate.proxy.AbstractLazyInitializer.initialize
    (AbstractLazyInitializer.java:53)
    at
    t
    org.hibernate.proxy.AbstractLazyInitializer.getImpleme
    ntation(AbstractLazyInitializer.java:84)
    at
    t
    org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGL
    IBLazyInitializer.java:134)
    at
    t
    quickstart.User$$EnhancerByCGLIB$$360d995d.getUsername
    at
    t
    org.apache.jsp.jsp1_jsp._jspService(jsp1_jsp.java:52)Hi,
    Although I never got as far as lazy initializations, I just consulted myHibernate in Action book, and it makes mention of problems that can occur on page 300. It says regarding their example "By the time we get to the JSP, the Hibernate session is already closed, so we can't access unfetched lazy associations. We encourage you to think about this issue; we made the experience that this might not be obvious for new Hibernate users. A great solution to ... [the problem] is the thread-local session pattern."
    gl
    AU

  • Problems with offline caching

    In a recent AIR 2.6 application I use the offline caching feature of LCDS 3.1
    The application itself uses a Java 6 / Spring 3 / JPA 1 / Hibernate stack (custom code, not using LC model driven development). For offline support, I started with the sample code from the LCDS 3.1 documentation which works ok in most cases - at least, if I fetch collections when online, then go to offline mode and fetch the same collections from the cache. This works fine and the SQLite data base gets created correctly.
    However, as soon as I start calling fill() on a DataService in offline mode on a collection that has *not* been fetched before or try to load an lazy association which has not been fetched before, the DataService "hangs" in terms of that the AsyncToken returned by that fill() method never fires a result or fault event.
    The last thing that happens in the client is
      [DEBUG] mx.data.SQLDBCache SQLDBCache - before select: SELECT id,data FROM [ORGANIZATION_FAVSOrganization]
    and that’s it. In this case I don’t get any further feedback and the DataService does not create a result or fault event, it does not even time out. Not sure if this is by design or not but as I’m listening for result/faults event to display/hide progress indicators gives me a lot of headaches on how to control them in offline mode.
    Any ideas?
    Thanks,
    Dirk

    Harry, thank you for your immed response.
    I think I might have posted my problem under a wrong thread. I am facing this issue for older version of LCDS which I downloaded couple of years back.. it says ES 2.6 and am still a bit confused about the version numbers.
    That being said, my problem is exactly the same. Everything works fine when LCDS server is reachable. However when offline, Fill() just does not call any of the handlers.
    In case if you can still help:
    Here is the DS definition:
         public class UsersDataService extends EventDispatcher implements IFITDataService
              private var mDS:DataServiceWrapper;
              private var mAllUsers:ArrayCollection;
              public function UsersDataService()
                   mDS = new DataServiceWrapper("UserInfo");
                   mDS.cacheID = "allusers"
                   mAllUsers = new ArrayCollection();
                   mDS.addEventListener(DataServiceFaultEvent.FAULT,OnFault);
                   mDS.autoConnect = true;
              public function getAllUsers(locationId:String):void
                   mDS.addEventListener(ResultEvent.RESULT, OnResult);
                   if(mDS.isCollectionManaged(mAllUsers))
                        mDS.refreshCollection(mAllUsers);
                   else
                        mDS.fill(mAllUsers, locationId);
              public function getUser(userName:String):void
                   mDS.addEventListener(ResultEvent.RESULT, OnResult);
                   mDS.getItem({ID:userName});
              public function OnResult(event:ResultEvent):void
                   mDS.removeEventListener(ResultEvent.RESULT, OnResult);
                   trace(event)
                   var dsEvent:DataServiceEvent = new DataServiceEvent(DataServiceEvent.Result)
                   dsEvent.user = event.result
                   dispatchEvent(dsEvent);
              public function OnFault(event:FaultEvent):void
                   trace(event)
              public function getData(locationId:String):void
                   getAllUsers(locationId);
              public function refresh():void
                   if(mDS.isCollectionManaged(mAllUsers))
                        mDS.addEventListener(ResultEvent.RESULT, OnResult);
                        mDS.refreshCollection(mAllUsers);
                   else
                        getAllUsers(FITSession.regLocationID);
              public function get users():ArrayCollection
                   return mAllUsers
              public function get connected():Boolean
                   return mDS.connected;
    I am also attaching the 'allusers' db
    Thanks much!

  • Tour de Flex Sample - Managing Associations and Lazy Loading - 13800

    comments

    For that number of sections, you may want to consider leveraging an MVC framework like Mate ( http://mate.asfusion.com/ ). Mate (and, in general, most MVC frameworks) is more about application structure than application layout, but it provides some really useful guidelines for organizing your code for maintainability and testability. Mate even has a Google Code project of example applications: http://code.google.com/p/mate-examples/ .

  • Is it possible to get component associated with DefaultListSelectionEvent?

    Hallo,
    Is it possible to get component associated with DefaultListSelectionEvent, please?
    There are multiple tables in my window. All tables (must!) have same TableSelectionListener. Problem is that there's no information about component in default list selection model implementation. When fireing events DefaultListSelectionModel use self as event source (see DefaultListSelectionModel.fireValueChanged fragment below).
    e = new ListSelectionEvent(this, firstIndex, lastIndex, isAdjusting);Any ideas how to get component in ListSelectionListener.valueChanged, please? But don't forget that as a programer, i am the lazy. Thus implementing new selection model is not an acceptable solution, but class extension is :p
    One idea is to remember models component in constructor and override DefaultListSelectionModel.fireValueChanged like this:
    class MyGreatListSelectionModel extends DefaultListSelectionModel {
       protected JComponent boss;
        public MyGreatListSelectionModel(JComponent c) {
            boss = c;
        @Override protected void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting)
            Object[] listeners = listenerList.getListenerList();
            ListSelectionEvent e = null;
            for (int i = listeners.length - 2; i >= 0; i -= 2) {
                if (listeners[i] == ListSelectionListener.class) {
                    if (e == null) {
                        // Only changed 'this' to 'boss'
                        e = new ListSelectionEvent(boss, firstIndex, lastIndex, isAdjusting);
                    ((ListSelectionListener)listeners[i+1]).valueChanged(e);
    }This should work, but if there already exists some mechanism, such extension is just slowing app down.

    Thanks for your help.
    However I could not get the result. I am using following code:
    public void myaction(ActionEvent event)
    FacesContext context = FacesContext.getCurrentInstance();
    UIViewRoot view = context.getViewRoot();
    UIComponent UI = view.findComponent("tab");
    if(UI == null)     
         System.out.println("UI Not Found ");
    else
         System.out.println("Get Current FecesContext");
    There is an Component having id "tab" is available on JSF page but I am getting "UI not Found" every time. Is there somthing wrong...Please suggest.

  • JPA lazy loading with Firebirdsql

    I'm trying to use FetchType.Lazy in @OneToOne associations, with a firebirdsql database.
    Toplink JPA generates the sql query as follow:
    SELECT FIELD1, FIELD2, _TOPLINK_FIELD3_VH, ... FROM TABLE.....
    This select gets this error msg:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.firebirdsql.jdbc.FBSQLException: Exception. nullError Code: 0
    (it can't find the TOPLINKFIELD3_VH field)
    Is this an issue related to firebirdsql support on Toplink?
    Or is it a issue related to firebirdsql JDBC driver/database?

    Don't double post. I've removed the thread you started 3 hrs 16 minutes after this one with the identically same question.
    db

  • How to configure lazy/eager loading for each JPA query

    Hi!
    I have extensive EJB model (entities with many child entities, entities with association to other large (many fields, BLOBs including) entities, and so on) and I would like for each JPA query configure what properties or associated entities (actually - in arbitrary depth) of selected entities should be fetched.
    E.g. for one query I would like to fetch only Order (and no data of associated entities), but for other queries I would like to fetch Order, Order.Customer, Order.ShippingAddress.ZipCode and nothing else ( e.g. if there is Ordere.Route, Order.Billing and other associations, then I would like not to waste resources for fetching them). In both case the select clause of query can include only Order, but the results should be different - i.e. - there is no associated data in the first case and there are some associated data the second case.
    I know that one solution is to declare all associations as lazy and then - after reading the result of query - do some touching for retrieving the associated data:
    String check = order.Customer.toString();
    check = order.ShippingAddess.ZipCode.toString();
    But I see 2 problems with this: 1) it is not nice (resources are wasted for simply touching associated entities); 2) I assume that each "touch" operation generates other query to database that could be executed together with the original query. So - it would be nice to configure JPA query somehow to let it know which associations will be required from the result and which not.
    What is the best practice?
    I found, that JBoss server has lazy-loading-group configuration, but - I guess - it is JBoss specific:
    http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.2/html/Server_Configuration_Guide/Loading_Process-Lazy_loading_Process.html
    besides - it is XML and it would be more pretty if query configuration could be done with annotations!

    JPQL has a "fetch" construct in which you can force a lazy element to be fetched using a query - I must note that I have had unexpected results with it in the past but that was using an old version of Hibernate and I wasn't very experienced with JPA yet.
    http://docs.oracle.com/cd/E15051_01/wls/docs103/kodo/full/html/ejb3_langref.html#ejb3_langref_fetch_joins

  • Lazy loading differences Toplink vs. Hibernate - plz. explain

    I'm in the process of evaluating both Toplink and hibernate as potential ORM framework to use for a project I'm currently involved in.
    My question is about how Toplink resolves lazily loaded associations. In hibernate I have to perform a query inside a transactional context boundary, like:
    Session s = SessionFactory.getSession();
    s.beginTransaction();
    ... your query logic here
    s.getTransaction().commit();When the query involves associations which are declared as lazily loadable, trying to invoke these associations after the transaction boundary has been closed, results in an exception. This differs from Toplink (my JUnit testcase breaks for Hibernate if I set the DAOFactory to return hibernate enabled DAO's) and I'm wondering why?
    I'm guessing this has something to do with how Toplink manages its clientsession, but would like to get some confirmation about this. It looks like as-long as the thread of execution is running I can resolve associations using Toplink, but not when I use Hibernate.
    This brings me to yet another question - what's considered best practices in Toplink regarding session disposal. Should I do something myself, or let the garbage collector take care of it?

    I'm not too sure here, but I think it's because TopLink has a "long running" ServerSession. When you do lazy initialization outside a clientsession it is for read only purposes and it will use the centrally managed ServerSession (and cache). I'm still trying to figure out the exact relationships here, som I'm not too sure. :) Hibernate does not have a centrally shared cache, and will not be able to instantiate objects if the session is closed (for each session, objects are instantiated from it's data cache).
    As for handling resources and closing/opening, use the Spring/TopLink integration. It will handle it for you and give you heaps of convenience methods that uses some clever tricks to decide if it should fetch objects with Session or UnitOfWork. It will also do some good Exception handling built into Spring.

  • Concurrent, non-synchronized, lazy initialization: is this correct?

    Guys, I would appreciate a sanity check on some code of mine.
    I have a class, call it State. Every instance is associated with a key of some type. Each user will know the key it wants to use. It will present that key to State to request the corresponding State instance. They must always receive back that sole instance that corresponds to key. The keys are unknown until runtime, so you must lazy initialize a State instance when first presented with a given key.
    If concurrency was not an issue, then State could have lazy initialization code like this:
         /** Contract: never contains null values. */
         private static final Map<Object,State> map = new HashMap<Object,State>();
         public static State get(Object key) {
              State state = map.get(key);
              if (state == null) {
                   state = new State();
                   map.put(key, state);
              return state;
         private State() {}     // CRITICAL: private to ensure that get is the only place instances createdBut heavy concurrency on get is present in my application. While I could trivially make the above code safe by synchronizing get, that would cause it bottleneck the entire application. Vastly superior would be the use of some sort of concurrent data structure that would only bottleneck during the relatively rare times when new State instances must be created, but would allow fast concurrent retrievals when the State instance has already been created, which is the vast majority of the time.
    I think that the unsynchronized code below does the trick:
         /** Contract: never contains null values. */
         private static final ConcurrentMap<Object,State> map = new ConcurrentHashMap<Object,State>();
         public static State get(Object key) {
              State current = map.get(key);
              if (current != null) return current;
              State candidate = new State();
              current = map.putIfAbsent(key, candidate);
              return (current == null) ? candidate : current;
         }Here is how it works: most of the time, just the first two lines
         /** (ignore this) */
         State current = map.get(key);
         if (current != null) return current;will be executed because the mapping will exist. This will be really fast, because ConcurrentHashMap is really fast (its always slower than HashMap, but maybe only 2X slower for the scenario that I will use it in; see [https://www.ibm.com/developerworks/java/library/j-benchmark2/#dsat] ).
    If the relevant State instance is not present in map, then we speculatively create it. Because get is unsynchronized, this may/may not be the one actully put on map and returned by the subsequent lines of code because another thread supplying the same key may be concurrently executing the same lines of code. That's why its named candidate.
    Next--and this is the real critical step--use ConcurrentMap's atomic putIfAbsent method to ensure that just the first thread to call the method for a given key is the one who suceeds in putting it's candidate in map. We reassign current to the result of putIfAbsent. Its value will be null only if there was no previous mapping for key but this call to putIfAbsent suceeded in putting candidate on map; thus, candidate needs to be returned in this case. But if current is not null, then some other thread with the same key must have been concurrently calling this code and was the thread which suceeded in putting its State on map; thus in this case current will have that other thread's value and so return it (with this thread's candidate being a waste; oh well).
    Note that this problem is similar in spirit to the infamous double checked locking idiom. Since that is such a treacherous minefield
    [http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html].
    I would really appreciate another set of eyes looking over my code.

    Hi Bbatman,
    Thank you so much for your answer.
    Pietblock: I believe that your double checked locking proposal is still wrong.OK, I do believe you.
    Did you read the link that I provided in my initial post?
    It discusses some known solutions,
    the best of which for singletons is a value helper class,
    followed by making the reference to your singleton be volatile
    (assuming that you are using jdk 1.5+).Yes, I did read that article some time ago, when I first got warned for double checking. I never quite understood the keyword "volatile". Now, when reading it again, I see some light glimmering.
    But your proposal has some strange elements.
    First, both the singleton field as well as accessor method are always static
    --why did you make them instance based in your code?
    In order to call them, you already need an instance which defeats the purpose!
    Are you sure about that choice?Yes, that is deliberately. The intended use is to define a static instance of SingletonReference in a class that needs to be instantiated as a singleton. That reference is then used to obtain the singleton.
    Assuming that leaving out static on those was a typo,
    the only innovation in your proposal is the claim that
    "Executing an instance method on the new singleton prevents inlining".
    Where did you get that idea from?
    Its news to me. Instance methods often get inlined, not just static methods.The non static field is not a typo, but intentional. What you call a "innovation", my assumption that I prevented inlining, is exactly what I was not very sure about. I can't imagine how an interpreter or JIT compiler would navigate around that construct, but nevertheless, I am not sure. Your remark suggests that it is unsafe and I will reconsider my code (change it).
    The reason why most double checked locking solutions fail,
    including I believe yours,
    is due to completely unintuitive behavior of optimizing java runtime compilers;
    things can happen in different time order than you expect if you do not use some sort of locking.
    Specifically, typical double checked locking fails because there is no lock on the singleton,
    which means that writes to it can occur in strange order,
    which means that your null-check on it may not prevent multiple instances from being created. Yes, you convinced me.
    Thank you so much for looking into it
    Piet

  • Lazy initialization of ValueHolderInterface

    We are initializing the value holders lazily, for example we are initializing them checking them if they are null in the getter methods, from
    the code patterns it is always seem that value holders are initialized in the constructors of the POJO. what are the problems associated
    with lazy initialization of valueholderinterface? thanks

    Should be ok, and more optimal. When TopLink generates/weaves code it initializes them lazily (since 10.1.3).
    James : http://www.eclipselink.org

  • JPA -- Best way to refresh a List association?

    Hi,
    I need to refresh a OneToMany association.
    For example, I have two entities: Header & Detail.
    @Entity
    @Table(name="HEADERS")
    public class Header implements Serializable {
        @OneToMany(mappedBy="header")
        private List<Detail> details;
    @Entity
    @Table(name="DETAILS")
    public class Detail implements Serializable {
        @ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="HDR_ID", referencedColumnName="HDR_ID")
        private Header header;
    }So, I fetch the Header along with all its Details.
    At a later point of time, I know that some Detail rows in the database have been changed behind my back. I need to re-fetch the list of Details. What should I do?
    1. I could add a cascade parameter to the @OneToMany association. I could specify:
    @OneToMany(mappedBy="header", cascade={CascadeType.REFRESH})Then I could run:
    entityManager.refresh(header);The trouble is that, since all the Details are already in the cache, the cached entities will be returned, not the ones fetched from the database. So, I won't refresh a thing. A query will be sent to the database indeed, but I will get the cached (i.e. stale) entities. I don't know of a way to specify something like
    setHint(TopLinkQueryHints.REFRESH, HintValues.TRUE)dynamically for associations, so that the values in the cache would be replaced with the ones fetched from the database.
    2. I could try to turn off the caching for the while Entity class. The trouble is that for some reason this doesn't work (see my other question here JPA -- How can I turn off the caching for an entity? Besides, even if it worked, I don't want to turn off the caching in general. I simply want to refresh the list sometimes.
    Could anyone tell me what's the best way to refresh the association?
    Best regards,
    Bisser

    Hi Chris,
    First, let me thank you that you take the time to answer my questions. I really appreciate that. I wish to apologize for my late reply but I wasn't around the PC for a while.
    TopLink doesn't refresh an entity based on a view. I will try to explain in more detail. I hope you'll have patience with me because this might be a bit longer even than my previous post. I will oversimplify my actual business case.
    Let's assume we have two tables and a view:
    create table MASTERS
      (id number(18) not null primary key,
       master_name varchar2(50));
    create table DETAILS
      (id number(18) not null primary key,
       master_id number(18) not null,   -- FK to MASTER.ID
       price number(7,2));
    create view DETAILS_VW as
      select id, master_id, price
      from details;Of course, in real life the view is useful and actually peforms complex aggregate calculations on the details. But at the moment I wish to keep things as simple as possible.
    So, I create Entities for the tables and the view. Here are the entities for MASTERS and DETAILS_VW, only the essential stuff (w/o getters, setters, sequence info, etc.):
    @Entity
    @Table(name="MASTERS")
    public class Master {
         @Id
         @Column(name="ID", nullable=false)
         private Long id;
         @Column(name="MASTER_NAME")
         private String masterName;
         @OneToMany(mappedBy="master", fetch=FetchType.LAZY, cascade=CascadeType.REFRESH)
         private List<DetailVw> detailsVw;
    @Entity
    @Table(name="DETAILS_VW")
    public class DetailVw {
         @Id
         @Column(name="ID")
         private Long id;
         @ManyToOne(fetch=FetchType.LAZY)
         @JoinColumn(name="MASTER_ID", referencedColumnName="ID")
         private Master master;
         @Column(name="PRICE")
         private Double price;
    }So, now we have the tables and the entities. Let's assume one master row and two detail rows exist:
    MASTER:  ID=1, MASTER_NAME='Master #1'
    DETAIL:  ID=1, MASTER_ID=1, PRICE=3
    DETAIL:  ID=2, MASTER_ID=1, PRICE=8And now let's run the following code:
    // List the initial state
    Master master = em.find(Master.class, 1L);
    List<DetailVw> detailsVw = master.getDetailsVw();
    for (DetailVw dv : detailsVw) {
         System.out.println(dv);
    // Modify a detail
    EntityTransaction tx = em.getTransaction();
    tx.begin();
    Detail d = em.find(Detail.class, 2L);
    d.setPrice(1);
    tx.commit();
    // Refresh
    System.out.println("----------------------------------------");
    em.refresh(master);
    // List the state AFTER the update
    detailsVw = master.getDetailsVw();
    for (DetailVw dv : detailsVw) {
         System.out.println(dv);
    }And here are some excerpts from the console (only the essentials):
    DetailVw: id=1, price=3
    DetailVw: id=2, price=8
    UPDATE DETAILS SET PRICE = ? WHERE (ID = ?)
         bind => [1, 2]
    SELECT ID, MASTER_NAME FROM MASTERS WHERE (ID = ?)
         bind => [1]
    SELECT ID, PRICE, MASTER_ID FROM DETAILS_VW WHERE (MASTER_ID = ?)
         bind => [1]
    DetailVw: id=1, price=3
    DetailVw: id=2, price=8You see, the UPDATE statement changes the DETAILS row. The price was 8, but was changed to 1. I checked the database. It was indeed changed to 1.
    Furthermore, due to the refresh operation, a query was run on the view. But as you can see from the console output, the results of the query were completely ignored. The price was 8, and continued to be 8 even after the refresh. I assume it was because of the cache. If I run an explicit query on DETAILS_VW with the hint:
    q.setHint(TopLinkQueryHints.REFRESH, HintValues.TRUE);then I see the real updated values. But if I only refresh with em.refresh(master), then the DetailVw entities do not get refreshed, even though a query against the database is run. I have tested this both in JavaSE and in OC4J. The results are the same.
    An explicit refresh on a particular DetailVw entity works, though:
    DetailVw dvw = em.find(DetailVw.class, 2L);
    em.refresh(dvw);
    System.out.println(dvw);Then the console says:
    DetailVw: id=2, price=1So, the price is indeed 1, not 8.
    If you can explain that to me, I will be really thankful!
    Best regards,
    Bisser

  • Missing declared association property

    A fill command like so:
    <mx:Button label="Fill" click="{se.fill(entitymaps)}"/>
    In this data service:
    <mx:DataService id="se" destination="entityds"/>
    Gives the following stack trace:
    Error: Item added to destination: entityds of type: maps::EntityMap is missing declared association property: children
        at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::checkAssociations()[C:\depot\DataServices\bran ches\lcds26_hotfixes\frameworks\projects\data\src\mx\data\ConcreteDataService.as:2154]
        at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequence()[C:\depot\DataServices\branch es\lcds26_hotfixes\frameworks\projects\data\src\mx\data\DataList.as:2060]
        at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequenceResult()[C:\depot\DataServices\ branches\lcds26_hotfixes\frameworks\projects\data\src\mx\data\DataList.as:2284]
        at DataListRequestResponder/result()[C:\depot\DataServices\branches\lcds26_hotfixes\framewor ks\projects\data\src\mx\data\ConcreteDataService.as:7283]
        at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
        at NetConnectionMessageResponder/resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\ src\mx\messaging\channels\NetConnectionChannel.as:515]
        at mx.messaging::MessageResponder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx \messaging\MessageResponder.as:199]
    When the 'children' property of EntityMap is not declared, EntityMap looks like this:
    package maps
        import mx.collections.ArrayCollection;
        [Managed]
        [RemoteClass(alias="alex.onetomany.Entity")]
        public class {   
            public function EntityMap() {}      
            public var name:String;
            public var identity:String;
    Despite the fact that the entityds destination looks like this......
    <destination id="entityds">
            <properties>
                <source>alex.onetomany.EntityAssembler</source>
                <scope>application</scope>
                <metadata>
                    <identity property="identity"/>
                </metadata>
                <network>
                    <paging enabled="false" pageSize="10" />
                </network>
            </properties>
        </destination>
    ...the problem still seems to occour. The strangest thing is when I rename the destination from entityds to 'blah' (on the server in data-management-config.xml and on the client in my MXML file OneToManyTest.mxml) the error no longer happens.
    Questions:
    1) When exactly is the missing declared association property: supposed to appear? Is it when you add some associated property in data-management-config.xml, if so....
    2) How come it does not appear for the nodeds data service when I give it a similar children property on-to-many configuration in data-management-service.xml like so:
        <destination id="nodeds">
            <properties>
                <source>alex.onetomany.NodeAssembler</source>
                <scope>application</scope>
                <metadata>
                    <identity property="identity"/>
                    <one-to-many property="children" destination="nodeds"
                        load-on-demand="true"
                        read-only="true"
                        lazy="false"/>
                </metadata>
                <network>
                    <paging enabled="false" pageSize="1" />
                </network>
            </properties>
        </destination>
    3) Most importantly: why does it appear for entityds and only when the destination is called entityds and nothing else.

    Do you have the XML request that you are sending?

  • BlazeDS "Configure return type" not working with Hibernate lazy fetching

    I am using the new BlazeDS 4 with Flash Builder 4.
    Backend configuration: Spring 3.0 + Spring-BlazeDS 1.0.3 + Hibernate 3.5
    I have successfully configured my Spring-BlazeDS project based on this excellent video tutorial by James Ward.
    The problem:
    While trying to use the "Configure return type" option for one of my service calls, or the "Test operation" option, I get the following exception thrown:
    InvocationTargetException:There was an error while  invoking the operation. Check your server settings and try invoking the  operation again.
    Reason: Server error failed to lazily initialize a  collection of role:  com.xyz.product.domain.MyEntityClass.myLazyCollection, no  session or session was closed null
    I am well aware of lazy loading issues and configured Gilead to handle this, hopefully with success although I cannot indicate this for sure yet.
    However - in this case, i'm not certain it's even related to Gilead, because this is happening on server side and not on client as far as I understand so Gilead isn't playing its role in removing the proxy associations. BlazeDS however is trying to fully inspect whatever object graph it gets, and appearantly does that outside of a persistence session scope, hence the LazyInitializationException.
    Is this a BlazeDS bug? Can BlazeDS do the objects inspection within a provided open persistence context session to avoid this?
    See also stacktrace from server:
    1327066 [tomcat-http--32] ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: com.xyz.product.domain.MyEntityClass.myLazyCollection, no session or session was closed
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.xyz.product.domain.MyEntityClass.myLazyCollection, no session or session was closed
        at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(Ab stractPersistentCollection.java:380)
        at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfN otConnected(AbstractPersistentCollection.java:372)
        at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollec tion.java:365)
        at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.j ava:108)
        at org.hibernate.collection.PersistentBag.toArray(PersistentBag.java:280)
        at java.util.ArrayList.<init>(ArrayList.java:131)
        at flex.messaging.io.ArrayCollection.<init>(ArrayCollection.java:44)
        at flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:455)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:175)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:566)
        at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:817)
        at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:431)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:179)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:556)
        at flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:462)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:175)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:566)
        at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:566)
        at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:193)
        at flex.messaging.io.amf.Java15Amf0Output.writeObject(Java15Amf0Output.java:41)
        at flex.messaging.io.amf.AmfMessageSerializer.writeObject(AmfMessageSerializer.java:196)
        at flex.messaging.io.amf.AmfMessageSerializer.writeBody(AmfMessageSerializer.java:186)
        at flex.messaging.io.amf.AmfMessageSerializer.writeMessage(AmfMessageSerializer.java:142)
        at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:179)
        at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:274)
        at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$c487cc23.service(<generated>)
        at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerA dapter.java:101)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644 )
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:343)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(Filter SecurityInterceptor.java:109)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(Filt erSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTran slationFilter.java:97)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManageme ntFilter.java:100)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(An onymousAuthenticationFilter.java:78)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFil ter(SecurityContextHolderAwareRequestFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCac heAwareFilter.java:35)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.do Filter(AbstractAuthenticationProcessingFilter.java:188)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter .java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(Securi tyContextPersistenceFilter.java:79)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy .java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java: 167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at com.springsource.metrics.collection.web.HttpRequestMetricCollectionValve.invoke(HttpReque stMetricCollectionValve.java:44)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja va:583)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:379)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
    [BlazeDS] Exception occurred during serialization: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.xyz.product.domain.MyEntityClass.myLazyCollection, no session or session was closed
        at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(Ab stractPersistentCollection.java:380)
        at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfN otConnected(AbstractPersistentCollection.java:372)
        at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollec tion.java:365)
        at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.j ava:108)
        at org.hibernate.collection.PersistentBag.toArray(PersistentBag.java:280)
        at java.util.ArrayList.<init>(ArrayList.java:131)
        at flex.messaging.io.ArrayCollection.<init>(ArrayCollection.java:44)
        at flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:455)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:175)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:566)
        at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:817)
        at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:431)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:179)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:556)
        at flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:462)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:175)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:566)
        at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243)
        at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:566)
        at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518)
        at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
        at flex.messaging.io.amf.Java15Amf3Output.writeObject(Java15Amf3Output.java:26)
        at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:193)
        at flex.messaging.io.amf.Java15Amf0Output.writeObject(Java15Amf0Output.java:41)
        at flex.messaging.io.amf.AmfMessageSerializer.writeObject(AmfMessageSerializer.java:196)
        at flex.messaging.io.amf.AmfMessageSerializer.writeBody(AmfMessageSerializer.java:186)
        at flex.messaging.io.amf.AmfMessageSerializer.writeMessage(AmfMessageSerializer.java:142)
        at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:179)
        at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:274)
        at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$c487cc23.service(<generated>)
        at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerA dapter.java:101)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644 )
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:343)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(Filter SecurityInterceptor.java:109)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(Filt erSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTran slationFilter.java:97)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManageme ntFilter.java:100)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(An onymousAuthenticationFilter.java:78)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFil ter(SecurityContextHolderAwareRequestFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCac heAwareFilter.java:35)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.do Filter(AbstractAuthenticationProcessingFilter.java:188)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter .java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(Securi tyContextPersistenceFilter.java:79)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChain Proxy.java:355)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy .java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java: 167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at com.springsource.metrics.collection.web.HttpRequestMetricCollectionValve.invoke(HttpReque stMetricCollectionValve.java:44)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja va:583)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:379)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

    slacknatcher wrote:
    the parts i had searched on google are specificaly the
    "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x12): undefined reference to `__libc_csu_fini'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x19): undefined reference to `__libc_csu_init'"
    does anyone have an idea of what could it be?
    notice that this doesn't bother me because if i use the glibc from the repositories everything works fine, this is just for curiosity of why it doesn't work
    thanks in advance
    You have stripped glibc too much.  See the Arch PKGBUILD and make sure your makepkg.conf has STRIP_BINARY etc defined.

Maybe you are looking for