EAR project facet and APP-INF/lib

Hello,
I have four Workshop 10.3 projects which comprise an EAR. The projects are like this:
- MyCommonLib (Project Facets: EAR 5.0, WebLogic EAR Extensions 5.0)
- MyCommonLibControls (Project Facets: Utility Module 1.0, WebLogic Utility Module Extensions 10.3, ...)
- MyCommonLibSchemas (Project Facets: Utility Module 1.0, WebLogic Utility Module Extensions 10.3, ...)
- MyCommonLibExtraControls (Project Facets: Utility Module 1.0, WebLogic Utility Module Extensions 10.3, ...)
Basically, I am bundling 3 utility-jars into an EAR to be deployed collectively as a shared library. The problem is that I need to define at least one module in application.xml, otherwise deployment fails. Workshop however places all the jars in APP-INF/lib and leaves the application.xml empty.
I tried to "hack my way around this" by creating an empty "dummy.jar" file and placing it in the EarContent folder of the "MyCommonLib" project and editing application.xml by hand. However, when I export an EAR, it does not make it into the archive (even if I add it to the J2EE Module Dependencies of the EAR project MyCommonLib) and therefore deployment fails because the dummy.jar referenced in my application.xml does not exist.
What project settings do I need to achieve what I need?
Edited by: akarypid on Nov 4, 2010 2:29 AM

Hello,
Thank you for your input; the WAR approach works, although I don't like the idea of publishing web pages by importing the shared library.
However, I was hoping for an approach that would use the "standard J2EE" jar packaging approach whereby a project that is marked as a utilitiy module is not placed in the APP-INF/lib (thisi is weblogic-specific) but rather placed in the EAR's root and published in the standard application.xml as:
<application ...>
    <module>
        <java>dummy.jar</java>
   </module>
</application>This way I could bundle everything into the EAR, without having to include a web application in the shared library (and every app that uses it)... Could this be done using some project setup in Workshop?

Similar Messages

  • Can TLD jar can access through EAR / APP-INF/lib folder

    Hi All,
    If I have a TLD files into jar file and their specific classes are also into jar file .
    Now can access those jar through EAR file APP-INF/lib folder or else its must to access through WEB-INF/lib folder.
    any pointer will be great.
    Regards,
    Kal.

    I suggest you assume that's how it's supposed to work, and get that to work most efficiently. I have no idea what you were trying to achieve by putting the taglib jar in APP-INF/lib. Perhaps you have multiple webapps and you wanted to avoid multiple instances of the taglib jar? If that's the case, I believe you could use WebLogic "shared application libraries" (I don't think that's the correct term), where you deploy a jar file as an application library, and the weblogic.xml file in each webapp that uses it would specify the name of the application library it uses.

  • Help with APP-INF/lib inside EAR

    I have an EAR task in my ANT script, how do I add jars into APP-INF/
    lib inside EAR ?
    I dont want to create a folder structure in my project, only EAR
    should have
    <EAR root> /APP-INF/lib
    Edited by: Taranfx_com on Oct 12, 2008 4:49 AM

    try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
    or using prefer-application-packages in the weblogic-application.xml file in your EAR.

  • Web application in EAR not finding class in APP=INF/lib jar file

    Hi,
    I have read some posts regarding this but am still not able to figure out anything.
    I have a war file in my EAR along with some EJB jars. I have the common jars in the APP-INF/lib. The EJBs can find the classes in the common jars easily. But the Web app gives me a NoClassDefFoundError when trying to load a class from a common jar.
    Here is the structure:
    <pre>
    EAR
    |---WAR
    |---WEB-INF
    | |---lib
    | |---a.jar (A.class)
    |---APP-INF
    |---lib
    |---b.jar (B.class)
    </pre>
    Class A is trying to load class B and I get the NoClassDefFoundError for class B
    Thanks for any help,
    Sameet

    I found the problem. The web-app was finding the class in the APP-INf/lib. But the problem was being caused due to a reference to another class that was being loaded by the webapp classloader which was not visible to the class inside the common jar. The solution was to make sure both classes were being loaded by one class loader.
    Thanks anyway
    Sameet

  • Unable to load classes from jar files inside APP-INF/lib in EAR.

    Weblogic version: 10.3.3
    Platform: Linux x86-64 bit
    We deployed an ear packaged with all the common library jars inside APP-INF/lib. Deployment was successful.
    for some reason, it is always giving ClassNotFoundException for the classes inside the jars. This does not happen
    in 10.3.2 version of weblogic.
    We tried to add them to domain/lib directory (instead of APP-INF/lib) but still it is not able to resolve the classes.
    Any pointers would be appreciated.

    try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
    or using prefer-application-packages in the weblogic-application.xml file in your EAR.

  • APP-INF\lib

    Hello,
    I am migrating an ear from a j2ee1.4 websphere to javaee6 weblogic. As part of migrating from j2ee1.4 to javaee6, I made a change to the packaging. In j2ee1.4, our EAR had all the dependent jars for our 4 WARS in the root directory. I moved all the jars from root to APP-INF\lib.
    I have been getting errors on classloading of hibernate/antlr jars. I would like to know if moving the jars to APP-INF/lib is right and non-problematic. Do I have to mandatorily use <library-ref> anywhere? Do I have to refer anywhere such as classpath in Manifest.mf or anyother place to tell weblogic about the location of jars?
    Regards,
    Raj

    If it's an archived EAR, you can find the exploded contents under the
    server's .wlnotdelete directory.
    APP-INF/lib jar files are also copied under the same directory.
    -- Rob
    Krish wrote:
    If I have a jar file under APP-INF/lib in an EAR file, do the classes inside the
    jar file get extracted to some place in the EAR staging directory? If so, where?
    Thanks, Krish

  • Weblogic 8.1 Classpath vs APP-INF/lib

    I'm deploying an enterprise application on Weblogic 8.1. log4j 1.2.8 is on the classpath of Weblogic, while log4j 1.2.16 is in the APP-INF/lib of my EAR file. Unfortunately, my application seems to be binding to the older version of log4j, instead of the one in my EAR file, and I have no control over administration of the server.
    Is there any way to work around this problem? Thanks.

    Hi,
    You can try to set the value true for prefer-web-inf-classes element which will cause the classes which are located in the directory \WEB-INF\lib of a Web application to be loaded in preference to classes loaded in the application or system class loader. This way we can be sure that the classes from the lib folder would be picked and used for this application.
    Things to do:
    1) Place the Jars inside the “<APPLICATION_EAR>/APP-INF/lib” directory.
    2) Add the following entries inside ”<APPLICATION_EAR>/META-INF/weblogic-application.xml” (You need to add the packages available in your JAR files which you want to be loaded from your application in Below)
    <?xml version=”1.0″ encoding=”ISO-8859-1″?>
    <weblogic-application xmlns=”http://www.bea.com/ns/weblogic/90″>
    *<prefer-application-packages>*
    <package-name>org.apache.*</package-name>
    <package-name>org.apache.xerces.*</package-name>
    <package-name>org.apache.xalan.*</package-name>
    <package-name>org.apache.xmlcommons.*</package-name>
    <package-name>org.apache.xerces.jaxp.*</package-name>
    *</prefer-application-packages>*
    </weblogic-application>
    NOTE: if you Don’t have an EAR File (Enterprise Application) Then First place all the JARs in “<WEB_APPLICATION>/WEB-INF/lib” And then you can perform ClassLoader Filtering by Adding the Following Entry in “<WEB_APPLICATION>/WEB-INF/weblogic.xml”
    <weblogic-web-app xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.bea.com/ns/weblogic/90″ xsi:schemaLocation=”http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd”>
    <container-descriptor>
    *<prefer-web-inf-classes>true</prefer-web-inf-classes>*
    </container-descriptor>
    </weblogic-web-app>
    You can even go through the following link:
    http://middlewaremagic.com/weblogic/?page_id=192
    Few more links which might help you:
    Search for: prefer-web-inf-classes
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html
    Search for: Configuring a FilteringClassLoader
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1098468
    Regards,
    Ravish Mody
    http://middlewaremagic.com/weblogic/
    Come, Join Us and Experience The Magic…

  • ClassNotFoundException from servelt inside app-inf/lib of an ear.

    Hi,
    I'm experiencing a ClassNotFoundException errors in WebLogic 9.1 running with JDK 1.5.0_04 when I try to start an ear application that has defined, in the web module, a servlet for which the base class is inside an ear library which in turns try to get a class defined in the web module using Class.forName(...) during it's initializzation.
    I've made a test ear project with the following structure:
    prova.ear
    - APP-INF
    ---- test.jar
    ------- com.ServletProva
    - META-INF
    ---- application.xml
    - prova.war
    ---- WEB-INF
    ------- classes
    ---------- com.ClasseDaLeggere
    ---------- com.ServletProvaDue [extends com.ServletProva]
    ------- web.xml
    the content of web.xml is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="WebApp_ID">
         <display-name>weblogic-prova_servlet</display-name>
         <servlet>
              <servlet-name>ServletProva</servlet-name>
              <display-name>ServletProva</display-name>
              <description></description>
              <servlet-class>com.ServletProvaDue</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>ServletProva</servlet-name>
              <url-pattern>/ServletProva</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>
    And the content of the com.ServletProva class is:
    package com;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ServletProva extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
         public ServletProva() {
              super();
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         public void init() throws ServletException {
              try {
                   Class.forName("com.ClasseDaLeggere");
              } catch (Exception e) {
                   throw new ServletException(e);
              super.init();
    Trying to start the application i get the following error:
    <4-ago-2008 15.57.32 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "ServletProva" failed to preload on startup in Web application: "/prova".
    java.lang.ClassNotFoundException: com.ClasseDaLeggere
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:222)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:195)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:130)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at com.ServletProva.init(ServletProva.java:38)
    at com.ServletProvaDue.init(ServletProvaDue.java:37)
    at javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:68)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:493)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1688)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1665)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1585)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2678)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:874)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:326)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:114)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:25)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:640)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:252)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:567)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:
    131)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:101)
    at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:126)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:329)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:845)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1246)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:432)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(Deployment
    ReceiverCallbackDeliverer.java:181)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiv
    erCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCal
    lbackDeliverer.java:67)
    at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:876)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:326)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:114)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: com.ClasseDaLeggere
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:222)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:195)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:130)
    Truncated. see log file for complete stacktrace
    Someone can help me to figure out this problem?

    Check out this recent thread:
    Re: weblogic 10 ear problem-urgent
    If you're still having issues, then I recommend using the IDE tooling for WebLogic to do this in WTP or Workshop, then Export the EAR/WAR which will give you the structure.

  • WLS 8.1 SP4 and web-inf/lib ClassNotFoundExceptions

    Hi
    Is anyone else having problems with this issue ?
    I saw it was resolved (CR161884 & CR173695) in the 8.1 SP3 release, but I'm unable to deploy a web app (either through the console or in the applications directory of the domain) in SP4 as the classloader can't see my JAR file in WEB-INF/lib.
    <30-Dec-2004 15:51:47 o'clock GMT> <Error> <Deployer> <BEA-149201> <Failed to co
    mplete the deployment task with ID 7 for the application appsdirdp-application
    -1.0-SNAPSHOT_war.
    weblogic.management.DeploymentException:
    Exception:weblogic.management.ApplicationException: start() failed.
            Module: dp-application-1.0-SNAPSHOT     Error: weblogic.management.Deplo
    ymentException: org/picocontainer/gems/StaticFactory - with nested exception:
    [java.lang.NoClassDefFoundError: org/picocontainer/gems/StaticFactory]Inside my WAR file, I have a WEB-INF\lib directory, containing picocontainer-gems-1.1-SNAPSHOT.jar which contains the org.picocontainer.gems.StaticFactory class.
    I've tried deploying the app both with and without a weblogic.xml file declaring prefer-web-inf-classes set to true.
    Rgs
    Erik

    Just as a check, I moved the JAR files to a common lib directory on the server and added them to the system classpath specified in startWeblogic.cmd, and the application starts fine.
    Maybe not related, but yesterday I was tried deploying an EJB that was dependent on a JAR file NOT included within its JAR file, but specified with the Class-path entry in the manifest.
    The behaviour I saw was WLS swallowed the ClassNotFoundException silently, the admin console reported that the EJB was deployed successfully but inside the ejbCreate method - I had two print line statements, one prior to calling the missing class, and one after. Only the one prior appeared on the system console, suggesting that the ejbCreate method wasn't completing, yet no exception is thrown ?

  • WebLogic 11g EAR EJB Classpath and class loaders

    All,
    I have been having issues migrating Spring based EJB applications from OC4J to WebLogic 11g (10.3.1). I have been in communication with Oracle who has suggested a work around however I am keen to see if anyone else can suggest a solution.
    The application is dependant on stateless session EJB beans that communicate with a Spring managed service tier to perform the business logic and database access. PitchFork is used to inject the Spring managers into the EJB’s using the spring-ejb-jar.xml configuration file. Note originally I was using the SpringBeanAutowiringInterceptor however I could not get this to work. See WebLogic 11g and Spring beens injected into EJB for details.
    When the application is deployed packaging all the dependant jars within the APP-INF\lib folder I get a verity of errors from the following InvalidClassException, NoSuchMethodError, AbstractMethodError and IllegalArgumentException. I am using Spring 2.5.3 to match the supported WebLogic version. Note within the EAR application.xml the library-directory is set to APP-INF/lib. The issue appears to be Spring, PitchFork, commons-logging and aspectj libraries are being loaded form WebLogic and do not have visibility on jars within the application or have been modified when bundled for WebLogic. An example of this is the PitchFork jar within WebLogic has been changed excluding the spi package resulting in java.lang.ClassNotFoundException: org.springframework.jee.spi.PitchforkUtilsImpl errors.
    Moving the jars to the domain library path does not resolve any of the issues. I have been unable to successfully deploy the application picking up the application jars using the prefer-application-packages configuration.
    Oracle has advised me to deploy the libraries into the WebLogic system classpath by modifying the startWebLogic command to load the libraries into the classpath. I am concerned that modifying the system classpath will result in an unstable WebLogic server as I will be replacing modified jar files packages with WebLogic (such as PitchFork). This will also limit the applications that can be deployed within the server as each application must use the same libraries and versions (as the application ibraries are leing ignored).
    Has anyone else hit this issue and corrected it? Can anyone think of an alternative solution?
    Regards
    Neil

    Hi,
    I am in the process of updating the tracking bug# 331569 with copies of the eclipse EAR/WAR projects and the EAR for these scenarios. Here are some details on how I got past the 2nd CCE on the org.eclipse.persistence.jpa.PersistenceProvider class (not the javax one)
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=331569
    Essentially an SE persistence unit running both JPA 2.0 api and the 2.0 XSD schema work fine. I will next retest the EE case with variations of the 3 types of injection on the SSB or Servlet.
    Update: There are 3 (possibly 4) issues here (all of these may become obsolete when the next WLS version ships)Initially I got the same 2.0 schema error and the ClassCastException on org.eclipse.persistence.jpa.PersistenceProvider
    It turns out that my import of the 2 eclipse projects from my bug # 296271 for WebLogic 10.3.2.0 lost their facets(specifically the dynamic web facet) because I associated them with a different WebLogic 10.3.3.0. - this caused the CCE I was experiencing like Sri.
    Anyways, after creating an EAR/Web project combination from scratch in eclipse associated with the 10.3.3.0 instance - I predeployed/deployed/ran fine - even with the 2.0 schema - in SE bootstrap mode (no EE yet).
    Reproduction Procedure:
    redoing project from scratch as I noticed that the war was not at the root of the ear - it was a jar in the app-inf/lib dir - my imported eclipse project was not referenced correctly as a web module facet- create empty EAR and WAR project with references
    - download and open my EAR and WAR project code from bug # 296271
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=296271
    - do essentially all the steps in the page below (I paraphrase for re-verification)
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-InUse
    - copy applicationService, entity and FrontController servlet code into new projects
    - create persistence.xml and MANIFEST.MF manifest in src\META-INF
    - update manifest
    Class-Path: APP-INF/lib/eclipselink.jar
    APP-INF/lib/javax.persistence_2.0.0.v200911041116.jar
    - copy both javax.persistence 2.0 and eclipselink 2.x jars to APP-INF/lib
    - change ordering of WebLogic library modules classpath reference (javax.persistence 1.0) to ear reference (2.0 version)
    - update web.xml with servlet tags
    - update weblogic.xml with new context root
    - make the persistence unit name the same in persistence.xml and ApplicationManagedService
    - update weblogic-application.xml with prefer-application-packages overrides
    <wls:prefer-application-packages>
    <wls:package-name>javax.persistence.*</wls:package-name>
    <wls:package-name>org.eclipse.persistence.*</wls:package-name>
    </wls:prefer-application-packages>
    - enable server redirect logging
    <!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
    <property name="eclipselink.logging.logger" value="DefaultLogger"/>
    - start WebLogic 10.3.3.0
    - deploy (run on) server from eclipse or export ear to auto deploy directory
    1) JPA 2.0 XSD usage on 10.3.3.0
    - I reproduced this issue with a bad EAR
    - was able to use the 2.0 schema within the WAR-only application managed EAR
    persistence.xml<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <!-- persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"-->
    <persistence-unit name="example2" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>localJTA</jta-data-source>
    <class>org.eclipse.persistence.example.business.Cell</class>
    <shared-cache-mode>NONE</shared-cache-mode>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.logging.level" value="FINEST"/>
    <property name="eclipselink.target-database" value="Derby"/>
    <!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
    <property name="eclipselink.logging.logger" value="DefaultLogger"/>
    <!-- property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
    <property name="javax.persistence.jdbc.url" value="jdbc:derby://127.0.0.1:1527/dataparallel;create=true"/>
    <property name="javax.persistence.jdbc.user" value="APP"/>
    <property name="javax.persistence.jdbc.password" value="APP"/-->
    <!-- turn off DDL generation after the model is stable -->
    <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
    <property name="eclipselink.ddl-generation.output-mode" value="both"/-->
    </properties>
    </persistence-unit>
    </persistence>
    2) CCE on JPA provider implementation class
    Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit example2: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider
    - I reproduced and fixed this one (was Eclipse project facet issue) - EAR was wrong
    - was able to run JPA 2.0 code fine on an SE PU (predeploy/deploy together)
    - EE injection should not work but I will post an example EAR anyway
    log[EL Example]: enterprise: JPA 2.0 Metamodel: MetamodelImpl@56287508 [ 3 Types: , 1 ManagedTypes: , 1 EntityTypes: , 0 MappedSuperclassTypes: , 0 EmbeddableTypes: ]
    3) CCE on JPA spec interface class
    - I could not reproduce this one
    Re: WebLogic 11g EAR EJB Classpath and class loaders
    Error processing persistence unit PT of module pt: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit PT: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
    4) CCE on fallback Kodo JPA provider (if an invalid say 2.1 JPA XSD schema is referenced)
    java.lang.ClassCastException: kodo.persistence.PersistenceProviderImpl
    at javax.persistence.Persistence.findAllProviders(Persistence.java:186)
    java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
    - reproduced by using the 1.0 javax.persistence jar (but named as the 2.0 one in APP-INF/lib)
    - fixed by using either the 1.0 or 2.0 JPA XSD schema and using the correct 2.0 spec jar
    thank you
    /michael

  • Deployment of JSF Libraries to /WEB-INF/lib

    Good day.
    In our new web application we use three different JSF taglibs (richfaces, trinidad, tomahawk). All of them are managed as "JSF Libraries" (created in eclipse options->web->"JavaServer Faces Tools"->Libraries). To include jars from these libraries in webapp I've checked respective entries in project's options->"Java EE Module Dependencies"->"Web Libraries". However webapp doesn't contain jars from these libs at runtime even if webapp is served from separate folder within weblogic server's directory structure (don't remember how this option is called at server configuration page). Is it some kind of a bug or this feature is just not supported (tradeoff for being able to serve modules directly from the workspace)? I read throught OEPE help contents, but haven't found definite answer there.
    Env: Eclipse 3.4.1, WTP 3.0.3, OEPE 1.0, JVM Sun 1.6.0_11, Win32 XP SP2, WLS 10.3
    Thank you very much!

    Sorry, forgot to mention that web application is a part of ear archive. Don't know if "Stand-alone Web Application Deployment Mode" will have any signification effect in this case.
    However, here are contents of .beabuild file from ear and contents of temporary directory from wls with webapp contents if it will be of any importance.
    ru.bpc.sv.web is ear archive and ru.bpc.sv.web.iu is included webapp.
    .beabuild:
    C\:/workspaces/web2008/ru.bpc.sv.web/EarContent/APP-INF/classes = APP-INF/classes
    C\:/workspaces/web2008/ru.bpc.sv.web.ui/WebContent = ru.bpc.sv.web.ui.war
    C\:/workspaces/web2008/ru.bpc.sv.web.ui/build/weboutput = ru.bpc.sv.web.ui.war
    C\:/workspaces/web2008/ru.bpc.sv.web.ui/build/classes = ru.bpc.sv.web.ui.war/WEB-INF/classes
    C\:/projects/java/libs/org/jboss/richfaces/3.1.5_1.4/richfaces-api-3.1.5.GA.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/richfaces-api-3.1.5.GA.jar
    C\:/projects/java/libs/org/jboss/richfaces/3.1.5_1.4/richfaces-impl-3.1.5.GA.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/richfaces-impl-3.1.5.GA.jar
    C\:/projects/java/libs/org/jboss/richfaces/3.1.5_1.4/richfaces-ui-3.1.5.GA.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/richfaces-ui-3.1.5.GA.jar
    C\:/projects/java/libs/org/apache/myfaces/tomahawk/1.1.6/tomahawk-1.1.6.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/tomahawk-1.1.6.jar
    C\:/projects/java/libs/org/apache/myfaces/trinidad/1.0.9_1.4/trinidad-api-1.0.9-jdk14.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/trinidad-api-1.0.9-jdk14.jar
    C\:/projects/java/libs/org/apache/myfaces/trinidad/1.0.9_1.4/trinidad-impl-1.0.9-jdk14.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/trinidad-impl-1.0.9-jdk14.jar
    C\:/projects/java/libs/org/apache/myfaces/trinidad/1.2.8/backport-util-concurrent-3.1.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/backport-util-concurrent-3.1.jar
    C\:/projects/java/libs/org/apache/myfaces/trinidad/1.2.8/retrotranslator-runtime-1.2.6.jar = ru.bpc.sv.web.ui.war/WEB-INF/lib/retrotranslator-runtime-1.2.6.jar
    C\:/workspaces/web2008/ru.bpc.sv.ejb.authClient/build/classes = APP-INF/lib/ru.bpc.sv.ejb.authClient.jar
    C\:/workspaces/web2008/ru.bpc.sv.ejb.svboClient/build/classes = APP-INF/lib/ru.bpc.sv.ejb.svboClient.jar
    C\:/workspaces/web2008/ru.bpc.sv.ejb.svfeClient/build/classes = APP-INF/lib/ru.bpc.sv.ejb.svfeClient.jar
    C\:/workspaces/web2008/ru.bpc.sv.commonitems/bin = APP-INF/lib/ru.bpc.sv.commonitems.jar
    C\:/workspaces/web2008/ru.bpc.sv.commonEjbUtils/bin = APP-INF/lib/ru.bpc.sv.commonEjbUtils.jar
    C\:/workspaces/web2008/ru.bpc.sv.web/EarContent/APP-INF/lib/commons-logging-1.1.jar = APP-INF/lib/commons-logging-1.1.jar
    C\:/workspaces/web2008/ru.bpc.sv.web/EarContent/APP-INF/lib/log4j-1.2.14.jar = APP-INF/lib/log4j-1.2.14.jar
    C\:/workspaces/web2008/ru.bpc.sv.web/EarContent/APP-INF/lib/poi-3.0.1-FINAL-20070705.jar = APP-INF/lib/poi-3.0.1-FINAL-20070705.jar
    C\:/workspaces/web2008/ru.bpc.sv.web/EarContent/APP-INF/lib/quartz-all-1.6.1-RC3.jar = APP-INF/lib/quartz-all-1.6.1-RC3.jar
    dir:
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\1
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\.tld_cache
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\libs
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\public
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\.tld_cache\tomahawk-sandbox-1.1.7-SNAPSHOT.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\.tld_cache\tomahawk-sandbox-1.1.7-SNAPSHOT.jar\META-INF
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\.tld_cache\tomahawk-sandbox-1.1.7-SNAPSHOT.jar\META-INF\myfaces_sandbox.tld
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\.tld_cache\tomahawk-sandbox-1.1.7-SNAPSHOT.jar\META-INF\myfaces_sandbox.tld\crc.ser
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\.tld_cache\tomahawk-sandbox-1.1.7-SNAPSHOT.jar\META-INF\myfaces_sandbox.tld\des.ser
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\libs\jsf-ri
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\libs\jsf-ri\moygs
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\libs\jsf-ri\moygs\war
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\commons-collections-3.1.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\commons-el-1.0.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\commons-fileupload-1.2.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\itext-2.0.6.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\iText-2.1.2u.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\iText-rtf-2.1.2u.jar
    C:\as\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\ru.bpc.sv.web\mc65ws\war\WEB-INF\lib\tomahawk-sandbox-1.1.7-SNAPSHOT.jar

  • Ear file deployment and jar libaries

    I am creating a simple ejb application that uses some jar libraries. The ejb app builds fine but when i try to deploy the application, it cannot find the dependent classes although i am including the jar libs in the ear file. I tried including the jars-libs in root as well as in app-inf/lib directory. I also made sure that i have the right jar-libs. What am i missing ?
    Here is what i see on the console when i try to deploy on Oracle App server:
    Nov 29, 2006 1:31:51 PM] Unpacking TestWithLib.ear
    [Nov 29, 2006 1:31:52 PM] Done unpacking TestWithLib.ear
    [Nov 29, 2006 1:31:52 PM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\TestWithLib.ear ends...
    [Nov 29, 2006 1:31:52 PM] Starting application : TestWithLib
    [Nov 29, 2006 1:31:52 PM] Initializing ClassLoader(s)
    [Nov 29, 2006 1:31:52 PM] Initializing EJB container
    [Nov 29, 2006 1:31:52 PM] Loading connector(s)
    [Nov 29, 2006 1:31:52 PM] Starting up resource adapters
    [Nov 29, 2006 1:31:52 PM] Processing EJB module: ejb1.jar
    [Nov 29, 2006 1:31:52 PM] Operation failed with error: com/xyz/ClassName

    One thing to try is in the JAR deployment profile for the EJB - stand on the File Groups node and click new to add a library group and make sure it includes the libraries/jar you added to your project.
    If this doesn't help then you might want to try and cross post this on the OC4J forum:
    OC4J

  • APP-INF directory

    Hello All,
    Is APP-INF directory in an EAR file is a new feature in BEA8.0 + or was
    it present in prior versions...???
    We have 7.0. And trying to leverage APP-INF.
    All we have done is to put the third party jars in APP-INF\lib directory. Am
    I missing smthg..???

    It's a new feature in 8.1.
    -- Rob
    a wrote:
    Hello All,
    Is APP-INF directory in an EAR file is a new feature in BEA8.0 + or was
    it present in prior versions...???
    We have 7.0. And trying to leverage APP-INF.
    All we have done is to put the third party jars in APP-INF\lib directory. Am
    I missing smthg..???

  • Using the APP-INF directory

    If i create a folder inside APP-INF/ directory and put jar files inside it, weblogic apps cant see them?
    I'm using Weblogic 10.3.2. This structure used to work on WLS 8.1
    Above is my app-inf structure:
    APP-INF
    |
    --------->basic.jar
    --------->teste.jar
    |
    ---------->extra(folder)
    |
    ----------------> logica.jar
    Thanks in Advance
    Erick
    Edited by: ErickAkamine on 28/05/2010 11:12

    U Need to put your JARs inside
    *"APP-INF/lib"* directory
    Example: Suppose MyEAR name is TestEAR:
    TestEAR
        |
          APP-INF    _______________ lib (Put All application Jars Here)
        |
        |
          META-INF    _______________application.xml
        |
          TESTWEBAPP
        |
        |
        _______________WEB-INF;      _______________web.xml
    The Above Directory structure suggests that u need to put all your Jar files inside *"TestEAR/APP-INF/lib"* Directory.
    <font color=red> NOTE: The Jar file Names which are mentioned inside the "application.xml" file should be present in the ROOT directory of your EAR file....</font> Other Jars can be placed inside the APP-INF/lib directory.
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are Here)

  • APP-INF Fails APPC Destroyes Manifests

    We have an application with a hierarchy of utility jars. Each jar manifest
    lists only those jars it has a direct dependency on. Even for a large number
    of jars this is a clean simple and specification-compliant way to use
    utility jars.
    The appc command in WLS 8.1 blows away the manifest on, for example, our war
    file jar. Consequently it breaks an otherwise working application. I read up
    on the addition of the non-standard and entirely unecessary APP-INF folder
    and, since appc is killing our manifest, decided to try that. The jars in
    APP-INF/lib are not found and there are other posts to that effect here. So
    Weblogic has taken a simply specification compliant means of sharing jars,
    destoryed it, and added its own non-functional hack.
    Can anybody tell us how to stop appc from whacking our manifests?
    TIA

    (answering his own question :)
    The issue has to do with the fact that while Class has a "getResource" method, it does not have a "getResources" (plural) method. So I had to use Class.getClassLoader().getResources().
    It's hinted at in the docs for Class.getResource, but that method likes a "/" at the beginning of the String it gets; while ClassLoader.getResource and .getResources do not. In my example, if I use "META-INF/MANIFEST.MF" (note the lack of a preceding '/'), then getResources succeeds.
    I'd say either Class needs to add a getResources method that has the same semantics as Class.getResource so things are symmetric. A little more documentation on this in Class.getResource and ClassLoader.getResource(s) would be nice too.
    Donnie

Maybe you are looking for

  • Control recipe destination not available in Process order

    Hi PP-PI Gurus, When i am sending the process maessages to destinations,i am getting the error"No control receipe destination available in process order". When we create master recipe using X-steps, there is no option to enter comtrol recipe destinat

  • [svn:fx-trunk] 11899: Cleaning up some FIXMEs assigned to me in the code:

    Revision: 11899 Revision: 11899 Author:   [email protected] Date:     2009-11-17 10:24:33 -0800 (Tue, 17 Nov 2009) Log Message: Cleaning up some FIXMEs assigned to me in the code: In UIMC, we now call invalidateParentSizeAndDL() on setting explicitM

  • Play TV on a Home theather in a box kit

    I am going to purchase a home theatre setup , the one that has speakers and DVD / FM Tuner as a package deal.    Can these type of setups also play the audio directly from the TV as in just normal TV shows ?  sports...etc...etc...etc Thanks in advanc

  • How to implement a server side SOAP invokeable class????

    Here is my class public class ABCImpl public String exceute (String msg) { ...} ABCImpl.execute(...) requires a string parameter and return a string in XML format. It is invoked throught SOAP-RPC call by a remote client. How do I integrate class ABCI

  • FIDCC1 Idoc seperation based on company code

    Hi, My problem is as follows. I have 3 company codes all producing Idocs with Same message type FIDCC1 and the basic type. My requirement is while Processing Idocs through BD87, it should be possible to know before processing which idocs belong to Co