Thank you Matthieu,
I did as you suggested and took a look into OC4J's documentation. There's a
way to do what you told me to do: in order to enable local classes'
classloading behavior for a Web application, one needs to configure it by
having the following tag in the application's orion-web.xml file:
<web-app-class-loader search-local-classes-first="true"/>
Now it seems to be doing what you suggested but I am experiencing the
following exception:
SEVERE: The application named, default, could not start due to an error.
oracle.oc4j.persistence.PersistenceException: [default:ode] - Exception
creating EntityManagerFactory using PersistenceProvider class
org.apache.openjpa.persistence.PersistenceProviderImpl for persistence unit
ode-dao.
at
oracle.oc4j.persistence.PersistenceException.exceptionCreatingEntityManagerFactory(PersistenceException.java:113)
at
oracle.oc4j.persistence.PersistenceUnitManagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:178)
at
oracle.oc4j.persistence.PersistenceUnitManagerImpl.createPersistenceUnit(PersistenceUnitManagerImpl.java:140)
at
oracle.oc4j.persistence.PersistenceUnitManagerImpl.initialize(PersistenceUnitManagerImpl.java:80)
at
oracle.oc4j.persistence.ServerPersistenceUnitManagerImpl.initialize(ServerPersistenceUnitManagerImpl.java:17)
at
com.evermind.server.http.HttpApplication.createDefaultPersistenceUnitManager(HttpApplication.java:937)
at
com.evermind.server.http.HttpApplication.init(HttpApplication.java:856)
at
com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:686)
at
com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:493)
at
com.evermind.server.Application.getHttpApplication(Application.java:769)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.doCreateHttpApplicationFromReference(HttpSite.java:2315)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2295)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2196)
at
com.evermind.server.http.HttpSite.initApplications(HttpSite.java:728)
at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:332)
at com.evermind.server.http.HttpServer.setSites(HttpServer.java:286)
at
com.evermind.server.http.HttpServer.setConfig(HttpServer.java:189)
at
com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2819)
at
com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1242)
at
oracle.oc4j.server.ServerFactory$Worker.start(ApplicationServerFactory.java:249)
at
oracle.oc4j.server.ServerFactory$Worker.run(ApplicationServerFactory.java:259)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException:
org.apache.openjpa.persistence.PersistenceProviderImpl cannot be cast to
javax.persistence.spi.PersistenceProvider
at
oracle.oc4j.persistence.PersistenceUnitManagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:173)
... 20 more
Jul 31, 2008 9:02:02 PM com.evermind.server.http.HttpMessages
internalErrorWhileTryingToInstantiate
SEVERE: Internal error raised trying to instantiate web-application: ode
defined in web site Default Web Site. The application named, default, could
not start due to an error.
[default:ode] - Exception creating EntityManagerFactory using
PersistenceProvider class
org.apache.openjpa.persistence.PersistenceProviderImpl for persistence unit
ode-dao.
I really don't get why it throws a ClassCastException when trying to cast
org.apache.openjpa.persistence.PersistenceProviderImpl to
javax.persistence.spi.PersistenceProvider. I checked the docs and verified
the source code that comes with the openjpa.jar library packaged with ODE
and I found out that PersistenceProviderImpl is defined to implement
javax.persistence.spi.PersistenceProvider.
Do you happen to have any more clues. Thanks in advance.
On Wed, Jul 30, 2008 at 11:17 AM, Matthieu Riou <[EMAIL PROTECTED]>wrote:
> On Tue, Jul 29, 2008 at 6:56 PM, Sergio Tridente <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > First of all, I am pretty new to ODE so I want to apologize if this an
> > abvious situation. I am posting here because searching the net did not
> give
> > me the answers I am looking for.
> >
> > I am working on a project (mainly a rich client application) where we are
> > using JDev as our development platform and OC4J as the application
> server.
> > We are currently evaluating the possibility of using ODE for implementing
> > some BPEL stuff the project requires.
> >
>
> I'm not aware of anyone who tried ODE with OC4J so I'm not surprised you're
> having a few difficulties. ODE is a plain webapp so normally <irony
> level="max">it should work on any app server</irony>
>
>
> >
> > I am trying to deploy the ODE's WAR file. Here are some of the problems I
> > have encountered:
> >
> > 1) I deployed the WAR file into OC4J's application folder. I also
> deployed
> > the three examples that come with the WAR download by copying the three
> > directories into ode's WEB-INF/processes folder.
> >
> > 2) While starting the AS I got was the following exception:
> >
> > java.lang.NoSuchMethodError: javax.wsdl.xml.WSDLLocator.close()V
> > at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL
> >
> > After some googling I found out the problem had to do with wsdl4j.jar.
> The
> > thing is OC4J comes with version 1.5.1 while ODE is bundled with version
> > 1.6.1. I tried replacing OC4J's version with ODE's as someone suggested
> in
> > the Internet but that did not work. I work-arounded this problem by
> puting
> > 1.5.1's com.ibm.wsdl.xml.WSDLReaderImpl.class file into the
> WEB-INF/classes
> > directory.
> >
> > 3) I started the AS again and now ODE started up and was able to deploy
> the
> > HelloWorld2 example. I tested it and it worked fine. However, it failed
> > with
> > the other two samples giving the following message:
> >
> > FATAL - GeronimoLog.fatal(120) | Encountered an unexpected error. Exiting
> > poller...
> > java.lang.IncompatibleClassChangeError: Class
> > org.apache.ode.bpel.elang.xpath10.compiler.JaxenBpelHandler does not
> > implement the requested interface org.jaxen.saxpath.XPathHandler
> >
> > After spending quite some time, I worked around this problem by replacing
> > OC4J's version of jaxen.jar with ODE's (currently version 1.1.1)
> >
> > 4) I restarted the server and now the third example deployed correctly
> > (MagicSession). I tested it and it worked fine.
> >
> > So far so good, however I am still failing trying to make DynPartner's
> > example work. The error I am now getting is the following:
> >
> > ERROR - GeronimoLog.error(108) | Deployment of DynPartner failed,
> aborting
> > for now.
> > java.lang.ClassCastException:
> > org.apache.ode.bpel.compiler.wsdl.Definition4BPELImpl cannot be cast to
> > oracle.j2ee.ws.wsdl.DefinitionImpl
> >
> > I am running out of ideas. Could someone give me some help? I would be
> > really thankful.
> >
>
> Given that OC4J seem to use its own versions of WSDL4J and Jaxen, you won't
> get very far if you can't get it to isolate the webapp classloader from the
> server classloarder. Theoretically, all app servers should at a minimum be
> able to not leak their own libraries all over the place. Practically, most
> (not too good) app servers leak their libraries like a sieve.
>
> So my advice would be to check your OC4J documentation and see if there are
> options that can provide isolation of the webapp classloader from the main
> server classloader or the ability to exclude some server libraries from the
> webapp classloader.
>
> Good luck,
> Matthieu
>
>
> >
> > BTW, ODE and te three samples worked fine on JBoss after some tweaking
> > (removing some of geronimo's jars and using an external DataSource).
> >
> > Thank you in advance.
> >
> > --.
> > --
> > Best regards,
> >
> > Sergio Tridente
> >
>
--
--
Best regards,
Sergio Tridente