You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Quintin Beukes <qu...@last.za.net> on 2009/09/05 23:14:40 UTC
Fwd: A Bug in OpenEJB?
I tried a JUnit test and got the following. It first thought it might
be that I didn't set the non-jta-data-source. But this didn't help. So
what could cause this?
My initialization code:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");
p.put("jdbc_kmsPool", "new://Resource?type=DataSource");
p.put("jdbc_kmsPool.JdbcDriver", "org.postgresql.Driver");
p.put("jdbc_kmsPool.JdbcUrl", "jdbc:postgresql://localhost:5432/test_kms");
p.put("jdbc_kmsPool.UserName", "kms");
p.put("jdbc_kmsPool.Password", "kms");
p.put("hibernate.hbm2ddl.auto", "create-drop");
p.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
My 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="KMSPlatform-PU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/kmsPool</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property
name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.transaction.manager_lookup_class"
value="net.kunye.persistence.GeronimoTransactionManagerLookup"/>
</properties>
</persistence-unit>
</persistence>
This is the output from the JUnit test:
Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
- Loading module configuration for: tests
Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
- Application root for operating system 'Linux' is: /opt/kms
Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
- Loading application configuration for: tests
Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
- Application root for operating system 'Linux' is: /opt/kms
Apache OpenEJB 3.0 build: 20080408-04:13
http://openejb.apache.org/
INFO - openejb.home = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
INFO - openejb.base = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
INFO - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=jdbc_kmsPool, type=Resource,
provider-id=Default JDBC Database)
INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
INFO - Found EjbModule in classpath:
/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
INFO - Configuring app:
/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
INFO - Configuring Service(id=Default Stateless Container,
type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean PersonnelBean:
Container(type=STATELESS, id=Default Stateless Container)
INFO - Configuring PersistenceUnit(name=KMSPlatform-PU,
provider=org.hibernate.ejb.HibernatePersistence)
INFO - Auto-creating a Resource with id 'jdbc_kmsPoolNonJta' of type
'DataSource for 'KMSPlatform-PU'.
INFO - Configuring Service(id=jdbc_kmsPoolNonJta, type=Resource,
provider-id=jdbc_kmsPool)
INFO - Adjusting KMSPlatform-PU <jta-data-source> to 'jdbc_kmsPool'
INFO - Adjusting KMSPlatform-PU <non-jta-data-source> to 'jdbc_kmsPoolNonJta'
ERROR - FATAL ERROR: Unknown error in Assembler. Please send the
following stack trace and this message to user@openejb.org :
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:426)
at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:95)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:443)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:391)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:309)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:249)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:267)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:40)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at net.kunye.platform.appclient.test.LocalTestFramework.<init>(LocalTestFramework.java:39)
at net.kunye.platform.personnel.PersonnelBeanTest.setUpClass(PersonnelBeanTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
FATAL - OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:263)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:267)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:40)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at net.kunye.platform.appclient.test.LocalTestFramework.<init>(LocalTestFramework.java:39)
at net.kunye.platform.personnel.PersonnelBeanTest.setUpClass(PersonnelBeanTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:426)
at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:95)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:443)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:391)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:309)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:249)
... 31 more
--
Quintin Beukes
--
Quintin Beukes
Re: A Bug in OpenEJB?
Posted by Quintin Beukes <qu...@skywalk.co.za>.
I changed the logging to be very verbose. Wasn't sure which categories
this would be, so I just made everything trace.
log4j:WARN No appenders could be found for logger
(org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
log4j:WARN Please initialize the log4j system properly.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - trace - Retrieving
bean 'propertyConfigurer' of type
'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Retrieved
bean 'propertyConfigurer' of type
'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer].
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Created new
Application Context.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Loaded XML
Spring configuration for class
'net.kunye.platform.testing.LocalTestFramework':
/META-INF/local-test-framework.xml.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - trace - Retrieving
bean 'testDefaultConfiguration' of type 'java.util.Properties'.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Retrieved
bean 'testDefaultConfiguration' of type 'java.util.Properties'
[java.util.Properties].
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Loaded XML
Spring configuration for class 'net.kunye.test.TestBeanTest':
/META-INF/tests.xml.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - trace - Retrieving
bean 'testConfiguration' of type 'java.util.Properties'.
Fri Sep 11 09:28:12 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Retrieved
bean 'testConfiguration' of type 'java.util.Properties'
[java.util.Properties].
Initial Context Properties - Start
-- listing properties --
java.naming.factory.initial=org.apache.openejb.client.LocalInitia...
testPool.UserName=kms
testPool=new://Resource?type=DataSource
net.kunye.platform.tests.appclient.auth.admin.pass=kmsTESTpassword
net.kunye.platform.tests.appclient.auth.admin.username=testuser-admin
testPool.Password=kms
testPool.JdbcUrl=jdbc:postgresql://localhost:5432/test...
net.kunye.platform.tests.appclient.auth.lamp-room.username=testuser-lamproom
net.kunye.platform.tests.appclient.auth.lamp-room.pass=kmsTESTpassword
testPool.JdbcDriver=org.postgresql.Driver
Initial Context Properties - End
DEBUG - Using default 'openejb.nobanner=true'
Apache OpenEJB 3.1.2-SNAPSHOT build: 20090827-09:05
http://openejb.apache.org/
INFO -
********************************************************************************
OpenEJB http://openejb.apache.org/
Startup: 2009/09/11 9:28 AM
Copyright 1999-2008 (C) Apache OpenEJB Project, All Rights Reserved.
Version: 3.1.2-SNAPSHOT
Build date: 20090827
Build time: 09:05
********************************************************************************
INFO - openejb.home = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
INFO - openejb.base = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
DEBUG - Using default
'openejb.assembler=org.apache.openejb.assembler.classic.Assembler'
DEBUG - Instantiating assembler class
org.apache.openejb.assembler.classic.Assembler
DEBUG - Using default 'openejb.jndiname.failoncollision=true'
DEBUG - Using default
'openejb.configurator=org.apache.openejb.config.ConfigurationFactory'
DEBUG - Using default 'openejb.validation.skip=false'
DEBUG - Using default 'openejb.deploymentId.format={ejbName}'
DEBUG - Using default 'openejb.debuggable-vm-hackery=false'
DEBUG - Using default 'openejb.webservices.enabled=true'
DEBUG - Using default 'openejb.vendor.config=ALL' Possible values
are: geronimo, glassfish, jboss, weblogic or NONE or ALL
INFO - Cannot find the configuration file [conf/openejb.xml]. Will
attempt to create one for the beans deployed.
DEBUG - Using default 'openejb.provider.default=org.apache.openejb.embedded'
INFO - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=testPool, type=Resource,
provider-id=Default JDBC Database)
DEBUG - Override [Password=<hidden>]
DEBUG - Override [JdbcUrl=jdbc:postgresql://localhost:5432/test_kms]
DEBUG - Override [UserName=kms]
DEBUG - Override [JdbcDriver=org.postgresql.Driver]
DEBUG - Using default 'openejb.deployments.classpath=true'
DEBUG - Using default 'openejb.deployments.classpath.include='
DEBUG - Using default 'openejb.deployments.classpath.exclude=.*'
DEBUG - Using default 'openejb.deployments.classpath.require.descriptor=false'
DEBUG - Using default 'openejb.deployments.classpath.filter.descriptors=false'
DEBUG - Using default 'openejb.deployments.classpath.filter.systemapps=true'
DEBUG - Inspecting classpath for applications: 0 urls.
INFO - Found ClientModule in classpath:
/opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
INFO - Found ClientModule in classpath:
/opt/netbeans-6.7.1/java2/ant/lib/ant.jar
INFO - Found ClientModule in classpath:
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
INFO - Found ClientModule in classpath:
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
INFO - Found EjbModule in classpath:
/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
INFO - Found ClientModule in classpath:
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
INFO - Found EjbModule in classpath:
/home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar
DEBUG - URLs after filtering: 039
DEBUG - Descriptors path:
file:/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/test/classes/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/entitymanager-3.4.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/xbean-reflect-3.6-r779512.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/xbean-asm-shaded-3.6-r779512.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/XmlSchema-1.4.2.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/opensaml-1.1.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/core-3.3.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/jpa-3.0.jar!/
DEBUG - Descriptors path:
jar:file:/opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/dom4j-1.6.1.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/lib/commons-configuration-1.6.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/bcprov-jdk15-140.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/quartz-1.5.2.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/wss4j-1.5.4.jar!/
DEBUG - Descriptors path: jar:file:/opt/netbeans-6.7.1/java2/ant/lib/ant.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/jdbc/postgresql-8.3.jdbc3.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/slf4j-log4j12-1.5.5.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/lib/KunyeLib.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/annotations-3.4.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/commons-annotations-3.4.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/saaj-impl-1.3.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/antlr-2.7.6.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/neethi-2.0.4.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/lib/geronimo-security-2.2-SNAPSHOT.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/slf4j-api-1.5.5.jar!/
DEBUG - Descriptors path:
jar:file:/opt/netbeans-6.7.1/java2/ant/patches/72080.jar!/
DEBUG - Descriptors path: jar:file:/opt/antlr/lib/antlr-2.7.7.jar!/
DEBUG - Descriptors path:
file:/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar/
DEBUG - Descriptors path: jar:file:/opt/antlr/lib/stringtemplate-3.2.jar!/
DEBUG - Descriptors path:
file:/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/xmlsec-1.4.0.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/commons-dbcp-all-1.3-r699049.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar!/
DEBUG - Descriptors path: jar:file:/opt/antlr/lib/antlr-3.1.3.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/xbean-finder-shaded-3.6-r779512.jar!/
DEBUG - Descriptors path:
jar:file:/home/quintin/dev/kms/libs/junit-openejb/ejb31-api-experimental-3.1.2-SNAPSHOT.jar!/
DEBUG - Using default 'openejb.deployments.classpath.ear=true'
INFO - Beginning load: /opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@15623809
DEBUG - Destroying classLoaders for application
/opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
DEBUG - Releasing URLs for application
/opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
DEBUG - Clearing Sun JarFileFactory cache for directory
/opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
INFO - Beginning load: /opt/netbeans-6.7.1/java2/ant/lib/ant.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@22939763
DEBUG - Destroying classLoaders for application
/opt/netbeans-6.7.1/java2/ant/lib/ant.jar
DEBUG - Releasing URLs for application /opt/netbeans-6.7.1/java2/ant/lib/ant.jar
DEBUG - Clearing Sun JarFileFactory cache for directory
/opt/netbeans-6.7.1/java2/ant/lib/ant.jar
INFO - Beginning load:
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@8175078
DEBUG - Destroying classLoaders for application
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
DEBUG - Releasing URLs for application
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
DEBUG - Clearing Sun JarFileFactory cache for directory
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
INFO - Beginning load:
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@3408129
DEBUG - Destroying classLoaders for application
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
DEBUG - Releasing URLs for application
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
DEBUG - Clearing Sun JarFileFactory cache for directory
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
INFO - Beginning load:
/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@3022623
INFO - Beginning load:
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@7566193
DEBUG - Destroying classLoaders for application
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
DEBUG - Releasing URLs for application
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
DEBUG - Clearing Sun JarFileFactory cache for directory
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
INFO - Beginning load:
/home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Using default 'openejb.tempclassloader.skip=none' Possible
values are: none, annotations, enums or NONE or ALL
DEBUG - Destroying classLoader URLClassLoader@27263487
INFO - Configuring enterprise application: classpath.ear
DEBUG - No application-client.xml found assuming annotations present:
classpath.ear, module: ant-launcher.jar
DEBUG - No application-client.xml found assuming annotations present:
classpath.ear, module: ant.jar
DEBUG - No application-client.xml found assuming annotations present:
classpath.ear, module: ApplicationClientLib.jar
DEBUG - No application-client.xml found assuming annotations present:
classpath.ear, module: xml-resolver-1.2.jar
DEBUG - No application-client.xml found assuming annotations present:
classpath.ear, module: javassist-3.9.0.GA.jar
DEBUG - Searching for inherited application exceptions (see
OPENEJB-980) - it doesn't care whether inherited is true/false
DEBUG - Searching for inherited application exceptions (see
OPENEJB-980) - it doesn't care whether inherited is true/false
INFO - Auto-deploying ejb PersonnelBean:
EjbDeployment(deployment-id=PersonnelBean)
INFO - Auto-deploying ejb TestBean: EjbDeployment(deployment-id=TestBean)
INFO - Auto-deploying ejb SiteBean: EjbDeployment(deployment-id=SiteBean)
INFO - Auto-deploying ejb SpringContextBean:
EjbDeployment(deployment-id=SpringContextBean)
INFO - Auto-deploying ejb AdminBean: EjbDeployment(deployment-id=AdminBean)
INFO - Auto-deploying ejb StandardUserBean:
EjbDeployment(deployment-id=StandardUserBean)
INFO - Configuring Service(id=Default Stateless Container,
type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean PersonnelBean:
Container(type=STATELESS, id=Default Stateless Container)
INFO - Configuring PersistenceUnit(name=KMSPlatform-PU,
provider=org.hibernate.ejb.HibernatePersistence)
DEBUG - raw <jta-data-source>testPool</jta-datasource>
DEBUG - raw <non-jta-data-source>null</non-jta-datasource>
DEBUG - normalized <jta-data-source>testPool</jta-datasource>
DEBUG - normalized <non-jta-data-source>null</non-jta-datasource>
DEBUG - Available DataSources
DEBUG - DataSource(name=testPool, JtaManaged=true)
INFO - Auto-creating a Resource with id 'testPoolNonJta' of type
'DataSource for 'KMSPlatform-PU'.
INFO - Configuring Service(id=testPoolNonJta, type=Resource,
provider-id=testPool)
INFO - Adjusting PersistenceUnit KMSPlatform-PU <non-jta-data-source>
to Resource ID 'testPoolNonJta' from 'null'
DEBUG - Using default 'openejb.descriptors.output=false'
DEBUG - Using default 'openejb.descriptors.output=false'
DEBUG - Using default 'openejb.descriptors.output=false'
ERROR - FATAL ERROR: Unknown error in Assembler. Please send the
following stack trace and this message to users@openejb.apache.org :
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:502)
at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:111)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at net.kunye.platform.testing.LocalTestFramework.<init>(LocalTestFramework.java:72)
at net.kunye.test.TestBeanTest.setUpClass(TestBeanTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
FATAL - OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:292)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at net.kunye.platform.testing.LocalTestFramework.<init>(LocalTestFramework.java:72)
at net.kunye.test.TestBeanTest.setUpClass(TestBeanTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:502)
at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:111)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
... 31 more
On Fri, Sep 11, 2009 at 9:22 AM, Quintin Beukes <qu...@skywalk.co.za> wrote:
> OK. Let me check again.
>
> 1. I just ran a junit for a TestBean. It was successful.
> 2. I'm changing and doing a clean+build:
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> to
> <property name="hibernate.hbm2ddl.auto"/>
> 3. Rerun the test. Fails with the mentioned error. Below is my
> persistence.xml and full output:
> ------------------------
> CONFIG:
> ------------------------
> <?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="KMSPlatform-PU" transaction-type="JTA">
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>testPool</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="hibernate.dialect"
> value="org.hibernate.dialect.PostgreSQLDialect"/>
> <property name="hibernate.show_sql" value="true"/>
> <!--
> <property name="hibernate.cache.provider_class"
> value="org.hibernate.cache.NoCacheProvider"/>
> -->
> <property name="hibernate.hbm2ddl.auto"/>
> <property name="hibernate.transaction.manager_lookup_class"
> value="org.apache.openejb.hibernate.TransactionManagerLookup"/>
> </properties>
> </persistence-unit>
> </persistence>
>
> ------------------------
> OUTPUT:
> ------------------------
> log4j:WARN No appenders could be found for logger
> (org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
> log4j:WARN Please initialize the log4j system properly.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - trace - Retrieving
> bean 'propertyConfigurer' of type
> 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - debug - Retrieved
> bean 'propertyConfigurer' of type
> 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer].
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - debug - Created new
> Application Context.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - debug - Loaded XML
> Spring configuration for class
> 'net.kunye.platform.testing.LocalTestFramework':
> /META-INF/local-test-framework.xml.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - trace - Retrieving
> bean 'testDefaultConfiguration' of type 'java.util.Properties'.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - debug - Retrieved
> bean 'testDefaultConfiguration' of type 'java.util.Properties'
> [java.util.Properties].
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - debug - Loaded XML
> Spring configuration for class 'net.kunye.test.TestBeanTest':
> /META-INF/tests.xml.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - trace - Retrieving
> bean 'testConfiguration' of type 'java.util.Properties'.
> Fri Sep 11 09:18:33 SAST 2009 -
> net.kunye.platform.appclient.context.AppContext - debug - Retrieved
> bean 'testConfiguration' of type 'java.util.Properties'
> [java.util.Properties].
> Initial Context Properties - Start
> -- listing properties --
> java.naming.factory.initial=org.apache.openejb.client.LocalInitia...
> testPool.UserName=kms
> testPool=new://Resource?type=DataSource
> net.kunye.platform.tests.appclient.auth.admin.pass=kmsTESTpassword
> net.kunye.platform.tests.appclient.auth.admin.username=testuser-admin
> testPool.Password=kms
> testPool.JdbcUrl=jdbc:postgresql://localhost:5432/test...
> net.kunye.platform.tests.appclient.auth.lamp-room.username=testuser-lamproom
> net.kunye.platform.tests.appclient.auth.lamp-room.pass=kmsTESTpassword
> testPool.JdbcDriver=org.postgresql.Driver
> Initial Context Properties - End
> Apache OpenEJB 3.1.2-SNAPSHOT build: 20090827-09:05
> http://openejb.apache.org/
> INFO - openejb.home = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
> INFO - openejb.base = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
> INFO - Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Configuring Service(id=testPool, type=Resource,
> provider-id=Default JDBC Database)
> INFO - Found ClientModule in classpath:
> /opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
> INFO - Found ClientModule in classpath:
> /opt/netbeans-6.7.1/java2/ant/lib/ant.jar
> INFO - Found ClientModule in classpath:
> /home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
> INFO - Found ClientModule in classpath:
> /home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
> INFO - Found EjbModule in classpath:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
> INFO - Found ClientModule in classpath:
> /home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
> INFO - Found EjbModule in classpath:
> /home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar
> INFO - Beginning load: /opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
> INFO - Beginning load: /opt/netbeans-6.7.1/java2/ant/lib/ant.jar
> INFO - Beginning load:
> /home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
> INFO - Beginning load:
> /home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
> INFO - Beginning load:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
> INFO - Beginning load:
> /home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
> INFO - Beginning load:
> /home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar
> INFO - Configuring enterprise application: classpath.ear
> INFO - Configuring Service(id=Default Stateless Container,
> type=Container, provider-id=Default Stateless Container)
> INFO - Auto-creating a container for bean PersonnelBean:
> Container(type=STATELESS, id=Default Stateless Container)
> INFO - Configuring PersistenceUnit(name=KMSPlatform-PU,
> provider=org.hibernate.ejb.HibernatePersistence)
> INFO - Auto-creating a Resource with id 'testPoolNonJta' of type
> 'DataSource for 'KMSPlatform-PU'.
> INFO - Configuring Service(id=testPoolNonJta, type=Resource,
> provider-id=testPool)
> INFO - Adjusting PersistenceUnit KMSPlatform-PU <non-jta-data-source>
> to Resource ID 'testPoolNonJta' from 'null'
> ERROR - FATAL ERROR: Unknown error in Assembler. Please send the
> following stack trace and this message to users@openejb.apache.org :
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:502)
> at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:111)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
> at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
> at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
> at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.<init>(InitialContext.java:197)
> at net.kunye.platform.testing.LocalTestFramework.<init>(LocalTestFramework.java:72)
> at net.kunye.test.TestBeanTest.setUpClass(TestBeanTest.java:49)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
>
> FATAL - OpenEJB has encountered a fatal error and cannot be started:
> Assembler failed to build the container system.
> org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:292)
> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
> at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.<init>(InitialContext.java:197)
> at net.kunye.platform.testing.LocalTestFramework.<init>(LocalTestFramework.java:72)
> at net.kunye.test.TestBeanTest.setUpClass(TestBeanTest.java:49)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
> Caused by: java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:502)
> at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:111)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
> at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
> at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
> ... 31 more
>
>
> On Thu, Sep 10, 2009 at 11:35 PM, David Blevins <da...@visi.com> wrote:
>> This is strange as the parsing is done by JAXB and the related class looks
>> setup correctly:
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlType(name = "")
>> public class Property {
>>
>> @XmlAttribute(required = true)
>> protected String name;
>> @XmlAttribute(required = true)
>> protected String value;
>>
>> It should complain that you don't have the required attribute.
>>
>> -David
>>
>> On Sep 8, 2009, at 6:42 AM, Quintin Beukes wrote:
>>
>>> Hey,
>>>
>>> I can reproduce it everytime. All I have to do is leave out the value
>>> attribute.
>>>
>>> Q
>>>
>>> On Tue, Sep 8, 2009 at 2:06 PM, Jean-Louis MONTEIRO
>>> <je...@atosorigin.com> wrote:
>>>>
>>>> Hi Quintin,
>>>>
>>>> The specification only supports the second form.
>>>> Here is an extract from the specification:
>>>> <xsd:complexType>
>>>> <xsd:attribute name="name" type="xsd:string"
>>>> use="required"/>
>>>> <xsd:attribute name="value" type="xsd:string"
>>>> use="required"/>
>>>> </xsd:complexType>
>>>>
>>>>
>>>> Q Beukes wrote:
>>>>>
>>>>> I got the first one from an example. Can't recall where though, is it
>>>>> incorrect? If I think about it I've always used the 2nd form.
>>>>>
>>>> Please, if you find it again, let us know so we can fix it.
>>>>
>>>> Thanks in advance.
>>>> Jean-Louis
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Fwd%3A-A-Bug-in-OpenEJB--tp25313066p25344885.html
>>>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Quintin Beukes
>>>
>>
>>
>
>
>
> --
> Quintin Beukes
>
--
Quintin Beukes
Re: A Bug in OpenEJB?
Posted by Quintin Beukes <qu...@skywalk.co.za>.
OK. Let me check again.
1. I just ran a junit for a TestBean. It was successful.
2. I'm changing and doing a clean+build:
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
to
<property name="hibernate.hbm2ddl.auto"/>
3. Rerun the test. Fails with the mentioned error. Below is my
persistence.xml and full output:
------------------------
CONFIG:
------------------------
<?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="KMSPlatform-PU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>testPool</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.show_sql" value="true"/>
<!--
<property name="hibernate.cache.provider_class"
value="org.hibernate.cache.NoCacheProvider"/>
-->
<property name="hibernate.hbm2ddl.auto"/>
<property name="hibernate.transaction.manager_lookup_class"
value="org.apache.openejb.hibernate.TransactionManagerLookup"/>
</properties>
</persistence-unit>
</persistence>
------------------------
OUTPUT:
------------------------
log4j:WARN No appenders could be found for logger
(org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
log4j:WARN Please initialize the log4j system properly.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - trace - Retrieving
bean 'propertyConfigurer' of type
'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Retrieved
bean 'propertyConfigurer' of type
'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer].
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Created new
Application Context.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Loaded XML
Spring configuration for class
'net.kunye.platform.testing.LocalTestFramework':
/META-INF/local-test-framework.xml.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - trace - Retrieving
bean 'testDefaultConfiguration' of type 'java.util.Properties'.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Retrieved
bean 'testDefaultConfiguration' of type 'java.util.Properties'
[java.util.Properties].
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Loaded XML
Spring configuration for class 'net.kunye.test.TestBeanTest':
/META-INF/tests.xml.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - trace - Retrieving
bean 'testConfiguration' of type 'java.util.Properties'.
Fri Sep 11 09:18:33 SAST 2009 -
net.kunye.platform.appclient.context.AppContext - debug - Retrieved
bean 'testConfiguration' of type 'java.util.Properties'
[java.util.Properties].
Initial Context Properties - Start
-- listing properties --
java.naming.factory.initial=org.apache.openejb.client.LocalInitia...
testPool.UserName=kms
testPool=new://Resource?type=DataSource
net.kunye.platform.tests.appclient.auth.admin.pass=kmsTESTpassword
net.kunye.platform.tests.appclient.auth.admin.username=testuser-admin
testPool.Password=kms
testPool.JdbcUrl=jdbc:postgresql://localhost:5432/test...
net.kunye.platform.tests.appclient.auth.lamp-room.username=testuser-lamproom
net.kunye.platform.tests.appclient.auth.lamp-room.pass=kmsTESTpassword
testPool.JdbcDriver=org.postgresql.Driver
Initial Context Properties - End
Apache OpenEJB 3.1.2-SNAPSHOT build: 20090827-09:05
http://openejb.apache.org/
INFO - openejb.home = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
INFO - openejb.base = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
INFO - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=testPool, type=Resource,
provider-id=Default JDBC Database)
INFO - Found ClientModule in classpath:
/opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
INFO - Found ClientModule in classpath:
/opt/netbeans-6.7.1/java2/ant/lib/ant.jar
INFO - Found ClientModule in classpath:
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
INFO - Found ClientModule in classpath:
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
INFO - Found EjbModule in classpath:
/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
INFO - Found ClientModule in classpath:
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
INFO - Found EjbModule in classpath:
/home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar
INFO - Beginning load: /opt/netbeans-6.7.1/java2/ant/lib/ant-launcher.jar
INFO - Beginning load: /opt/netbeans-6.7.1/java2/ant/lib/ant.jar
INFO - Beginning load:
/home/quintin/dev/kms/KMSPlatform/ApplicationClientLib/dist/ApplicationClientLib.jar
INFO - Beginning load:
/home/quintin/dev/kms/libs/junit-openejb/xml-resolver-1.2.jar
INFO - Beginning load:
/home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
INFO - Beginning load:
/home/quintin/dev/kms/libs/hibernate/javassist-3.9.0.GA.jar
INFO - Beginning load:
/home/quintin/dev/kms/KMSPlatform/UnitTesting/dist/UnitTesting.jar
INFO - Configuring enterprise application: classpath.ear
INFO - Configuring Service(id=Default Stateless Container,
type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean PersonnelBean:
Container(type=STATELESS, id=Default Stateless Container)
INFO - Configuring PersistenceUnit(name=KMSPlatform-PU,
provider=org.hibernate.ejb.HibernatePersistence)
INFO - Auto-creating a Resource with id 'testPoolNonJta' of type
'DataSource for 'KMSPlatform-PU'.
INFO - Configuring Service(id=testPoolNonJta, type=Resource,
provider-id=testPool)
INFO - Adjusting PersistenceUnit KMSPlatform-PU <non-jta-data-source>
to Resource ID 'testPoolNonJta' from 'null'
ERROR - FATAL ERROR: Unknown error in Assembler. Please send the
following stack trace and this message to users@openejb.apache.org :
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:502)
at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:111)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at net.kunye.platform.testing.LocalTestFramework.<init>(LocalTestFramework.java:72)
at net.kunye.test.TestBeanTest.setUpClass(TestBeanTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
FATAL - OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:292)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at net.kunye.platform.testing.LocalTestFramework.<init>(LocalTestFramework.java:72)
at net.kunye.test.TestBeanTest.setUpClass(TestBeanTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:502)
at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:111)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
... 31 more
On Thu, Sep 10, 2009 at 11:35 PM, David Blevins <da...@visi.com> wrote:
> This is strange as the parsing is done by JAXB and the related class looks
> setup correctly:
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "")
> public class Property {
>
> @XmlAttribute(required = true)
> protected String name;
> @XmlAttribute(required = true)
> protected String value;
>
> It should complain that you don't have the required attribute.
>
> -David
>
> On Sep 8, 2009, at 6:42 AM, Quintin Beukes wrote:
>
>> Hey,
>>
>> I can reproduce it everytime. All I have to do is leave out the value
>> attribute.
>>
>> Q
>>
>> On Tue, Sep 8, 2009 at 2:06 PM, Jean-Louis MONTEIRO
>> <je...@atosorigin.com> wrote:
>>>
>>> Hi Quintin,
>>>
>>> The specification only supports the second form.
>>> Here is an extract from the specification:
>>> <xsd:complexType>
>>> <xsd:attribute name="name" type="xsd:string"
>>> use="required"/>
>>> <xsd:attribute name="value" type="xsd:string"
>>> use="required"/>
>>> </xsd:complexType>
>>>
>>>
>>> Q Beukes wrote:
>>>>
>>>> I got the first one from an example. Can't recall where though, is it
>>>> incorrect? If I think about it I've always used the 2nd form.
>>>>
>>> Please, if you find it again, let us know so we can fix it.
>>>
>>> Thanks in advance.
>>> Jean-Louis
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Fwd%3A-A-Bug-in-OpenEJB--tp25313066p25344885.html
>>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Quintin Beukes
>>
>
>
--
Quintin Beukes
Re: A Bug in OpenEJB?
Posted by Quintin Beukes <qu...@skywalk.co.za>.
I built a test case to prove the bug:
package org.apache.openejb.jee.jpa.unit;
import java.util.List;
public class Test
{
public static void main(String[] args) throws Exception
{
Persistence persistence =
JaxbPersistenceFactory.getPersistence(Test.class.getResource("/persistence.xml"));
Properties propertiesE =
persistence.getPersistenceUnit().get(0).getProperties();
List<Property> properties = propertiesE.getProperty();
for (Property prop : properties)
{
System.out.println("Prop: " + prop.getName() + " = " +
prop.getValue());
}
}
}
Running this with this unit:
<?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="KMSPlatform-PU" transaction-type="JTA">
<properties>
<property name="non-null-value" value="create-drop"/>
<property name="null-value"/>
</properties>
</persistence-unit>
</persistence>
Gives the following output:
Prop: non-null-value = create-drop
Prop: null-value = null
I got it to validate by adding the following code. When I do then it
only works if the value property is present. In other cases it gives
the exception the follows the code. for this to work you would have to
ship the XMLSchema file, which I know isn't ideal. I'm actually
confused as to why it doesn't use the annotations. But I know that the
Unmarshaller specifically says that validation is disabled if the
Schema object is null. So perhaps one needs to create a special schema
class instance, which constructs itself from the annotations?
Code to enable validation. Schema file from:
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
try
{
SchemaFactory schemaFactory =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema =
schemaFactory.newSchema(JaxbPersistenceFactory.class.getResource("/persistence_1_0.xsd"));
u.setSchema(schema);
}
catch (SAXException e)
{
}
Exception:
Exception in thread "main" javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'value'
must appear on element 'property'.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:481)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:199)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:120)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:103)
at org.apache.openejb.jee.jpa.unit.JaxbPersistenceFactory.getPersistence(JaxbPersistenceFactory.java:82)
at org.apache.openejb.jee.jpa.unit.Test.main(Test.java:9)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.4:
Attribute 'value' must appear on element 'property'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.addDefaultAttributes(XMLSchemaValidator.java:2859)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2041)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:685)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:549)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:73)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:101)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:195)
... 5 more
Quintin
On Thu, Sep 10, 2009 at 11:35 PM, David Blevins <da...@visi.com> wrote:
> This is strange as the parsing is done by JAXB and the related class looks
> setup correctly:
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "")
> public class Property {
>
> @XmlAttribute(required = true)
> protected String name;
> @XmlAttribute(required = true)
> protected String value;
>
> It should complain that you don't have the required attribute.
>
> -David
>
> On Sep 8, 2009, at 6:42 AM, Quintin Beukes wrote:
>
>> Hey,
>>
>> I can reproduce it everytime. All I have to do is leave out the value
>> attribute.
>>
>> Q
>>
>> On Tue, Sep 8, 2009 at 2:06 PM, Jean-Louis MONTEIRO
>> <je...@atosorigin.com> wrote:
>>>
>>> Hi Quintin,
>>>
>>> The specification only supports the second form.
>>> Here is an extract from the specification:
>>> <xsd:complexType>
>>> <xsd:attribute name="name" type="xsd:string"
>>> use="required"/>
>>> <xsd:attribute name="value" type="xsd:string"
>>> use="required"/>
>>> </xsd:complexType>
>>>
>>>
>>> Q Beukes wrote:
>>>>
>>>> I got the first one from an example. Can't recall where though, is it
>>>> incorrect? If I think about it I've always used the 2nd form.
>>>>
>>> Please, if you find it again, let us know so we can fix it.
>>>
>>> Thanks in advance.
>>> Jean-Louis
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Fwd%3A-A-Bug-in-OpenEJB--tp25313066p25344885.html
>>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Quintin Beukes
>>
>
>
--
Quintin Beukes
Re: A Bug in OpenEJB?
Posted by David Blevins <da...@visi.com>.
This is strange as the parsing is done by JAXB and the related class
looks setup correctly:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public class Property {
@XmlAttribute(required = true)
protected String name;
@XmlAttribute(required = true)
protected String value;
It should complain that you don't have the required attribute.
-David
On Sep 8, 2009, at 6:42 AM, Quintin Beukes wrote:
> Hey,
>
> I can reproduce it everytime. All I have to do is leave out the
> value attribute.
>
> Q
>
> On Tue, Sep 8, 2009 at 2:06 PM, Jean-Louis MONTEIRO
> <je...@atosorigin.com> wrote:
>>
>> Hi Quintin,
>>
>> The specification only supports the second form.
>> Here is an extract from the specification:
>> <xsd:complexType>
>> <xsd:attribute name="name" type="xsd:string"
>> use="required"/>
>> <xsd:attribute name="value" type="xsd:string"
>> use="required"/>
>> </xsd:complexType>
>>
>>
>> Q Beukes wrote:
>>>
>>> I got the first one from an example. Can't recall where though, is
>>> it
>>> incorrect? If I think about it I've always used the 2nd form.
>>>
>> Please, if you find it again, let us know so we can fix it.
>>
>> Thanks in advance.
>> Jean-Louis
>> --
>> View this message in context: http://www.nabble.com/Fwd%3A-A-Bug-in-OpenEJB--tp25313066p25344885.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Quintin Beukes
>
Re: A Bug in OpenEJB?
Posted by Quintin Beukes <qu...@skywalk.co.za>.
Hey,
I can reproduce it everytime. All I have to do is leave out the value attribute.
Q
On Tue, Sep 8, 2009 at 2:06 PM, Jean-Louis MONTEIRO
<je...@atosorigin.com> wrote:
>
> Hi Quintin,
>
> The specification only supports the second form.
> Here is an extract from the specification:
> <xsd:complexType>
> <xsd:attribute name="name" type="xsd:string"
> use="required"/>
> <xsd:attribute name="value" type="xsd:string"
> use="required"/>
> </xsd:complexType>
>
>
> Q Beukes wrote:
>>
>> I got the first one from an example. Can't recall where though, is it
>> incorrect? If I think about it I've always used the 2nd form.
>>
> Please, if you find it again, let us know so we can fix it.
>
> Thanks in advance.
> Jean-Louis
> --
> View this message in context: http://www.nabble.com/Fwd%3A-A-Bug-in-OpenEJB--tp25313066p25344885.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>
--
Quintin Beukes
Re: A Bug in OpenEJB?
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi Quintin,
The specification only supports the second form.
Here is an extract from the specification:
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string"
use="required"/>
<xsd:attribute name="value" type="xsd:string"
use="required"/>
</xsd:complexType>
Q Beukes wrote:
>
> I got the first one from an example. Can't recall where though, is it
> incorrect? If I think about it I've always used the 2nd form.
>
Please, if you find it again, let us know so we can fix it.
Thanks in advance.
Jean-Louis
--
View this message in context: http://www.nabble.com/Fwd%3A-A-Bug-in-OpenEJB--tp25313066p25344885.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: A Bug in OpenEJB?
Posted by Quintin Beukes <qu...@last.za.net>.
OK. After looking at the OpenEJB source, I think I found the problem.
I changed this property:
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
To:
<property name="hibernate.dialect"
value="org.hibernate.dialect.PostgreSQLDialect"/>
I got the first one from an example. Can't recall where though, is it
incorrect? If I think about it I've always used the 2nd form.
Q
On Sat, Sep 5, 2009 at 11:14 PM, Quintin Beukes <qu...@last.za.net> wrote:
> I tried a JUnit test and got the following. It first thought it might
> be that I didn't set the non-jta-data-source. But this didn't help. So
> what could cause this?
>
> My initialization code:
> Properties p = new Properties();
>
> p.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.apache.openejb.client.LocalInitialContextFactory");
>
> p.put("jdbc_kmsPool", "new://Resource?type=DataSource");
> p.put("jdbc_kmsPool.JdbcDriver", "org.postgresql.Driver");
> p.put("jdbc_kmsPool.JdbcUrl", "jdbc:postgresql://localhost:5432/test_kms");
> p.put("jdbc_kmsPool.UserName", "kms");
> p.put("jdbc_kmsPool.Password", "kms");
>
> p.put("hibernate.hbm2ddl.auto", "create-drop");
> p.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
>
> My 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="KMSPlatform-PU" transaction-type="JTA">
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>jdbc/kmsPool</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property
> name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
> <property name="hibernate.transaction.manager_lookup_class"
> value="net.kunye.persistence.GeronimoTransactionManagerLookup"/>
> </properties>
> </persistence-unit>
> </persistence>
>
> This is the output from the JUnit test:
> Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
> - Loading module configuration for: tests
> Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
> - Application root for operating system 'Linux' is: /opt/kms
> Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
> - Loading application configuration for: tests
> Sat Sep 05 23:05:26 SAST 2009 - net.kunye.configuration.Config - debug
> - Application root for operating system 'Linux' is: /opt/kms
> Apache OpenEJB 3.0 build: 20080408-04:13
> http://openejb.apache.org/
> INFO - openejb.home = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
> INFO - openejb.base = /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb
> INFO - Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> INFO - Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> INFO - Configuring Service(id=jdbc_kmsPool, type=Resource,
> provider-id=Default JDBC Database)
> INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
> type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
> INFO - Found EjbModule in classpath:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
> INFO - Configuring app:
> /home/quintin/dev/kms/KMSPlatform/KMSPlatform-ejb/build/jar
> INFO - Configuring Service(id=Default Stateless Container,
> type=Container, provider-id=Default Stateless Container)
> INFO - Auto-creating a container for bean PersonnelBean:
> Container(type=STATELESS, id=Default Stateless Container)
> INFO - Configuring PersistenceUnit(name=KMSPlatform-PU,
> provider=org.hibernate.ejb.HibernatePersistence)
> INFO - Auto-creating a Resource with id 'jdbc_kmsPoolNonJta' of type
> 'DataSource for 'KMSPlatform-PU'.
> INFO - Configuring Service(id=jdbc_kmsPoolNonJta, type=Resource,
> provider-id=jdbc_kmsPool)
> INFO - Adjusting KMSPlatform-PU <jta-data-source> to 'jdbc_kmsPool'
> INFO - Adjusting KMSPlatform-PU <non-jta-data-source> to 'jdbc_kmsPoolNonJta'
> ERROR - FATAL ERROR: Unknown error in Assembler. Please send the
> following stack trace and this message to user@openejb.org :
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:426)
> at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:95)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:443)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:391)
> at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:309)
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:249)
> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:267)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
> at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:40)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.<init>(InitialContext.java:197)
> at net.kunye.platform.appclient.test.LocalTestFramework.<init>(LocalTestFramework.java:39)
> at net.kunye.platform.personnel.PersonnelBeanTest.setUpClass(PersonnelBeanTest.java:50)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
>
> FATAL - OpenEJB has encountered a fatal error and cannot be started:
> Assembler failed to build the container system.
> org.apache.openejb.OpenEJBException: java.lang.NullPointerException: null
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:263)
> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:267)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
> at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
> at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:40)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.<init>(InitialContext.java:197)
> at net.kunye.platform.appclient.test.LocalTestFramework.<init>(LocalTestFramework.java:39)
> at net.kunye.platform.personnel.PersonnelBeanTest.setUpClass(PersonnelBeanTest.java:50)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
> at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
> Caused by: java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.openejb.config.AppInfoBuilder.buildPersistenceModules(AppInfoBuilder.java:426)
> at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:95)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:443)
> at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:391)
> at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:309)
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:249)
> ... 31 more
>
>
>
> --
> Quintin Beukes
>
>
>
> --
> Quintin Beukes
>
--
Quintin Beukes