This content has been marked as final.
Show 2 replies
-
1. Re: problem configuring testNG [verbose]
nico.ben Apr 25, 2006 8:48 AM (in response to nico.ben)Hi !
I had some improvments, but still error.
In summary I:1) added to my project embedded-ejb/lib
2) added to my project microcontainer/lib
3) added to my project embedded-ejb/conf
4) added my resource dir, containing META-INF/jboss-beans.xml, persistence.xml, application.xml, jboss-app.xml (but I think only the first 2 ones are needed)
5) added testng.jar
embedded-jboss-beans.xml and jboss-beans.xml contain:<bean name="DefaultDSBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">org.hsqldb.jdbcDriver</property> <property name="connectionURL">jdbc:hsqldb:.</property> <property name="userName">sa</property> <property name="jndiName">java:/DefaultDS</property> <property name="minSize">0</property> <property name="maxSize">10</property> <property name="blockingTimeout">1000</property> <property name="idleTimeout">100000</property> <property name="transactionManager"><inject bean="TransactionManager"/></property> <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="DefaultDS" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="DefaultDSBootstrap"/> </constructor> </bean>
When I launch a testNG I get the following error:
INFO 25-04 14:42:41,411 (Initialization.java:loadFromResource:123) -reading properties from: /seam.properties
INFO 25-04 14:42:41,421 (Initialization.java:loadFromResource:123) -reading properties from: /seam-jndi.properties
INFO 25-04 14:42:41,431 (Initialization.java:init:90) -initializing Seam
INFO 25-04 14:42:41,481 (Component.java:<init>:168) -Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
INFO 25-04 14:42:41,712 (Component.java:<init>:168) -Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
INFO 25-04 14:42:41,732 (Component.java:<init>:168) -Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
INFO 25-04 14:42:41,862 (Component.java:<init>:168) -Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
INFO 25-04 14:42:41,872 (Component.java:<init>:168) -Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
INFO 25-04 14:42:41,882 (Component.java:<init>:168) -Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationList
INFO 25-04 14:42:41,902 (Component.java:<init>:168) -Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
INFO 25-04 14:42:41,912 (Component.java:<init>:168) -Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
INFO 25-04 14:42:41,922 (Component.java:<init>:168) -Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
INFO 25-04 14:42:41,952 (Component.java:<init>:168) -Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
INFO 25-04 14:42:41,962 (Component.java:<init>:168) -Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
INFO 25-04 14:42:41,972 (Component.java:<init>:168) -Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
INFO 25-04 14:42:41,982 (Component.java:<init>:168) -Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
INFO 25-04 14:42:41,982 (Component.java:<init>:168) -Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
INFO 25-04 14:42:42,002 (Component.java:<init>:168) -Component: resourceBundle, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle
INFO 25-04 14:42:42,032 (Component.java:<init>:168) -Component: org.jboss.seam.debug.introspector, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.debug.Introspector
INFO 25-04 14:42:42,082 (ResourceBundle.java:loadBundle:62) -resource bundle missing: messages
INFO 25-04 14:42:42,172 (Component.java:<init>:168) -Component: org.jboss.seam.debug.contexts, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.debug.Contexts
INFO 25-04 14:42:42,192 (Component.java:<init>:168) -Component: org.jboss.seam.core.microcontainer, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Microcontainer
INFO 25-04 14:42:42,212 (Component.java:<init>:168) -Component: loginDatabase, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
INFO 25-04 14:42:42,222 (Scanner.java:getClasses:75) -scanning: C:\Eclipse\neutwork\bin
INFO 25-04 14:42:42,262 (Component.java:<init>:168) -Component: login, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: it.benamiles.action.LoginAction, JNDI: LoginAction/local
INFO 25-04 14:42:42,303 (Component.java:<init>:168) -Component: user, scope: SESSION, type: ENTITY_BEAN, class: it.benamiles.entity.User
INFO 25-04 14:42:42,333 (Component.java:<init>:168) -Component: changePassword, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: it.benamiles.action.ChangePasswordAction, JNDI: ChangePasswordAction/local
INFO 25-04 14:42:42,373 (Component.java:<init>:168) -Component: logout, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: it.benamiles.action.LogoutAction, JNDI: LogoutAction/local
WARN 25-04 14:42:43,695 (BeanSchemaBinding.java:init:227) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
java.lang.IllegalStateException: Incompletely deployed:
*** DEPLOYMENTS MISSING DEPENDENCIES:
DefaultDS -> DefaultDSBootstrap{Instantiated:Instantiated}
DefaultDSBootstrap -> TransactionManager{Configured:NOT FOUND}, CachedConnectionManager{Configured:NOT FOUND}, InitialContextProperties{Configured:NOT FOUND}
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:241)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161)
at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap.bootstrap(StandaloneBootstrap.java:90)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:91)
at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap.main(StandaloneBootstrap.java:54)
at org.jboss.seam.core.Microcontainer.startup(Microcontainer.java:28)
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:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
at org.jboss.seam.Component.callComponentMethod(Component.java:1119)
at org.jboss.seam.Component.callCreateMethod(Component.java:1107)
at org.jboss.seam.Component.newInstance(Component.java:1096)
at org.jboss.seam.Component.getInstance(Component.java:1044)
at org.jboss.seam.Component.getInstance(Component.java:1027)
at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:88)
at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:68)
at org.jboss.seam.init.Initialization.init(Initialization.java:94)
at org.jboss.seam.mock.SeamTest.init(SeamTest.java:247)
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:585)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:318)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:152)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:88)
at org.testng.TestRunner.privateRun(TestRunner.java:682)
at org.testng.TestRunner.run(TestRunner.java:566)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:220)
at org.testng.SuiteRunner.run(SuiteRunner.java:146)
at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:98)
at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
FAILED: init
java.lang.IllegalStateException: Incompletely deployed:
*** DEPLOYMENTS MISSING DEPENDENCIES:
DefaultDS -> DefaultDSBootstrap{Instantiated:Instantiated}
DefaultDSBootstrap -> TransactionManager{Configured:NOT FOUND}, CachedConnectionManager{Configured:NOT FOUND}, InitialContextProperties{Configured:NOT FOUND}
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:241)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161)
at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap.bootstrap(StandaloneBootstrap.java:90)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:91)
at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap.main(StandaloneBootstrap.java:54)
at org.jboss.seam.core.Microcontainer.startup(Microcontainer.java:28)
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:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
at org.jboss.seam.Component.callComponentMethod(Component.java:1119)
at org.jboss.seam.Component.callCreateMethod(Component.java:1107)
at org.jboss.seam.Component.newInstance(Component.java:1096)
at org.jboss.seam.Component.getInstance(Component.java:1044)
at org.jboss.seam.Component.getInstance(Component.java:1027)
at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:88)
at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:68)
at org.jboss.seam.init.Initialization.init(Initialization.java:94)
at org.jboss.seam.mock.SeamTest.init(SeamTest.java:247)
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:585)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:318)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:152)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:88)
at org.testng.TestRunner.privateRun(TestRunner.java:682)
at org.testng.TestRunner.run(TestRunner.java:566)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:220)
at org.testng.SuiteRunner.run(SuiteRunner.java:146)
at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:98)
at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
SKIPPED: begin
SKIPPED: end
SKIPPED: testLogin
SKIPPED: cleanup
What kind of dependencies does it complain of ?
Thank you,
Nico -
2. Re: problem configuring testNG
gavin.king Apr 25, 2006 10:44 AM (in response to nico.ben)You are supposed to be using the embedded-jboss-beans.xml that ships in the embedded-ejb/conf directory, not writing your own!