Re: No EntityFactory in Eclipse [message #210276] |
Wed, 12 March 2008 08:55  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Dom,
This sounds like a question for the WTP newsgroup, so I've added that to
the to list of my reply.
Is something supposed to automagically initialize "factory" or is that
not what's null? (A stack trace is always good.)
dadom wrote:
> Hi...
>
> I have a little WebProject developes with Eclipse Europe (3.3.1.1) and
> a GlassFish v.2 (9.1_01). Because of some problems after the deploy
> with Eclipse I teste my Project with another IDE. Installed NetBeans
> 6, copied all my ProjectFiles, i left out only the persistence.xml and
> let NetBeans generate it for me.
> persistence.xml:
> ***
> <?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="DReminderPU" transaction-type="JTA">
> <provider>oracle.toplink.essentials.PersistenceProvider</provider >
> <jta-data-source>jdbc/dreminder</jta-data-source>
> <properties>
> <property name="toplink.ddl-generation" value="create-tables"/>
> </properties>
> </persistence-unit>
> </persistence>
> ***
>
> for this case i create a new connection pool for my server (worked
> fine) and try to get the EntityManagerFactory
>
> @PersistenceUnit
> private EntityManagerFactory factory;
>
> The PROBLEM. After the deploy with NetBeans, all work fine (even after
> a redploy). But when i deploy it with Eclipse (same SourceCode, same
> Config-XMLs!, same Server) i get a null-pointer exception when i try
> to get my EntityManager: EntityManager em =
> factory.createEntityManager();
> Its confusing me :( Pls help...
>
> thx
> Dom
>
|
|
|
|
|
|
Re: No EntityFactory in Eclipse [message #210722 is a reply to message #210309] |
Fri, 21 March 2008 16:57  |
Eclipse User |
|
|
|
On Wed, 12 Mar 2008 11:18:14 -0400, dadom <dadom110@xxx.de> wrote:
>
> i added the class additional even in my persistence.xml, but no deployment
> descriptor :(
>
>
Let's start with the basics ... which is about as far as I can go :)
but do you have WTP (with JPT tools) installed?
Almost sounds like maybe you have only Eclipse and EclipseLink?
|
|
|
Powered by
FUDForum. Page generated in 0.03511 seconds