[JBoss Seam] - configuring integration testing with TestNG in eclipse
by matt.drees
I seam-gened a new empty project, and then created a simple action (seam new-action) called RegisterAction. I could right-click on the RegisterTest file and run TestNG, and it would pass.
If I add
| @PersistenceContext
| private EntityManager em;
|
to RegisterAction.java, the test fails with "NameNotFoundException: RegisterAction not bound".
If I run the test through ant (command line or eclipse), it passes.
Visually comparing the eclipse output with the ant output, the only difference I saw was that the ant output has an extra 3 lines:
| [testng] 02:06:35,705 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=test-build,name=RegisterAction,service=EJB3 with dependencies:
| [testng] 02:06:35,705 INFO [MCKernelAbstraction] AbstractDependencyMetaData@9722c9{dependency=persistence.units:jar=test-build.jar,unitName=integrationtest}
| [testng] 02:06:35,736 INFO [EJBContainer] STARTED EJB: org.uscm.integrationtest.RegisterAction ejbName: RegisterAction
|
So apparently RegisterAction isn't getting installed as an EJB.
Does anyone know why that might be?
I'm using seam from cvs (head).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007370#4007370
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007370
19 years, 2 months
[JBoss Getting Started Documentation] - Re: User not found: SA
by sai_nukala
The possible reason could be that your script is deleted..
Make sure if you valid "localDB.script" file under $JBOSS_HOME/server/all/data/hypersonic and it should not be empty;;
Here is the script from 4.0.3 SP1 on windows:
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE TIMERS(TIMERID VARCHAR(80) NOT NULL,TARGETID VARCHAR(80) NOT NULL,INITIALDATE TIMESTAMP NOT NULL,TIMERINTERVAL BIGINT,INSTANCEPK VARBINARY,INFO VARBINARY,CONSTRAINT TIMERS_PK PRIMARY KEY(TIMERID,TARGETID))
CREATE MEMORY TABLE JMS_USERS(USERID VARCHAR(32) NOT NULL PRIMARY KEY,PASSWD VARCHAR(32) NOT NULL,CLIENTID VARCHAR(128))
CREATE MEMORY TABLE JMS_ROLES(ROLEID VARCHAR(32) NOT NULL,USERID VARCHAR(32) NOT NULL,PRIMARY KEY(USERID,ROLEID))
CREATE MEMORY TABLE JMS_SUBSCRIPTIONS(CLIENTID VARCHAR(128) NOT NULL,SUBNAME VARCHAR(128) NOT NULL,TOPIC VARCHAR(255) NOT NULL,SELECTOR VARCHAR(255),PRIMARY KEY(CLIENTID,SUBNAME))
CREATE CACHED TABLE JMS_MESSAGES(MESSAGEID INTEGER NOT NULL,DESTINATION VARCHAR(255) NOT NULL,TXID INTEGER,TXOP CHAR(1),MESSAGEBLOB OBJECT,PRIMARY KEY(MESSAGEID,DESTINATION))
CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES(TXOP,TXID)
CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES(DESTINATION)
CREATE CACHED TABLE JMS_TRANSACTIONS(TXID INTEGER NOT NULL PRIMARY KEY)
CREATE MEMORY TABLE HILOSEQUENCES(SEQUENCENAME VARCHAR(50) NOT NULL,HIGHVALUES INTEGER NOT NULL,CONSTRAINT HILO_PK PRIMARY KEY(SEQUENCENAME))
SET TABLE JMS_MESSAGES INDEX'1936 1936 1936 0'
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 20
SET SCHEMA PUBLIC
INSERT INTO JMS_USERS VALUES('dynsub','dynsub',NULL)
INSERT INTO JMS_USERS VALUES('guest','guest',NULL)
INSERT INTO JMS_USERS VALUES('j2ee','j2ee',NULL)
INSERT INTO JMS_USERS VALUES('john','needle','DurableSubscriberExample')
INSERT INTO JMS_USERS VALUES('nobody','nobody',NULL)
INSERT INTO JMS_ROLES VALUES('durpublisher','dynsub')
INSERT INTO JMS_ROLES VALUES('publisher','dynsub')
INSERT INTO JMS_ROLES VALUES('guest','guest')
INSERT INTO JMS_ROLES VALUES('j2ee','guest')
INSERT INTO JMS_ROLES VALUES('john','guest')
INSERT INTO JMS_ROLES VALUES('durpublisher','john')
INSERT INTO JMS_ROLES VALUES('publisher','john')
INSERT INTO JMS_ROLES VALUES('subscriber','john')
INSERT INTO JMS_ROLES VALUES('noacc','nobody')
INSERT INTO HILOSEQUENCES VALUES('general',0)
Hope this helps..You might have to confirm if index is ok...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007351#4007351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007351
19 years, 2 months