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

  • SEARCH
  • Home
  • 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 7969879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:18:26+00:00 2026-06-04T07:18:26+00:00

My development environment (IBM RAD 8 + WAS 8) is complaining that my project

  • 0

My development environment (IBM RAD 8 + WAS 8) is complaining that my project does not have a persistence.xml file. Still it seems that I can build and run my project. Is that file required and if a add one such file to make my project pass validation, what should be in that file?

The project is a web project that uses session beans and entity beans from other projects and this persistence.xml error is the only error in the project so I’d be glad to get rid of it.

Thanks for any help

Update

I searched my files for persistence.xml and it showed up in src/ and bin/ of the EJB project while the web project with servlets and jsp does not have a persistence.xml, according to my colleague the web project is using the persistence.xml from the EJB project i.e:

<?xml version="1.0" encoding="UTF-8"?>
<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="PandoraArendeWeb" transaction-type="JTA">

        <jta-data-source>jdbc/Mainframe_TEST_ADBUTV2</jta-data-source>
        <class>se.prv.pandora.arendeprocess.entity.PRVNummer</class>
        <class>se.prv.pandora.arendeprocess.entity.Ansokan</class>
        <class>se.prv.pandora.arendeprocess.entity.NatAnsokan</class>
        <class>se.prv.pandora.arendeprocess.entity.PctAnsokan</class>
        <class>se.prv.pandora.arendeprocess.entity.ArendePerson</class>
        <class>se.prv.pandora.arendeprocess.entity.Nyregistrering</class>
        <class>se.prv.pandora.arendeprocess.entity.Anstalld</class>
        <class>se.prv.pandora.arendeprocess.entity.Handlaggare</class>
        <class>se.prv.pandora.arendeprocess.entity.OrgElement</class>
        <class>se.prv.pandora.arendeprocess.entity.FysiskHandlaggare</class>
        <class>se.prv.pandora.arendeprocess.entity.AnsvarigHandlaggare</class>
        <class>se.prv.pandora.arendeprocess.entity.AnsvarigFysiskHandlaggare</class>
        <class>se.prv.pandora.arendeprocess.entity.TeknikOmrade</class>
        <class>se.prv.pandora.arendeprocess.entity.Person</class>
        <class>se.prv.pandora.arendeprocess.entity.PRVNummerPerson</class>
        <class>se.prv.pandora.arendeprocess.entity.Notering</class>
        <class>se.prv.pandora.arendeprocess.entity.Lock</class>
        <class>se.prv.pandora.arendeprocess.entity.LandKod</class>
        <class>se.prv.pandora.arendeprocess.entity.ArbetsMomentLog</class>
        <class>se.prv.pandora.arendeprocess.entity.SystemTypDel</class>
        <class>se.prv.pandora.arendeprocess.entity.ArbetsMoment</class>
        <class>se.prv.pandora.arendeprocess.entity.UnderStatus</class>
        <class>se.prv.pandora.arendeprocess.entity.PatPers</class>
        <class>se.prv.pandora.arendeprocess.entity.PrvLandP</class>
        <class>se.prv.pandora.arendeprocess.entity.PkaPerln</class>
        <class>se.prv.pandora.arendeprocess.entity.PctnPerl</class>
        <class>se.prv.pandora.arendeprocess.entity.PersonToPatPersKoppl</class>
        <class>se.prv.pandora.arendeprocess.entity.PRVNummerPersonKoppl</class>
        <class>se.prv.pandora.arendeprocess.entity.Region</class>
        <class>se.prv.pandora.arendeprocess.entity.Historik</class>
        <class>se.prv.pandora.arendeprocess.entity.Egenskap</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>

    </persistence-unit>

<!-- <persistence-unit name="PandoraArendeWeb_MSSQL" transaction-type="JTA">

        <jta-data-source>jdbc/MSSQL_TEST_XA</jta-data-source>
        <class>se.prv.pandora.arendeprocess.entity.PersonSearch</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>

    </persistence-unit>
 -->    
</persistence>

enter image description here

  • 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-04T07:18:26+00:00Added an answer on June 4, 2026 at 7:18 am

    persistence.xml files usually contain details related to your database, such as connection strings and their respective user names and passwords including other ORM related information. These details can be placed in other locations so you need not explicitly have one, although having such a file usually makes all persistence related information available in one place which makes looking up certain settings and configurations easier.

    This is a sample persistence.xml file:

    <?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="<PERSISTENCE UNIT NAME>">
            <properties>
                <!--
                <property name="hibernate.ejb.cfgfile" value="/hibernate.cfg.xml"/>
                <property name="hibernate.hbm2ddl.auto" value="create"/>
                -->
                <property name="hibernate.archive.autodetection" value="class, hbm"/>
                <property name="hibernate.show_sql" value="true"/>
                <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
                <property name="hibernate.connection.password" value="<PASSWORD>"/>
                <property name="hibernate.connection.url" value="jdbc:mysql://<HOST IP ADDRESS>/<DB NAME>"/>
                <property name="hibernate.connection.username" value="<USERNAME>"/>
                <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
                <property name="hibernate.c3p0.min_size" value="5"/>
                <property name="hibernate.c3p0.max_size" value="20"/>
                <property name="hibernate.c3p0.timeout" value="300"/>
                <property name="hibernate.c3p0.max_statements" value="50"/>
                <property name="hibernate.c3p0.idle_test_period" value="3000"/>
            </properties>
        </persistence-unit>
    </persistence>
    

    The above content was taken from here.

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

Sidebar

Related Questions

Does Java have a default System Environment Variable that will always be read/appended when
I mucked around my development environment enough that now I have to restart my
Why does the Eclipse development environment complain that the private modifier is invalid in
I have set up my development environment on a new PC and seems I
My development environment is disconnected from the internet, and it seems that visual studio
My development environment is such that I have some_header.h in /usr/include and in /another/directory
let's say that RoR development environment is set up and working does the developer
In the software development environment where I work we have a group of developers
we have a mixed development environment using ASP.NET MVC and Ruby on Rails. We
In development environment string AppPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string path = AppPath + \\options.xml; Works.

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.