Re: Geronimo 2.0 MDB is not Triggering
On 11/1/07, jthinaka [EMAIL PROTECTED] wrote: The core of my problem is that I know that a message is being enqueued on the queue, and yet the MDB doesn't get triggered. Hi, How do you know that? What steps do you perform to check it out. I could deploy mdb on the latest Geronimo version built from the trunk without any troubles, but even if it worked I didn't know how to find out the queue content. @MessageDriven(mappedName = CallFinishMDB, I'm not sure if mappedName means anything to Geronimo. Remove it and give it a try again. If it changes nothing, it's expected. If not you will have found an exception. @ActivationConfigProperty(propertyName = acknowledgeMode, propertyValue = Auto-acknowledge), Unless I'm mistaken It's a default setting - no need to specify it explicitly. What's your openejb-jar.xml file? What's Geronimo version? How do you deploy/create the managed objects - jms queue factory and the queue itself? How do you send messages to the queue? I think I could help you nail it down, but not much information to go on. If you speak Polish call yourself lucky as you may find the following docs quite useful ;-) * Uruchomienie ziarna MDB w Apache Geronimo (http://www.jaceklaskowski.pl/wiki/Uruchomienie_ziarna_MDB_w_Apache_Geronimo) * Aplikacja Java EE 5 z MDB z JPA w trybie JTA i PostgreSQL w Apache Geronimo 2 (http://www.jaceklaskowski.pl/wiki/Aplikacja_Java_EE_5_z_MDB_z_JPA_w_trybie_JTA_i_PostgreSQL_w_Apache_Geronimo_2) I'm working on translating them, but I don't think you want to wait that long ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
Re: Configure and Deploy JMS Resources in Geronimo 2.0.2
On 11/6/07, ivanrc [EMAIL PROTECTED] wrote: I´m trying to configure and deploy JMS Resources in Geronimo 2.0.2. I´ve got the connector xml file below that is for geronimo 1.1 I want to know what I have to change in this file and how to deploy it, because i trying to use... deploy.bat deploy my-JMS-resources-plan.xml repository/activemq/rars/activemq.rar ... and It in this version doesn´t work. Hi, my-JMS-resources-plan.xml: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector-1.2; dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2; 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-nameSampleJMSResources/resourceadapter-name workmanager xmlns=http://geronimo.apache.org/xml/ns/naming-1.2; gbean-linkDefaultWorkManager/gbean-link /workmanager /resourceadapter-instance outbound-resourceadapter connection-definition connectionfactory-interfacejavax.jms.ConnectionFactory/connectionfactory-interface connectiondefinition-instance nameSampleConnectionFactory/name implemented-interfacejavax.jms.QueueConnectionFactory/implemented-interface implemented-interfacejavax.jms.TopicConnectionFactory/implemented-interface connectionmanager xa-transaction transaction-caching / /xa-transaction single-pool max-size10/max-size min-size0/min-size blocking-timeout-milliseconds5000/blocking-timeout-milliseconds idle-timeout-minutes0/idle-timeout-minutes match-one / /single-pool /connectionmanager /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.apache.activemq.command.ActiveMQTopic/adminobject-class adminobject-instance message-destination-nameSampleTopic/message-destination-name config-property-setting name=PhysicalNameSampleTopic/config-property-setting /adminobject-instance /adminobject adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.apache.activemq.command.ActiveMQQueue/adminobject-class adminobject-instance message-destination-nameSampleQueue/message-destination-name config-property-setting name=PhysicalNameSampleQueue/config-property-setting /adminobject-instance /adminobject /connector The command to deploy the file is as follows: [EMAIL PROTECTED] /cygdrive/c/geronimo-jetty6-jee5-2.0.2 $ ./bin/deploy.sh --user system --password manager deploy my-JMS-resources-plan.xml repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.0.2/geronimo-activemq-ra-2.0.2.rar Using GERONIMO_BASE: c:\geronimo-jetty6-jee5-2.0.2 Using GERONIMO_HOME: c:\geronimo-jetty6-jee5-2.0.2 Using GERONIMO_TMPDIR: c:\geronimo-jetty6-jee5-2.0.2\var\temp Using JRE_HOME:c:\apps\java5\jre Deployed default/geronimo-activemq-ra-2.0.2.rar/1194341150421/rar and you can see the managed objects deployed to Geronimo in the web console: http://localhost:8080/console/portal/services/services_jms SampleJMSResources (default/geronimo-activemq-ra-2.0.2.rar/1194341150421/rar) TypeNameDeployed As State Actions Connection Factory SampleConnectionFactory Server-wide running Queue SampleQueue Server-wide running Topic SampleTopic Server-wide running These managed objects are server-wide so all applications can use it. If you want to bind these managed objects to your application, place the xml file within geronimo-application.xml of your application. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
Re: Configure and Deploy JMS Resources in Geronimo 2.0.2
On 11/6/07, Vamsavardhana Reddy [EMAIL PROTECTED] wrote: Have you tried using the JMS Resources portlet in the Admin Console? Admin Console is broken on Jetty due to java.io.IOException: FULL head (http://issues.apache.org/jira/browse/GERONIMO-3523). It might work fine on Tomcat, though (I didn't try it out myself). Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
Re: Configure and Deploy JMS Resources in Geronimo 2.0.2
On 11/6/07, ivanrc [EMAIL PROTECTED] wrote: and my jndi.parameters are... java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory java.naming.provider.url=tcp://localhost:61616 topic.MyTopic=jms/CustomerServiceTopic but always obtain javax.naming.NamingException: Cannot lookup Use the remote client sample as a reference: package pl.jaceklaskowski.ticketservice; import java.util.Properties; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.QueueConnection; import javax.jms.QueueConnectionFactory; import javax.jms.QueueSession; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; public class TicketServiceClient { private final static int NUMBER_OF_MESSAGES = 1; public static void main(String[] args) throws Exception { Properties env = new Properties(); env.put(Context.PROVIDER_URL, tcp://localhost:61616); env.put(connectionFactoryNames, TicketConnectionFactory); env.put(queue.TicketQueue, TicketQueue); Context jndiContext = new InitialContext(env); QueueConnectionFactory factory = (QueueConnectionFactory) jndiContext.lookup(TicketConnectionFactory); Queue queue = (Queue) jndiContext.lookup(TicketQueue); QueueConnection connection = factory.createQueueConnection(); QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(queue); for (int i = 0; i NUMBER_OF_MESSAGES; i++) { System.out.println(Wysylana wiadomosc nr # + i); TextMessage txtMsg = session.createTextMessage(); txtMsg.setText(Wiadomosc od Jacka o numerze # + i); producer.send(txtMsg); } session.close(); connection.close(); } } Change the managed object names appropriately. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
Configure and Deploy JMS Resources in Geronimo 2.0.2
Hello, I´m trying to configure and deploy JMS Resources in Geronimo 2.0.2. I´ve got the connector xml file below that is for geronimo 1.1 I want to know what I have to change in this file and how to deploy it, because i trying to use... deploy.bat deploy my-JMS-resources-plan.xml repository/activemq/rars/activemq.rar ... and It in this version doesn´t work. Thanks. my-JMS-resources-plan.xml: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector; configId=SampleJMSResources parentId=geronimo/activemq/1.0/car resourceadapter resourceadapter-instance resourceadapter-nameSampleJMSResources/resourceadapter-name config-property-setting name=ServerUrltcp://localhost:61616/config-property-setting workmanager gbean-linkDefaultWorkManager/gbean-link /workmanager /resourceadapter-instance !-- defines a ConnectionFactory -- outbound-resourceadapter connection-definition connectionfactory-interfacejavax.jms.ConnectionFactory/connectionfactory-interface connectiondefinition-instance nameSampleConnectionFactory/name implemented-interfacejavax.jms.QueueConnectionFactory/implemented-interface implemented-interfacejavax.jms.TopicConnectionFactory/implemented-interface connectionmanager xa-transaction transaction-caching / /xa-transaction single-pool max-size10/max-size min-size0/min-size blocking-timeout-milliseconds5000/blocking-timeout-milliseconds idle-timeout-minutes0/idle-timeout-minutes match-one / /single-pool /connectionmanager global-jndi-namejms/SampleConectionFactory/global-jndi-name /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter !-- defines a Topic -- adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.codehaus.activemq.message.ActiveMQTopic/adminobject-class adminobject-instance message-destination-nameSampleTopic/message-destination-name config-property-setting name=PhysicalNameSampleTopic/config-property-setting /adminobject-instance /adminobject !-- defines a Queue -- adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.codehaus.activemq.message.ActiveMQQueue/adminobject-class adminobject-instance message-destination-nameSampleQueue/message-destination-name config-property-setting name=PhysicalNameSampleQueue/config-property-setting /adminobject-instance /adminobject /connector -- View this message in context: http://www.nabble.com/Configure-and-Deploy-JMS-Resources-in-Geronimo-2.0.2-tf4756866s134.html#a13603013 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Configure and Deploy JMS Resources in Geronimo 2.0.2
Jacek Laskowski wrote: On 11/6/07, ivanrc [EMAIL PROTECTED] wrote: I´m trying to configure and deploy JMS Resources in Geronimo 2.0.2. I´ve got the connector xml file below that is for geronimo 1.1 I want to know what I have to change in this file and how to deploy it, because i trying to use... deploy.bat deploy my-JMS-resources-plan.xml repository/activemq/rars/activemq.rar ... and It in this version doesn´t work. Hi, my-JMS-resources-plan.xml: connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector-1.2; dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2; 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-nameSampleJMSResources/resourceadapter-name workmanager xmlns=http://geronimo.apache.org/xml/ns/naming-1.2; gbean-linkDefaultWorkManager/gbean-link /workmanager /resourceadapter-instance outbound-resourceadapter connection-definition connectionfactory-interfacejavax.jms.ConnectionFactory/connectionfactory-interface connectiondefinition-instance nameSampleConnectionFactory/name implemented-interfacejavax.jms.QueueConnectionFactory/implemented-interface implemented-interfacejavax.jms.TopicConnectionFactory/implemented-interface connectionmanager xa-transaction transaction-caching / /xa-transaction single-pool max-size10/max-size min-size0/min-size blocking-timeout-milliseconds5000/blocking-timeout-milliseconds idle-timeout-minutes0/idle-timeout-minutes match-one / /single-pool /connectionmanager /connectiondefinition-instance /connection-definition /outbound-resourceadapter /resourceadapter adminobject adminobject-interfacejavax.jms.Topic/adminobject-interface adminobject-classorg.apache.activemq.command.ActiveMQTopic/adminobject-class adminobject-instance message-destination-nameSampleTopic/message-destination-name config-property-setting name=PhysicalNameSampleTopic/config-property-setting /adminobject-instance /adminobject adminobject adminobject-interfacejavax.jms.Queue/adminobject-interface adminobject-classorg.apache.activemq.command.ActiveMQQueue/adminobject-class adminobject-instance message-destination-nameSampleQueue/message-destination-name config-property-setting name=PhysicalNameSampleQueue/config-property-setting /adminobject-instance /adminobject /connector The command to deploy the file is as follows: [EMAIL PROTECTED] /cygdrive/c/geronimo-jetty6-jee5-2.0.2 $ ./bin/deploy.sh --user system --password manager deploy my-JMS-resources-plan.xml repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.0.2/geronimo-activemq-ra-2.0.2.rar Using GERONIMO_BASE: c:\geronimo-jetty6-jee5-2.0.2 Using GERONIMO_HOME: c:\geronimo-jetty6-jee5-2.0.2 Using GERONIMO_TMPDIR: c:\geronimo-jetty6-jee5-2.0.2\var\temp Using JRE_HOME:c:\apps\java5\jre Deployed default/geronimo-activemq-ra-2.0.2.rar/1194341150421/rar and you can see the managed objects deployed to Geronimo in the web console: http://localhost:8080/console/portal/services/services_jms SampleJMSResources (default/geronimo-activemq-ra-2.0.2.rar/1194341150421/rar) Type NameDeployed As State Actions Connection FactorySampleConnectionFactory Server-wide running Queue SampleQueue Server-wide running Topic SampleTopic Server-wide running These managed objects are server-wide so all applications can use it. If you want to bind these managed objects to your application, place the xml file within geronimo-application.xml of your application. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl it works! thanks :) -- View this message in context: http://www.nabble.com/Configure-and-Deploy-JMS-Resources-in-Geronimo-2.0.2-tf4756866s134.html#a13604890 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Problem with JPA MySQL and Geronimo2.0.2
Hello, I have connected a MySQL Database to Geronimo via MySQL XA Pool. Further I have two entities: Country and Region. In the country Entity I mapped the Region as follows: @OneToMany(cascade = ALL, targetEntity = entities.orig.Region.class, mappedBy = country) @OrderBy(name ASC) public CollectionRegion getRegion() { return region; } In Region I mapped Country: @ManyToOne(targetEntity=entities.orig.Country.class, cascade = { MERGE, REFRESH }) @JoinColumn(name=country_id, referencedColumnName = id, table = region) public Country getCountry() { return country; } I have the following schema for region: CREATE TABLE region ( id INT NOT NULL AUTO_INCREMENT, country_id INT DEFAULT 0 NOT NULL, name VARCHAR(255) DEFAULT '' NOT NULL, info_id INT DEFAULT 0 NOT NULL, default_region BIT DEFAULT 0 NOT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM; //I tried ENGINE=InnoDB too with the same results alter table region add foreign key(country_id) references country (id) CREATE TABLE country ( id INT(4) NOT NULL AUTO_INCREMENT, countrycode CHAR(2) DEFAULT '' NOT NULL, name VARCHAR(255) DEFAULT '' NOT NULL, default_region_id INT(2) DEFAULT 0 NOT NULL, UNIQUE KEY(countrycode), PRIMARY KEY (id) ) ENGINE=MyISAM // and also InnoDB; This is my persistence.xml: persistence-unit name=JPATest jta-data-sourceTEST_XA/jta-data-source classentities.orig.Country/class classentities.orig.Region/class properties property name=openjpa.jdbc.SynchronizeMappings value=false / property name=openjpa.jdbc.DBDictionary value=mysql(SupportsSubselect=true) / property name=openjpa.Log value=DefaultLevel=TRACE,SQL=TRACE / /properties /persistence-unit When I run this I get the following exception from OpenJPA: openjpa-1.0.0-r420667:568756 nonfatal general error org.apache.openjpa.persistence.PersistenceException: Not unique table/alias: 't0' {prepstmnt 10955888 SELECT t0.id, t0.changed, t0.created, t0.default_region, t1.id, t1.changed, t1.created, t1.infotext, t1.user_changed, t1.user_created, t0.name, t0.user_changed, t0.user_created FROM bo_test.region t0 INNER JOIN bo_test.region t0 ON t0.id = t0.Region_id LEFT OUTER JOIN bo_test.info t1 ON t0.info_id = t1.id WHERE t0.country_id = ? [params=(int) 43]} [code=1066, state=42000] When I use a mapping table and change the mapping it works: Country: @OneToMany(cascade = REFRESH, targetEntity = entities.Region.class, fetch = EAGER) @OrderBy(name ASC) @JoinTable(name=country_region, joinColumns = @JoinColumn(name=country_id, referencedColumnName = id), inverseJoinColumns = @JoinColumn(name=region_id, referencedColumnName = id)) public CollectionRegion getRegion() { return region; } Region: @ManyToOne(targetEntity=entities.Country.class) @JoinColumn(name = country_id, referencedColumnName = id, table = country_region) public Country getCountry() { return country; } What it going wrong here? Can anybody help me? Thanks, Mark -- View this message in context: http://www.nabble.com/Problem-with-JPA-MySQL-and-Geronimo2.0.2-tf4758860s134.html#a13609313 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
problems when deploy ejb in eclipse
Hi, everyone. here is what I've done. I setup a app server on a machine, say A. And I test it, it works fine. In eclipse I install the server environment, apache Geronimo v2.0. The steps are as follows. 1.windows--preference--server--add 2.choose apache Geronimo v2.0, next 3.choose application Server Installation Directory. ( I chose a place in my computer, say B. I was not able to choose a place in A. Actually, I want to use computer A as my server, then why I have to specify Server Installation Directory on my own computer? Could anyone please tell me?) 4.Finish 5.File--new project--others, choose Server, next 6.In Server's host name, I typed 192.168.X.C, which is computer A, the remote server. next 7. specify the port ,then next. finish. After that I created my EJB project. I followed this tutorial.http://www.eclipse.org/webtools/community/tutorials/ejbtutorial/buildingejbs.html. Instead of using JBoss. I use Geronimo. But when I try to publish the project on computer A in eclipse. It says : Distribution of configuration failed. See log for details. unknown protocol: localhost java.net.MalformedURLException: unknown protocol: localhost at java.net.URL.init(Unknown Source) at java.net.URL.init(Unknown Source) at java.net.URL.init(Unknown Source) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.getRemoteDeployUploadURL(AbstractDeployCommand.java:149) at org.apache.geronimo.deployment.plugin.remote.RemoteDeployUtil.uploadFilesToServer(RemoteDeployUtil.java:59) at org.apache.geronimo.deployment.plugin.remote.DistributeCommand.massageFileNames(DistributeCommand.java:43) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:114) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61) at java.lang.Thread.run(Unknown Source) And when I stop the server, in console appears: Geronimo Application Server started 14:25:55,722 ERROR [log] failed jsp org.apache.geronimo.kernel.proxy.DeadProxyException: Proxy is no longer valid to gbean: org.apache.geronimo.configs/webconsole-jetty6/2.0.1/car?J2EEApplication=org.apache.geronimo.configs/webconsole-jetty6/2.0.1/car,j2eeType=WebModule,name=standard.war at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:87) at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$1187ad47.newInstance(generated) at org.apache.geronimo.jetty6.InternalJettyServletHolder.newInstance(InternalJettyServletHolder.java:81) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:253) at org.apache.geronimo.jetty6.InternalJettyServletHolder.internalDoStart(InternalJettyServletHolder.java:119) at org.apache.geronimo.jetty6.InternalJettyServletHolder.access$000(InternalJettyServletHolder.java:38) at org.apache.geronimo.jetty6.InternalJettyServletHolder$StartCommand.lifecycleMethod(InternalJettyServletHolder.java:130) at org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleCommand(AbstractImmutableHandler.java:54) at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.lifecycleCommand(ThreadClassloaderHandler.java:57) at org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleCommand(AbstractImmutableHandler.java:52) at org.apache.geronimo.jetty6.handler.InstanceContextHandler.lifecycleCommand(InstanceContextHandler.java:81) at org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleCommand(AbstractImmutableHandler.java:52) at org.apache.geronimo.jetty6.handler.UserTransactionHandler.lifecycleCommand(UserTransactionHandler.java:63) at org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleCommand(AbstractImmutableHandler.java:52) at org.apache.geronimo.jetty6.handler.ComponentContextHandler.lifecycleCommand(ComponentContextHandler.java:57) at org.apache.geronimo.jetty6.InternalJettyServletHolder.doStart(InternalJettyServletHolder.java:106) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:612) at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:980) at org.mortbay.jetty.servlet.ServletHandler.setFilterMappings(ServletHandler.java:1016) at org.apache.geronimo.jetty6.JettyFilterMapping.resetJettyFilterMappings(JettyFilterMapping.java:129) at org.apache.geronimo.jetty6.JettyFilterMapping.access$100(JettyFilterMapping.java:35) at org.apache.geronimo.jetty6.JettyFilterMapping$1.memberRemoved(JettyFilterMapping.java:113) at org.apache.geronimo.gbean.runtime.ProxyCollection.removeTarget(ProxyCollection.java:129) at
Re: problems when deploy ejb in eclipse
On 11/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Distribution of configuration failed. See log for details. unknown protocol: localhost java.net.MalformedURLException: unknown protocol: localhost at java.net.URL.init(Unknown Source) at java.net.URL.init(Unknown Source) at java.net.URL.init(Unknown Source) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.getRemoteDeployUploadURL(AbstractDeployCommand.java:149) ... Eclipse-3.3.0 Web Standard Tools-Version: 2.0.1 geronimo-jetty6-jee5-2.0.1 linux-Red had Enterprise 7.0(server installed on it) xDoclet-1.2.3 Hi, Not that it sorts out the issue, but could you upgrade your environment to Eclipse 3.3.1, Geronimo Eclipse Plugin 2.0.0 and Geronimo 2.0.2? I'm not certain what exactly issues were faced, but WTP in Eclise 3.3 made us some troubles that were fixed with the recent versions. You may find the ant script (see Prerequisites on Welcome to Apache Geronimo Development Tools Subproject [1]) very handy. I'm working on a article about Geronimo, Eclipse, M2Eclipse and Spring Framework so can't help much until I've finished it (almost done), but as you see I'm nearly where I should be to help you out ;-) If only you could upgrade the env... Jacek [1] http://geronimo.apache.org/development-tools.html -- Jacek Laskowski http://www.JacekLaskowski.pl