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 Alen Tan <ia...@hotmail.com> on 2003/10/28 07:51:52 UTC

OJB & weblogic problem - No record found

Hi,

I have this problem with OJB in weblogic. I have already set up the OJB 
to run in weblogic 7.1. There is a startup class to load the OJB up and 
bind to the JNDI tree.

I store my application in the domain/applications directory. Everytime I 
changed my source code, I will touch the REDEPLOY file to redeploy the 
whole EJB application.

There is a problem here. Whenever I redeploy my application in weblogic 
using the above method, the broker will return null record to me. 
Although the query is valid and the record is certainly inside the 
database. It just return me with a null record and without any error. 
But, if I restart the weblogic, everything would be ok.

So, I wonder what has gone wrong. Anyone got any idea? Appreciate the 
help very much, because I have been stuck with this problem for quite a 
while.

Thank you.




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


Re: OJB & weblogic problem - No record found

Posted by Alen Tan <ia...@hotmail.com>.
Hi,

That's ok. Thanks for the help

Armin Waibel wrote:
> Hi Alen,
> 
> I can't speak for weblogic server (I don't use it), but
> we have a similar redeploy problems with jboss (ok, we got
> a exception after redeploy) until we deploy the whole
> ejb-examples with all ojb.jars + config files + libraries
> in a sar directory (jboss specific deployment format).
> Sorry, I can't be a great help.
> 
> regards,
> Armin
> 
> Alen Tan wrote:
> 
>> Hi,
>>
>> Yes. Those jar files which ojb needs are all inside the same directory 
>> as db-ojb-1.0.rc4.jar
>>
>> I don't see it as classpath problem. Because when the server is 
>> started up fresh, everything is ok. Only when I redeploy the whole 
>> application, then the OJB broker will return me null record.
>>
>> I think it might be class loader problem. When the whole application 
>> is redeploy, I think the thing changed would be class loader. However, 
>> it is difficult for me to figure out what is their relationship and 
>> why it is so.
>>
>> Regards,
>> Alen
>>
>> Armin Waibel wrote:
>>
>>> Hi,
>>>
>>> Alen Tan wrote:
>>>
>>>> Hi,
>>>>
>>>> I have this problem with OJB in weblogic. I have already set up the 
>>>> OJB to run in weblogic 7.1. There is a startup class to load the OJB 
>>>> up and bind to the JNDI tree.
>>>>
>>>> I store my application in the domain/applications directory. 
>>>> Everytime I changed my source code, I will touch the REDEPLOY file 
>>>> to redeploy the whole EJB application.
>>>>
>>>> There is a problem here. Whenever I redeploy my application in 
>>>> weblogic using the above method, the broker will return null record 
>>>> to me. Although the query is valid and the record is certainly 
>>>> inside the database. It just return me with a null record and 
>>>> without any error. But, if I restart the weblogic, everything would 
>>>> be ok.
>>>>
>>> hmm, maybe it's a classpath problem. Are all libraries used
>>> by OJB in the same "classpath path" as ojb.jar?
>>>
>>> regards,
>>> Armin
>>>
>>>> So, I wonder what has gone wrong. Anyone got any idea? Appreciate 
>>>> the help very much, because I have been stuck with this problem for 
>>>> quite a while.
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>



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


Re: OJB & weblogic problem - No record found

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Alen,

I can't speak for weblogic server (I don't use it), but
we have a similar redeploy problems with jboss (ok, we got
a exception after redeploy) until we deploy the whole
ejb-examples with all ojb.jars + config files + libraries
in a sar directory (jboss specific deployment format).
Sorry, I can't be a great help.

regards,
Armin

Alen Tan wrote:
> Hi,
> 
> Yes. Those jar files which ojb needs are all inside the same directory 
> as db-ojb-1.0.rc4.jar
> 
> I don't see it as classpath problem. Because when the server is started 
> up fresh, everything is ok. Only when I redeploy the whole application, 
> then the OJB broker will return me null record.
> 
> I think it might be class loader problem. When the whole application is 
> redeploy, I think the thing changed would be class loader. However, it 
> is difficult for me to figure out what is their relationship and why it 
> is so.
> 
> Regards,
> Alen
> 
> Armin Waibel wrote:
> 
>> Hi,
>>
>> Alen Tan wrote:
>>
>>> Hi,
>>>
>>> I have this problem with OJB in weblogic. I have already set up the 
>>> OJB to run in weblogic 7.1. There is a startup class to load the OJB 
>>> up and bind to the JNDI tree.
>>>
>>> I store my application in the domain/applications directory. 
>>> Everytime I changed my source code, I will touch the REDEPLOY file to 
>>> redeploy the whole EJB application.
>>>
>>> There is a problem here. Whenever I redeploy my application in 
>>> weblogic using the above method, the broker will return null record 
>>> to me. Although the query is valid and the record is certainly inside 
>>> the database. It just return me with a null record and without any 
>>> error. But, if I restart the weblogic, everything would be ok.
>>>
>> hmm, maybe it's a classpath problem. Are all libraries used
>> by OJB in the same "classpath path" as ojb.jar?
>>
>> regards,
>> Armin
>>
>>> So, I wonder what has gone wrong. Anyone got any idea? Appreciate the 
>>> help very much, because I have been stuck with this problem for quite 
>>> a while.
>>>
>>> Thank you.
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
> 
> 
> 



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


Re: OJB & weblogic problem - No record found

Posted by Alen Tan <ia...@hotmail.com>.
Hi,

Yes. Those jar files which ojb needs are all inside the same directory 
as db-ojb-1.0.rc4.jar

I don't see it as classpath problem. Because when the server is started 
up fresh, everything is ok. Only when I redeploy the whole application, 
then the OJB broker will return me null record.

I think it might be class loader problem. When the whole application is 
redeploy, I think the thing changed would be class loader. However, it 
is difficult for me to figure out what is their relationship and why it 
is so.

Regards,
Alen

Armin Waibel wrote:
> Hi,
> 
> Alen Tan wrote:
> 
>> Hi,
>>
>> I have this problem with OJB in weblogic. I have already set up the 
>> OJB to run in weblogic 7.1. There is a startup class to load the OJB 
>> up and bind to the JNDI tree.
>>
>> I store my application in the domain/applications directory. Everytime 
>> I changed my source code, I will touch the REDEPLOY file to redeploy 
>> the whole EJB application.
>>
>> There is a problem here. Whenever I redeploy my application in 
>> weblogic using the above method, the broker will return null record to 
>> me. Although the query is valid and the record is certainly inside the 
>> database. It just return me with a null record and without any error. 
>> But, if I restart the weblogic, everything would be ok.
>>
> hmm, maybe it's a classpath problem. Are all libraries used
> by OJB in the same "classpath path" as ojb.jar?
> 
> regards,
> Armin
> 
>> So, I wonder what has gone wrong. Anyone got any idea? Appreciate the 
>> help very much, because I have been stuck with this problem for quite 
>> a while.
>>
>> Thank you.
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: OJB & weblogic problem - No record found

Posted by RB...@intersoft.de.
Hi,
we encounter the same phenomenon with weblogic 8.1 sp1. 
With a hot deploy the OJB responds like normal but with null or empty 
result.
This could be fixed by restarting weblogic. But this is very time 
expensive.

cheers,

Ralf 

Armin Waibel <ar...@code-au-lait.de> schrieb am 28.10.2003 10:11:05:

> Hi,
> 
> Alen Tan wrote:
> > Hi,
> > 
> > I have this problem with OJB in weblogic. I have already set up the 
OJB 
> > to run in weblogic 7.1. There is a startup class to load the OJB up 
and 
> > bind to the JNDI tree.
> > 
> > I store my application in the domain/applications directory. Everytime 
I 
> > changed my source code, I will touch the REDEPLOY file to redeploy the 

> > whole EJB application.
> > 
> > There is a problem here. Whenever I redeploy my application in 
weblogic 
> > using the above method, the broker will return null record to me. 
> > Although the query is valid and the record is certainly inside the 
> > database. It just return me with a null record and without any error. 
> > But, if I restart the weblogic, everything would be ok.
> > 
> hmm, maybe it's a classpath problem. Are all libraries used
> by OJB in the same "classpath path" as ojb.jar?
> 
> regards,
> Armin
> 
> > So, I wonder what has gone wrong. Anyone got any idea? Appreciate the 
> > help very much, because I have been stuck with this problem for quite 
a 
> > while.
> > 
> > Thank you.
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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: OJB & weblogic problem - No record found

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi,

Alen Tan wrote:
> Hi,
> 
> I have this problem with OJB in weblogic. I have already set up the OJB 
> to run in weblogic 7.1. There is a startup class to load the OJB up and 
> bind to the JNDI tree.
> 
> I store my application in the domain/applications directory. Everytime I 
> changed my source code, I will touch the REDEPLOY file to redeploy the 
> whole EJB application.
> 
> There is a problem here. Whenever I redeploy my application in weblogic 
> using the above method, the broker will return null record to me. 
> Although the query is valid and the record is certainly inside the 
> database. It just return me with a null record and without any error. 
> But, if I restart the weblogic, everything would be ok.
> 
hmm, maybe it's a classpath problem. Are all libraries used
by OJB in the same "classpath path" as ojb.jar?

regards,
Armin

> So, I wonder what has gone wrong. Anyone got any idea? Appreciate the 
> help very much, because I have been stuck with this problem for quite a 
> while.
> 
> Thank you.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: OJB & weblogic problem - No record found - Solution

Posted by Alen Tan <ia...@hotmail.com>.
Hi all,

I have found a solution to this problem.

You have to separate those database entity classes from application 
classes. Jar your entity classes and put inside system classpath. Remove 
those entity classes with application logic classes.

The reason could be everytime you redeploy the whole thing in BEA, it 
would use a different new class loader. After that, the OJB broker could 
not find the class definition from original class loader and return you 
a null.


Alen Tan wrote:
> Hi,
> 
> I have this problem with OJB in weblogic. I have already set up the OJB 
> to run in weblogic 7.1. There is a startup class to load the OJB up and 
> bind to the JNDI tree.
> 
> I store my application in the domain/applications directory. Everytime I 
> changed my source code, I will touch the REDEPLOY file to redeploy the 
> whole EJB application.
> 
> There is a problem here. Whenever I redeploy my application in weblogic 
> using the above method, the broker will return null record to me. 
> Although the query is valid and the record is certainly inside the 
> database. It just return me with a null record and without any error. 
> But, if I restart the weblogic, everything would be ok.
> 
> So, I wonder what has gone wrong. Anyone got any idea? Appreciate the 
> help very much, because I have been stuck with this problem for quite a 
> while.
> 
> Thank you.



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