Feil ved artefakt distribusjon: Problem mens avregistrere MBean: javax.management.InstanceNotFoundException

stemmer
0

Jeg lærer Java EE. Og prøvde å lage enkle hello world program med modell og oppbevaringssted, men jeg fikk: feil under forsøk på å distribuere til glassfish5. Jeg bruker IntelliJ.

Jeg tenkte at det kunne være fordi krigen ikke kompilere men når jeg kjørte maven fra kommandolinjen det pakker alt.

BookRepository.java


    @PersistenceContext(unitName = bookStorePU)
    private EntityManager em;

    public Book find(Long id){
        return em.find(Book.class, id);
    }
}

persistence.xml

    <persistence-unit name=bookStorePU transaction-type=JTA>
        <class>com.learning.model.Book</class>
        <properties>
            <property name=javax.persistance.schema-generation.database.action value=drop-and-create/>
            <property name=javax.persistence.schema-generation.scripts.action value=drop-and-create/>
            <property name=javax.persistence.schema-generation.scripts.create-target value=bookStoreCreate.ddl/>
            <property name=javax.persistance.schema-generation.scripts.drop-target value=bookStoreDrop.ddl/>
        </properties>
    </persistence-unit>

Jeg forventer at det skal kompilere og distribuere til Glassfish, men jeg får unntak:

[2019-10-09T11:56:48.412+0200] [glassfish 5.0] [WARNING] [] [org.eclipse.persistence.session./file:/C:/projects/projectname/target/projectname-1.0-SNAPSHOT/WEB-INF/classes/_bookStorePU.server] [tid: _ThreadID=46 _ThreadName=admin-listener(5)] [timeMillis: 1570615008412] [levelValue: 900] [[
  Problem while unregistering MBean: javax.management.InstanceNotFoundException: TopLink:Name=Development-/file_/C_/projects/projectname/target/projectname-1.0-SNAPSHOT/WEB-INF/classes/_bookStorePU,Type=Configuration]]

[2019-10-09T11:56:48.414+0200] [glassfish 5.0] [WARNING] [] [org.eclipse.persistence.session./file:/C:/projects/projectname/target/projectname-1.0-SNAPSHOT/WEB-INF/classes/_bookStorePU.server] [tid: _ThreadID=46 _ThreadName=admin-listener(5)] [timeMillis: 1570615008414] [levelValue: 900] [[
  Problem while unregistering MBean: javax.management.InstanceNotFoundException: TopLink:Name=Session(/file_/C_/projects/projectname/target/projectname-1.0-SNAPSHOT/WEB-INF/classes/_bookStorePU)]]

i Glassfish logger

Publisert på 09/10/2019 klokken 13:02
kilden bruker
På andre språk...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more