On Aug 28, 2007, at 5:13 AM, Paul Spencer wrote:
David,
I am using Maven 2. If the example could include a Maven 2 based
pom without inheriting a parent pom, that would be great.
Definitely. Looks like another user has some examples with JPA we
can use here.
Doing some experimenting with an intentionally bad reference to a non-
existent persistence unit and am not seeing the output a user would
need to correct things. Something fishy is definitely going on.
Going to dig into this more first thing tomorrow. Likely won't take
too much longer to steam things out.
-David
Paul Spencer
David Blevins wrote:
That looks exactly right. Let me see if I can whip up a quick
example with similar settings and see if we can't figure out what
might be going. We need the example anyway.
-David
On Aug 27, 2007, at 9:00 PM, Paul Spencer wrote:
David,
See below.
David Blevins wrote:
On Aug 26, 2007, at 6:44 PM, Paul Spencer wrote:
If you're persistence unit was not found when we attempted to
resolve the reference (created via the annotation) during the
time the bean as loading, we'd throw one of these which should
be logged and would fail your app:
throw new IllegalArgumentException("Persistence unit " +
contextInfo.persistenceUnitName + " for persistence-context-ref " +
contextInfo.referenceName + " not found");
I am getting this error, but I believe the datasource is defined.
Below is my configuration. Is their something missing?
***
* conf/openejb.xml
***
...
JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
JdbcUrl jdbc:derby:openjpa-database;create=true;
UserName
Password
...
***
* ArtifactManagerImpl.java
***
...
@Stateless
public class ArtifactManagerImpl implements ArtifactManager {
@PersistenceContext(unitName = "myDataSource")
private EntityManager entityManager;
public ArtifactManagerImpl() {
}
...
***
* META-INF/persistence.xml
***
org.apache.openjpa.persistence.PersistenceProviderImpl
java:openejb/Connector/Default JDBC Database
-David
Paul Spencer