• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Working with third-party utility

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, guys!
I have to implement solution as Session stateless bean can deliver xml string using Oracle XML-SQL Utility (XSU). So one of the business method gets connection from connection pool and pass that connection and sql query to OracleXMLQuery constructor. Find below code:
OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from employee");
strXML = qry.getXMLString();
I'm getting the exception see dump)
<Jan 8, 2002 12:56:19 AM PST> <Info> <EJB> <EJB Exception during invocation from home: del
ivery.DeliveryHandlerBeanHomeImpl@42d9a threw exception: java.lang.NoClassDefFoundError: o
racle/xml/sql/query/OracleXMLQuery
java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery
at delivery.DeliveryHandlerBean.getXML(DeliveryHandlerBean.java:104)
at delivery.DeliveryHandlerBeanImpl.getXML(DeliveryHandlerBeanImpl.java:110)
at delivery.DeliveryHandlerBeanEOImpl.getXML(DeliveryHandlerBeanEOImpl.java:31)
at delivery.DeliveryHandlerBeanEOImpl_WLSkel.invoke(DeliveryHandlerBeanEOImpl_WLSk
el.java:92)
at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:373)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:12
8)
at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.java:237)
at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.jav
a:118)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:17)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
Looks like trivial: class didn't load. My classpath includes oracle jar files (I run simple java client application without weblogic and ejb - works fine).
What should I do in order to load that class:
I put all jars in
mydomain\applications\webApp\WEB-INF\lib directory - no positive effect.
Please help, I appresiate in advance.
Oleg
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming you have installed BEA on your c drive, try placing it under the following
C:/bea/lib
and not
C:/bea/config/mydomain\applications\webApp\WEB-INF\lib
as you may have indicated to have done..
Eric Khosa
 
Oleg Shklyar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,
Thanks a lot for your suggestion.
I put Oracle's jar files in
c:\bea\wlserver6.0\lib and classpath includes them. But still no positive result.
So oracle's class is not visible for ejb client,
when I run simple java client everything is fine.
Thanks,
Oleg
 
Oleg Shklyar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally, I've got the solution. It's regarding classloaders: please remember about them. The easiest way to add third-party component workable within WL domain is to add it's classpath to the startWeblogic script file, so when WL server starts it's system loader represent third-party components. If you don't have everything packed in .ear file (there are a separate .war and .jar files), then remember to include EJB home and remote interfaces in the .war file.
It's pretty good explained in "Developing WLS Application" Chapter 3, p.3-8, 3-9.
I hope it will save a little time for those people who want to enable third-party utilities into WebLogic Server solution.
Oleg
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic