Query result closing prematurely, Object closed error

Hi guys
I've discovered an unusual behaviour when iterating through a collection
returned from a query.
Scenario
The code executes a query, iterates partially through the resultset and for
each row calls a method which creates another object. Given that there
could be thousands of rows, I commit the new objects every n times and then
go back to the start of the loop which re-executes the query. This code runs
fine when
MAX_SCHEDULES_PER_TRANS <= com.solarmetric.kodo.DefaultFetchBatchSize.
Problem
If the DefaultFetchBatchSize is 10, and I commit every 11 iterations, then
during the 3rd outer loop (ie commit has succeeded twice and the query has
been executed 3 times) an exception is thrown when calling events.next() on
the 10th element. The stack trace is included below, but it appears that
the query resultset is somehow being closed early.
If I increase the DefaultFetchBatchSize to 20, then I can also increase my
MAX_SCHEDULES_PER_TRANS to 20 without getting the error.
Any ideas?
Regards
Nathan
Kodo 2.5.3
SQLServer 2000
Code Snippet
private static final int MAX_SCHEDULES_PER_TRANS = 10;
while (!terminated) {
Collection col = (Collection) getQuery().execute(currentDate); //
getQuery() method Creates query object once and reused in subsequent calls
Iterator events = col.iterator();
int counter = 0;
boolean committed = false;
while (events.hasNext() && !committed && !terminated) {
Event event = (Event) events.next();
event.schedule()
counter++;
if ((counter == MAX_SCHEDULES_PER_TRANS ) || !events.hasNext()) {
try {
context.getPersist().commitTransaction();
committed = true;
catch (OptimisticLockException e) {
context.getPersist().rollbackTransaction();
break;
getQuery().close(col);
Kodo.properties
# Kodo JDO Properties configuration
# DEVELOPMENT
com.solarmetric.kodo.LicenseKey: xxxxxxx
com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=Tran
sactionFactory
javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBC
PersistenceManagerFactory
javax.jdo.option.ConnectionDriverName=com.microsoft.jdbc.sqlserver.SQLServer
Driver
javax.jdo.option.ConnectionUserName=xxxxx
javax.jdo.option.ConnectionPassword=xxxx
javax.jdo.option.ConnectionURL=jdbc:microsoft:sqlserver://devsnetsql01:1433;
SelectMethod=cursor;DatabaseName=devsnet09
javax.jdo.option.RetainValues=true
javax.jdo.option.RestoreValues=true
javax.jdo.option.Optimistic=true
javax.jdo.option.NontransactionalWrite=false
javax.jdo.option.NontransactionalRead=true
javax.jdo.option.Multithreaded=true
javax.jdo.option.MsWait=5000
javax.jdo.option.MinPool=0
javax.jdo.option.MaxPool=0
javax.jdo.option.IgnoreCache=false
com.solarmetric.kodo.FlushBeforeQueries=with-connection
com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory=20
com.solarmetric.kodo.impl.jdbc.StatementCacheMaxSize=0
com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure=true
com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass=com.solarmetric.kodo.imp
l.jdbc.schema.DBSequenceFactory
com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping=true
com.solarmetric.kodo.impl.jdbc.AutoReturnTimeout=10
com.solarmetric.kodo.Logger=stdout
com.solarmetric.kodo.EnableQueryExtensions=true
com.solarmetric.kodo.DefaultFetchThreshold=30
com.solarmetric.kodo.DefaultFetchBatchSize=10
com.solarmetric.kodo.impl.jdbc.TransactionIsolation=READ_COMMITTED
com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerMethod=co
m.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager
com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.Invocati
onManagedRuntime
Stack trace
com.solarmetric.kodo.runtime.DataStoreException: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed.
[code=0;state=HY000]
NestedThrowables:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has
been closed.
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
tions.java:64)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:223)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:142)
at java.util.AbstractList$Itr.next(AbstractList.java:431)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
at com.mallesons.servicenet.ta.shared.BOIterator.next(BOIterator.java:48)
at
com.mallesons.servicenet.ta.event.SchedulerThread.process(Scheduler.java:171
at com.mallesons.servicenet.ta.event.SchedulerThread.run(Scheduler.java:122)
NestedThrowablesStackTrace:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has
been closed.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
Source)(Inlined Compiled Code)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)(Inlined Compiled Code)
at com.microsoft.jdbc.base.BaseConnection.validateClosedState(Unknown
Source)(Inlined Compiled Code)
at com.microsoft.jdbc.base.BaseStatement.validateClosedState(Unknown
Source)(Inlined Compiled Code)
at com.microsoft.jdbc.base.BaseResultSet.validateClosedState(Unknown
Source)(Compiled Code)
at com.microsoft.jdbc.base.BaseResultSet.getRow(Unknown Source)
at
com.solarmetric.datasource.ResultSetWrapper.getRow(ResultSetWrapper.java:465
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:186)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:142)
at java.util.AbstractList$Itr.next(AbstractList.java:431)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
at com.mallesons.servicenet.ta.shared.BOIterator.next(BOIterator.java:48)
at
com.mallesons.servicenet.ta.event.SchedulerThread.process(Scheduler.java:171
at com.mallesons.servicenet.ta.event.SchedulerThread.run(Scheduler.java:122)

Thanks for pointing out the optimisticLockException catch error. That would
have been a bug but it hasn't been hit yet as I've only ever run one
instance of this app!!
The BOIterator is just wrapper layer and I have removed it to ensure it is
not the culprit. Still getting the same error.
I have done some more testing and have narrowed down the problem a little.
It seems to only occur when I update one of the columns that is being used
in the query. If I update a column that is not used in the query, it works
fine.
com.solarmetric.kodo.runtime.DataStoreException: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed.
[code=0;state=HY000]
NestedThrowables:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has
been closed.
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
tions.java:64)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:223)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:142)
at java.util.AbstractList$Itr.next(AbstractList.java:431)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
at
com.mallesons.servicenet.ta.event.SchedulerThread.process(Scheduler.java:197
at com.mallesons.servicenet.ta.event.SchedulerThread.run(Scheduler.java:143)
NestedThrowablesStackTrace:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has
been closed.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.validateClosedState(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.validateClosedState(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.validateClosedState(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.getRow(Unknown Source)
at
com.solarmetric.datasource.ResultSetWrapper.getRow(ResultSetWrapper.java:478
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:186)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:142)
at java.util.AbstractList$Itr.next(AbstractList.java:431)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
at
com.mallesons.servicenet.ta.event.SchedulerThread.process(Scheduler.java:197
at com.mallesons.servicenet.ta.event.SchedulerThread.run(Scheduler.java:143)
2003-10-27 15:26:40,142 DEBUG - SchedulerThread.run() - exit
"Marc Prud'hommeaux" <[email protected]> wrote in message
news:[email protected]...
Nathan-
I guess you are right that it doesn't look like the query result is
being kept open between commits. I do notice that the block that catches
the OptimisticLockException doesn't break out of the loop though: can
you check to ensure that one isn't getting thrown?
Also, what is the com.mallesons.servicenet.ta.shared.BOIterator stuff?
If it is a wrapper layer that you have around the query execution,
can you try removing it, just to ensure that it isn't misbehaving in
some way?
In article <[email protected]>, nathan boyes wrote:
Hi Marc,
Bug 718 certainly seems similar, however I still don't think it is
necessarily the problem in this case. That particular bug relates to the
resultset that was opened prior to commit, not remaining open after the
commit. However, once I've committed, I call query.closeAll() then re
execute the query. I would expect this to give me a new resultset that
would not be affected by the previous commit.
Also the CURSOR_CLOSE_ON_COMMIT is disabled by default and we haven't
enabled it. A query against the database using one of the SQLServer
functions confirms that this setting is false on the server.
Predictably, instantiating the entire collection also fixes the problem.
I
guess this is similar to setting DefaultFetchThreshold = -1.
Not really sure what else to try.
"Marc Prud'hommeaux" <[email protected]> wrote in message
news:[email protected]...
Nathan-
This sounds to me like
http://bugzilla.solarmetric.com/show_bug.cgi?id=718 , even though it is
not known to happen for SQLServer. If, before you commit, you
instantiate the entire "col" list (with something like
"new LinkedList (col)"), do you still see the problem?
If this is indeed the problem, it seems that this is a server option
that you can configure. If you disable CURSOR_CLOSE_ON_COMMIT on the
server, do you still see the problem? See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_set-set_48kz.asp
>>>
>>>
>>>
>>>
In article <[email protected]>, nathan boyes wrote:
I have upgraded to 2.5.5 and am now calling query.closeAll() neither
of
which had any effect. When I set DefaultFetchThreshold to -1, thenthe
problem disappeared.
For efficiency, if I am iterating through 50 objects beforecommitting
then
it is probably worth setting
DefaultFetchThreshold=50
DefaultFetchBatchSize=50
which will run without problem.
However, that doesn't address the underlying problem that could stilloccur
in other parts of our system.
"Stephen Kim" <[email protected]> wrote in message
news:[email protected]...
First can you upgrade to Kodo 2.5.4 and see if the problem persists?
If so, can you for the sake of debugging try setting
DefaultFetchThreshold to -1?
Also you should be calling either query.closeAll () or query.close(events).
nathan boyes wrote:
Hi guys
I've discovered an unusual behaviour when iterating through a
collection
returned from a query.
Scenario
The code executes a query, iterates partially through the
resultset
and
for
each row calls a method which creates another object. Given that
there
could be thousands of rows, I commit the new objects every n timesand
then
go back to the start of the loop which re-executes the query. This
code
runs
fine when
MAX_SCHEDULES_PER_TRANS <=
com.solarmetric.kodo.DefaultFetchBatchSize.
Problem
If the DefaultFetchBatchSize is 10, and I commit every 11
iterations,
then
during the 3rd outer loop (ie commit has succeeded twice and the
query
has
been executed 3 times) an exception is thrown when calling
events.next()
on
the 10th element. The stack trace is included below, but it
appears
that
the query resultset is somehow being closed early.
If I increase the DefaultFetchBatchSize to 20, then I can also
increase
my
MAX_SCHEDULES_PER_TRANS to 20 without getting the error.
Any ideas?
Regards
Nathan
Kodo 2.5.3
SQLServer 2000
Code Snippet
private static final int MAX_SCHEDULES_PER_TRANS = 10;
while (!terminated) {
Collection col = (Collection) getQuery().execute(currentDate);
getQuery() method Creates query object once and reused insubsequent
calls
Iterator events = col.iterator();
int counter = 0;
boolean committed = false;
while (events.hasNext() && !committed && !terminated) {
Event event = (Event) events.next();
event.schedule()
counter++;
if ((counter == MAX_SCHEDULES_PER_TRANS ) ||
!events.hasNext()) {
>>>>>>
try {
context.getPersist().commitTransaction();
committed = true;
catch (OptimisticLockException e) {
context.getPersist().rollbackTransaction();
break;
getQuery().close(col);
Kodo.properties
# Kodo JDO Properties configuration
# DEVELOPMENT
com.solarmetric.kodo.LicenseKey: xxxxxxx
com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=Tran
sactionFactory
javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBC
PersistenceManagerFactory
javax.jdo.option.ConnectionDriverName=com.microsoft.jdbc.sqlserver.SQLServer
Driver
javax.jdo.option.ConnectionUserName=xxxxx
javax.jdo.option.ConnectionPassword=xxxx
javax.jdo.option.ConnectionURL=jdbc:microsoft:sqlserver://devsnetsql01:1433;
SelectMethod=cursor;DatabaseName=devsnet09
javax.jdo.option.RetainValues=true
javax.jdo.option.RestoreValues=true
javax.jdo.option.Optimistic=true
javax.jdo.option.NontransactionalWrite=false
javax.jdo.option.NontransactionalRead=true
javax.jdo.option.Multithreaded=true
javax.jdo.option.MsWait=5000
javax.jdo.option.MinPool=0
javax.jdo.option.MaxPool=0
javax.jdo.option.IgnoreCache=false
com.solarmetric.kodo.FlushBeforeQueries=with-connection
com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory=20
com.solarmetric.kodo.impl.jdbc.StatementCacheMaxSize=0
com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure=true
com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass=com.solarmetric.kodo.imp
l.jdbc.schema.DBSequenceFactory
com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping=true
com.solarmetric.kodo.impl.jdbc.AutoReturnTimeout=10
com.solarmetric.kodo.Logger=stdout
com.solarmetric.kodo.EnableQueryExtensions=true
com.solarmetric.kodo.DefaultFetchThreshold=30
com.solarmetric.kodo.DefaultFetchBatchSize=10
com.solarmetric.kodo.impl.jdbc.TransactionIsolation=READ_COMMITTED
com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerMethod=co
m.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager
com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.Invocati
onManagedRuntime
Stack trace
com.solarmetric.kodo.runtime.DataStoreException:java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed.
[code=0;state=HY000]
NestedThrowables:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver forJDBCObject
has
been closed.
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
tions.java:64)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:223)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:142)
at java.util.AbstractList$Itr.next(AbstractList.java:431)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
atcom.mallesons.servicenet.ta.shared.BOIterator.next(BOIterator.java:48)
>>>>>>
at
com.mallesons.servicenet.ta.event.SchedulerThread.process(Scheduler.java:171
atcom.mallesons.servicenet.ta.event.SchedulerThread.run(Scheduler.java:122)
>>>>>>
NestedThrowablesStackTrace:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver forJDBCObject
has
been closed.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
Source)(Inlined Compiled Code)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)(Inlined Compiled Code)
at
com.microsoft.jdbc.base.BaseConnection.validateClosedState(Unknown
Source)(Inlined Compiled Code)
atcom.microsoft.jdbc.base.BaseStatement.validateClosedState(Unknown
Source)(Inlined Compiled Code)
atcom.microsoft.jdbc.base.BaseResultSet.validateClosedState(Unknown
Source)(Compiled Code)
at com.microsoft.jdbc.base.BaseResultSet.getRow(Unknown Source)
at
com.solarmetric.datasource.ResultSetWrapper.getRow(ResultSetWrapper.java:465
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:186)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:142)
at java.util.AbstractList$Itr.next(AbstractList.java:431)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
atcom.mallesons.servicenet.ta.shared.BOIterator.next(BOIterator.java:48)
>>>>>>
at
com.mallesons.servicenet.ta.event.SchedulerThread.process(Scheduler.java:171
atcom.mallesons.servicenet.ta.event.SchedulerThread.run(Scheduler.java:122)
>>>>>>
>>>>>>
>>>>>
Stephen Kim
[email protected]
SolarMetric, Inc.
http://www.solarmetric.com
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • RPD - Cannot obtain number of columns for the query result :Working with MS SQL 2012 schema

    Hi All,
    I have created my warehouse in MS SQL 2012.
    For management purpose, I have created different schemas in SQL database
    In RPD, Physical layer, when i view data > I get error as
    [nQSError:16002] Cannot obtain number of columns for the query result.
    [nQSError:16001] ODBC error state : S0002 code : 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name 'tbl'..
    [nQSError:16001] ODBC error state : S0002 code : 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server] Statements could not be prepared..
    I have already browsed : OBIEE 11g Strange ODBC Driver Error with SQL Server : Total Business Intelligence ... did not help me
    please help!!!

    Hi All,
    After all R&D it is been found that Oracle business administrator( RPD) needs default dbo schema. It doesn't accept custom schema for pulling data.
    If anybody have other views please share.!!
    Thank you

  • Multiple Query Result tabs

    Is it possible to have a new Query Result tab opened every time a query is run instead of overwriting the current contents of the window Query Result tab?
    thanks,
    Louis

    Hi Louis,
    Welcome to the forum. Here is a thread with some posts telling you how to control this, both for Query Results and the Object Viewer:
    Re: SQL Developer no longer letting me look at the same table name on 2 servers
    Regards,
    Gary

  • Incorrect query results with conformResultsInUnitOfWork

    Hi,
    has anybody experienced this:
    Take two classes User and Group
    Group has a 1:n Mapping to User (attribute users)
    User has a 1:1 Mapping to User (attribute partner).
    Following query returns too many objects
    User user1 = someUserObject;
    ReadAllQuery readAllQuery = new ReadAllQuery(Group.class);
    Expression e = builder.anyOf("users").get("partner").equal(user1);
    readAllQuery.setSelectionCriteria(e);
    readAllQuery.conformResultsInUnitOfWork();
    Vector vector = (Vector) unitOfWork.executeQuery(readAllQuery);
    It returns
    - the correct Group object as determined from the sql query +
    - any other objects of the same class that are fully instantiated (users is instantiated and for each user, partner is instantiated), even if they don't conform to the expression.
    The same query works properly ;
    - without conformResults
    - or if the other objects are not fully instantiated

    Hi,
    we need an workaround badly and the support is moving at exactly the rate I feared it would.
    So I thought, since we only hit this bug with existing objects and we use conformResultsInUnitOfWork because we want to find the newly created objects, is there a way to get
    - the SQL Query results
    + any new objects that conform to the query
    We still might get new objects that don't conform to the query (this is the bug) but I'll worry about that later if it happens.
    My first attempt at a solution looks like this:
    1. turn off conformResults
    2. manually add all new objects that conform to the query
    I had to guess a little for 2, since I don't know what exactly toplink does to select the "conform" objects.
    private static List findConformNewObjects(UnitOfWork unitOfWork, ReadAllQuery query) {
    List result = new ArrayList();
    Class resultClass = query.getReferenceClass();
    Expression selectionCriteria = query.getSelectionCriteria();
    Enumeration enumeration;
    IdentityHashtable newObjectsCloneToOriginal = unitOfWork.getNewObjectsCloneToOriginal();
    if (newObjectsCloneToOriginal != null && newObjectsCloneToOriginal.size() > 0)
    enumeration = newObjectsCloneToOriginal.keys();
    while (enumeration.hasMoreElements())
    Object o = enumeration.nextElement();
    if (resultClass.isInstance(o))
    if (selectionCriteria != null && selectionCriteria.doesConform(o, unitOfWork, null, query.getInMemoryQueryIndirectionPolicy()))
    result.add(o);
    return result;
    Does this look OK to you? Is there a better way to do it?
    Ana

  • Query Result export problem

    When I attempt to export query results, I consistently get an error and am unable to get any export. I have taken the following steps:
    1. Right click output grid.
    2. Select Export >
    3. Select any format.
    These steps result in this error, in a dialog box:
    ORA-00907: missing right parenthesis (dialog title)
    An error was encountered performing the requested operation:
    ORA-00907: missing right parenthesis
    Vendor code 907
    I am on Windows XP SP2, and I have been reporting this and similar errors through several of the beta Raptor / SQLDeveloper versions. It is still occurring in the production version. Please let me know if I may provide any further information.

    Here is the query, which has only 4 columns: EWUID, FULL_NAME, PROGRAM, and STYP. The query returns 48 rows.
    SELECT DISTINCT
    p.id_number ewuid,
    p.full_name_lfmi full_name,
    r.program,
    'Recruit' AS styp
    FROM as_person p, as_recruitment_information r
    WHERE
    p.person_uid = r.person_uid
    AND r.program IN ('POST-BACH','CERT-TEACHER')
    UNION ALL
    SELECT DISTINCT
    p.id_number ewuid,
    p.full_name_lfmi full_name,
    a.program,
    CASE WHEN APPL_ACCEPT_ANY_TIME_IND = 'Y' THEN 'App and Stu' ELSE 'Applicant' END AS styp
    FROM as_person p, as_admissions_application a
    WHERE
    p.person_uid = a.person_uid
    AND a.program IN ('POST-BACH','CERT-TEACHER')
    -- PROGRAM: PB_Curriculum.SQL
    -- AUTHOR: BEN MORGAN
    -- DATE: 5/4/2006
    -- PURPOSE: GENERATE LIST OF ALL Post-Bac APPLICANTS with invalid
    -- curriculum programs (POST-BACH and CERT-TEACHER) for
    -- manual cleanup.
    The query looks at 3 views - as_person, as_recruitment_information, and as_admissions_application. I can post the code that generates each view, but that would take pages, so please let me know if you need it.
    However, I can successfully export the following query:
    select *
    from as_admissions_application
    where STUDENT_POPULATION = 'R'
    as_admissions_application is one of the same views as in the query above - so it isn't a specific problem with the view. The difference is the commenting I have below the query. These are legal SQL comments, and they document what I'm using the query for. I've tried putting a semi-colon after the comments, but that doesn't work either. But I think the comments are the issue.
    Our version of Oracle is: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production.

  • How to get POF object's field value from query result

    hi,all:
    I want to get field value from the query result, my code is below
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
    Contact c=(Contact)iter.next();
    System.out.println ("firstame####=" + c.getFirstName());
    * but I get error*
    Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
    tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
    at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
    at com.oracle.handson.QueryExample.query(QueryExample.java:86)
    at com.oracle.handson.QueryExample.main(QueryExample.java:43)
    who can tell me how to get POF object's field value from query result

    Hi,
    If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
        Map.Entry entry = iter.next();
        Contact c=(Contact)entry.getValue();
        System.out.println ("firstame####=" + c.getFirstName());
    }JK

  • SI_LOCALE - dashboard problem - query result error

    Dear Sirs,
    I have:
    1. Business Objects Business Intelligence platform 4.0 with SP2 and FP 11.
    2. Dashboard Design 2011
    On BI launch pad I have problem with dashboard design object. When user tries to run the dashboard, it shows a error message.
    Query result error:
    The property with ID SI_LOCALE does not exist in the object.
    On the same workstation, If I try to do the same, but using a different user, dashboard displays properly.
    Let me add that the dashboard has 2 queries (from universe).
    I tried to change the regional settings, but without results.
    What does it mean?
    Any idea how to resolve this problem?
    Best regards,
    Michal

    I met the same issue, till now it remains.
    I referred to SAP note
    "1747311
    Receive Error: "The property with ID SI_LOCALE does not exist in the object" when viewing "
    However we already applied SP5. It seems still other factor entails this.

  • Random Connection Closed Errors using UCP

    Hey All;
    I am trying to figure out why we are seeing quite a few random connection closed errors in our applications that are using Oracle UCP ver 11.2.0.1.0 connection pooling.
    The errors happen at arbitrary jdbc usage source code locations (e.g.: spots that check a connection's auto commit mode, spots that spool through a result set, spots that do yada..) that consume a connection, and are not affiliated with what is being done with the connection (SQL being ran).
    The architecture is Tomcat 7, hitting Oracle 10g Enterprise Edition Release 10.2.0.4.0 (RAC). The structure of the code (it's a web app) is such that we have a servlet filter that assigns a http request thread a connection from the pool on an incoming request, then that same connection is closed at the completion of that request's handling. No code uses connections other than code related to handling an http request. And, no threads are spawned off of that request handling thread. And, no code whatsoever (other than the servlet filter's finally block) ever closes a DB connection.
    Also, the number of connections in the pool is quite adequate for the usage of the pool. That is, the ceiling is likely never hit. Even if it were---- having an outstanding connection suddenly 'closed out' wouldn't be the proper behavior there.
    What are the things that can cause a connection to be 'closed out from under you' ? Meaning, the connection is valid when taken from the pool, but arbitrarily in the middle of usage--- it gets closed.
    I am pretty stumped at this point.
    Any ideas?
    Thanks--

    Here are a few sample stacks. Keep in mind that the line of code where the exception actually happens is arbitrary. We see the exception happen at ANY line that is a consumer of a connection. For example... it could happen that it blows up on the 'Nth' iteration while trucking through a result set. Suddenly at say... iteration 143 the connection is suddenly closed out from under the connection's handle.
    As far as threads are concerned, each http request that creates a controller servlet instance is assigned it's own connection to use through the handling of that request. That connection instance is assigned as a ThreadLocal instance. Any DB usage that thread has is via that connection. The servlet filter ensures the handle is assigned when the request comes in, then is cleaned up as that request is completely handled in the same filter's finally block (this is a pattern that dozens of web apps we have have been using for going on 10 years now). This is not an ejb app. Straight Tomcat 7 web app using MVC pattern where C is a servlet.
    The curious thing here in my mind is that we only have two apps in our collection that are using this new UCP pooling driver (most other are using a tomcat pool). And, only those two are seeing this behavior.
    I am not balking at the threads concern--- it's just hard to square that with how we handle threading in such a 'single thread per http request' manner.
    And, if it were the case that the pool is handing out the same connection handle to more than one thread because of having multiple entrant threads to the pool accessor method---- it's difficult to buy that it's that common for us to have multiple entrant threads at the same moment in those very short time span it takes for a pool to hand out a connection (given the traffic usage pattern for the app).
    Here are the 'known deltas' I am aware of between the two apps that have this behavior, and the couple of dozen we have that do not:
    1) these two apps are on Tomcat 7 (most others are Tom 5, Resin, or JBoss)
    2) these two apps are using the Ora UCP pool. (most others use Tomcat pool)
    ~~~~~~~~~ Stack 1 ~~~~~~~~~~~~~~~~~~
    01-Dec-2010 12:34:13.479 [ERROR] JDBCExceptionReporter: The connection is closed: The connection is closed
    01-Dec-2010 12:34:13.479 [ERROR] PartsGroupingPanel: getDealersInventoryRow() pvid FO03348
    org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:228)
    at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:437)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1134)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    at com.dmotorworks.partinventory.dao.ClientParametersDAO.getAllDealers(ClientParametersDAO.java:20)
    ~~~~~~~~~ Stack 2 ~~~~~~~~~~~~~~~~~~
    01-Dec-2010 11:23:54.889 [ERROR] PartsSearchDAO: getDealerInventoryLineItemsNofN()
    java.sql.SQLException: The connection is closed: The connection is closed
    at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:526)
    at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:510)
    at oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:245)
    at $Proxy0.prepareStatement(Unknown Source)
    at com.dmotorworks.partinventory.dao.PartsSearchDAO.getDealerInventoryLineItemsNofN(PartsSearchDAO.java:246)

  • Stream closed error while testing a composite in EM

    HI,
    I have deployed a simple composite and wanted to test it in EM. I am getting a stream closed popup, not sure whats wrong?
    I have restarted the server and problem still persists.

    its actually remote server, I am able to deploy a simple HelloWorld composite and even able to see the same in Em.I can even browse through all the composites deployed there by many other people.But problem is when I try to test it its giving the Stream closed error.
    Is it something to do with access permissions, if so i would not have deployed it in first case..
    the pop up error message----
    Stream Closed
    For more information, please see the server's error log for
    an entry beginning with: Server Esception beginning with PPR, #14
    _______________________________

  • Cannot open document (Error: INF) / Session is closed (Error: INF )

    SAP BO XI3.1
    last time I face this one but suddenly disappear during testing, now we once again face this issue. As all users are member of group 'EveryOne' if we add any user membership to administrator group / master group this error resolved for this user.but that is not proper solutions, so far i m unable to find the rights which is lacking to all user for these report which are available in each user infoview and causing these errors while viewing.
    Open Document error message:
    While viewing Web Intelligence reports
    [Session is closed (Error: INF )|http://yfrog.com/0cwebirightsp|Session is closed (Error: INF )]
    While viewing Desktop Intelligence reports
    [Cannot open document (Error: INF )|http://yfrog.com/mjdeskirightsp|Cannot open document (Error: INF )]

    You might need to give read rights to the folder and category this report belongs to???
    If the problem is fixed when the user who is viweing is an administrator, this means there is insufficient privileges for the other users.

  • Error occurred while sending query result: 'java.lang.NullPointerException'

    I am doing end to end scenario from SQL server to File
    JDBC --XI -- File
    I am getting the following Error while monitoring the sender CC in RWB
    "Error occurred while sending query result: 'java.lang.NullPointerException'
    Please Help !!

    Hi,
    To see the Adapter Error log, try:
    http://<XiServerHostName>:<J2EE-Port>/MessagingSystem
    Try viewing the Audit Log for each message (Newspaper Icon)
    Regards,
    Amitabha

  • FTP Adapter ORABPEL-11407 Connection closed error.

    Hiiii friends
    I have configured the connection factory for FTP Adapter (not defined any connection pool). My BPEL process poll the ftp location to get the file.
    But no bpel instance is getting generated and domain.log shows the following error. Can you help me in this issue ?
    +<2009-06-26 04:09:59,140> <INFO> <default.collaxa.cube.engine.deployment> Process "ReadEmp" (revision "1.0") successfully loaded.+
    +<2009-06-26 04:10:10,666> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation age+
    nt, processId='bpel://localhost/default/ReadEmp~1.0/
    +<2009-06-26 04:10:10,667> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and+
    initializing inbound JCA endpoint for:
    process='bpel://localhost/default/ReadEmp~1.0/'
    +<2009-06-26 04:10:10,667> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and+
    initializing inbound JCA endpoint for:
    process='bpel://localhost/default/ReadEmp~1.0/'
    domain='default'
    WSDL location='ReadEmpPL.wsdl'
    portType='GetEmpOp_ptt'
    operation='GetEmpOp'
    +activation properties={portType=GetEmpOp_ptt}+
    +<2009-06-26 04:10:10,678> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for p+
    ortType=GetEmpOp_ptt, operation=GetEmpOp
    +<2009-06-26 04:10:10,763> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> ENDPOINT ACTIVATION CALLED IN FTP ADAPTER+
    +<2009-06-26 04:10:10,765> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed e+
    ndpointActivation for portType=GetEmpOp_ptt, operation=GetEmpOp
    +<2009-06-26 04:10:10,765> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created+
    +<2009-06-26 04:10:40,516> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die+
    +<2009-06-26 04:20:11,382> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Poller raising Alert for exception : ORABPEL-11407+
    Connection closed error.
    Connection closed for Host: corpdevapp10.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    +<2009-06-26 04:20:41,429> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created+
    I am not sure what exactly is happening here. I have already established the successful connection with the same FTP server using different FTP clients.

    sounds like the ftp server closed the connection. did you try to use other ftp clients from the same machine where the bpel engine is running?
    Mark

  • Image Import Error "No query results returned"

    Hi All,
    I have the problem while importing images, several image have not been imported with this error.
    Log:
    Importing [German [DE]] '205865_logo.jpg'...failed.
    Import complete
    Error:
    E:\images\205865\h-jpeg\205865_logo.jpg: No query results returned
    Altogether I have imported 17000 Images. 16998 have been successful and 2 throw this error. Anybody an idea what this means and how to avoid it?
    Best Regards
    Roman
    Edited by: Roman Becker on Mar 8, 2009 1:14 PM

    Hi Roman,
    I assume you import the images to a catalog, dont you?
    Which catalog do you use? MDM or CCM?
    Daniel

  • Query Result Error

    Hi Experts,
    I am facing problem with Bex Queries in Dashboards..
    I am using Bex Queries in the Dashboard. When i go to Preview Mode i am getting an error "Query Result Error".
    In this dashboard i do have an Hierarchical Data.
    Please help me in solving this Problem..
    I am using Dashboard 4.1 SP3

    Hi Suman,
    Thanks for your quick reply...
    I am trying to just Preview data..
    I even checked the Bex Query its working fine. And i am not using any filters or prompts.
    I can even preview the data when i try to edit query in the Query Browser Tab in the Dashboard. But i don't know wts the problem i am unable to see the data in the SWF mode.

  • Error in testing XML query result set web service

    Hi
    I was trying to test a <b>XML query result set web service</b> in BW system with tcode wsadmin but getting error like
    <b>Cannot download WSDL from http://ibmbtsb02.megacenter.de.ibm.com:8070/sap/bw/xml/soap/queyview?sap-client=001&wsdl=1.1&mode=sap_wsdl: F:\usr\sap\W70\DVEBMGS70\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet_jsp\wsnavigator\root\WEB-INF\temp\ws1139464945296\wsdls\wsdlroot.wsdl (The system cannot find the path specified)</b>
    I had tried it first time few days ago and was able to test it successfully with the same configuration settings.
    Could any one of you please provide any suggestion on this?
    Thanks in advance
    Sudip

    hi
    check this links it may help u.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/e3072e65f04445a010847aa970b68b/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/frameset.htm
    Regards,
    Manoseelan

Maybe you are looking for

  • Mobile account doesn't complete initial creation and sync process

    I'm trying to setup a mobile account for a network account but it won't complete the sync process on the client MacBook Pro. Both the server and the MacBook Pro are running 10.5.5. When I login to client it prompts me to create a Mobile account and p

  • How to cancel Auto Renewable purchase programmatically.

    I have a scenario where user can subscribe to auto renewable in-app purchase. Once he/she has puchased, we have an option "cancel subscription". Means I have to cancel auto renewablt in-app purchase programatically. Please let me know Is it possible

  • Dispalying ME23N w.r.t the EBELN

    Hi Folks, I am doing an interactive report where at the level of list 4 I have to call ME23N w.r.t the EBELN  I had displayed in list 3. loop at iekpo. iekpo-ebeln hotspot on, hide iekpo-ebeln. endloop. if sy-lsind = 4. call transaction 'ME23N'  and

  • SQL Execution Error in Eclipse 3.5 (Windows Vista)

    Selecting and executing this query in SQL Scrapbook in Eclipse 3.5 produces "Failed" status. If I remove commented fields then it works OK. Using the latest OEPE Patch Set 1. SELECT * FROM (SELECT 'Patient' AS USERTYPE, SUM(TOTAL) AS Total FROM( SELE

  • Where are attribute values when developing custom adapter?

    Hello, I am developing custom adapter for IDM 8. When the server wants to make reconciliation it calls method listObjects in my case and getUser. I wanted to ask if I am able to get values attributes of user which is passed to this method as paramete