Duvida sobre TopLINK(JPA)

Olá, estou começando a trabalhar agora com a API JPA, e gostaria de alguma ajuda nesse assunto, criei as entidades e o XML pelo NetBeans.

Bom, estou rodando o seguinte codigo para gerar a comunicação com o XML…

EntityManagerFactory emf = Persistence.createEntityManagerFactory ("HelpDesk2007PU"); EntityManager em = emf.createEntityManager ();

e esta me devolvendo o seguinte erro.

[quote][TopLink Config]: 2007.02.27 09:28:14.779–ServerSession(4461550)–The alias name for the entity class [class Entidades.Conhecimentodescricao] is being defaulted to: Conhecimentodescricao.
[TopLink Config]: 2007.02.27 09:28:14.842–ServerSession(4461550)–The alias name for the entity class [class Entidades.Situacaosolicitacaoaberta] is being defaulted to: Situacaosolicitacaoaberta.
[TopLink Config]: 2007.02.27 09:28:14.842–ServerSession(4461550)–The alias name for the entity class [class Entidades.Solicitacaofeedback] is being defaulted to: Solicitacaofeedback.
[TopLink Config]: 2007.02.27 09:28:14.842–ServerSession(4461550)–The alias name for the entity class [class Entidades.Setoroperacional] is being defaulted to: Setoroperacional.
[TopLink Config]: 2007.02.27 09:28:14.857–ServerSession(4461550)–The alias name for the entity class [class Entidades.Acordoservico] is being defaulted to: Acordoservico.
[TopLink Config]: 2007.02.27 09:28:14.857–ServerSession(4461550)–The alias name for the entity class [class Entidades.Setoroperacionalusuariosmasters] is being defaulted to: Setoroperacionalusuariosmasters.
[TopLink Config]: 2007.02.27 09:28:14.857–ServerSession(4461550)–The alias name for the entity class [class Entidades.Usuario] is being defaulted to: Usuario.
[TopLink Config]: 2007.02.27 09:28:14.857–ServerSession(4461550)–The alias name for the entity class [class Entidades.Situacaosolicitacao] is being defaulted to: Situacaosolicitacao.
[TopLink Config]: 2007.02.27 09:28:14.857–ServerSession(4461550)–The alias name for the entity class [class Entidades.Empresa] is being defaulted to: Empresa.
[TopLink Config]: 2007.02.27 09:28:14.873–ServerSession(4461550)–The alias name for the entity class [class Entidades.Conhecimentotipo] is being defaulted to: Conhecimentotipo.
[TopLink Config]: 2007.02.27 09:28:14.873–ServerSession(4461550)–The alias name for the entity class [class Entidades.Modulos] is being defaulted to: Modulos.
[TopLink Config]: 2007.02.27 09:28:14.873–ServerSession(4461550)–The alias name for the entity class [class Entidades.Gruposdeusuarios] is being defaulted to: Gruposdeusuarios.
[TopLink Config]: 2007.02.27 09:28:14.873–ServerSession(4461550)–The alias name for the entity class [class Entidades.Tipousuario] is being defaulted to: Tipousuario.
[TopLink Config]: 2007.02.27 09:28:14.873–ServerSession(4461550)–The alias name for the entity class [class Entidades.Prioridadetiposituacao] is being defaulted to: Prioridadetiposituacao.
[TopLink Config]: 2007.02.27 09:28:14.873–ServerSession(4461550)–The alias name for the entity class [class Entidades.Solicitacoes] is being defaulted to: Solicitacoes.
[TopLink Config]: 2007.02.27 09:28:14.889–ServerSession(4461550)–The alias name for the entity class [class Entidades.Historicodesituacoesabertas] is being defaulted to: Historicodesituacoesabertas.
[TopLink Config]: 2007.02.27 09:28:14.889–ServerSession(4461550)–The alias name for the entity class [class Entidades.Setor] is being defaulted to: Setor.
[TopLink Config]: 2007.02.27 09:28:14.889–ServerSession(4461550)–The alias name for the entity class [class Entidades.Solicitacaosolucao] is being defaulted to: Solicitacaosolucao.
[TopLink Config]: 2007.02.27 09:28:14.889–ServerSession(4461550)–The alias name for the entity class [class Entidades.Prioridadetipo] is being defaulted to: Prioridadetipo.
[TopLink Config]: 2007.02.27 09:28:14.889–ServerSession(4461550)–The alias name for the entity class [class Entidades.Conhecimentoanexos] is being defaulted to: Conhecimentoanexos.
Exception in thread “main” java.lang.NullPointerException
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at helpdesk2007.Main.main(Main.java:38)
Java Result: 1
[/quote]

Como faço para realizar a conexão correta com o XML?

Consegui fazer a conexão funcionar com esse codigo…

Empresa Empres = new Empresa (1); EntityManagerFactory emf = Persistence.createEntityManagerFactory ("HelpDesk"); EntityManager em = emf.createEntityManager (); em.getTransaction ().begin (); em.persist (Empres); System.out.println (Empres.getEmpresaDescricao ());

Mas por que o System.out.println esta me retornando Null??? Falta alguma coisa para corrigir essa persistencia?