Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8252249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:30:42+00:00 2026-06-08T00:30:42+00:00

Environment WebLogic 11g (consequently Java EE 5 and EJB 3.0) An EJB contained JAR

  • 0

Environment

  • WebLogic 11g (consequently Java EE 5 and EJB 3.0)
  • An EJB contained JAR that also holds all persistence Entities. It worked fine (have a web app that uses the EJB and it works as expected). I decided to separate Entities to another layer and to do this I created another module and deploy that as an Optional Package. So now I have two JAR files which, by the way, I deploy separately and not as part of one application; persistence JAR and EJB JAR.

Problem

During the deployment of EJB I get the following error (which tells me that the Optional Package wasn’t found):

Unable to deploy EJB: StocksBean from BLayer-1.0.0-SNAPSHOT.jar: No persistence unit named ‘internalAppsPU’ is available in scope
BLayer-1.0.0-SNAPSHOT.jar. Available persistence units: []

More Info

Manifest of persistence module’s JAR

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: bm03043
Build-Jdk: 1.6.0_18
Extension-Name: com.amir.persistence
Implementation-Version: 1.0.0
Specification-Version: 1.6

persistence.XML in META-INF folder of persistence module’s JAR

<?xml version="1.0" encoding="UTF-8"?>
<persistence 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"
    version="1.0">
    <persistence-unit name="internalAppsPU" transaction-type="JTA">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>InternalAppsDS</jta-data-source>
        <class>com.xx.persistence.Stock</class>
        <properties>
            <property name="eclipselink.logging.level" value="FINE" />
        </properties>
    </persistence-unit>
</persistence>

EJB’s code

package com.xx.bll;

// bunch of imports //

@Stateless(name="StocksBean", mappedName="Internal-BLayer-StocksBean")
public class StocksBean implements Stocks {

   @PersistenceContext(unitName = "internalAppsPU")
   private EntityManager em;

   // SNIP //
}

Manifest of EJB’s JAR

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: bm03043
Build-Jdk: 1.6.0_18
Extension-List: PLayer
PLayer-Extension-Name: PersistenceLayer
PLayer-Implementation-Version: 1.0.0-SNAPSHOT
PLayer-Specification-Version: 1.6

Please take note the following:

  • The InternalAppsDS data source is configured previously in WebLogic.
  • At some point I was under the impression that names in Extension-List have to match the names of JAR files deployed as Optional Package. But as I read more I realized that’s not correct.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:30:43+00:00Added an answer on June 8, 2026 at 12:30 am

    So the answer is to use the same Extension-name used in the Library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with a WebLogic 10.3.5 clustered environment. My application includes an EJB
I'm starting Java development at a place that uses Weblogic on their production and
I have an environment setup with Java EE (weblogic 10.0). Thus, Kodo/OpenJPA is used
I'm using Weblogic application server and Apache web server in my J2EE environment and
How can I add the domain root path to the Oracle WebLogic 11g (10.3.2)
I have a very weird problem.That my web project deployed to the Weblogic 10.0,Monday
I have weblogic in Solaris 10 environment. My application had been caught OutOfMemoryError. My
I am working in a typical Dev->QA->Production environment, and it appears that our Dev
I've got a C++ program that internally uses java (via my C++ dll that
I am using Weblogic 10g clustered environment to deploy my application. In my application,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.