[EJB 3.0 Users] - Re: Session EJB and MDB Configuration
by kyle.bober
Yup, the mydomain-aop.xml file is definetly present in the META-INF directory. Here is the contents of the jar as you requested.
META-INF/
META-INF/MANIFEST.MF
com/
com/thesearchagency/
com/thesearchagency/service/
com/thesearchagency/service/kat/
com/thesearchagency/service/kat/adapter/
com/thesearchagency/service/kat/impl/
com/thesearchagency/service/kat/jmx/
com/thesearchagency/service/kat/mdb/
com/thesearchagency/service/kat/model/
com/thesearchagency/service/kat/report/
com/thesearchagency/service/kat/util/
com/thesearchagency/service/kat/util/manager/
com/thesearchagency/service/kat/util/parser/
com/thesearchagency/service/kat/validator/
com/thesearchagency/service/kat/adapter/IKATDataServiceAdapter.class
com/thesearchagency/service/kat/adapter/KATDataWSAdapter.class
com/thesearchagency/service/kat/adapter/KATDataWSAdapterException.class
com/thesearchagency/service/kat/IKATReportDeleteTimerService.class
com/thesearchagency/service/kat/IKATReportLocal.class
com/thesearchagency/service/kat/IKATReportProcessTimerService.class
com/thesearchagency/service/kat/IKATReportRemote.class
com/thesearchagency/service/kat/IKATReportWS.class
com/thesearchagency/service/kat/impl/KATReportDeleteTimerService.class
com/thesearchagency/service/kat/impl/KATReportEJB.class
com/thesearchagency/service/kat/impl/KATReportProcessTimerService.class
com/thesearchagency/service/kat/impl/KATReportWS.class
com/thesearchagency/service/kat/jmx/IKATReportServiceJMX.class
com/thesearchagency/service/kat/jmx/KATReportServiceJMX.class
com/thesearchagency/service/kat/jmx/KATReportServiceJMXException.class
com/thesearchagency/service/kat/KATReportServiceException.class
com/thesearchagency/service/kat/mdb/KATReportTopicCourier.class
com/thesearchagency/service/kat/mdb/KATReportTopicException.class
com/thesearchagency/service/kat/mdb/KATReportTopicListener.class
com/thesearchagency/service/kat/model/KATReportDeleteTimer.class
com/thesearchagency/service/kat/model/KATReportProcessTimer.class
com/thesearchagency/service/kat/model/KeywordAnalysisDeleteCriteria.class
com/thesearchagency/service/kat/report/KATExactMatchReport.class
com/thesearchagency/service/kat/TransactionException.class
com/thesearchagency/service/kat/TSABaseEJB.class
com/thesearchagency/service/kat/TSABaseWS.class
com/thesearchagency/service/kat/util/manager/ExcelPOIManager.class
com/thesearchagency/service/kat/util/manager/JTAManager.class
com/thesearchagency/service/kat/util/manager/KATReportManager.class
com/thesearchagency/service/kat/util/manager/KATReportManagerException.class
com/thesearchagency/service/kat/util/manager/KATReportMappingManager.class
com/thesearchagency/service/kat/util/manager/KATReportPersistenceManager.class
com/thesearchagency/service/kat/util/manager/KATReportPersistentManagerException.class
com/thesearchagency/service/kat/util/parser/KATReportExcelDOMParser.class
com/thesearchagency/service/kat/util/parser/KATReportExcelDOMParserException.class
com/thesearchagency/service/kat/util/PropertyLoader.class
com/thesearchagency/service/kat/util/ServiceLocator.class
com/thesearchagency/service/kat/ValidationException.class
com/thesearchagency/service/kat/validator/AnnotationValidator.class
dozerBeanMapping.xml
META-INF/jboss.xml
META-INF/mydomain-aop.xml
web-services.properties
META-INF/maven/
META-INF/maven/com.thesearchagency.service/
META-INF/maven/com.thesearchagency.service/service-kat-ejb/
META-INF/maven/com.thesearchagency.service/service-kat-ejb/pom.xml
META-INF/maven/com.thesearchagency.service/service-kat-ejb/pom.properties
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254444#4254444
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254444
15 years, 4 months
[JNDI and Naming] - ejb-ref lookup does not work in JBoss 4.2.0.GA_CP07
by ghepardo
Hi,
I am using JBoss 4.2.0.GA_CP07 with ear-isolation = true and call-by-value=false
I have the following situation:
ejb A needs to call ejb B, and both are in different isolated EARs.
To do this, as stated on the JBoss community wiki's:
http://www.jboss.org/community/wiki/classloadingconfiguration
I have to configure ejb-jar.xml and jboss.xml of ejb A with references to ejb b.
So, these are my configuration files:
ejb A = TISService
ejb B = GTSService
ejb-jar.xml of ejb A
| ...
| <enterprise-beans>
| <session>
| <display-name>TISService</display-name>
| <ejb-name>TISService</ejb-name>
| <home>it.ltm.ca.tis.session.TISServiceHome</home>
| <remote>it.ltm.ca.tis.session.TISServiceRemote</remote>
| <local-home>it.ltm.ca.tis.session.TISServiceLocalHome</local-home>
| <local>it.ltm.ca.tis.session.TISServiceLocal</local>
| <ejb-class>it.ltm.ca.tis.session.TISServiceBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
|
| <!-- RIFERIMENTO AL GTS -->
| <ejb-local-ref>
| <ejb-ref-name>ejb/KCP_GTSServiceLocalReference</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local-home>it.ltm.kcp.gts.session.GTSServiceLocalHome</local-home>
| <local>it.ltm.kcp.gts.session.GTSServiceLocal</local>
| </ejb-local-ref>
|
| </session>
| ...
| [/CODE]
|
| jboss.xml of ejb A
| [CODE]
| ...
| <jboss>
| <enterprise-beans>
| <session>
| <ejb-name>TISService</ejb-name>
| <jndi-name>ejb/TISService</jndi-name>
| <local-jndi-name>java:/ejb/TISService</local-jndi-name>
|
| <!-- RIFERIMENTO AL GTS -->
| <ejb-local-ref>
| <ejb-ref-name>ejb/KCP_GTSServiceLocalReference</ejb-ref-name>
| <local-jndi-name>java:/ejb/KCP_GTSService</local-jndi-name>
| </ejb-local-ref>
| </session>
| ...
|
This is the code I am using to lookup ejb B from a class in ejb A (taken from an example in the JBoss UserGuide):
| Context ctx = (Context) new InitialContext().lookup("java:comp/env"
| GTSServiceLocalHome local = (GTSServiceLocalHome) ctx.lookup("ejb/KCP_GTSServiceLocalReference"); //I am using the <ejb-ref-name> as the lookup String.
| GTSService instance = local.create();
|
The problem is that the lookup of the ejb-ref fails.
If I try to lookup the JNDI name of the EJB, the lookup succeed, but the create fails with "Invalid invocation, check your deployment..." because it is trying to create an instance of ejb B that is in an isolated ear.
Can someone help me?
Why the lookup of the ejb-ref-name fails?
The main problem is that the ejb-ref-name (ie: ejb/KCP_GTSServiceLocalReference)
is present in the JNDI Tree:
| Ejb Module: CA_TerminalInteractionSystemEJB.jar
|
| java:comp namespace of the TISService bean:
|
| +- HandleDelegate (class: org.jboss.proxy.ejb.handle.HandleDelegateImpl)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
| | +- ejb (class: org.jnp.interfaces.NamingContext)
| | | +- KCP_GTSServiceReference[link -> ejb/KCP_GTSService] (class: javax.naming.LinkRef)
| | | +- KCP_GTSServiceLocalReference[link -> java:/ejb/KCP_GTSService] (class: javax.naming.LinkRef)
|
I hope to get an answer, I am really blocked here. Thanks
Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254439#4254439
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254439
15 years, 4 months
[Security] - Re: NullPointerException @ DatabaseServerLoginModule.java:14
by mactex
I get exactly the same error message when trying to use the Databaseserver loginmodule. I use JBoss 4.2.3. In the log there is the following:
javax.security.auth.login.LoginException: java.lang.NullPointerException
| at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:141)
| at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:206)
|
It seems from the source file, that the Datasource returned is null. It's the following source in the login module:
InitialContext ctx = new InitialContext();
| DataSource ds = (DataSource) ctx.lookup(dsJndiName);
| conn = ds.getConnection();
|
I configured everything from the documentation.
login-config.xml:
<application-policy name = "nedbDbLogin">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
| flag="required">
| <module-option name="dsJndiName">java:jdbc/bavnedb</module-option>
| <!--<module-option name="hashAlgorithm">MD5</module-option>
| <module-option name="hashEncoding">base64</module-option> -->
| <module-option name="principalsQuery">
| select password from USER where LOGIN_ID=?</module-option>
| <module-option name="rolesQuery">
| select 'Nedb_User', 'Roles' from USER where LOGIN_ID=?</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
jboss-web.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-web>
| <security-domain>java:/jaas/nedbDbLogin</security-domain>
| </jboss-web>
The code for the programmatic login:
| UsernamePasswordHandler handler = new UsernamePasswordHandler(userId, password);
|
| LoginContext loginContext = new LoginContext(LOGIN_CONTEXT,
| (CallbackHandler) handler);
| loginContext.login();
|
Do you have any idea what can be wrong?
Thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254426#4254426
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254426
15 years, 4 months