[jboss-user] [JBoss Seam] - Integration Testing with TestNG and embeddedejb
romanschlegel@gmail.com
do-not-reply at jboss.com
Mon Sep 10 08:08:17 EDT 2007
Hi Experts
I've set up a TestNG integration test and most stuff works fine, but my Code can't grab the PojoCache because (I suspect) of this:
| DEBUG 10-09 13:17:52,636 (ServiceController.java:create:369) -Creating service jboss.cache:service=PojoCache
| DEBUG 10-09 13:17:52,636 (ServiceController.java:doChange:659) -Waiting in create of jboss.cache:service=PojoCache on jboss:service=Naming jboss:service=TransactionManager
| DEBUG 10-09 13:17:52,636 (ServiceController.java:start:409) -starting service jboss.cache:service=PojoCache
| DEBUG 10-09 13:17:52,636 (ServiceController.java:doChange:659) -Waiting in start of jboss.cache:service=PojoCache on
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/IntegrationTest.xml
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/UnitTest.xml
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/components.properties
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/dozerBeanMapping.xml
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/import.sql
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/jboss-aop.xml
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/messages_en.properties
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/seam-gen.reveng.xml
| DEBUG 10-09 13:17:52,636 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/seam.properties
| DEBUG 10-09 13:17:52,667 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/c:/test/test-build/security.drl
| FAILED CONFIGURATION: @BeforeClass init
| org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
|
| jboss.cache:service=PojoCache
| -> jboss:service=Naming{Create:** NOT FOUND **}
| -> jboss:service=Naming{Start:** NOT FOUND **}
|
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| jboss:service=Naming -> ** NOT FOUND **
|
|
| at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.java:151)
| at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
| at org.jboss.embedded.Bootstrap.deployResourceBase(Bootstrap.java:294)
| at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:923)
| at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| ... Removed 22 stack frames
|
I guess jboss-service.xml from test-bootstrap doesn't help here, but I'll post it anyway:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- $Id: jboss-service.xml 434 2007-09-07 06:16:07Z uwagner $ -->
|
| <!-- ===================================================================== -->
| <!-- JBoss Server Configuration -->
| <!-- ===================================================================== -->
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- Main Deployer -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.deployment.MainDeployer"
| name="jboss.system:service=MainDeployer">
| <!-- This is used to delegate the deployment handling -->
| <attribute name="KernelMainDeployer"><inject bean="MainDeployer" /></attribute>
| </mbean>
|
| <!-- ==================================================================== -->
| <!-- SAR Deployer -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.deployment.SARDeployer"
| name="jboss.system:service=ServiceDeployer">
| <depends>jboss.system:service=MainDeployer</depends>
| </mbean>
|
| <!-- ==================================================================== -->
| <!-- Security -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.security.plugins.SecurityConfig"
| name="jboss.security:service=SecurityConfig">
| <attribute name="LoginConfig">jboss.security:service=XMLLoginConfig</attribute>
| <depends>jboss.security:service=XMLLoginConfig</depends>
| </mbean>
| <mbean code="org.jboss.security.auth.login.XMLLoginConfig"
| name="jboss.security:service=XMLLoginConfig">
| <attribute name="ConfigResource">${jboss.embedded.bootstrap.resource.path}conf/login-config.xml</attribute>
| </mbean>
|
| <!-- JAAS security manager and realm mapping -->
| <mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
| name="jboss.security:service=JaasSecurityManager">
| <!-- A flag which indicates whether the SecurityAssociation server mode
| is set on service creation. This is true by default since the
| SecurityAssociation should be thread local for multi-threaded server
| operation.
| -->
| <attribute name="ServerMode">true</attribute>
| <attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
| <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute>
| <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
| in seconds.
| If you want to disable caching of security credentials, set this to 0 to
| force authentication to occur every time. This has no affect if the
| AuthenticationCacheJndiName has been changed from the default value.
| -->
| <attribute name="DefaultCacheTimeout">1800</attribute>
| <!-- DefaultCacheResolution: Specifies the default timed cache policy
| resolution in seconds. This controls the interval at which the cache
| current timestamp is updated and should be less than the DefaultCacheTimeout
| in order for the timeout to be meaningful. This has no affect if the
| AuthenticationCacheJndiName has been changed from the default value.
| -->
| <attribute name="DefaultCacheResolution">60</attribute>
| <!-- DeepCopySubjectMode: This set the copy mode of subjects done by the
| security managers to be deep copies that makes copies of the subject
| principals and credentials if they are cloneable. It should be set to
| true if subject include mutable content that can be corrupted when
| multiple threads have the same identity and cache flushes/logout clearing
| the subject in one thread results in subject references affecting other
| threads.
| -->
| <attribute name="DeepCopySubjectMode">false</attribute>
| </mbean>
|
| <!-- Authorization manager-->
| <mbean code="org.jboss.security.plugins.AuthorizationManagerService"
| name="jboss.security:service=AuthorizationManager">
| <attribute name="AuthorizationManagerClassName">org.jboss.security.plugins.JBossAuthorizationManager</attribute>
| </mbean>
|
| <!-- ==================================================================== -->
| <!-- Transactions -->
| <!-- ==================================================================== -->
| <!-- The configurable Xid factory. For use with Oracle, set pad to true -->
| <mbean code="org.jboss.tm.XidFactory"
| name="jboss:service=XidFactory">
| <!--attribute name="Pad">true</attribute-->
| </mbean>
|
| <!--
| | The fast in-memory transaction manager.
| | Deprecated in 5.0. Use JBossTS JTA instead.
| <mbean code="org.jboss.tm.TransactionManagerService"
| name="jboss:service=TransactionManager"
| xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
| <attribute name="TransactionTimeout">300</attribute>
| <attribute name="XARetryTimeout">60</attribute>
| <attribute name="PreparedTimeout">60</attribute>
| <attribute name="GlobalIdsEnabled">true</attribute>
| <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
| </mbean>
| -->
|
|
| <!-- JBossTS JTA -->
| <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
| name="jboss:service=TransactionManager">
| <attribute name="TransactionTimeout">300</attribute>
| </mbean>
|
| <mbean code="org.jboss.util.threadpool.BasicThreadPool"
| name="jboss.jca:service=WorkManagerThreadPool">
| <!-- The name that appears in thread names -->
| <attribute name="Name">WorkManager</attribute>
| <!-- The maximum amount of work in the queue -->
| <attribute name="MaximumQueueSize">1024</attribute>
| <!-- The maximum number of active threads -->
| <attribute name="MaximumPoolSize">100</attribute>
| <!-- How long to keep threads alive after their last work (default one minute) -->
| <attribute name="KeepAliveTime">60000</attribute>
| </mbean>
|
| <mbean code="org.jboss.resource.work.JBossWorkManager"
| name="jboss.jca:service=WorkManager">
| <depends optional-attribute-name="ThreadPoolName">jboss.jca:service=WorkManagerThreadPool</depends>
| <depends optional-attribute-name="XATerminatorName">jboss:service=TransactionManager</depends>
| </mbean>
|
| <!--
| | The CachedConnectionManager is used partly to relay started UserTransactions to
| | open connections so they may be enrolled in the new tx.
| -->
| <mbean code="org.jboss.resource.connectionmanager.CachedConnectionManager"
| name="jboss.jca:service=CachedConnectionManager">
| <depends optional-attribute-name="TransactionManagerServiceName">jboss:service=TransactionManager</depends>
|
| <!-- Enable connection close debug monitoring -->
| <attribute name="Debug">true</attribute>
|
| </mbean>
|
| <mbean code="org.jboss.naming.JNDIView"
| name="jboss:service=JNDIView"
| xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">
| <!-- The HANamingService service name -->
| <attribute name="HANamingService">jboss:service=HAJNDI</attribute>
| </mbean>
|
| </server>
|
I am using
JDK 1.5.0_12, Jboss 4.2.0GA, Ant 1.7.0, TestNG 5.6
Many thanks for your advice,
Roman
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082580#4082580
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082580
More information about the jboss-user
mailing list