You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Antonio <an...@gmail.com> on 2013/03/08 17:31:41 UTC

Re: Impossible to instantiate a container

Hi Again,

Sorry but i got over this issue creating a new project from scratch but now
i suddenly got this error again.
The main problem is that I don't fully understand what this 'Context' means:

contextProperties = 
                new Properties();
        contextProperties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.core.LocalInitialContextFactory");
        contextProperties.put("openejb.deployments.classpath.ear", "true");
        contextProperties.put("postgresDatabase",
"new://Resource?type=DataSource");
        contextProperties.put("postgresDatabase.JdbcDriver",
"org.postgresql.Driver");
        contextProperties.put("postgresDatabase.JdbcUrl",
"jdbc:postgresql://localhost:5432/aomdb");
        contextProperties.put("postgresDatabase.JtaManaged", "true");    
        context = 
                new InitialContext(contextProperties);
        userDao = 
                (UserProfileDaoLocal) context.lookup("UserProfileDaoLocal");

In here I'm not sure what I'm doing.
The question would be, what do I need to run this test?
I need tomee running in port 8080? I got it.
Do i need the database running on localhost:5432? I got it.
What else do need this conext needs to be instantiated.
This class is in a separated module, can I run this test only checking out
the jar module and doing mvn install?

Regards,
Antonio



--
View this message in context: http://openejb.979440.n4.nabble.com/Impossible-to-instantiate-a-container-tp4660887p4661365.html
Sent from the OpenEJB User mailing list archive at Nabble.com.