You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by shivaken <sh...@e-can.ne.jp> on 2004/02/06 11:34:10 UTC

StringIndexOutOfBoundsException at SqlHelper.splitPath

Hi,

At imigrating to rc5 from rc4, I got StringIndexOutOfBoundsException.
I read SqlHelper.java. But I couldn't find any wrong thing.

Please help me.

# I'm using J2sdk1.4.2_03, db-ojb-rc5

# I did
        Criteria criteria = new Criteria();
        String[] columns = { "sum(TIME)" };
        QueryByCriteria query =
            new ReportQueryByCriteria(Call.class, columns, criteria);
        query.addGroupBy("DATE_FORMAT(DATE, \"%Y/%m/%d\")");

# stack trace
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
        at java.lang.String.substring(String.java:1444)
        at org.apache.ojb.broker.util.SqlHelper.splitPath(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.getAttributeI\
nfo(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.appendColName\
(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.ensureColumns\
(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement.getStatement\
(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.getPrep\
aredSelectStatement(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown\
 Source)
        at 
org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown \
Source)
        at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
        at 
org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(Unknow\
n Source)
        at 
org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterat\
or(Unknown Source)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue\
ry(Unknown Source)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
orFromQuery(Unknown Source)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
orByQuery(Unknown Source)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
IteratorByQuery(Unknown Source)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
IteratorByQuery(Unknown Source)


-- 
-- shivaken
antshell: Ant command line front end
http://www.antshell.org

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


Re: StringIndexOutOfBoundsException at SqlHelper.splitPath

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi,

the fix is now in the branch as well.

jakob

Armin Waibel wrote:
> Hi,
> 
> I think (but I'm not sure) this is fixed in CVS HEAD (not 1.0_branch).
> See
> http://www.mail-archive.com/ojb-user%40db.apache.org/msg07835.html
> 
> regards,
> Armin
> 
> shivaken wrote:
> 
>> Hi,
>>
>> At imigrating to rc5 from rc4, I got StringIndexOutOfBoundsException.
>> I read SqlHelper.java. But I couldn't find any wrong thing.
>>
>> Please help me.
>>
>> # I'm using J2sdk1.4.2_03, db-ojb-rc5
>>
>> # I did
>>         Criteria criteria = new Criteria();
>>         String[] columns = { "sum(TIME)" };
>>         QueryByCriteria query =
>>             new ReportQueryByCriteria(Call.class, columns, criteria);
>>         query.addGroupBy("DATE_FORMAT(DATE, \"%Y/%m/%d\")");
>>
>> # stack trace
>> java.lang.StringIndexOutOfBoundsException: String index out of range: -2
>>         at java.lang.String.substring(String.java:1444)
>>         at org.apache.ojb.broker.util.SqlHelper.splitPath(Unknown Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.getAttributeI\
>> nfo(Unknown Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.appendColName\
>> (Unknown Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.ensureColumns\
>> (Unknown Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement.getStatement\
>> (Unknown Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.getPrep\
>> aredSelectStatement(Unknown Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown\
>>  Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown \
>> Source)
>>         at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown 
>> Source)
>>         at 
>> org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(Unknow\
>> n Source)
>>         at 
>> org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterat\
>> or(Unknown Source)
>>         at 
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue\
>> ry(Unknown Source)
>>         at 
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
>> orFromQuery(Unknown Source)
>>         at 
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
>> orByQuery(Unknown Source)
>>         at 
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
>> IteratorByQuery(Unknown Source)
>>         at 
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
>> IteratorByQuery(Unknown Source)
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

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


Re: StringIndexOutOfBoundsException at SqlHelper.splitPath

Posted by shivaken <sh...@e-can.ne.jp>.
Hi,

On Thursday 19 February 2004 05:33, Jakob Braeuchi wrote:
> hi,
>
> SqlHelper is quite a primitive thing. it assumes that there is only ONE
> column in a selectio criteria. this means it cannot handle criteria like
> this:
>
> oracle: upper(col1 || col2) = ?
> mysql: upper(concat(col1,col2)) = ?
>
> in fact the whole selection criteria handling assumes only one column :(
> i'm currently thinking about how i can get rid of this limitation. and i
> hope that we can also drop SqlHelper then.

Sorry, I had not read SqlHelper.java and around enough.
It seems SqlHelper#splitPath creates PathInfo contains suffix, prefix and  
column from criteria. And it will help creating sql statement.
At SqlQueryStatement#appendColName, PathInfo's colName is translated to 
table's column name. Then, you said only ONE column will not be translated at 
that time. 

Why don't you make PathInfo independent and move translating function to 
PathInfo.  There are two getColumn at SqlDeleteByQuery.java and 
SqlQueryStatement.java. The difference is just only table alias.
If PathInfo has translating function, you can reinforce that to be able to 
translate 2 or more columns easily. 

Anyway, StringIndexOutOfBoundsException was caused by 
the white space after "," at below row.
  query.addGroupBy("DATE_FORMAT(DATE, \"%Y/%m/%d\")");

I attached temporary patch. Try that.
I think treating 'distinct name' and ' to_char(col, 'format_mask')'  by one 
way is the cause of this problem.

Thanks.
-- 
-- shivaken
antshell: Ant command line front end
http://www.antshell.org

Re: StringIndexOutOfBoundsException at SqlHelper.splitPath

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi,

SqlHelper is quite a primitive thing. it assumes that there is only ONE column 
in a selectio criteria. this means it cannot handle criteria like this:

oracle: upper(col1 || col2) = ?
mysql: upper(concat(col1,col2)) = ?

in fact the whole selection criteria handling assumes only one column :(
i'm currently thinking about how i can get rid of this limitation. and i hope 
that we can also drop SqlHelper then.

jakob

shivaken wrote:

> Thanks Armin, 
> 
> But, that was another problem. 
> That was caused by below line in my code.
>         query.addGroupBy("DATE_FORMAT(DATE,  \"%Y/%m/%d\")");
> # DATE_FORMAT() is mysql function
> 
> And SqlHelper.java: 
>          colName = betweenBraces.substring(colBegin + 1, colEnd);
> 
> colBegin is created by..
>   colBegin = betweenBraces.indexOf(" ");
> So, colBegin will be 5 with aPath="DATE_FORMAT(DATE,  \"%Y/%m/%d\")" .
> And colEnd indicates ","'s place. then colEnd is 4.
> 
> SqlHelper will try substring with condition colBeling > colEnd.
> That is the problem.
> 
> Just for me, removing white space from above query is enough.
> But I want you to fix it.
> I wanted to write a patch, but I don't know expected work of SqlHelper.
> 
> Thanks.
> 
> On Friday 06 February 2004 20:14, Armin Waibel wrote:
> 
>>Hi,
>>
>>I think (but I'm not sure) this is fixed in CVS HEAD (not 1.0_branch).
>>See
>>http://www.mail-archive.com/ojb-user%40db.apache.org/msg07835.html
>>
>>regards,
>>Armin
>>
>>shivaken wrote:
>>
>>>Hi,
>>>
>>>At imigrating to rc5 from rc4, I got StringIndexOutOfBoundsException.
>>>I read SqlHelper.java. But I couldn't find any wrong thing.
>>>
>>>Please help me.
>>>
>>># I'm using J2sdk1.4.2_03, db-ojb-rc5
>>>
>>># I did
>>>        Criteria criteria = new Criteria();
>>>        String[] columns = { "sum(TIME)" };
>>>        QueryByCriteria query =
>>>            new ReportQueryByCriteria(Call.class, columns, criteria);
>>>        query.addGroupBy("DATE_FORMAT(DATE, \"%Y/%m/%d\")");
>>>
>>># stack trace
>>>java.lang.StringIndexOutOfBoundsException: String index out of range: -2
>>>        at java.lang.String.substring(String.java:1444)
>>>        at org.apache.ojb.broker.util.SqlHelper.splitPath(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.getAttributeI\
>>>nfo(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.appendColName\
>>>(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.ensureColumns\
>>>(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement.getStatement\
>>>(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.getPrep\
>>>aredSelectStatement(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown\
>>> Source)
>>>        at
>>>org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown \
>>>Source)
>>>        at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
>>>Source) at
>>>org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(Unknow\
>>>n Source)
>>>        at
>>>org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterat\
>>>or(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue\
>>>ry(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
>>>orFromQuery(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
>>>orByQuery(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
>>>IteratorByQuery(Unknown Source)
>>>        at
>>>org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
>>>IteratorByQuery(Unknown Source)
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

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


Re: StringIndexOutOfBoundsException at SqlHelper.splitPath

Posted by shivaken <sh...@e-can.ne.jp>.
Thanks Armin, 

But, that was another problem. 
That was caused by below line in my code.
        query.addGroupBy("DATE_FORMAT(DATE,  \"%Y/%m/%d\")");
# DATE_FORMAT() is mysql function

And SqlHelper.java: 
         colName = betweenBraces.substring(colBegin + 1, colEnd);

colBegin is created by..
  colBegin = betweenBraces.indexOf(" ");
So, colBegin will be 5 with aPath="DATE_FORMAT(DATE,  \"%Y/%m/%d\")" .
And colEnd indicates ","'s place. then colEnd is 4.

SqlHelper will try substring with condition colBeling > colEnd.
That is the problem.

Just for me, removing white space from above query is enough.
But I want you to fix it.
I wanted to write a patch, but I don't know expected work of SqlHelper.

Thanks.

On Friday 06 February 2004 20:14, Armin Waibel wrote:
> Hi,
>
> I think (but I'm not sure) this is fixed in CVS HEAD (not 1.0_branch).
> See
> http://www.mail-archive.com/ojb-user%40db.apache.org/msg07835.html
>
> regards,
> Armin
>
> shivaken wrote:
> > Hi,
> >
> > At imigrating to rc5 from rc4, I got StringIndexOutOfBoundsException.
> > I read SqlHelper.java. But I couldn't find any wrong thing.
> >
> > Please help me.
> >
> > # I'm using J2sdk1.4.2_03, db-ojb-rc5
> >
> > # I did
> >         Criteria criteria = new Criteria();
> >         String[] columns = { "sum(TIME)" };
> >         QueryByCriteria query =
> >             new ReportQueryByCriteria(Call.class, columns, criteria);
> >         query.addGroupBy("DATE_FORMAT(DATE, \"%Y/%m/%d\")");
> >
> > # stack trace
> > java.lang.StringIndexOutOfBoundsException: String index out of range: -2
> >         at java.lang.String.substring(String.java:1444)
> >         at org.apache.ojb.broker.util.SqlHelper.splitPath(Unknown Source)
> >         at
> > org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.getAttributeI\
> > nfo(Unknown Source)
> >         at
> > org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.appendColName\
> > (Unknown Source)
> >         at
> > org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.ensureColumns\
> > (Unknown Source)
> >         at
> > org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement.getStatement\
> > (Unknown Source)
> >         at
> > org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.getPrep\
> > aredSelectStatement(Unknown Source)
> >         at
> > org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown\
> >  Source)
> >         at
> > org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown \
> > Source)
> >         at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
> > Source) at
> > org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(Unknow\
> > n Source)
> >         at
> > org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterat\
> > or(Unknown Source)
> >         at
> > org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue\
> > ry(Unknown Source)
> >         at
> > org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
> > orFromQuery(Unknown Source)
> >         at
> > org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
> > orByQuery(Unknown Source)
> >         at
> > org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
> > IteratorByQuery(Unknown Source)
> >         at
> > org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
> > IteratorByQuery(Unknown Source)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org

-- 
-- shivaken
antshell: Ant command line front end
http://www.antshell.org

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


Re: StringIndexOutOfBoundsException at SqlHelper.splitPath

Posted by Armin Waibel <ar...@apache.org>.
Hi,

I think (but I'm not sure) this is fixed in CVS HEAD (not 1.0_branch).
See
http://www.mail-archive.com/ojb-user%40db.apache.org/msg07835.html

regards,
Armin

shivaken wrote:
> Hi,
> 
> At imigrating to rc5 from rc4, I got StringIndexOutOfBoundsException.
> I read SqlHelper.java. But I couldn't find any wrong thing.
> 
> Please help me.
> 
> # I'm using J2sdk1.4.2_03, db-ojb-rc5
> 
> # I did
>         Criteria criteria = new Criteria();
>         String[] columns = { "sum(TIME)" };
>         QueryByCriteria query =
>             new ReportQueryByCriteria(Call.class, columns, criteria);
>         query.addGroupBy("DATE_FORMAT(DATE, \"%Y/%m/%d\")");
> 
> # stack trace
> java.lang.StringIndexOutOfBoundsException: String index out of range: -2
>         at java.lang.String.substring(String.java:1444)
>         at org.apache.ojb.broker.util.SqlHelper.splitPath(Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.getAttributeI\
> nfo(Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.appendColName\
> (Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.ensureColumns\
> (Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement.getStatement\
> (Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.getPrep\
> aredSelectStatement(Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown\
>  Source)
>         at 
> org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown \
> Source)
>         at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
>         at 
> org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(Unknow\
> n Source)
>         at 
> org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterat\
> or(Unknown Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue\
> ry(Unknown Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
> orFromQuery(Unknown Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIterat\
> orByQuery(Unknown Source)
>         at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
> IteratorByQuery(Unknown Source)
>         at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQuery\
> IteratorByQuery(Unknown Source)
> 
> 

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


How to configure OJB with Websphere datasource

Posted by Yannick Goujon <ya...@unilog.fr>.
Hello,

I'm using Websphere 4.0.7, Oracle 8.1.7.4 on Solaris 8 with OJB 1.0.
When I use a direct connexion defined in the repository_database.xml file,
it works OK in our development server (with Websphere and Oracle installed
on the same server):

****************************************************
    <jdbc-connection-descriptor
        jcd-alias="default"
        default-connection="true"
        platform="Oracle"
        jdbc-level="2.0"
        driver="oracle.jdbc.driver.OracleDriver"
        protocol="jdbc"
        subprotocol="oracle:thin"
        dbalias="@172.18.226.4:1521:WSPAVT2"
        username="user "
        password="*******"
        batch-mode="false"
        useAutoCommit="0"   
   >
        <connection-pool
            maxActive="25"
            whenExhaustedAction="0"            
        />
   
   <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"/>

   </jdbc-connection-descriptor>
****************************************************


But in production we have some troubles because the Websphere Server
connects the Oracle server through a firewall. This firewall is configured
to end inactive connection. So, the application can't connect to the
database at the end of the day! We need to retstart the application every
day! Here is the error:



****************************************************
[org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: 
[2/5/04 19:07:08:758 CET]    c7f06 SystemOut     U Io exception: Connection
reset by peer: Connection reset by peer
[2/5/04 19:07:08:787 CET]    c7f06 SystemOut     U
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: 
[2/5/04 19:07:08:788 CET]    c7f06 SystemOut     U
PersistenceBrokerException
during the execution of the query: Io exception: Connection reset by peer:
Connection reset by peer
[2/5/04 19:07:08:788 CET]    c7f06 SystemOut     U Io exception: Connection
reset by peer: Connection reset by peer
[2/5/04 19:07:08:795 CET]    c7f06 SystemOut     U
[org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] INFO: 
[2/5/04 19:07:08:795 CET]    c7f06 SystemOut     U Rollback was called, do
rollback on current connection oracle.jdbc.driver.OracleConnection@6597d1
[2/5/04 19:07:08:796 CET]    c7f06 SystemOut     U
[org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] ERROR: 
[2/5/04 19:07:08:796 CET]    c7f06 SystemOut     U Rollback on the
underlying
connection failed
[2/5/04 19:07:08:796 CET]    c7f06 SystemOut     U Io exception: Broken pipe
[2/5/04 19:07:08:803 CET]    c7f06 SystemOut     U 05 Feb 2004 -
19:07:08,802
ERROR [com.aventis.sage.service.ServiceUserBackBone] error : (ligne 180) -
Io
exception: Connection reset by peer: Connection reset by peer
****************************************************


We have another application using Websphere datasource (without OJB) and it
works OK through the firewall. So we decided to configure OJB with a jndi
datasource. But I didn't find any document to do this with Websphere (except
the repository.dtd.
I tried this configuration with my development environment:

****************************************************
<jdbc-connection-descriptor
        jcd-alias="default"
        default-connection="true"
        platform="Oracle"
        jdbc-level="2.0"
        jndi-datasource-name="jdbc/mydatasource"
        batch-mode="false"
        useAutoCommit="0"
   >
        <connection-pool
            maxActive="25"
            whenExhaustedAction="0"
        />
      <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"/>

   </jdbc-connection-descriptor>
****************************************************


The datasource is found but we have this error:
org.apache.ojb.broker.TransactionNotInProgressException: ConnectionManager
is NOT in transaction.
This configuration is working OK with WSAD 5(Windows).

Any idea about how to configure a datasource with Websphere (solaris) or
about our firewall problem?

Thanks a lot.

Yannick




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