Adventure Builder 1.0.4 Service not found exception in Genonimo 1.1
Hello, I tried to port Adventure Builder 1.0.4 to Geronimo 1.1 but failed. I started from the Adventure Builder 1.0.3's deplopyment file for Geronimo 1.0 by Jacek from http://issues.apache.org/jira/browse/GERONIMO-1164 I made some changes to the deployment files to make the deployment process happy. The customer web site could be sucessfully started, but at the final step, after pressing submit. I will get an error com.sun.j2ee.blueprints.waf.controller.web.html.HTMLActionException: CheckoutHTMLAction Exception : (404)/consumer/foo/pi Checking the geronimo.out reveals that the /consumer/foo/po can not be found is the root cause of the error. I wonder if anybody here has some experience on this. The deployment plan is attached. BTW, I have problems in accessing the wiki pages of Adventure Builder: http://wiki.apache.org/geronimo/AdventureBuilder thanks a lot for your help! Wenguang http://www.nabble.com/file/p11095754/plan.tar.gz plan.tar.gz (404)/consumer/foo/po at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366)at org.apache.geronimo.axis.client.ServiceEndpointMethodInterceptor.intercept(ServiceEndpointMethodInterceptor.java:92) at org.apache.geronimo.axis.client.GenericServiceEndpointWrapper$$EnhancerByCGLIB$$b2f13e74.submitPurchaseOrder(generated) at com.sun.j2ee.blueprints.consumerwebsite.actions.CheckoutHTMLAction.buildPurchaseOrder(Unknown Source) at com.sun.j2ee.blueprints.consumerwebsite.actions.CheckoutHTMLAction.perform(Unknown Source) at com.sun.j2ee.blueprints.waf.controller.web.html.HTMLActionSupport.perform(Unknown Source) at com.sun.j2ee.blueprints.waf.controller.web.RequestProcessor.processRequest(Unknown Source) at com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doProcess(Unknown Source) at com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:615) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.sun.j2ee.blueprints.signon.web.SignOnFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) .. http://www.nabble.com/file/p11095754/plan.tar.gz plan.tar.gz -- View this message in context: http://www.nabble.com/Adventure-Builder-1.0.4-Service-not-found-exception-in-Genonimo-1.1-tf3913522s134.html#a11095754 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Help needed in creating enterprise application deployment plan
Did you see these docs http://cwiki.apache.org/GMOxDOC11/deployment-plans.html There are also some sample apps here http://cwiki.apache.org/GMOxDOC11/sample-applications.html HTH Cheers! Hernan krishj wrote: Hi, I am new to WAS CE. i have given a job of deploying EJB application in WASCE. But i am not sure about how to prepare the deployment plan. i used WSAD for developing the application. it generated 3 xml files. 1.application.xml 2.ejb-jar.xml 3.web.xml Now i need to write geronimo-application.xml can anyone help me on this ? application.xml file: !DOCTYPE application PUBLIC -//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN http://java.sun.com/dtd/application_1_3.dtd; application id=Application_ID display-nameNamEAR/display-name module id=EjbModule_1094665284328 ejbNamService.jar/ejb /module module id=WebModule_1108531169734 web web-uriNamWeb1.war/web-uri context-rootNamWeb/context-root /web /module /application ejb-jar.xml: !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN http://java.sun.com/dtd/ejb-jar_2_0.dtd; ejb-jar id=ejb-jar_ID display-nameNamService/display-name enterprise-beans session id=WorkAssignBean ejb-nameWorkAssignBean/ejb-name homecom.nam.facade.workassign.WorkAssignHome/home remotecom.nam.facade.workassign.WorkAssign/remote ejb-classcom.nam.service.workassign.WorkAssignBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=ContractBean ejb-nameContractBean/ejb-name homecom.nam.facade.contract.ContractHome/home remotecom.nam.facade.contract.ContractRemote/remote ejb-classcom.nam.service.contract.ContractBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=Client ejb-nameClient/ejb-name homecom.nam.facade.client.ClientHome/home remotecom.nam.facade.client.ClientRemote/remote ejb-classcom.nam.service.client.ClientBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=ResourceAllocation ejb-nameResourceAllocation/ejb-name homecom.nam.facade.resourceAllocation.ResourceAllocationHome/home remotecom.nam.facade.resourceAllocation.ResourceAllocationRemote/remote ejb-classcom.nam.service.resourceAllocation.ResourceAllocationBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=Module ejb-nameModule/ejb-name homecom.nam.facade.module.ModuleHome/home remotecom.nam.facade.module.ModuleRemote/remote ejb-classcom.nam.service.module.ModuleDetailsBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=ProjectList ejb-nameProjectList/ejb-name homecom.nam.facade.project.ProjectHome/home remotecom.nam.facade.project.ProjectRemote/remote ejb-classcom.nam.service.project.ProjectBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=ScopeBean ejb-nameScopeBean/ejb-name homecom.nam.facade.scope.ScopeHome/home remotecom.nam.facade.scope.ScopeRemote/remote ejb-classcom.nam.service.scope.ScopeBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=ClientEmail ejb-nameClientEmail/ejb-name homecom.nam.facade.clientEmail.ClientEmailHome/home remotecom.nam.facade.clientEmail.ClientEmailRemote/remote ejb-classcom.nam.service.clientEmail.ClientEmailBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=TreeBean ejb-nameTreeBean/ejb-name homecom.nam.facade.tree.TreeHome/home remotecom.nam.facade.tree.TreeRemote/remote ejb-classcom.nam.service.tree.TreeBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=Report ejb-nameReport/ejb-name homecom.nam.facade.report.ReportHome/home remotecom.nam.facade.report.ReportRemote/remote ejb-classcom.nam.service.report.ReportBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session session id=Error ejb-nameError/ejb-name homecom.nam.facade.error.ErrorHome/home remotecom.nam.facade.error.ErrorRemote/remote ejb-classcom.nam.service.error.ErrorBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session /enterprise-beans /ejb-jar web.xml: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app id=WebApp display-nameNamWeb/display-name context-param param-namestruts-layout-config/param-name param-valueconfig/param-value /context-param context-param param-namestruts-layout-image/param-name param-valueconfig/images/param-value /context-param context-param param-namestruts-layout-skin/param-name param-valuedefault/param-value /context-param servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class
Re: Help needed in creating enterprise application deployment plan
On 6/13/07, Hernan Cunico [EMAIL PROTECTED] wrote: Did you see these docs http://cwiki.apache.org/GMOxDOC11/deployment-plans.html There are also some sample apps here http://cwiki.apache.org/GMOxDOC11/sample-applications.html HTH Cheers! Hernan I have yet to find documentation about the benefits of creating a plan. I think plans are just platform-specific overrides for web.xml with platform-specific extended configuration. Is this correct? The Geronimo documentation includes an inverse-classloading setting. This setting may be required to make Geronimo sane. I just posted about an issue that may have been solved with this setting. Why is this not the default? solprovider
Re: JAR in Geronimo overrides JAR in WAR
From a quick look at what you say the problems you are experiencing are from cocoon requiring a more recent JAXP implementation than is in the geronimo 1.2-beta you are using. AFAICT the jaxp implementation has to be installed in lib/endorsed and cannot be affected by any application classpaths or classloader settings (such as inverse-classloading). I believe that in the geronimo 1.2 branch code and the 2.0 trunk code we have successfully navigated through various problems I can't discuss here that kept us at antique jaxp versions for a long time and include fairly up to date jaxp implementations and apis. In any case you can certainly replace or install xml libraries in lib/endorsed to what you need. thanks david jencks On Jun 13, 2007, at 8:37 AM, [EMAIL PROTECTED] wrote: [I started this as a response to David Jencks' 20070608 post about classpaths for EARs, WARs, and JARs.] Please correct me if I misrepresent anything. My understanding was one of the primary benefits of J2EE was independent class loading. My application uses Cocoon with org.apache.cocoon.components.modules.input.XMLFileModule configured in cocoon.xconf. I created a Cocoon WAR using the ant build target. Sometimes I deply the WAR to Geronimo. Sometimes I create an EAR. I have not tested if the results differ depending on the format deployed. I used Eclipse 3.2 to create an EAR project. I used Eclipse 3.2 to Import the WAR with the Add project to an EAR option. The next screen states: Select the web library jars from the list below to be imported as web library projects. Unselected web libraries will be imported as jars in the WEB-INF/lib directory. No libraries were selected so all libraries are imported to cocoon.war\WEB-INF\lib. I deployed the EAR on Geronimo. The Cocoon pipeline using XMLFileModule errors: java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node; I solved this by copying Cocoon's lib/endorsed/xml-apis-1.3.04.jar to Geronimo's lib/endorsed directory. (I planned to remove xmlParserAPIs-2.6.2.jar but this proved unnecessary, probably because xmlParserAPIs-2.6.2 is ancient.) Should the Cocoon WAR use the JARs in the WAR before the JARs in Geronimo? solprovider USING geronimo-tomcat-j2ee-1.2-beta
Re: Help needed in creating enterprise application deployment plan
On Jun 13, 2007, at 9:03 AM, [EMAIL PROTECTED] wrote: On 6/13/07, Hernan Cunico [EMAIL PROTECTED] wrote: Did you see these docs http://cwiki.apache.org/GMOxDOC11/deployment-plans.html There are also some sample apps here http://cwiki.apache.org/GMOxDOC11/sample-applications.html HTH Cheers! Hernan I have yet to find documentation about the benefits of creating a plan. I think plans are just platform-specific overrides for web.xml with platform-specific extended configuration. Is this correct? More or less, yes. You need plans for datasources to tell where your database is. Often you need to map jndi names to stuff like datasource names, although usually you can avoid this by careful naming. You can also use the environment element in a plan to specify the classloader for your app very precisely. This can for instance let you put all the dependency jars in the geronimo repository where they can be shared rather than in WEB-INF/lib where each app needs its own copy. You can also use one app as a parent of another which can let you split up large apps without duplicating classes. You can construct a classloader with a lot of dependency jars in it and use it as a parent of all your apps, so the dependency classes are only loaded once. etc etc. The Geronimo documentation includes an inverse-classloading setting. This setting may be required to make Geronimo sane. I just posted about an issue that may have been solved with this setting. Why is this not the default? I don't think inverse-classloading should affect the problem you described with jaxp libraries: if it does i'd be inclined to regard it as a bug, although it might be a misconfiguration. I think that generally one wants to have only one copy of a class in a classloader graph, its the simplest and least error-prone situation. We provide inverse-classloading and the hidden-classes and non-overridable- classes so that if for some reason you need to deal with multiple copies of a class, you can usually come up with some way to get the one you want, where you want it. But its often better to try to eliminate the problem by having only one version of each class. thanks david jencks solprovider
MDB trouble with references
I am trying to get a simple MDB to work using annotations. However, when I deploy it into Geronimo 2.0, I get the following error. This is with the ConnectionFactory and Queue set up in Geronimo already: Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to resolve resource reference 'jms/CommonConnectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. My deployment plan for the ConnectionFactory and Queues looks like this: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector-1.1; dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2; dep:moduleId dep:groupIdorg.apache.geronimo.samples/dep:groupId dep:artifactIdjms-resources/dep:artifactId dep:version1.2/dep:version dep:typerar/dep:type /dep:moduleId dep:dependencies dep:dependency dep:groupIdorg.apache.geronimo.configs/dep:groupId dep:artifactIdactivemq-broker/dep:artifactId dep:typecar/dep:type /dep:dependency /dep:dependencies /dep:environment resourceadapter resourceadapter-instance resourceadapter-nameCommonConnectionFactory/resourceadapter-name config-property-setting name=Passwordgeronimo/config-property-setting config-property-setting name=UserNamegeronimo/config-property-setting nam:workmanager xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.1; nam:gbean-linkDefaultWorkManager/nam:gbean-link /nam:workmanager /resourceadapter-instance outbound-resourceadapter connection-definition connectionfactory-interfacejavax.jms.QueueConnectionFactory/connectionfactory-interface connectiondefinition-instance nameCommonConnectionFactory/name connectionmanager xa-transaction transaction-caching/ /xa-transaction single-pool match-one/ /single-pool /connectionmanager /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.activemq.message.ActiveMQQueue/adminobject-class adminobject-instance message-destination-nameOrderQueue/message-destination-name config-property-setting name=PhysicalNameOrderQueue/config-property-setting /adminobject-instance adminobject-instance message-destination-nameConsignmentQueue/message-destination-name config-property-setting name=PhysicalNameConsignmentQueue/config-property-setting /adminobject-instance /adminobject adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.activemq.message.ActiveMQTopic/adminobject-class /adminobject /connector I have the MDB with the following annotation @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName=destinationType, propertyValue=javax.jms.Queue), @ActivationConfigProperty(propertyName=destination, propertyValue=jms/OrderQueue) }) I have a Servlet with the following annotated Queue and ConnectionFactory: @Resource(mappedName=jms/OrderQueue) private static Queue receivingQueue; @Resource(mappedName=jms/CommonConnectionFactory) private static QueueConnectionFactory factory; I have the geronimo-web.xml file which has the following: resource-ref ref-namejms/CommonConnectionFactory/ref-name resource-linkCommonConnectionFactory/resource-link /resource-ref resource-env-ref ref-namejms/OrderQueue/ref-name admin-object-linkOrderQueue/admin-object-link /resource-env-ref However, I think that these references are unnecessary when the annotations are present. But I am new to EJBs in general so I am not sure. And I also have a web.xml with the following references too resource-ref res-ref-namejms/CommonConnectionFactory/res-ref-name res-typejavax.jms.QueueConnectionFactory/res-type res-authContainer/res-auth res-sharing-scopeShareable/res-sharing-scope /resource-ref message-destination-ref message-destination-ref-namejms/OrderQueue/message-destination-ref-name message-destination-typejavax.jms.Queue/message-destination-type message-destination-usageProduces/message-destination-usage message-destination-linkOrderQueue/message-destination-link /message-destination-ref Am I missing something? I would appreciate any type of feedback. Thanks, Viet Nguyen
Re: 1.2 Bug ClassCastException with Properties
This information is now at: https://issues.apache.org/jira/browse/GERONIMO-3243 I am using Geronimo as a local J2EE server for testing from a perceived obligation as an Apache Committer to learn, support, and market Apache software. My application is a flexible front-end for SAP Portal and must run on the SAP Portal WAS. Geronimo is currently only a concern when it is not working. So far: Port issue - moved RMIRegistry (and changed 2 URLs to match.) ClassDef issue - EARs/WARs use Geronimo before own JARs. Properties - programmer without Java experience committing to subproject. I will submit bugs and issues and solutions and code here and in JIRA. I will not have time to test issues solved for my situation, but the JIRA includes test code for this issue. Thanks for your help. solprovider On 6/7/07, David Jencks [EMAIL PROTECTED] wrote: I opened https://issues.apache.org/activemq/browse/AMQ-1254 to deal with a similar problem for org.apache.activemq.kaha.impl.KahaStore. I'll try to scrape together some time to add to the patch for this property also. I think we can set the property you've located in a geronimo SystemProperties gbean, there's one called ServerSystemProperties in j2ee-server. It would be great if you can open a geronimo jira for this problem and even better if you could test out using the ServerSystemProperties gbean to fix it. thanks david jencks On Jun 7, 2007, at 10:54 AM, [EMAIL PROTECTED] wrote: The latest Geronimo 1.2 and 2.0 use ActiveMQ. ActiveMQ adds a HashMap as a global Property named org.apache.activeio.journal.active.lockMap. Global Properties must be Strings. This causes any code reading all the Properties and expecting Strings to error. The permanent fix if for Geronimo to update to a better version of ActiveMQ, either downgrading to before the bug was programmed or wait for the ActiveMQ team to follow the standards. That is unlikely to be tested and released quickly. The quick fix is to disable the offensive code. For Geronimo 1.2 on Windows, add this line at the beginning of STARTUP.BAT: SET GERONIMO_OPTS=- Dorg.apache.activeio.journal.active.DisableLocking=true %GERONIMO_OPTS% solprovider
Unable to resolve resource reference on 3.0 with annotations
Okay, I tried to find a similar situation as this on this forum and on the web, but have not had any luck. I am using Geroimo 2.0M5 I have deployed a new ActiveMQ Resource Adapter with 2 queues and 1 topic. The factory name is Factory1 I have a single session bean that publishes to a JMS queue. The bean has one method publishAsset(), which performs the publishing act to the queue. This is a stateless session bean. it is declared with @Stateless @Remote( { AssetRecordRemote.class }) I have a connection factory object declared in my code: @Resource(mappedName = java:/comp/env/jms/Factory1) ConnectionFactory connectionFactory; The package this is in is called com.avorcor.fm The bean name is AssetSessionBean I jar this up with my remote interface and call deploy AssetSessionBean.jar I get an error deploying: Error: Unable to distribute AssetSessionBean.jar: org.apache.geronimo.common.DeploymentException: Unable to resolve resource reference com.avorcor.fm.AssetSessionBean/connectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. If I remove all references to JMS, this will deploy just fine. Although, it deploys in the default package instead of com.avorcor.fm . I would like to hear thoughts on this as well if anyone knows, but my primary concern is for trying to understand why Geronimo cannot find the resource reference and what I could try to correct this situation. Thank you. -- View this message in context: http://www.nabble.com/Unable-to-resolve-resource-reference-on-3.0-with-annotations-tf3919298s134.html#a3134 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: MDB trouble with references
You need to include the resource plan as a parent of your web-app in the geronimo-web environment element. If this doesn't help please show your entire geroniimo-web.xml. You can eliminate the resource-ref type stuff from your geronimo- web.xml if you make the names exactly the same e.g. naming the connection factory jms/CommonConnectionFactory There's some support for automatically mapping common prefixes but I don't think I got to jms yet :-) hope this helps david jencks On Jun 13, 2007, at 10:21 AM, Viet Hung Nguyen wrote: I am trying to get a simple MDB to work using annotations. However, when I deploy it into Geronimo 2.0, I get the following error. This is with the ConnectionFactory and Queue set up in Geronimo already: Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to resolve resource reference 'jms/CommonConnectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. My deployment plan for the ConnectionFactory and Queues looks like this: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/ connector-1.1 dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/ deployment-1.2 dep:moduleId dep:groupIdorg.apache.geronimo.samples/dep:groupId dep:artifactIdjms-resources/dep:artifactId dep:version1.2/dep:version dep:typerar/dep:type /dep:moduleId dep:dependencies dep:dependency dep:groupIdorg.apache.geronimo.configs/dep:groupId dep:artifactIdactivemq-broker/dep:artifactId dep:typecar/dep:type /dep:dependency /dep:dependencies /dep:environment resourceadapter resourceadapter-instance resourceadapter-nameCommonConnectionFactory/ resourceadapter-name config-property-setting name=Passwordgeronimo/ config-property-setting config-property-setting name=UserNamegeronimo/ config-property-setting nam:workmanager xmlns:nam=http://geronimo.apache.org/ xml/ns/naming-1.1 nam:gbean-linkDefaultWorkManager/nam:gbean-link /nam:workmanager /resourceadapter-instance outbound-resourceadapter connection-definition connectionfactory- interfacejavax.jms.QueueConnectionFactory/connectionfactory- interface connectiondefinition-instance nameCommonConnectionFactory/name connectionmanager xa-transaction transaction-caching/ /xa-transaction single-pool match-one/ /single-pool /connectionmanager /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.activemq.message.ActiveMQQueue/ adminobject-class adminobject-instance message-destination-nameOrderQueue/message- destination-name config-property-setting name=PhysicalNameOrderQueue/ config-property-setting /adminobject-instance adminobject-instance message-destination-nameConsignmentQueue/message- destination-name config-property-setting name=PhysicalNameConsignmentQueue/config-property-setting /adminobject-instance /adminobject adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.activemq.message.ActiveMQTopic/ adminobject-class /adminobject /connector I have the MDB with the following annotation @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName=destinationType, propertyValue=javax.jms.Queue), @ActivationConfigProperty(propertyName=destination, propertyValue=jms/OrderQueue) }) I have a Servlet with the following annotated Queue and ConnectionFactory: @Resource(mappedName=jms/OrderQueue) private static Queue receivingQueue; @Resource(mappedName=jms/CommonConnectionFactory) private static QueueConnectionFactory factory; I have the geronimo-web.xml file which has the following: resource-ref ref-namejms/CommonConnectionFactory/ref-name resource-linkCommonConnectionFactory/resource-link /resource-ref resource-env-ref ref-namejms/OrderQueue/ref-name admin-object-linkOrderQueue/admin-object-link /resource-env-ref However, I think that these references are unnecessary when the annotations are present. But I am new to EJBs in general so I am not sure. And I also have a web.xml with the following references too resource-ref res-ref-namejms/CommonConnectionFactory/res-ref-name res-typejavax.jms.QueueConnectionFactory/res-type res-authContainer/res-auth
Re: Unable to resolve resource reference on 3.0 with annotations
You need a geronimo plan for your (ejb? ear? app) that includes the jms module you have deployed as a parent, otherwise the references won't be able to be resolved. Also we ignore the mappedName, you should specify the name and make sure it's the same as what's in the jms module plan. Hope this helps david jencks On Jun 13, 2007, at 8:27 PM, Avorcor wrote: Okay, I tried to find a similar situation as this on this forum and on the web, but have not had any luck. I am using Geroimo 2.0M5 I have deployed a new ActiveMQ Resource Adapter with 2 queues and 1 topic. The factory name is Factory1 I have a single session bean that publishes to a JMS queue. The bean has one method publishAsset(), which performs the publishing act to the queue. This is a stateless session bean. it is declared with @Stateless @Remote( { AssetRecordRemote.class }) I have a connection factory object declared in my code: @Resource(mappedName = java:/comp/env/jms/Factory1) ConnectionFactory connectionFactory; The package this is in is called com.avorcor.fm The bean name is AssetSessionBean I jar this up with my remote interface and call deploy AssetSessionBean.jar I get an error deploying: Error: Unable to distribute AssetSessionBean.jar: org.apache.geronimo.common.DeploymentException: Unable to resolve resource reference com.avorcor.fm.AssetSessionBean/connectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. If I remove all references to JMS, this will deploy just fine. Although, it deploys in the default package instead of com.avorcor.fm . I would like to hear thoughts on this as well if anyone knows, but my primary concern is for trying to understand why Geronimo cannot find the resource reference and what I could try to correct this situation. Thank you. -- View this message in context: http://www.nabble.com/Unable-to- resolve-resource-reference-on-3.0-with-annotations- tf3919298s134.html#a3134 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: MDB trouble with references
Also I noticed you are using mappedName which we ignore, try using name instead. thanks david jencks On Jun 13, 2007, at 8:31 PM, David Jencks wrote: You need to include the resource plan as a parent of your web-app in the geronimo-web environment element. If this doesn't help please show your entire geroniimo-web.xml. You can eliminate the resource-ref type stuff from your geronimo- web.xml if you make the names exactly the same e.g. naming the connection factory jms/CommonConnectionFactory There's some support for automatically mapping common prefixes but I don't think I got to jms yet :-) hope this helps david jencks On Jun 13, 2007, at 10:21 AM, Viet Hung Nguyen wrote: I am trying to get a simple MDB to work using annotations. However, when I deploy it into Geronimo 2.0, I get the following error. This is with the ConnectionFactory and Queue set up in Geronimo already: Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to resolve resource reference 'jms/CommonConnectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. My deployment plan for the ConnectionFactory and Queues looks like this: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/ connector-1.1 dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/ deployment-1.2 dep:moduleId dep:groupIdorg.apache.geronimo.samples/dep:groupId dep:artifactIdjms-resources/dep:artifactId dep:version1.2/dep:version dep:typerar/dep:type /dep:moduleId dep:dependencies dep:dependency dep:groupIdorg.apache.geronimo.configs/dep:groupId dep:artifactIdactivemq-broker/dep:artifactId dep:typecar/dep:type /dep:dependency /dep:dependencies /dep:environment resourceadapter resourceadapter-instance resourceadapter-nameCommonConnectionFactory/ resourceadapter-name config-property-setting name=Passwordgeronimo/ config-property-setting config-property-setting name=UserNamegeronimo/ config-property-setting nam:workmanager xmlns:nam=http://geronimo.apache.org/ xml/ns/naming-1.1 nam:gbean-linkDefaultWorkManager/nam:gbean-link /nam:workmanager /resourceadapter-instance outbound-resourceadapter connection-definition connectionfactory- interfacejavax.jms.QueueConnectionFactory/connectionfactory- interface connectiondefinition-instance nameCommonConnectionFactory/name connectionmanager xa-transaction transaction-caching/ /xa-transaction single-pool match-one/ /single-pool /connectionmanager /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.activemq.message.ActiveMQQueue/ adminobject-class adminobject-instance message-destination-nameOrderQueue/message- destination-name config-property-setting name=PhysicalNameOrderQueue/config-property-setting /adminobject-instance adminobject-instance message-destination-nameConsignmentQueue/message- destination-name config-property-setting name=PhysicalNameConsignmentQueue/config-property-setting /adminobject-instance /adminobject adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.activemq.message.ActiveMQTopic/ adminobject-class /adminobject /connector I have the MDB with the following annotation @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName=destinationType, propertyValue=javax.jms.Queue), @ActivationConfigProperty(propertyName=destination, propertyValue=jms/OrderQueue) }) I have a Servlet with the following annotated Queue and ConnectionFactory: @Resource(mappedName=jms/OrderQueue) private static Queue receivingQueue; @Resource(mappedName=jms/CommonConnectionFactory) private static QueueConnectionFactory factory; I have the geronimo-web.xml file which has the following: resource-ref ref-namejms/CommonConnectionFactory/ref-name resource-linkCommonConnectionFactory/resource-link /resource-ref resource-env-ref ref-namejms/OrderQueue/ref-name admin-object-linkOrderQueue/admin-object-link /resource-env-ref However, I think that these references are unnecessary when the annotations are present. But I am new to EJBs in general so I am not sure. And I also have a web.xml with the following references too resource-ref
Re: Unable to resolve resource reference on 3.0 with annotations
Well, that sure did fix that in a hurry.Thank you. Now, if I may, one final question. Now that my session bean is deployed, aren't I supposed to be able to access it as web service through EJB? If so, what do I need to do to make that happen? Thank you again. JP djencks wrote: You need a geronimo plan for your (ejb? ear? app) that includes the jms module you have deployed as a parent, otherwise the references won't be able to be resolved. Also we ignore the mappedName, you should specify the name and make sure it's the same as what's in the jms module plan. Hope this helps david jencks On Jun 13, 2007, at 8:27 PM, Avorcor wrote: Okay, I tried to find a similar situation as this on this forum and on the web, but have not had any luck. I am using Geroimo 2.0M5 I have deployed a new ActiveMQ Resource Adapter with 2 queues and 1 topic. The factory name is Factory1 I have a single session bean that publishes to a JMS queue. The bean has one method publishAsset(), which performs the publishing act to the queue. This is a stateless session bean. it is declared with @Stateless @Remote( { AssetRecordRemote.class }) I have a connection factory object declared in my code: @Resource(mappedName = java:/comp/env/jms/Factory1) ConnectionFactory connectionFactory; The package this is in is called com.avorcor.fm The bean name is AssetSessionBean I jar this up with my remote interface and call deploy AssetSessionBean.jar I get an error deploying: Error: Unable to distribute AssetSessionBean.jar: org.apache.geronimo.common.DeploymentException: Unable to resolve resource reference com.avorcor.fm.AssetSessionBean/connectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. If I remove all references to JMS, this will deploy just fine. Although, it deploys in the default package instead of com.avorcor.fm . I would like to hear thoughts on this as well if anyone knows, but my primary concern is for trying to understand why Geronimo cannot find the resource reference and what I could try to correct this situation. Thank you. -- View this message in context: http://www.nabble.com/Unable-to- resolve-resource-reference-on-3.0-with-annotations- tf3919298s134.html#a3134 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Unable-to-resolve-resource-reference-on-3.0-with-annotations-tf3919298s134.html#a3427 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: MDB trouble with references
David Jencks wrote: Also I noticed you are using mappedName which we ignore, try using name instead. thanks david jencks On Jun 13, 2007, at 8:31 PM, David Jencks wrote: You need to include the resource plan as a parent of your web-app in the geronimo-web environment element. If this doesn't help please show your entire geroniimo-web.xml. You can eliminate the resource-ref type stuff from your geronimo-web.xml if you make the names exactly the same e.g. naming the connection factory jms/CommonConnectionFactory There's some support for automatically mapping common prefixes but I don't think I got to jms yet :-) hope this helps david jencks On Jun 13, 2007, at 10:21 AM, Viet Hung Nguyen wrote: I am trying to get a simple MDB to work using annotations. However, when I deploy it into Geronimo 2.0, I get the following error. This is with the ConnectionFactory and Queue set up in Geronimo already: Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to resolve resource reference 'jms/CommonConnectionFactory' (Could not auto-map to resource. Try adding a resource-ref mapping to your Geronimo deployment plan. My deployment plan for the ConnectionFactory and Queues looks like this: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector-1.1; dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2; dep:moduleId dep:groupIdorg.apache.geronimo.samples/dep:groupId dep:artifactIdjms-resources/dep:artifactId dep:version1.2/dep:version dep:typerar/dep:type /dep:moduleId dep:dependencies dep:dependency dep:groupIdorg.apache.geronimo.configs/dep:groupId dep:artifactIdactivemq-broker/dep:artifactId dep:typecar/dep:type /dep:dependency /dep:dependencies /dep:environment resourceadapter resourceadapter-instance resourceadapter-nameCommonConnectionFactory/resourceadapter-name config-property-setting name=Passwordgeronimo/config-property-setting config-property-setting name=UserNamegeronimo/config-property-setting nam:workmanager xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.1; nam:gbean-linkDefaultWorkManager/nam:gbean-link /nam:workmanager /resourceadapter-instance outbound-resourceadapter connection-definition connectionfactory-interfacejavax.jms.QueueConnectionFactory/connectionfactory-interface connectiondefinition-instance nameCommonConnectionFactory/name connectionmanager xa-transaction transaction-caching/ /xa-transaction single-pool match-one/ /single-pool /connectionmanager /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.activemq.message.ActiveMQQueue/adminobject-class adminobject-instance message-destination-nameOrderQueue/message-destination-name config-property-setting name=PhysicalNameOrderQueue/config-property-setting /adminobject-instance adminobject-instance message-destination-nameConsignmentQueue/message-destination-name config-property-setting name=PhysicalNameConsignmentQueue/config-property-setting /adminobject-instance /adminobject adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.activemq.message.ActiveMQTopic/adminobject-class /adminobject /connector I have the MDB with the following annotation @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName=destinationType, propertyValue=javax.jms.Queue), @ActivationConfigProperty(propertyName=destination, propertyValue=jms/OrderQueue) }) I have a Servlet with the following annotated Queue and ConnectionFactory: @Resource(mappedName=jms/OrderQueue) private static Queue receivingQueue; @Resource(mappedName=jms/CommonConnectionFactory) private static QueueConnectionFactory factory; I have the geronimo-web.xml file which has the following: resource-ref ref-namejms/CommonConnectionFactory/ref-name resource-linkCommonConnectionFactory/resource-link /resource-ref resource-env-ref ref-namejms/OrderQueue/ref-name admin-object-linkOrderQueue/admin-object-link /resource-env-ref However, I think that these references are unnecessary when the annotations are present. But I am new to EJBs in general so I am not sure. And I also have a web.xml with the following references too resource-ref