[EJB 3.0] New message: "Re: Problem deploying EJB 3.0 jar to JBoss 5.0.1 GA"
by Viktor Halitsyn
User development,
A new message was posted in the thread "Problem deploying EJB 3.0 jar to JBoss 5.0.1 GA":
http://community.jboss.org/message/522285#522285
Author : Viktor Halitsyn
Profile : http://community.jboss.org/people/vhalitsyn
Message:
--------------------------------------------------------------
Hi again,
All errors gone for JBoss 5.1.0 GA. - EJB package deployed successfully.
However the very same setup fails on 5.0.1 GA which we are using extensively now.
*The final error is as follows*
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=model-ejb.jar,name=TestTableServiceImpl,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:jar=model-ejb.jar,name=TestTableServiceImpl,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **")
DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:jar=model-ejb.jar,name=TestTableServiceImpl,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **
*Previous errors on the stack*
14:22:17,761 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.ejb:persistencePolicy=database,service=EJBTimerService" is missing the following dependencies:
Dependency "jboss.jdbc:datasource=DefaultDS,service=metadata" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jdbc:datasource=DefaultDS,service=metadata' **")
Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")
Deployment "jboss.ejb:service=EJBTimerService" is missing the following dependencies:
Dependency "jboss.ejb:persistencePolicy=database,service=EJBTimerService" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=ConnectionFactoryBinding" is missing the following dependencies:
Dependency "jboss.jca:name=JmsXA,service=TxCM" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=ManagedConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=ManagedConnectionPool" is missing the following dependencies:
Dependency "jboss.jca:name=JmsXA,service=ManagedConnectionFactory" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=TxCM" is missing the following dependencies:
Dependency "jboss.jca:name=JmsXA,service=ManagedConnectionPool" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging:service=JMSUserManager" is missing the following dependencies:
Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")
Deployment "jboss.messaging:service=PersistenceManager" is missing the following dependencies:
Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")
Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging:service=ServerPeer" is missing the following dependencies:
Dependency "jboss.messaging:service=PersistenceManager" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=JMSUserManager" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.mq:service=DestinationManager" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss:service=KeyGeneratorFactory,type=HiLo" is missing the following dependencies:
Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")
Thanks.
DEPLOYMENTS IN ERROR:
Deployment "jboss.jca:name=DefaultDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **
Deployment "jboss.jdbc:datasource=DefaultDS,service=metadata" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jdbc:datasource=DefaultDS,service=metadata' **
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522285#522285
16 years, 2 months
[JBoss AOP] New message: "Problem with AOP arond advice in JBoss trunk"
by Andrew Dinn
User development,
A new message was posted in the thread "Problem with AOP arond advice in JBoss trunk":
http://community.jboss.org/message/522280#522280
Author : Andrew Dinn
Profile : http://community.jboss.org/people/adinn
Message:
--------------------------------------------------------------
I have been trying to revive on AS trunk the Web Service Transactions BAFramework demo which we last had working on AS 4.2.3. In doing so have come across what appears to be a problem with AOP. I don't have a _simple_ test case yet but by playing around with the code I have pinned the problem down.
My AOP advice binding is not being applied in a specific circumstance. This happens when the method belongs to an EJB and is annotated with a WebMethod annotation. In this case if I annotate the method with the BAMethod annotation AOP fails to apply the advice binding it. However, if I move the BAMethod annotation to a submethod called by the WebMethod then AOP respects the binding. Here, in brief, are the details of the failing and working cases:
This is the jboss-aop.xml
<aop xmlns="urn:jboss:aop-beans:1.0">
<!-- BA Processing Aspect -->
<aspect class="org.jboss.jbossts.baframework.aspect.TransactionProcessingAspect" scope="PER_INSTANCE"/>
<pointcut name="baMethodAnnotation" expr="execution(* *->@org.jboss.jbossts.baframework.annotation.BAMethod(..))"/>
<pointcut name="baDataManagementAnnotation" expr="field(org.jboss.jbossts.baframework.datamgmt.DataManager *->@org.jboss.jbossts.baframework.annotation.BADataManagement)"/>
<bind pointcut="baMethodAnnotation">
<advice name="process" aspect="org.jboss.jbossts.baframework.aspect.TransactionProcessingAspect"/>
</bind>
<bind pointcut="baDataManagementAnnotation">
<advice name="access" aspect="org.jboss.jbossts.baframework.aspect.TransactionProcessingAspect"/>
</bind>
</aop>
n.b. teh aspect class, TransactionProcessingAspect, implements methdos with the following signatures:
public Object process(MethodInvocation invocation) throws Throwable;
public Object access(FieldReadInvocation invocation) throws Throwable;
public Object access(FieldWriteInvocation invocation) throws Throwable;
Here is the web service implementation class te aspect should be applied to
@Stateless
@Remote(Hotel.class)
@WebService(name="Hotel")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@HandlerChain(file = "jaxws-handlers-server.xml")
@BAService(serviceClass=HotelImpl.class,ejbInterface=Hotel.class,jndiName="bademo/HotelImpl/remote")
public class HotelImpl implements Hotel
{
. . .
@WebMethod
@BAMethod(agreement=AgreementType.PARTICIPANT_COMPLETION)
@BACompensatedBy(value="cancelRoom",type=DataMatch.CUSTOM)
@BAResult("reservationNumber")
public Integer bookRoom(@BAParam("username")String username,@BAParam("password")String password, Integer roomNumber)
throws HotelCustomException, RoomAlreadyOccupiedException
{
log.info("bookRoom()");
hotelView.newMethod("bookRoom()");
hotelView.addMessage("Username: " + username);
. . .
This version of the code builds and boots up ok but AOP fails to call the aspect class's advice method, process(MethodInvocation invocation)
However, if I introduce an auxiliary method so that the web service target method becomes a wrapper and then split the annotations, applying the @WebMethod to the wrapper and the @BAMethod annotation to the auxiliary method, then my advice method does get called.
@WebMethod
public Integer bookRoom(String username, String password, Integer roomNumber)
throws HotelCustomException, RoomAlreadyOccupiedException
{
return bookRoomInternal(username, password, roomNumber);
}
@BAMethod(agreement=AgreementType.PARTICIPANT_COMPLETION)
@BACompensatedBy(value="cancelRoom",type=DataMatch.CUSTOM)
@BAResult("reservationNumber")
public Integer bookRoomInternal(@BAParam("username")String username,@BAParam("password")String password, Integer roomNumber)
throws HotelCustomException, RoomAlreadyOccupiedException
{
log.info("bookRoom()");
hotelView.newMethod("bookRoom()");
hotelView.addMessage("Username: " + username);
. . .
Any idea why AOP does not call process when both annotations are applied tot he service method?
If you need the full source I can provide it but it's a bit large and messy as it involves EJB, Web Servces and XTS (BA) code as well as the aspect code sketched above. I was hoping this description might be enough to allow you to identify what is wrong.
n.b. I am doing the AOP transform offline but I encountered the same failure using dynamic AOP. I have not yet seen whether inserting the auxiliary method fixes the dynamic AOP case.
regards,
Andrew Dinn
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522280#522280
16 years, 2 months
[JNDI and Naming] New message: "Re: Name lookup fails, reason unknown"
by Timothy Mowlem
User development,
A new message was posted in the thread "Name lookup fails, reason unknown":
http://community.jboss.org/message/522273#522273
Author : Timothy Mowlem
Profile : http://community.jboss.org/people/jvm
Message:
--------------------------------------------------------------
Peter,
I have pursued some investigation of whether it is a ClassLoader issue having read some other posts and linked pages. The full definition for the identity of a class is the combination of class loader + FQDN of the class.
(1) Display class info for a bean
I tried running http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=JM...
and doing a lookup of class info for MyFacade which gave:
MyFacade Information
Not loaded in repository cache
The context here was fixing a ClassCast due to the fact that classloaders were different when multiple instances of a class are present in the AS. You then two multiple entries when looking up class info. Presumably you expect a single entry for the class but I don't see any entry. Not sure if this is significant?
(2) Dump classloader names
I ran the client again and printed out the classloaders for returned object from the lookup.
Returned object from lookup:
classloader was null (which some implementations return to signify the bootstrap classloader)
Client interface being cast to (myFacade):
classloader was sun.misc.Launcher$AppClassLoader@<hex addr>
So this looks like it could be the problem?
Not sure whether this is a red herring and how to fix it?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522273#522273
16 years, 2 months
[JBoss Portal] New message: "Re: Long client id's for rich faces components in portlets"
by vineet tripathi
User development,
A new message was posted in the thread "Long client id's for rich faces components in portlets":
http://community.jboss.org/message/522270#522270
Author : vineet tripathi
Profile : http://community.jboss.org/people/vineet_tripathi
Message:
--------------------------------------------------------------
*Namespacing*
The bridge handles the namespacing combinations of JSF in the portal environment. In situations where you need to use the id of an element in your JSF/xhtml markup, you would normally see something like 'form1:myBtn' in the rendered markup. But now with the bridge namespacing you will see something similar to:
jbpns_2fdefault_2fNews_2fStories_2fStoryTemplateWindow12snpbj:_viewRoot:form1:myBtn
To overcome this, you can use the following expression in your Facelets page to prepend the namespace to your javascript code:
document.getElementById('#{facesContext.externalContext.response.namespace}the_rest_of_JSF_ID');
Please note that since this uses the portletResponse, once you try to view this page on the servlet application side you will get an exception. To avoid this, you need to check for the type of response in your backing bean and assign a new "safe" namespace variable for the UI.
Refer to: http://www.infoq.com/articles/jsf-ajax-seam-portlets-pt-1
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522270#522270
16 years, 2 months