Re: EAR can't find WEB-INF/classes or WEB-INF/lib
On May 27, 2008, at 3:50 PM, Andrew Thorburn wrote: Yes, that helps a lot. It's not the answer I wanted, but it does answer the question :). I guess that means I'll have to play around and see what can be done. How do separate classloaders work with statics (fields, etc). e.g. If I have a class A with static field B in the WAR, and again in the EJB jar, will I have two instances of that field, such that the WAR has one (because it has it's own separate classloader), and the EJB will have another? If so, then that's a problem. With normal parent-first classloader delegation, only one copy of the class will be loaded, the one in the ejb jar. If you turn on inverse- classloading in the war, then you will get two copies: one in the ejb jar visible to the ejbs, and one in the war, visible to the web app. IMO it is almost never appropriate to turn on inverse-classloading. I didn't discuss this detail in my first reply. I don't know much about Java Beans or Enterprise Java Beans, so this might be a bit silly, but: Can I put the MDB in the WAR? Or does it *have to* have it's own JAR? An mdb has to be in an ejb jar. (or a jar accessible to the ejb apps classloader, such as in a jar in an ear lib directory). Since the web app/war has a separate classloader that is a child of the ear classloader, there's no way you will be able to get the mdb visible to an ejb app if it is in the war. I guess I should mention that I think openejb standalone has a mode in which you can do something like what you seem to want to do, but it is not standard javaee. I don't know too much about it. hope this helps david jencks On Tue, May 27, 2008 at 6:03 PM, David Jencks <[EMAIL PROTECTED]> wrote: On May 26, 2008, at 6:28 PM, Andrew Thorburn wrote: Ok, it now works. Well, kinda. I think I must have originally also had a lib directory directly inside the EAR, as well as in the WAR, which was what was confusing Geronimo. Removed that, and my bean didn't start. Removed the (small but important) bits of code that relied on that, and everything works. Except it doesn't do logging anymore for my MDB. Works fine everywhere else. Apologies for not having the faintest idea what my problem was, but there we go. I now have a new problem, however: How do I reference the stuff in the WAR from my MDB JAR? I'm sure I saw information on this somewhere, but I closed it because I thought I had a different problem :(. I can't duplicate the JARS, as I'm sure that'll cause a vast multitude of problems. I really just want to be able to reference them easily, so that I don't have to worry about this when coding my application. In fact, it's going to be very necessary to communicate between the WAR and the MDB for it to be of any use at all (AJAX stuff communicating between browser and database via Java app). Basically need the WAR to be processed first, and then have the MDB JAR processed, so that I can then reference all the classes in the WAR. Is this possible? If not, what's the best alternative? Can I chuck my MDB into the WAR? I'd be very surprised if I could do that. And I don't know if that would solve any of my issues anyway... The exact location of the classfiles doesn't matter, just so long as it all works... Feh. This is starting to do my head in. Won't be posting again for nearly 24 hours (I only work part-time). I'm not sure I've understood clearly what problem you are having. Maybe if I explain the classloader structure your app has and what I think you need to do it will help. For an ear based application with no javaee app clients, there is one "base" classloader that includes all the ejb jars, all the rars, and all the jars in the lib directory. Then for each war inside the ear, there is a separate classloader that is a child of the ear classloader that contains the jars in WEB- INF/lib and the classes in WEB-INF/classes. Since this is a child of the ear classloader, all the code in the war can see the classes in the ear (ejb, connector, and lib). Also, since these war classloaders are children of the ear, nothing in an ejb, connector or lib jar can see anything in any war classloader. I think what you need to do is put any classes that need to be accessible to both the ejb app (such as your mdb) and the war(s) in either the ejb jar or in a jar in the ear's lib directory. Putting any such class anywhere in any war file will definitely prevent it being accessible from the ejb application. Hope this relates to what you are asking about :-) david jencks Anyway, thanks again, - Andrew
Re: JPA, entities and EJB3
1. I hope you named the file openejb-jar.xml 2. jta-datasource and non-jta-datasource have to contain the names of the datasources in the geronimo plan used for the pool, NOT some jndi name you might also map them to. The datasources don't need to be bound in jndi in order to be used for jpa 3. The non-jta-datasource must be a datasource that really has no transaction support, using the element instead of or ... in the connector plan. With derby I find it necessary to have a non-jta-datasource if any ddl is needed or if openjpa is generating the primary keys. I don't know if you can get away without one for other databases. If you want to experiment, leave out the non-jta-datasource rather than duplicating the jta-datasource contents. hope this helps david jencks On May 27, 2008, at 4:09 PM, zeros wrote: Good evening: I'm newbie with EJB3.0. I want to configure the persistence.xml to have entities managed with JPA. I have the next configuration files: OPENJPA-JAR.XML http://www.openejb.org/xml/ns/openejb-jar-2.1"; xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"; xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"; xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"; xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2";> o2o.marketing EJB 1.0.8 jar console.dbpool marketing 1.0 rar And I have also persistence.xml http://java.sun.com/xml/ns/persistence " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";> Entity Beans for User org.apache.openjpa.persistence.PersistenceProviderImplprovider> java:comp/env/marketing java:comp/env/marketing META-INF/orm.xml The error which I'm having is the next one: Unable to resolve reference "JtaDataSourceWrapper" and Unable to resolve reference "NonJtaDataSourceWrapper", which are basically the same error. I think this is produced because I'm not mapping the Datasocurce to the DBPool. Geronimo returns to me examples to do it for web, but no example to do it for an EJB. Please could you help me? WATCH OUT! I'm talking about entities and EJB3.0, not entiti beans and EJB2.0 Thanks in advance SERGIO -- View this message in context: http://www.nabble.com/JPA%2C-entities-and-EJB3-tp17502079s134p17502079.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: EAR can't find WEB-INF/classes or WEB-INF/lib
On May 27, 2008, at 4:40 PM, Andrew Thorburn wrote: Thanks for the help - I find that I'm struggling to get my head around this stuff. It's not exactly touched on at University (and I've only got the internet for help). Anyway, I think it's starting to come together. My current problem is that I'm getting a file not found error, of the form: /home/andrew/geronimo-jetty6-javaee5-2.1.1/repository/com/proaxiom/ maps/ MAPS/5.9.0/MAPS-5.9.0.ear/lib/maps_www.jar!/quartz-job.xml Now, the file quartz-job.xml is indeed inside maps_www.jar, and that is, indeed, the path to the JAR file. Which is more likely to be the problem: Something's not using the correct method to extract files from a JAR, or: I've stuck it in the wrong place? If it's the first, there's not much I can do about it, as it's the Quartz code, not code I've got access to. I'll try moving them while I wait for your response, as that seems the solution most likely to work. I don't know much about quartz. I hope that you can specify the location of this configuration file somehow? I also imagine that this file might be something the admin for the program might want to edit? In geronimo the philosophy is that the stuff in the repo should never be modified, and that app specific configuration files should go in the var directory. For instance, the derby db data files are in var/ derby. So, the recommended practice would be to put this file in var/ proaxiom/config or something similar. If you deploy your app as a geronimo plugin you can arrange that the plugin installation will unpack the (original version) of this file into such a location automatically. Otherwise you will have to install it manually. See http://cwiki.apache.org/GMOxDOC21/plugin-infrastructure.html thanks david jencks Thanks, - Andrew On Wed, May 28, 2008 at 11:20 AM, David Jencks <[EMAIL PROTECTED]> wrote: On May 27, 2008, at 3:50 PM, Andrew Thorburn wrote: Yes, that helps a lot. It's not the answer I wanted, but it does answer the question :). I guess that means I'll have to play around and see what can be done. How do separate classloaders work with statics (fields, etc). e.g. If I have a class A with static field B in the WAR, and again in the EJB jar, will I have two instances of that field, such that the WAR has one (because it has it's own separate classloader), and the EJB will have another? If so, then that's a problem. With normal parent-first classloader delegation, only one copy of the class will be loaded, the one in the ejb jar. If you turn on inverse-classloading in the war, then you will get two copies: one in the ejb jar visible to the ejbs, and one in the war, visible to the web app. IMO it is almost never appropriate to turn on inverse- classloading. I didn't discuss this detail in my first reply. I don't know much about Java Beans or Enterprise Java Beans, so this might be a bit silly, but: Can I put the MDB in the WAR? Or does it *have to* have it's own JAR? An mdb has to be in an ejb jar. (or a jar accessible to the ejb apps classloader, such as in a jar in an ear lib directory). Since the web app/war has a separate classloader that is a child of the ear classloader, there's no way you will be able to get the mdb visible to an ejb app if it is in the war. I guess I should mention that I think openejb standalone has a mode in which you can do something like what you seem to want to do, but it is not standard javaee. I don't know too much about it. hope this helps david jencks On Tue, May 27, 2008 at 6:03 PM, David Jencks <[EMAIL PROTECTED]> wrote: On May 26, 2008, at 6:28 PM, Andrew Thorburn wrote: Ok, it now works. Well, kinda. I think I must have originally also had a lib directory directly inside the EAR, as well as in the WAR, which was what was confusing Geronimo. Removed that, and my bean didn't start. Removed the (small but important) bits of code that relied on that, and everything works. Except it doesn't do logging anymore for my MDB. Works fine everywhere else. Apologies for not having the faintest idea what my problem was, but there we go. I now have a new problem, however: How do I reference the stuff in the WAR from my MDB JAR? I'm sure I saw information on this somewhere, but I closed it because I thought I had a different problem :(. I can't duplicate the JARS, as I'm sure that'll cause a vast multitude of problems. I really just want to be able to reference them easily, so that I don't have to worry about this when coding my application. In fact, it's going to be very necessary to communicate between the WAR and the MDB for it to be of any use at all (AJAX stuff communicating between browser and database via Java app). Basicall
Re: EAR can't find WEB-INF/classes or WEB-INF/lib
On May 27, 2008, at 7:32 PM, Andrew Thorburn wrote: Encountered another part of the problem: I can package the frontend stuff (that would normally be found in WAR/WEB-INF/classes into a JAR, put that in EAR/lib, and everything works. However, my boss doesn't like that. Why not? that's basically the only arrangement that will work It sounds a bit like the dependencies between the jars you are dealing with are somewhat mixed up. In my experience when this kind of problem is straightened out everyone finds it much easier to make progress and makes fewer mistakes. But if I leave the classes in WAR/WEB-INF, then I get a "Class Not Found" exception from one of the libs in EAR/lib, which is trying to load, via reflection, one of the classes in the frontend. I understand why that doesn't work, thanks to your explanation of the classloader. Obviously, if I move the libs from EAR/lib to EAR/WAR/WEB-INF/lib, then all is good. Except that my MDB can't find the libs anymore. Bugger. This problem will occur if I duplicate the libs, yes? I'm reasonably sure it did last time. I'd expect so. Further, if I set "reverse-classloading" to true, then I'm bound to get all sorts of problems, and if my MDB tries to access a static method (say, getInstance() for a class where that pattern is used), it will, essentially, call a *different* method to the one the classes in the WAR would call, yes? And return a different object. Not cool. I think that would produce more problems that it would solve. Can't really go around moving things, as the logging class (that's basically essential) is in the same package as the reflection-using class. Any ideas here apart from "Don't use Reflection", and "Don't call from libs to main"? Now, I think the solution I want is to have the libs able to access the frontend (in WEB-INF), while at the same time being access exactly the same libs from my MDB, and I don't think that's possible in Geronimo? Not at present. We could add a "single classloader per ear" flag fairly easily but it probably won't get into a release for a month or two. I'd start by asking why you can't straighten out the dependencies. thanks david jencks
Re: Main class used to start and stop the geronimo server?
I think you need to include -long or --long or geronimo keeps doing weird console specific attempts to rewrite the current line. I don't think you'd have this problem with g 2.1 or later but you might have other issues running gshell from jsw (I don't know if anyone has tried this yet). thanks david jencks On May 29, 2008, at 9:27 AM, Moni wrote: I am using the following command to start the geronimo server. /usr/local/jrockit-R27.5.0-jdk1.6.0_03/jre/bin/java -javaagent:/usr/ local/geronimo/bin/jpa.jar -Dorg.apache.geronimo.base.dir=/usr/local/ geronimo -Djava.endorsed.dirs=/usr/local/geronimo/lib/endorsed:/usr/ local/jrockit-R27.5.0-jdk1.6.0_03/jre/lib/endorsed - Djava.io.tmpdir=var/temp -jar /usr/local/geronimo/bin/server.jar However when I use the Java Service Wrapper to start the server I am getting the exception pasted below. I have been informed in the discussion forums for Java Service Wrapper that I am probably not specifying all the parameters to start the server. That is what is giving the start up error. Could you please look into it and let me know if I am missing any geronimo start up parameters. Any feedback will be much appreciated. INFO | jvm 1| 2008/05/27 14:59:48 | Booting Geronimo Kernel (in Java 1.6.0_03)... INFO | jvm 1| 2008/05/27 14:59:48 | Starting Geronimo Application Server v2.0.2 INFO | jvm 1| 2008/05/27 14:59:48 | INFO | jvm 1| 2008/05/27 14:59:48 | WrapperSimpleApp: Encountered an error running main: java.lang.StringIndexOutOfBoundsException: String index out of range: -11 INFO | jvm 1| 2008/05/27 14:59:48 | java.lang.StringIndexOutOfBoundsException: String index out of range: -11 INFO | jvm 1| 2008/05/27 14:59:48 | at java.lang.String.substring(String.java:1938) INFO | jvm 1| 2008/05/27 14:59:48 | at org .apache .geronimo .system .main .ProgressBarStartupMonitor.repaint(ProgressBarStartupMonitor.java:183) INFO | jvm 1| 2008/05/27 14:59:48 | at org .apache .geronimo .system .main .ProgressBarStartupMonitor .serverStartFailed(ProgressBarStartupMonitor.java:151) INFO | jvm 1| 2008/05/27 14:59:48 | at org .apache .geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java: 201) INFO | jvm 1| 2008/05/27 14:59:48 | at org .apache .geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78) INFO | jvm 1| 2008/05/27 14:59:48 | at org .apache .geronimo .kernel .util .MainConfigurationBootstrapper .main(MainConfigurationBootstrapper.java:45) INFO | jvm 1| 2008/05/27 14:59:48 | at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67) INFO | jvm 1| 2008/05/27 14:59:48 | at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30) INFO | jvm 1| 2008/05/27 14:59:48 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1| 2008/05/27 14:59:48 | at sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) INFO | jvm 1| 2008/05/27 14:59:48 | at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) INFO | jvm 1| 2008/05/27 14:59:48 | at java.lang.reflect.Method.invoke(Method.java:597) INFO | jvm 1| 2008/05/27 14:59:48 | at org .tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java: 240) INFO | jvm 1| 2008/05/27 14:59:48 | at java.lang.Thread.run(Thread.java:619) STATUS | wrapper | 2008/05/27 14:59:50 | <-- Wrapper Stopped Thanks and regards, Monisha - Original Message From: Kevan Miller <[EMAIL PROTECTED]> To: user@geronimo.apache.org Sent: Saturday, May 24, 2008 9:40:22 AM Subject: Re: Main class used to start and stop the geronimo server? On May 24, 2008, at 11:13 AM, Mark Aufdencamp wrote: Someone recently, within the the last 2 months, posted a Linux service start/stop script for Geronimo. I just tried to Google it for you, but didn't find it quickly. Perhaps someone else can find it and it can get added to the documentation as a sibling to the Windows Java Service Wrapper. http://www.nabble.com/Looking-for-init.d---rc.d-script-tt17113713.html#a17113713 Good idea... --kevan Original Message Subject: Main class used to start and stop the geronimo server? From: MShah <[EMAIL PROTECTED]> Date: Fri, May 23, 2008 5:41 pm To: user@geronimo.apache.org Hi, I am trying to start geronimo automatically on linux using the java service wrapper and in the conf file I need to specify the main class needed to start and stop the geronimo process instance. Can anyone please let me know that the main class is that is used to start the geronimo server instance and what is the main class used to stop the server? Any input will be appreciated. Thanks, Monisha -- View this message in c
Re: Database Pool with JPA in a Web App in G2.0.x
Where is your persistence.xml? I think you are doing something so that geronimo doesn't find it but openjpa does later. I think there's at least one testsuite app with jpa from a web app. thanks david jencks On May 29, 2008, at 7:30 AM, David Carew wrote: Does anyone know how to use a datasource with JPA classes that are in a Web App ? If I put the database pool name in the source> and or elements of persistence.xml I get a Naming Exception from OpenJPA saying that the name doesn't exist in JNDI. If I put a fully qualified JNDI name then the deployer complains because the name can't be resolved as a database pool name. From the examples I've seen this works if your JPA classes are in an EJB module . I don't really need to use JTA, I just need a way to point to a database pool from my persistence.xml file. Any ideas ? Regards, David
Re: MDB and openejb-jar.xml Sample
maybe http://cwiki.apache.org/confluence/display/GMOxDOC21/JMS+and+MDB+Sample+Application and if you check out the trunk samples svn co https://svn.apache.org/repos/asf/geronimo/samples/trunk the samples/jms-mdb-sample I haven't reviewed the docs or app for accuracy but the plugins install ok into trunk. thanks david jencks On May 30, 2008, at 1:21 PM, John wrote: I'm trying to put together a very basic test MDB to be deployed on a Geronimo 2.1.1 instance, but am having difficulty finding something that describes the minimal artifacts, be it MDB class, and a description of the openejb-jar.xml file. I noticed that the 2.0 documentation provides a sample EJB application but does not include an MDB. Can someone assist me by pointing me in the right direction? (I just feel like I am stumbling around in the dark) Thanks, John
Re: How to configure remote SMTP host?
I think that we should make this change in geronimo, right? SMTPPort is instructions on how to connect to a remote mail server, not a server socket geronimo is opening? So PortOffset is not appropriate. thanks david jencks On Jun 2, 2008, at 9:20 AM, sbyonge wrote: It works well after obtaining the mail session via the JNDI "mail/ Session" resource. I updated var/config/config-substitutions.properties instead of config.xml for SMTPHost. The only I had to change config.xml is to remove PortOffset since I have multiple Geronimo instances accessing the same remote SMTP host. ${SMTPHost} ${SMTPPort} Kevan Miller wrote: On Jun 2, 2008, at 9:45 AM, Kenneth P. Turvey wrote: On Mon, 02 Jun 2008 07:20:46 -0400, Rick McGuire wrote: sbyonge wrote: I am having trouble with mail session in Geronimo. I updated var/config/config.xml to point to remote STMP host smtpgw.mycom.com 25 However, mail session still seems to point to localhost instead of the remote host. How are you obtaining the mail session? SMTPTransport definition only manages the mail session obtained via the JNDI "mail/Session" resource lookup. If you're directly creating the mail session, you'll need to configure the properties yourself. Rick Looking at the configuration file it has ${SMTP_HOST} defined in it. If I'm configuring this service through the console, where do I change this setting? var/config/config-substitutions.properties --kevan -- View this message in context: http://www.nabble.com/How-to-configure-remote-SMTP-host--tp17591748s134p17605243.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: EJB/JMS Dependency Jars
On Jun 2, 2008, at 9:34 AM, John wrote: Hi Kevan, geronimo-ejb_3.0_spec-1.0.1.jar Like shooting fish in a barrel - thanks! Are these compile-time dependencies or do they become part of either the EAR archive or the EJB jar file? Compile time. These spec dependencies are supplied by geronimo (or other app server) at runtime. You shouldn't need the openejb-jee-3.0.jar you mentioned in your first post. thanks david jencks Thanks again, John
Re: Basic EAR Deployment confusion/issues
If you look at the jms-mdb-sample ear module you can see that we include the activmq connector in the ear to provide the jms connector support. This is not too obvious from the project structure since the activemq connector is not built in the project itself :-) I actually don't recommend this method any more, I think it makes more sense to deploy the jms connector separately as it lets you swap jms configuration between dev/test/production with fewer changes to your app. I've modified samples trunk to do this with the datasources, but haven't considered whether to do it for the jms sample as well yet. Hope this helps david jencks On Jun 3, 2008, at 9:39 AM, John wrote: Hi, I'm trying to deploy my first Geronimo EAR file without much luck (I have no problems with WARs). The EAR contains a single EJB jar file containing a single MDB. I have created a separate JMS connection factory and a destination and bundled the JAR file in the EAR using the following structure: EAR | -- META-INF/application.xml -- META-INF/geronimo-application.xml -- ejb jar | -- com/foo/TestMDB.class -- META-INF/openejb-jar.xml However, when I try to deploy the app in the console, I am getting following error: Geronimo ear plan contains modules that aren't in the ear: false I have tried (obviously unsuccessfully) to adapt the jms-mdb-sample deployment plan for my little "Hello World MDB" deployment and appreciate any help I can get in both understanding Geronimo deployment plans and figuring out my error. Here is the text of my geronimo-application.xml: http://geronimo.apache.org/xml/ns/j2ee/application-1.2 "> http://geronimo.apache.org/xml/ns/deployment-1.2 "> com.foo ESB 1.0-SNAPSHOT ear geronimo-activemq-ra-2.0-SNAPSHOT.rar http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";> http://geronimo.apache.org/xml/ns/deployment-1.2";> org.apache.geronimo.samplesdep:groupId> jms-resources 1.2 rar org.apache.geronimo.configs activemq-brokerdep:artifactId> car jms-resources http://geronimo.apache.org/xml/ns/naming-1.2";> DefaultWorkManagerlink> javax.jms.ConnectionFactoryconnectionfactory- interface> TestConnectionFactory javax.jms.QueueConnectionFactoryinterfa ce> javax.jms.Queue org.apache.activemq.command.ActiveMQQueueadminobject-cl ass> TestDestinationQueuename> TestDestinationQueue
Re: Basic EAR Deployment confusion/issues
I've tried to write up some instructions here: http://cwiki.apache.org/confluence/display/GMOxDOC21/Datasource%2C+ConnectionFactory%2C+MDB+and+jpa Please let me know if this helps comments would be really appreciated, especially soon before this all falls back out of my mind :-) thanks david jencks On Jun 3, 2008, at 11:17 AM, John wrote: It does, thank you David. However, if I remove the entire for the ActiveMQ resource adapter, it will remove the connection factory and queue destination information as well. How do I link up the TestMDB class with the proper connection factory and destination name? Does that occur in the openejb-jar.xml deployment descriptor? Thanks, John On 6/3/08 12:23 PM, "David Jencks" <[EMAIL PROTECTED]> wrote: If you look at the jms-mdb-sample ear module you can see that we include the activmq connector in the ear to provide the jms connector support. This is not too obvious from the project structure since the activemq connector is not built in the project itself :-) I actually don't recommend this method any more, I think it makes more sense to deploy the jms connector separately as it lets you swap jms configuration between dev/test/production with fewer changes to your app. I've modified samples trunk to do this with the datasources, but haven't considered whether to do it for the jms sample as well yet. Hope this helps david jencks On Jun 3, 2008, at 9:39 AM, John wrote: Hi, I'm trying to deploy my first Geronimo EAR file without much luck (I have no problems with WARs). The EAR contains a single EJB jar file containing a single MDB. I have created a separate JMS connection factory and a destination and bundled the JAR file in the EAR using the following structure: EAR | -- META-INF/application.xml -- META-INF/geronimo-application.xml -- ejb jar | -- com/foo/TestMDB.class -- META-INF/openejb-jar.xml However, when I try to deploy the app in the console, I am getting following error: Geronimo ear plan contains modules that aren't in the ear: false I have tried (obviously unsuccessfully) to adapt the jms-mdb-sample deployment plan for my little "Hello World MDB" deployment and appreciate any help I can get in both understanding Geronimo deployment plans and figuring out my error. Here is the text of my geronimo-application.xml: http://geronimo.apache.org/xml/ns/j2ee/application-1.2 "> http://geronimo.apache.org/xml/ns/deployment-1.2 "> com.foo ESB 1.0-SNAPSHOT ear geronimo-activemq-ra-2.0-SNAPSHOT.rar http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";> http://geronimo.apache.org/xml/ns/deployment-1.2";> org.apache.geronimo.samples jms-resources 1.2 rar org.apache.geronimo.configs activemq-broker car jms-resources http://geronimo.apache.org/xml/ns/naming-1.2";> DefaultWorkManager javax.jms.ConnectionFactory TestConnectionFactory javax.jms.QueueConnectionFactoryimplemented- interfa ce> javax.jms.Queue org.apache.activemq.command.ActiveMQQueue TestDestinationQueue TestDestinationQueue
Re: Basic EAR Deployment confusion/issues
On Jun 4, 2008, at 8:13 AM, John wrote: Hi David, Thank you for taking the time to document this on the Wiki. It does help, however, the struggle I have (and I assume I am not alone) is, as a new user approaching Geronimo deployment plans from "other" Java OSS AS containers, I am trying to create a simple MDB "Hello World" with the following artifacts: - Complete EAR application deployment plan/descriptor - Complete EJB deployment plan/descriptor sample - Fully configured ConnectionFactory and Queue/Topic Destinations (either with a deployment plan or from within the console) Such that a deployment, from either the command line or the console, deploys without error - and I'm just not there yet. Although this document certainly clarifies several things for me, I'm still confounded by the "Geronimo ear plan contains modules that aren't in the ear: false" error. that's pretty confusing ;-( Maybe I can figure out what it's trying to say. I will continue to work through this and would be happy to add to the Wiki page, or contribute the Hello World MDB sample app back to the Community, assuming I get there... I haven't checked if it actually works yet but I'm pretty sure the jms- mdb-sample deploys OK with the plan generated by building with maven. (I think this will work with samples/branches/2.1 but haven't checked. I'm more confident about samples/trunk which works with geronimo server trunk (2.2-SNAPSHOT)). After checking out all of samples/trunk (or branches/2.1) build it with maven and look in samples/jms-mdb-sample/jms-mdb-sample-jetty/target/resources/META-INF/ plan.xml for the plan to use. This app does include the jms configuration right in the ear which works fine although I don't think its as flexible as having it in a separate plugin. hope this helps david jencks Thanks again, you're a big help to people like me. John On 6/3/08 6:20 PM, "David Jencks" <[EMAIL PROTECTED]> wrote: I've tried to write up some instructions here: http://cwiki.apache.org/confluence/display/GMOxDOC21/Datasource%2C+ConnectionF actory%2C+MDB+and+jpa Please let me know if this helps comments would be really appreciated, especially soon before this all falls back out of my
Re: JSPWiki - Context did not start for an unknown reason
I tried it with geronimo-jetty6-javaee5-2.2-SNAPSHOT (trunk) and it deployed OK and is partially usable. I see this on deploy: 15:33:07,298 WARN [JettyModuleBuilder] Web application . does not contain a WEB-INF/geronimo-web.xml deployment plan. This may or may not be a problem, depending on whether you have things like resource references that need to be resolved. You can also give the deployer a separate deployment plan file on the command line. 15:33:08,402 WARN [JspModuleBuilderExtension] JspModuleBuilderExtension: Could not load tag class: com.opensymphony.module.oscache.web.tag.CacheTag mentioned in TLD file at file:/Users/david/geronimo/svn/geronimo-patch/trunk/assemblies/ geronimo-jetty6-javaee5/target/geronimo-jetty6-javaee5-2.2-SNAPSHOT/ repository/default/JSPWiki/1212705187099/JSPWiki-1212705187099.war/WEB- INF/oscache.tld 15:33:08,402 WARN [JspModuleBuilderExtension] JspModuleBuilderExtension: Could not load tag class: com.opensymphony.module.oscache.web.tag.UseCachedTag mentioned in TLD file at file:/Users/david/geronimo/svn/geronimo-patch/trunk/assemblies/ geronimo-jetty6-javaee5/target/geronimo-jetty6-javaee5-2.2-SNAPSHOT/ repository/default/JSPWiki/1212705187099/JSPWiki-1212705187099.war/WEB- INF/oscache.tld 15:33:08,403 WARN [JspModuleBuilderExtension] JspModuleBuilderExtension: Could not load tag class: com.opensymphony.module.oscache.web.tag.FlushTag mentioned in TLD file at file:/Users/david/geronimo/svn/geronimo-patch/trunk/assemblies/ geronimo-jetty6-javaee5/target/geronimo-jetty6-javaee5-2.2-SNAPSHOT/ repository/default/JSPWiki/1212705187099/JSPWiki-1212705187099.war/WEB- INF/oscache.tld which makes it look like something's missing from the war. Login doesn't work, which is not surprising considering the comments on deployment on jboss. To use jaas you'll need to set up an appropriate login configuration in a geronimo plan. Could I ask what your interest is here? From my point of view the ideal situation would be if jspwiki hosted a geronimo plugin version of the wiki on their site. We can't release such a plugin from apache since jspwiki is lgpl licenced. Possibly if there is interest we could find somewhere else to host a plugin project. I'm not sure if we could have a plugin project for reference with no possibility of releasing a plugin. If you want a reproducible way to deploy jspwiki for yourself, I still recommend the geronimo plugin approach. There's some info on how to set something like this up here: http://cwiki.apache.org/confluence/display/GMOxDOC21/Constructing+a+special-purpose+server+using+maven There's some info on how to configuration login modules in geronimo here: http://cwiki.apache.org/confluence/display/GMOxDOC21/Configuring+login+modules I also find the console swallowing exceptions half the time there is a problem rather annoying. I encourage you to file a jira issue about it. thanks david jencks On Jun 5, 2008, at 12:53 PM, Juergen Weber wrote: Hi, I tried to install the JSPWiki.war (JSPWiki 2.6.3) from http://www.jspwiki.org/ under geronimo-tomcat6-javaee5-2.1.1 via console. Console says The application was successfully deployed. The application was successfully started but afterward JSPWiki is shown as default/JSPWiki/1212695299546/warstopped What's wrong? At least Geronimo should not swallow the causing exception. Thanks, Juergen org.apache.geronimo.kernel.config.LifecycleException: start of default/JSPWiki/1 212695299546/war failed at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startCon figuration(SimpleConfigurationManager.java:566) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startCon figuration(SimpleConfigurationManager.java:530) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(Refl ectionMethodInvoker.java:34) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio n.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance. java:832) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5 7) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat ionInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(Pro xyMethodInterceptor.java:96) at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$ $b0cecfea.s tartConfiguration() at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCom mand.java:67)
Re: Geronimo v2.1 Plan Creator => Deploy Liferay 4.1.1
On Jun 8, 2008, at 1:44 PM, Peter Petersson wrote: Hi David I have been taking a look at your excellent "Constructing a special- purpose server using maven" (link below) in the hope to actually get Liferay 5.0.1 (rc1) running on Geronimo 2.1.1 in a special purpose build. Working on this i noticed what I believe is a typo in the documentation of the liferay-jetty pom : com.liferay liferay-portal ${liferayVersion} war : If I understand things right the artifactId should be "liferay- portal-lesslibs" else the liferay portal plugin would be the unmodified liferay war. I agree, fixed, thanks! Despite this finding I am unfortunately stuck at the same 404 error at http://localhost:8080/c as pointed out in the documentation. Although I added the debugviews console portlet plugin and trying to squeeze some logging out of liferay to find out what is going on I have so far not been able to get past this problem. Have anyone got some luck with this ? Any suggestion on what to do to get more information out of liferay/ geronimo to be able to pinpoint and fix this error is greatly appreciated! I talked with Brian Chan a little bit at JavaOne and it sounded like liferay had some way to get running on current geronimo, and he sounded interested in pursuing plugins. However, I haven't been able to contact him since. thanks! david jencks regards peter petersson David Jencks wrote: On Mar 4, 2008, at 9:48 AM, Jim Foster wrote: Hi David, I am glad that this is turning out to be a productive discussion. I have some more review notes for you. For reference: Constructing a special-purpose server using maven http://cwiki.apache.org/confluence/display/GMOxDOC21/Constructing+a+special-purpose+server+using+maven [1] Preparation – find the artifacts [2] Set up a parent maven project [3] Repackage the liferay war [4] Build a database plugin [5] Build the liferay war plugin [6] Build an assembly [7] Run the project Note: In the following, I use the term "baseline" to mean your liferay- sample.jar attached to your wiki doc, which builds as it should in maven (hence "baseline"), and "doc" to mean your wiki documentation. [3] baseline has this: 4.4.1 whereas the doc has this: ${liferayVersion} which produces an artifact not found error (i.e., there is no liferayVersion defined at this point of the process). fixed [5] baseline has this: com.liferay liferay-portal-lesslibs ${liferayVersion}-SNAPSHOT war provided whereas the doc has this: com.liferay liferay-portal-lesslibs ${liferayVersion} war provided which produces [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: com.liferay ArtifactId: liferay-portal-lesslibs Version: 4.4.1 fixed [6] baseline has this: 2.1 whereas the mvn command generates this: 2.2-SNAPSHOT which produces [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.geronimo.assemblies ArtifactId: assemblies Version: 2.2-SNAPSHOT Reason: Unable to download the artifact from any repository added a note near the top about this. [7] I see the same PermGen error. I wonder if we built this using MySQL rather than the system database (as the Liferay folks intended) we would be in better shape? After all, that database (the MySQL version at least) is just shy of 60MB, so it stands to reason that we are taxing resources here. I would like to explore this. Could you please guide me? It's worth a try, although it's also a bit worrysome. permGen OOM errors normally mean you are creating too many classes. The amount of data being fed into a database shouldn't affect the number of classes needed so if it is somehow affecting this I wonder if something else is wrong. I'll see if I can write up an example later today, but meanwhile you might look at the mysql plugin for roller under plugins/roller/ trunk. The basic idea is to build another database plugin, like the derby one but using the mysql wrapper and include something like this so the mysql plugin gets used instead of the derby one when it's installed.
Re: Geronimo v2.1 Plan Creator => Deploy Liferay 4.1.1
On Jun 8, 2008, at 3:03 PM, Peter Petersson wrote: David Jencks wrote: On Jun 8, 2008, at 1:44 PM, Peter Petersson wrote: Hi David I have been taking a look at your excellent "Constructing a special-purpose server using maven" (link below) in the hope to actually get Liferay 5.0.1 (rc1) running on Geronimo 2.1.1 in a special purpose build. Working on this i noticed what I believe is a typo in the documentation of the liferay-jetty pom : com.liferay liferay-portal ${liferayVersion} war : If I understand things right the artifactId should be "liferay- portal-lesslibs" else the liferay portal plugin would be the unmodified liferay war. I agree, fixed, thanks! Despite this finding I am unfortunately stuck at the same 404 error at http://localhost:8080/c as pointed out in the documentation. Although I added the debugviews console portlet plugin and trying to squeeze some logging out of liferay to find out what is going on I have so far not been able to get past this problem. Have anyone got some luck with this ? Any suggestion on what to do to get more information out of liferay/geronimo to be able to pinpoint and fix this error is greatly appreciated! I talked with Brian Chan a little bit at JavaOne and it sounded like liferay had some way to get running on current geronimo, and he sounded interested in pursuing plugins. However, I haven't been able to contact him since. Ah good I will take a look at it. Would it be any point in take the maven assembling source I have come up with for G 2.1.1 and Liferay 5.0.1 and set it up like the roller plugin? If appropriate I can put it (zip of the source tree) in a jira hopefully it is just some minor fixes that is needed for it to run and maybe I (or someone else) will be able to come up with a running bundle. I think the ideal situation would be if liferay took over this code as their geronimo integration. So, maybe opening an issue there with the code would provoke some movement :-). However if that doesn't work I think that a geronimo-hosted plugin would be a good idea. thanks david jencks regards peter petersson thanks! david jencks regards peter petersson David Jencks wrote: On Mar 4, 2008, at 9:48 AM, Jim Foster wrote: Hi David, I am glad that this is turning out to be a productive discussion. I have some more review notes for you. For reference: Constructing a special-purpose server using maven http://cwiki.apache.org/confluence/display/GMOxDOC21/Constructing+a+special-purpose+server+using+maven [1] Preparation – find the artifacts [2] Set up a parent maven project [3] Repackage the liferay war [4] Build a database plugin [5] Build the liferay war plugin [6] Build an assembly [7] Run the project Note: In the following, I use the term "baseline" to mean your liferay- sample.jar attached to your wiki doc, which builds as it should in maven (hence "baseline"), and "doc" to mean your wiki documentation. [3] baseline has this: 4.4.1 whereas the doc has this: ${liferayVersion} which produces an artifact not found error (i.e., there is no liferayVersion defined at this point of the process). fixed [5] baseline has this: com.liferay liferay-portal-lesslibs ${liferayVersion}-SNAPSHOT war provided whereas the doc has this: com.liferay liferay-portal-lesslibs ${liferayVersion} war provided which produces [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: com.liferay ArtifactId: liferay-portal-lesslibs Version: 4.4.1 fixed [6] baseline has this: 2.1 whereas the mvn command generates this: 2.2-SNAPSHOT which produces [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.geronimo.assemblies ArtifactId: assemblies Version: 2.2-SNAPSHOT Reason: Unable to download the artifact from any repository added a note near the top about this. [7] I see the same PermGen error. I wonder if we built this using MySQL rather than the system database (as the Liferay folks intended) we would be in better shape? After all, that database (the MySQL version at least) is just shy of 60MB, so it stands to reason that we are taxing resources here. I would like to explore this.
Re: JPA, entities and EJB3
I looked in the spec a bit and am not sure I understand how all the parts are meshing, maybe david blevins can chime in... I think that you've specified contradictory information and maybe we should be complaining rather than supplying a container managed jta EntityManager. I _think_ that your annotation-injected EntityManager has to be container managed and hence jta. I _think_ that if you want a resource-local EntityManager you have to inject the EMF with a PersistenceUnit annotation and get the EntityManager yourself. In the spec, section 5.6 starts: Whenacontainer-managedentitymanager isused, thelifecycleof thepersistencecontext isalways managedautomatically, transparentlytotheapplication, andthepersistencecontextispropagatedwith the JTA transaction. I think this means that with your @PersistenceContext annotation, you are definitely going to get a tx-type=JTA EM. Since you specified RESOURCE_LOCAL in the persistence.xml I think we should perhaps be objecting. I also think this means that you need an application managed persistence context to get RESOURCE_LOCAL. There are a bunch of examples in section 5.7 that all use @PersistenceUnit. Also hoping for clarification david jencks On Jun 9, 2008, at 1:43 AM, Phani Madgula wrote: Hi, I have tried to play with and as follows. I have the following peristence.xml in a web application. *** http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"; version="1.0"> type="RESOURCE_LOCAL"> org.apache.openjpa.persistence.PersistenceProviderImplprovider> ProductDS-nonJTA orm.xml samples.jpa.Product samples.jpa.Book *** In the servlet, I have the following code *** @PersistenceContext(unitName="Tutorial") private EntityManager em; . UserTransaction ut; try{ Context ctx = new InitialContext(); //ut = (UserTransaction)ctx.lookup("java:comp/UserTransaction"); //ut.begin(); //EntityTransaction et = em.getTransaction(); //et.begin(); Book book = new Book("D","John", 1.0,"Joe","1934834-23823","Phani"); em.persist(book); //et.commit(); //ut.commit(); }catch(Exception e){ e.printStackTrace(); throw new ServletException (e); } *** 1. When I hit the servlet, I get the following error. *** javax.persistence.TransactionRequiredException : No Active transaction *** 2. Suppose I have the following code in the servlet ** *** @PersistenceContext(unitName="Tutorial") private EntityManager em; . UserTransaction ut; try{ Context ctx = new InitialContext(); //ut = (UserTransaction)ctx.lookup("java:comp/UserTransaction"); //ut.begin(); //Uncomment EntityTransaction EntityTransaction et = em.getTransaction(); et.begin(); Book book = new Book("D","John", 1.0,"Joe","1934834-23823","Phani"); em.persist(book); et.commit(); //ut.commit(); }catch(Exception e){ e.printStackTrace(); throw new ServletException (e); } *** I get the following error *** java.lang.IllegalStateException : You can not call getTransaction on a container managed EntityManager * 3. Only if I use JTA API, I am able to get the entity persisted properly as below. *** @PersistenceContext(unitName="Tutorial") private EntityManager em; . UserTransaction ut; try{ Context ctx = new InitialContext(); ut = (UserTransaction)ctx.lookup("java:comp/UserTransaction"); ut.begin(); Book book = new Book("D",&
Re: Problem building plancreator
I think you might have updated from svn after you did your last full build and missed a private repository update. One of the worst features of our build at the moment is the private repo in svn that contains our versions of some artifacts not yet released by their projects, including this jasper jar. In order to make them available to the rest of the build you have to build the repository "project" in the root of the geronimo checkout: this will copy them to your local repo, so stuff that needs them such as the plancreator plugin can find them. This also happens if you do a full build. hope this helps david jencks On Jun 10, 2008, at 10:22 AM, Shrey Banga wrote: I'm sorry I did not mention I already built the entire trunk first, which was successful. I used the command mvn eclipse:eclipse to create eclipse projects, without the -o as it reported missing artefacts when done offline. Next, I opened the plancreator-portlets project in eclipse, modified it and tried to build it but it failed with the given error. "...Missing dependency: org.apache.tomcat/jasper/6.0.16-G652117/ jar..." My m2repo has 6.0.14-G614585 and 6.0.13-G543818 in the jasper directory. Should I manually download the mentioned jar ? If so, from where? On Tue, Jun 10, 2008 at 7:04 PM, Lin Sun <[EMAIL PROTECTED]> wrote: Hmm I don't know if you can build plancreator like this, without building the entire AG trunk first. You could try building the entire AG trunk first (http://cwiki.apache.org/GMOxDEV/building-apache-geronimo.html), which should build the plancreator. Lin On Tue, Jun 10, 2008 at 6:42 AM, Shrey Banga <[EMAIL PROTECTED]> wrote: > Hi > > I'm trying to build the plancreator with > trunk\plugins\plancreator> mvn > > but it fails with the following error: > > [ERROR] Error while starting; GBean is now in the FAILED state: > abstractName="or > g.apache.geronimo.configs/jasper/2.2-SNAPSHOT/car? configurationName=org.apache.g > eronimo.configs/jasper/2.2-SNAPSHOT/car" > org.apache.geronimo.kernel.repository.MissingDependencyException: Missing > depend > ency: org.apache.tomcat/jasper/6.0.16-G652117/jar > > org .apache .geronimo.kernel.config.ConfigurationResolver.resolve(Configuratio > nResolver.java:113) > > org .apache .geronimo.kernel.config.Configuration.buildClassPath(Configuration > .java:406) > > org .apache .geronimo.kernel.config.Configuration.createConfigurationClasssLoa > der(Configuration.java:323) > > org .apache .geronimo.kernel.config.Configuration.(Configuration.java:26 > 8) > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > sun .reflect .NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces > sorImpl.java:39) > > sun .reflect .DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc > torAccessorImpl.java:27) > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > > org .apache.xbean.recipe.ObjectRecipe.createInstance(ObjectRecipe.java: 390) > org.apache.xbean.recipe.ObjectRecipe.create(ObjectRecipe.java: 194) > > org .apache .geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance > .java:910) > > org .apache .geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanI > nstanceState.java:269) > > org .apache .geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceStat > e.java:103) > > org .apache .geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:524 > ) > > org .apache .geronimo.kernel.basic.BasicKernel.startGBean(BasicKernel.java:359 > ) > > org .apache .geronimo.kernel.config.KernelConfigurationManager.load(KernelConf > igurationManager.java:162) > > org .apache .geronimo.kernel.config.SimpleConfigurationManager.loadConfigurati > on(SimpleConfigurationManager.java:312) > > org .apache .geronimo.kernel.config.SimpleConfigurationManager.loadConfigurati > on(SimpleConfigurationManager.java:280) > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > > sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > java.lang.reflect.Method.invoke(Method.java:585) > > org .apache .geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionM > ethodInvoker.java:34) > > org .apache .geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java: > 124) > > org .apache .geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:81 > 5) > org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java: 57)
Re: Cannot deploy wmq.jmsra.rar (WebSphere MQ)
I think you have to start the config-property names with an upper-case letter, e.g. xxx thanks david jencks On Jun 12, 2008, at 4:29 PM, sbyonge wrote: I am having problem with deploying wmq.jmsra.rar in Geronimo 2.1.1 Deployment failed: The plan is trying to set attributes: [queueManager, transportType] Complete error message below. deployment plan: http://geronimo.apache.org/xml/ns/j2ee/ connector-1.2" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"; xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2";> mq jmsra 1.0 rar MQRA DefaultWorkManager javax.jms.QueueConnectionFactoryconnectionfactory-interface> MyQueueConnectionFactory xxx xxx CLIENT xxx xxxsetting> 50 20 5000 2 javax.jms.Queue com.ibm.mq.connector.outbound.MQQueueProxyadminobject-class> xxx xxx xxx Error detail: The plan is trying to set attributes: [queueManager, channel, transportType, hostName, port] Known attributes: [GAttributeInfo: name=TargetClientMatching type=boolean persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=objectName type=java.lang.String persistent=false manageable=false readable=true writable=false getterName=getObjectName setterName=null] [GAttributeInfo: name=SecurityExitInit type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=UserName type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=connectionFactory type=java.lang.Object persistent=false manageable=false readable=true writable=false getterName=getConnectionFactory setterName=null] [GAttributeInfo: name=HostName type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=Port type=int persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=SslPeerName type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=SubscriptionStore type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=TransportType type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=connectionFactoryInterface type=java.lang.String persistent=true manageable=true readable=true writable=false getterName=getConnectionFactoryInterface setterName=null] [GAttributeInfo: name=SendExitInit type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=statisticsProvider type=boolean persistent=false manageable=false readable=true writable=false getterName=isStatisticsProvider setterName=null] [GAttributeInfo: name=connectionFactoryImplClass type=java.lang.String persistent=true manageable=true readable=true writable=false getterName=getConnectionFactoryImplClass setterName=null] [GAttributeInfo: name=CleanupLevel type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=BrokerControlQueue type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=SecurityExit type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=stateManageable type=boolean persistent=false manageable=false readable=true writable=false getterName=isStateManageable setterName=null] [GAttributeInfo: name=kernel type=org.apache.geronimo.kernel.Kernel persistent=false manageable=false readable=false writable=false getterName=null setterName=null] [GAttributeInfo: name=SslCipherSuite type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=ReceiveExitInit type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=configProperties type=java.util.Map persistent=false manageable=false readable=true writable=false getterName=getConfigProperties setterName=null] [GAttributeInfo: name=ClientID type=java.lang.String persistent=true manageable=true readable=true writable=true getterName=null setterName=null] [GAttributeInfo: name=Pu
Re: Cannot deploy wmq.jmsra.rar (WebSphere MQ)
int is not an allowed config-property type, it should be Integer. Since we call the methods via some sort of reflection you might be able to make this work by changing the type in the ra.xml to java.lang.Integer, but I make no promises. thanks david jencks On Jun 13, 2008, at 8:11 AM, sbyonge wrote: I changed all to upper cases and now I am getting the following error. Deployment failed: Could not load attribute class: type: int org.apache.geronimo.common.DeploymentException: Could not load attribute class: type: int at org .apache .geronimo .connector .deployment .ConnectorModuleBuilder.getValue(ConnectorModuleBuilder.java:739) at org .apache .geronimo .connector .deployment .ConnectorModuleBuilder .setDynamicGBeanDataAttributes(ConnectorModuleBuilder.java:717) at org .apache .geronimo .connector .deployment .ConnectorModuleBuilder .addOutboundGBeans(ConnectorModuleBuilder.java:863) at org .apache .geronimo .connector .deployment .ConnectorModuleBuilder .addConnectorGBeans(ConnectorModuleBuilder.java:563) at org .apache .geronimo .connector .deployment .ConnectorModuleBuilder.initContext(ConnectorModuleBuilder.java:499) at org .apache .geronimo .j2ee .deployment .EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org .apache .geronimo .gbean .runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java: 34) at org .apache .geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) at org .apache .geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java: 239) at org .apache .geronimo .deployment .plugin .local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) at org .apache .geronimo .deployment .plugin.local.DistributeCommand.run(DistributeCommand.java:61) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: int in classloader gmo.mq/jmsra/1.0/rar at org .apache .geronimo .kernel .config .MultiParentClassLoader .loadOptimizedClass(MultiParentClassLoader.java:428) at org .apache .geronimo .kernel .config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java: 278) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org .apache .geronimo .connector .deployment .ConnectorModuleBuilder.getValue(ConnectorModuleBuilder.java:737) ... 18 more I think you have to start the config-property names with an upper-case letter, e.g. xxx thanks david jencks -- View this message in context: http://www.nabble.com/Cannot-deploy-wmq.jmsra.rar-%28WebSphere-MQ%29-tp17811963s134p17825640.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Class.getResource does not find a resource in a JCA module
The only stuff that gets in a classloader in a rar is stuff in a jar. So, to make the log4j config file loadable from cl.getResource you will need to put it inside a jar in the rar. Less than ideal, I know. thanks david jencks On Jun 16, 2008, at 4:30 AM, florinbratu wrote: Hello! I am developping a JCA module, which has the following structure: $ jar tf proactive.rar META-INF/ META-INF/MANIFEST.MF META-INF/proactive-log4j META-INF/ra.xml META-INF/geronimo-ra.xml proactiveConnector.jar ProActive.jar bouncycastle.jar fractal.jar javassist.jar log4j.jar xercesImpl.jar xml-apis.jar I use the following code to gain access to the proactive-log4j configuration file: public static final String LOG4J_CONFIG_FILE = "/META-INF/proactive- log4j"; URL log4jConfigFile = caller.getClass().getResource(LOG4J_CONFIG_FILE); This code is contained into a class placed in proactiveConnector.jar - it is in fact a log4j RepositorySelector. The problem is that log4jConfigFile is null after the getResource call. Can you tell me how to get this working, ie how to load the log4j configuration file from the RAR archive? Thanks, Florin. -- View this message in context: http://www.nabble.com/Class.getResource-does-not-find-a-resource-in-a-JCA-module-tp17862361s134p17862361.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: request.isUserInRole("some-role") always return false after @EJB injection
On Jun 16, 2008, at 10:12 AM, Kevan Miller wrote: On Jun 16, 2008, at 7:57 AM, Stig Even Larsen wrote: I forgot to tell that I'm using Geronimo 2.0.2 on Debian Etch. Regards, Stig Even Larsen Stig Even Larsen wrote: Hi, After logging in via the j_security_check form I use the simplest of jsp page for testing purpose. I've defined several roles and am able to check this via request.isUserInRole("some-role"). Everything is working as expected. When I throw in a EJB via @EJB annotation or via JNDI lookup request.isUserInRole("some-role") is now always returning false. Is this a bug or I'm I missing something here? Hi Stig, I think you've run into a bug, which was recently fixed (revision number 663484 for branches/2.0). The nightly build of 2.0.3-SNAPSHOT should contain the fix. You'll find some binaries here -- http://people.apache.org/builds/geronimo/server/binaries/2.0/20080616/ Just for tracking purposes this is GERONIMO-4099. This was the bug that came to my mind first also, but I'm not convinced it's the same problem. Please let us know whether the 2.0.3 snapshot fixes the problem you are seeing. thanks david jencks --kevan
Re: JPA transactions
On Jun 16, 2008, at 5:21 AM, Phani Madgula wrote: Hi, I tried to create a application managed entity manager as follows. persistence.xml --- http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";> type="RESOURCE_LOCAL"> BeanManagedJPA org.apache.openjpa.persistence.PersistenceProviderImplprovider> AccountDS sample.jpa.Account sample.jpa.Person Here the 'AccountDS' is the datasource deployed over 'AccountDB' in embedded derby database. --- I have the stateful 'AccountBean' that has the following code --- @Stateful @Local(AccountInterface.class) @TransactionManagement(TransactionManagementType.BEAN) public class AccountBean implements AccountInterface{ @PersistenceUnit(unitName="AccountUnit") private EntityManagerFactory emf; private EntityManager em; Account account; Person person; @PostConstruct public void init(){ em = emf.createEntityManager(); } public void initialize(int accountNumber){ account = em.find(Account.class, accountNumber); if(account == null)throw new IllegalStateException("Account number ("+accountNumber +") not found"); person = em.find(Person.class, account.getPersonId()); if(person == null)throw new IllegalStateException ("Person Id("+account.getPersonId()+ ") not found. There is a descripancy in the database for account number ("+accountNumber+")"); } [...] public void updateAllValues(String address, String personName, double balance){ em.getTransaction().begin(); System.out.println("Local Transaction Begin-->"); setAddress(address); setPersonName(personName); setBalance(balance); em.getTransaction().commit(); System.out.println("Local Transaction Commit-->"); } [...] public void withdraw(double amount){ if(amount > getBalance()) throw new IllegalStateException("The amount("+amount+ ") to be withdrawn is more than the available balance("+getBalance()+")"); try{ System.out.println("Method withdraw : message ---> 1"); em.joinTransaction(); System.out.println("Method withdraw : message ---> 2"); setBalance(getBalance() - amount); System.out.println("Method withdraw : message ---> 3"); }catch(Exception e){ throw new IllegalStateException(e); } } public void deposit(double amount){ try{ em.joinTransaction(); setBalance(getBalance() + amount); }catch(Exception e){ throw new IllegalStateException(e); } } The setAddress(address), setPersonName(personName), setBalance(balance) methods simply set the values to 'Account' and 'Person' entities declared at the class level. I also call 'initialize()' method to initialize 'person' and 'account' fields in the stateful session bean. Please also note that @TransactionManagement(TransactionManagementType.BEAN) is declared. --- The 'updateAllValues()' method uses local transaction to update name, address, balance fields in 'account' and 'person' entities. It is expected that the method is called with no active transaction. However, 'withdraw(amount)' and 'deposit(amount)' methods are called in a transaction. Hence, the entity managers are joined to the active transaction. I think this is your mistake. Since you declared the ejb to have bean- managed tx, when you call any method on the ejb, any existing jta transaction (such as the one you just started in the servlet using UserTransaction) is suspended so that your ejb can do its own transaction control. I don't think you can mix the styles of tx control as you appear to be trying to do. Also I don't think that a resource-local em is enrolled in any jta transactions under any circumstances, although I'm not too sure about this. I'm pretty sure it doesn't happen without a method call. thanks david jencks The typical web client for the bean is as follows. --- [...] int debitAccount = Integer.parseInt(request.getParameter("accou
Re: request.isUserInRole("some-role") always return false after @EJB injection
On Jun 16, 2008, at 1:11 PM, Stig Even Larsen wrote: Quoting David Jencks <[EMAIL PROTECTED]>: On Jun 16, 2008, at 12:30 PM, Stig Even Larsen wrote: Quoting David Jencks <[EMAIL PROTECTED]>: On Jun 16, 2008, at 10:12 AM, Kevan Miller wrote: On Jun 16, 2008, at 7:57 AM, Stig Even Larsen wrote: I forgot to tell that I'm using Geronimo 2.0.2 on Debian Etch. Regards, Stig Even Larsen Stig Even Larsen wrote: Hi, After logging in via the j_security_check form I use the simplest of jsp page for testing purpose. I've defined several roles and am able to check this via request.isUserInRole("some-role"). Everything is working as expected. When I throw in a EJB via @EJB annotation or via JNDI lookup request.isUserInRole("some-role") is now always returning false. Is this a bug or I'm I missing something here? Hi Stig, I think you've run into a bug, which was recently fixed (revision number 663484 for branches/2.0). The nightly build of 2.0.3-SNAPSHOT should contain the fix. You'll find some binaries here -- http://people.apache.org/builds/geronimo/server/binaries/2.0/20080616/ Just for tracking purposes this is GERONIMO-4099. This was the bug that came to my mind first also, but I'm not convinced it's the same problem. Please let us know whether the 2.0.3 snapshot fixes the problem you are seeing. thanks david jencks --kevan Hi, Thanks for your reply. Is this also an issue with 2.1.x? GERONIMO-4099 was an issue with 2.0.x, 2.1.x, and trunk (2.2- SNAPSHOT). I fixed it in all branches at the same time. Any progress on seeing if it is the problem you are running into? Well, I'm struggeling finding an "upgrade routine". Is there any? Anyway, since I'm at CET time (GMT+1) I probably won't be able to doing a test until working hours tomorrow... I'm not sure what you are looking for. There is no way to upgrade a geronimo installation from one version of geronimo to another "in place": you have to redeploy your applications on the new server. On the other hand I recommend a maven based workflow to build a customized server including your apps, in which case you'd just change the geronimo version in the appropriate pom. http://cwiki.apache.org/GMOxDOC21/constructing-a-special-purpose-server-using-maven.html thanks david jencks replying to the list will get you more responses in case I'm not around :-) thanks david jencks Sorry about that, won't happen agein ;) Regards, Stig Even Larsen Regards, Stig Even Larsen
Re: request.isUserInRole("some-role") always return false after @EJB injection
On Jun 17, 2008, at 12:07 AM, Stig Even Larsen wrote: David Jencks wrote: On Jun 16, 2008, at 1:11 PM, Stig Even Larsen wrote: Quoting David Jencks <[EMAIL PROTECTED]>: On Jun 16, 2008, at 12:30 PM, Stig Even Larsen wrote: Quoting David Jencks <[EMAIL PROTECTED]>: On Jun 16, 2008, at 10:12 AM, Kevan Miller wrote: On Jun 16, 2008, at 7:57 AM, Stig Even Larsen wrote: I forgot to tell that I'm using Geronimo 2.0.2 on Debian Etch. Regards, Stig Even Larsen Stig Even Larsen wrote: Hi, After logging in via the j_security_check form I use the simplest of jsp page for testing purpose. I've defined several roles and am able to check this via request.isUserInRole("some-role"). Everything is working as expected. When I throw in a EJB via @EJB annotation or via JNDI lookup request.isUserInRole("some-role") is now always returning false. Is this a bug or I'm I missing something here? Hi Stig, I think you've run into a bug, which was recently fixed (revision number 663484 for branches/2.0). The nightly build of 2.0.3-SNAPSHOT should contain the fix. You'll find some binaries here -- http://people.apache.org/builds/geronimo/server/binaries/2.0/20080616/ Just for tracking purposes this is GERONIMO-4099. This was the bug that came to my mind first also, but I'm not convinced it's the same problem. Please let us know whether the 2.0.3 snapshot fixes the problem you are seeing. thanks david jencks --kevan Hi, Thanks for your reply. Is this also an issue with 2.1.x? GERONIMO-4099 was an issue with 2.0.x, 2.1.x, and trunk (2.2- SNAPSHOT). I fixed it in all branches at the same time. Any progress on seeing if it is the problem you are running into? Well, I'm struggeling finding an "upgrade routine". Is there any? Anyway, since I'm at CET time (GMT+1) I probably won't be able to doing a test until working hours tomorrow... I'm not sure what you are looking for. There is no way to upgrade a geronimo installation from one version of geronimo to another "in place": you have to redeploy your applications on the new server. On the other hand I recommend a maven based workflow to build a customized server including your apps, in which case you'd just change the geronimo version in the appropriate pom. http://cwiki.apache.org/GMOxDOC21/constructing-a-special-purpose-server-using-maven.html thanks david jencks replying to the list will get you more responses in case I'm not around :-) thanks david jencks Sorry about that, won't happen agein ;) Regards, Stig Even Larsen Regards, Stig Even Larsen Hi again, In the 2.0.3 SNAPSHOT of 20080616 the malfunction is still there. It seems that this issue is not the same as described in GERONIMO-4099. I think is time to file a detailed bug-report? That would be great! If you can provide a small app showing the problem or at least the servlet code that would be good. I've just been looking at a similar case that works where there is a servlet and ejb, and the isUser/CallerinRole methods work: in the case I have, the servlet tests before calling the ejb and not after calling the ejb. Maybe you are testing in the servlet after calling the ejb? thanks! david jencks Best regards, Stig Even Larsen
Re: request.isUserInRole("some-role") always return false after @EJB injection
On Jun 17, 2008, at 12:35 PM, Stig Even Larsen wrote: Quoting Stig Even Larsen <[EMAIL PROTECTED]>: Stig Even Larsen wrote: David Jencks wrote: On Jun 17, 2008, at 12:07 AM, Stig Even Larsen wrote: David Jencks wrote: On Jun 16, 2008, at 1:11 PM, Stig Even Larsen wrote: Quoting David Jencks <[EMAIL PROTECTED]>: On Jun 16, 2008, at 12:30 PM, Stig Even Larsen wrote: Quoting David Jencks <[EMAIL PROTECTED]>: On Jun 16, 2008, at 10:12 AM, Kevan Miller wrote: On Jun 16, 2008, at 7:57 AM, Stig Even Larsen wrote: I forgot to tell that I'm using Geronimo 2.0.2 on Debian Etch. Regards, Stig Even Larsen Stig Even Larsen wrote: Hi, After logging in via the j_security_check form I use the simplest of jsp page for testing purpose. I've defined several roles and am able to check this via request.isUserInRole("some-role"). Everything is working as expected. When I throw in a EJB via @EJB annotation or via JNDI lookup request.isUserInRole("some-role") is now always returning false. Is this a bug or I'm I missing something here? Hi Stig, I think you've run into a bug, which was recently fixed (revision number 663484 for branches/2.0). The nightly build of 2.0.3-SNAPSHOT should contain the fix. You'll find some binaries here --http://people.apache.org/builds/geronimo/server/binaries/2.0/20080616/ Just for tracking purposes this is GERONIMO-4099. This was the bug that came to my mind first also, but I'm not convinced it's the same problem. Please let us know whether the 2.0.3 snapshot fixes the problem you are seeing. thanks david jencks --kevan Hi, Thanks for your reply. Is this also an issue with 2.1.x? GERONIMO-4099 was an issue with 2.0.x, 2.1.x, and trunk (2.2- SNAPSHOT). I fixed it in all branches at the same time. Any progress on seeing if it is the problem you are running into? Well, I'm struggeling finding an "upgrade routine". Is there any? Anyway, since I'm at CET time (GMT+1) I probably won't be able to doing a test until working hours tomorrow... I'm not sure what you are looking for. There is no way to upgrade a geronimo installation from one version of geronimo to another "in place": you have to redeploy your applications on the new server. On the other hand I recommend a maven based workflow to build a customized server including your apps, in which case you'd just change the geronimo version in the appropriate pom. http://cwiki.apache.org/GMOxDOC21/constructing-a-special-purpose-server-using-maven.html thanks david jencks replying to the list will get you more responses in case I'm not around :-) thanks david jencks Sorry about that, won't happen agein ;) Regards, Stig Even Larsen Regards, Stig Even Larsen Hi again, In the 2.0.3 SNAPSHOT of 20080616 the malfunction is still there. It seems that this issue is not the same as described in GERONIMO-4099. I think is time to file a detailed bug-report? That would be great! If you can provide a small app showing the problem or at least the servlet code that would be good. I've just been looking at a similar case that works where there is a servlet and ejb, and the isUser/CallerinRole methods work: in the case I have, the servlet tests before calling the ejb and not after calling the ejb. Maybe you are testing in the servlet after calling the ejb? thanks! david jencks Best regards, Stig Even Larsen Hi David, I've noticed something odd. After first login (first login after deployment) the request.isUserInRole(xxx) returns false. If a reload the page (eg. calling the servlet again) it returns true. If I then invalidate the session and login in again it returns true (it behaves normally). So it is infact working :) I'll be filing that bugreport anyway so you can test it. It will be submitted within the next 1/2 hour. Best regards, Stig Even Larsen Hi again, It seems that its partially working in 2.0.2 also which means that the GERONIMO-4099 has nothing to do in this scenario. I've posted GERONIMO-4119 as a new bug. Best regards, Stig Even Larsen Hi David, Will your fix (rev 668765) be available in tonights 2.0.3 SNAPSHOT? I just ported the fix to branches/2.0 so the next time 2.0.3-SNAPSHOT is built it will be included. I'm not certain when that will be. thanks david jencks Best regards, Stig Even Larsen
Re: Problem with deploying/undeploying/restarting modules
On Jun 17, 2008, at 2:56 PM, Beniamin Mazan wrote: Kevan Miller wrote: On Jun 17, 2008, at 8:22 AM, Beniamin Mazan wrote: I've just found problem in G 2.1.1 release. Very often I can't undeploy module from command line and also can't force Geronimo to restart module using G-console. Firefox still shows "reloading page...". So I hardly ever redeploy module without Geronimo restart. Hi Beniamin, Does the undeploy fail? Or does it succeed (or at least tell you that it succeeds)? And the subseqent deploy fails? What OS are you running on? --kevan I use win xp prof but the same problem has on machine with Debian. When Geronimo is running I can deploy my modules and sometimes undeploy some of them. But there's turning point in Geronimo state when Geronimo is not able to undeploy/deploy any module. Then the only one way to undeploy modules is to shutdown Geronimo, remove archives from ./repository and remove part of config.xml with modules' declarations. I've encountered lots of problems trying to undeploy apps that did not deploy successfully (in fact, not just that the admin console didn't tell me about a problem). Did the app you can't undeploy actually get deployed successfully or was it a failed deployment? thanks david jencks Beniamin - thanks Beniamin -- View this message in context: http://www.nabble.com/Problem-with-deploying-undeploying-restarting-modules-tp17894050s134p17948831.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: openJPA provided by Geronimo2.1.1 to run on JDk6
How are you starting geronimo? If you use gshell (e.g. bin/gsh geronimo/start-server) the runtime enhancer should be working fine. That said I would recommend build-time enhancement anyway. Is there some reason you stopped build-time enhancement? thanks david jencks On Jun 17, 2008, at 5:47 PM, Sai wrote: currently our applications(webservices) running fine on JDK5, Geronimo 1.1.1 and OpenJPA-0.9.6. Enhancing is done using maven plugin at build time. We are planned to move to JDK6,Geronimo 2.1.1 (as geronimo has openjpa1.0.2 -planned to use the same). I tried build webservice deployed on Geronimo. When I put the request it says that ValueObj is not enhanced.posted the stack trace as below. Tried different ways to enhance but same issue. Could any one advice how to enhance ,if we use openJPA at runtime given by container. Thanks in advance. Sai INFO: WSSERVLET14: JAX-WS servlet initializing 17280.640: [GC [PSYoungGen: 51680K->940K(54976K)] 103983K- >53680K(521024K), 0.04 75474 secs] [Times: user=0.02 sys=0.00, real=0.05 secs] 17-Jun-2008 8:05:44 PM abc.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: The type "class abc.efg.hello.prog.vo.ValueObj" has not been enh anced.; nested exception is error> org. apache.openjpa.perhellotence.ArgumentException: The type "class abc.efg.hello.bus iness.vo.ValueObj" has not been enhanced. org.springframework.dao.InvalidDataAccessApiUsageException: The type "class abc. efg.hello.prog.vo.ValueObj" has not been enhanced.; nested exception is org.apache.openjpa.perhellotence.A rgumentException: The type "class abc.efg.hello.prog.vo.ValueObj" has no t been enhanced. Caused by: org.apache.openjpa.pe rhellotence.ArgumentException: The type "class abc.efg.hello.prog.vo.ValueObj" has not been enhanced. at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java: 1639) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1613 ) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepo sitory.java:675) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataReposi tory.java:575) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository .java:500) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataReposi tory.java:302) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataReposi -- View this message in context: http://www.nabble.com/openJPA-provided-by-Geronimo2.1.1-to-run-on-JDk6-tp17957616s134p17957616.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: request.isUserInRole("some-role") always return false after @EJB injection
On Jun 18, 2008, at 4:31 AM, Stig Even Larsen wrote: Hi again, I think I've found an related error. I use javaBeans for wrapping Session EJB via jndi (one-to-one, method to method) to avoid to much java code in jsps. request.isUserInRole() always return false no mather how many times it is called. Is seems like the jndi lookup prevents the isUserinRole to work normally. Should I file a new bug-report or is this the same problem describe with EJB injection? An example. I have an stateless session bean (EJB): @Stateless public class TimeUtilsBean implements TimeUtilsLocal { public String getString() { return "Hello from Stateless EJB!"; } } A javaBean EJB wrapper: public class EJBWrapper { private TimeUtilsLocal lookupTimeUtilsBean() { try { Context c = new InitialContext(); return (TimeUtilsLocal) c.lookup("java:comp/env/ TimeUtilsBean"); } catch (NamingException ne) { System.out.println("NameingException: "+ne.getMessage()); } } public String getDate(){ return(this.lookupTimeUtilsBean().getString()); } } A form protected (j_security_check) jsp <[EMAIL PROTECTED] contentType="text/html" pageEncoding="UTF-8" import="no.nimra.ejb.wrapper.EJBWrapper "%> http://www.w3.org/TR/html4/loose.dtd";> scope="session" /> JSP Test Role test Time: <%= nisAdmin.getDate() %> <%if(request.isUserInRole("partners")){%> user is partner :) <%}else{%> user is NOT partner :( <%}%> My jsp deciphering skills are not the best but it looks to me as if the role check is done after the ejb lookup. This is the subject to the same problem as in GERONIMO-4119 and ought to work properly in the latest code in svn (in all branches): there's a test case in trunk checking that this scenario works. Which code are you seeing the problem with? thanks david jencks
Re: geronimo v2 quartz plugin
On Jun 19, 2008, at 2:32 PM, jklcom99 wrote: Can some one tell me if the quartz plugin from this link http://www.archivum.info/[EMAIL PROTECTED]/2008-05/ msg00505.html is applicable for Geronimo 2.1? Definitely not. However it should not be too hard to update. I opened https://issues.apache.org/jira/browse/GERONIMO-4140 to track progress on this. I probably won't have time myself to get to this soon but would be happy to give advice if you (or someone else) would like to work on it. thanks david jencks Thank you Kevan Miller wrote: On Jan 16, 2008, at 5:27 PM, Christian Malolepszy wrote: Helo all, is anyone working on a quartz plugin for geronimo 2? I neet the features of quartz to migrate my projects to geronimo2. Hi Christian, I don't recall any quartz plugin work for geronimo 2.0, only 1.1. Could be mistaken. Possible that with a little interest that somebody will have a look... --kevan -- View this message in context: http://www.nabble.com/geronimo-v2-quartz-plugin-tp14897501s134p18018668.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: override persistence.xml in geronimo plan
Comments based on memory, not the code. check before relying on them... On Jun 21, 2008, at 3:35 AM, Phani Madgula wrote: Thanks.I tested with a sample overriding persistence-unit in openejb- jar.xml. It worked well. Here are some more questions. 1. If a persistence-unit is declared both in openejb-jar.xml and persistence.xml, I guess, the declaration in openejb-jar.xml will override the one in persistence.xml entirely. That means, container will not perform union of what is declared in openejb-jar.xml and persistence.xml. am I right?? I think some merging takes place. 2. Does the point (1) above applies to only persistence-units declared in both persistence.xml and openejb-jar.xml?? I mean, if persistence.xml declares persistence-units which are not overridden in openejb-jar.xml, can the application access those persistence- units?? yes 3. Can the persistence-units be overridden in geronimo-web.xml as well?? yes hope this bears some resemblance to what the code does :-) thanks david jencks Thanks in advance Phani On Thu, Jun 19, 2008 at 4:58 PM, Jacek Laskowski <[EMAIL PROTECTED] > wrote: On Thu, Jun 19, 2008 at 9:07 AM, Phani Madgula <[EMAIL PROTECTED]> wrote: > I saw a related JIRA created for this issue. Can you explain what can be > overridden in geronimo plan and how? Is it for only datasource> and > ?? > https://issues.apache.org/jira/browse/GERONIMO-3308 I'd say everything can be overridden. See jboss-seam-jee5-geronimo-plan.xml in Running JBoss Seam 2.0.0.GA on Geronimo 2.1.1 (http://cwiki.apache.org/GMOxSAMPLES/running-jboss-seam-200ga-on-geronimo-211.html ). Jacek -- Jacek Laskowski Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
Re: geronimo v2 quartz plugin
On Jun 23, 2008, at 12:06 PM, jklcom99 wrote: Ok, can you show me the steps and what is involved to create a plugin? There are lots of examples of plugins to compare with: the directory and roller plugins in plugins, the contents of the main server build plugins directory, and the samples. I glanced really quickly at the quartz stuff and it looks like: 1. update to current geronimo stuff, such as version 2.1.1. Use org.apache.geronimo.genesis/project-config/1.4/pom as the parent (I may get a later version out soon, we'll see). Prune unneeded stuff out of the build such as repositories. Basically get the build to work. 2. in geronimo 2.1 and later, the geronimo-plugin.xml is generated by the car-maven-plugin. The format has also changed a lot. So, you should figure out what bits of the geronimo-plugin.xml are still relevant and correct and get them into the appropriate part of the pom.xml. There's some documentation here: http://cwiki.apache.org/GMOxDOC21/plugin-infrastructure.html http://cwiki.apache.org/GMOxDOC21/constructing-a-special-purpose-server-using-maven.html Let me know if this is starting you off at the wrong level. thanks david jencks djencks wrote: On Jun 19, 2008, at 2:32 PM, jklcom99 wrote: Can some one tell me if the quartz plugin from this link http://www.archivum.info/[EMAIL PROTECTED]/2008-05/ msg00505.html is applicable for Geronimo 2.1? Definitely not. However it should not be too hard to update. I opened https://issues.apache.org/jira/browse/GERONIMO-4140 to track progress on this. I probably won't have time myself to get to this soon but would be happy to give advice if you (or someone else) would like to work on it. thanks david jencks Thank you Kevan Miller wrote: On Jan 16, 2008, at 5:27 PM, Christian Malolepszy wrote: Helo all, is anyone working on a quartz plugin for geronimo 2? I neet the features of quartz to migrate my projects to geronimo2. Hi Christian, I don't recall any quartz plugin work for geronimo 2.0, only 1.1. Could be mistaken. Possible that with a little interest that somebody will have a look... --kevan -- View this message in context: http://www.nabble.com/geronimo-v2-quartz-plugin-tp14897501s134p18018668.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/geronimo-v2-quartz-plugin-tp14897501s134p18076097.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Update MyFaces in Geronimo 2.1.1
I added some basic jar upgrade instructions at the end of http://cwiki.apache.org/GMOxDOC21/plugin-infrastructure.html Please let us know if this works and if the docs are comprehensible :-) thanks david jencks On Jun 24, 2008, at 3:45 PM, gfie wrote: The Myfaces version (1.2.1) included in Geronimo 2.1.1 contains a bug (or, better, an annoying exemption log when using user defined validators). This is fixed in Myfaces 1.2.3. How do uninstall/unplug Myfaces 1.2.1 and install/plug in Myfaces 1.2.3? I've already spent 12 hours on this including finding workarounds. Anybody has done this before? - Gerald -- View this message in context: http://www.nabble.com/Update-MyFaces-in-Geronimo-2.1.1-tp18101594s134p18101594.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Update MyFaces in Geronimo 2.1.1
On Jun 25, 2008, at 9:58 AM, [EMAIL PROTECTED] wrote: So the 'Simple jar upgrade' method described there works even with jars like MyFaces that are defined as non-overridable due to the Java EE spec requirements? upgrading a jar using artifact_aliases.properties changes the jar the entire geronimo server uses: it's more or less equivalent to applying a server patch or getting a minor server upgrade. The spec prohibits applications from using their own jsf implementations, not from server vendors upgrading the server. The non-overridable setting prevents you from supplying a different jsf implementation in your application, to implement this spec requirement. hope this makes sense :-) david jencks - David Frahm From: Kevan Miller <[EMAIL PROTECTED]> To: user@geronimo.apache.org Date: 06/24/2008 11:50 PM Subject:Re: Update MyFaces in Geronimo 2.1.1 On Jun 24, 2008, at 8:36 PM, David Jencks wrote: I added some basic jar upgrade instructions at the end of http://cwiki.apache.org/GMOxDOC21/plugin-infrastructure.html Please let us know if this works and if the docs are comprehensible :-) Cool. Thanks David. Hope it's ok, I made a few edits and added some specific instructions on how to add a file to the server's repository... --kevan
Re: Deploying application-scoped db pool with an ear
On Jun 25, 2008, at 5:26 PM, purdticker wrote: I'm trying to deploy an ear file with an application-scoped database pool. Here is what I've currently done, and below the "==" line are my questions. To get a deployment plan, I use the wizard in the geronimo console. Database Pools -> Using the Geronimo database pool wizard When I fill all the required options I have three options: Test Connection, Skip Test and Deploy, or Skip Test and Show Plan. I click Test Connection. Test Result: Connected toOracle Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production Now I have two options: Deploy, or Show Plan. I click on Show Plan. Here are the instructions it gives me: Add to EAR: Instead of deploying as a top-level database pool, you can deploy this pool as part of an EAR. To add a database pool to an EAR using this plan: 1. Copy and paste the plan to a file 2. Save the plan file to the top level of your EAR 3. Copy the RAR file from GERONIMO_HOME/\repository\org\tranql\tranql-connector-ra\1.4\tranql- connector-ra-1.4.rar to the top level of your EAR 4. Create a META-INF/geronimo-application.xml file in your EAR that has a module entry like this (substituting the correct RAR file name and plan file name): http://geronimo.apache.org/xml/ns/j2ee/application-1.1";> MyApplication rar-file-name.rar plan-file-name.xml = Here are my questions: 1) "Copy the RAR file from GERONIMO_HOME/\repository\org\tranql\tranql-connector-ra\1.4\tranql- connector-ra-1.4.rar to the top level of your EAR". Is it always this tranql-connector-ra-1.4.rar file? Even if I'm using oracle? no, you should use whatever rar you picked at the beginning. I'm not sure if we make this very obvious, but I assume you picked one of the oracle rars. 2) I'm using Eclipse and the GEP. I already have an geronimo-application.xml file. It starts off with "When I write in the "" tags, do I also need to include the "app:" namespace? e.g. We should be fixing up the namespace for you. It won't hurt to use the correct namespace anyway. This is a remarkably obtuse error message. Does using the correct rar help at all? thanks david jencks 3) I get the following error when deploying when I assume answers to questions 1 and 2 are yes: Distribution of module failed. See log for details. Geronimo ear plan contains modules that aren't in the ear: false org.apache.geronimo.common.DeploymentException: Geronimo ear plan contains modules that aren't in the ear: false at org .apache .geronimo .j2ee.deployment.EARConfigBuilder.addModules(EARConfigBuilder.java: 893) at org .apache .geronimo .j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java: 402) at org .apache .geronimo .j2ee .deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java: 295) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:226) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org .apache .geronimo .gbean .runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java: 34) at org .apache .geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) at org .apache .geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java: 239) at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java: 342) at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org .apache .geronimo .gbean .runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java: 34) at org .apache .geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) at org .apache .geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java: 239) at org .apache .geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java: 172) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source
Re: geronimo v2 quartz plugin
-- [INFO] Failed to configure plugin parameters for: org.codehaus.mojo:xmlbeans-mav en-plugin:2.3.1 (found static expression: 'geronimo-quartz-0.2.xsd' which may act as a defau lt value). Cause: Cannot assign configuration entry 'sourceSchemas' to 'interface java.util .List' from 'geronimo-quartz-0.2.xsd', which is of type class java.lang.String [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 4 seconds [INFO] Finished at: Thu Jun 26 16:14:55 EDT 2008 [INFO] Final Memory: 6M/12M I'm not sure what's going on with this, but it might be due to the maven-1 like directory layout. I spent a couple minutes and moved everything I could find into the standard m2 directories. I did not update the poms -- they must have configuration that sets src, resource, and test directories to the non-defaults; this now needs to be removed. The xmlbeans plugin config ought to look like this: org.codehaus.mojo xmlbeans-maven-plugin (possibly with a version) It's not too hard to patch files in place but its pretty difficult to svn mv files via a patch, so hopefully this change will make what you are working on easier. If you've modified any source or plan files locally you may want to copy your project over before svn up. I'm not sure what happens when a file you have modified is removed by svn up. hope this helps david jencks djencks wrote: On Jun 23, 2008, at 12:06 PM, jklcom99 wrote: Ok, can you show me the steps and what is involved to create a plugin? There are lots of examples of plugins to compare with: the directory and roller plugins in plugins, the contents of the main server build plugins directory, and the samples. I glanced really quickly at the quartz stuff and it looks like: 1. update to current geronimo stuff, such as version 2.1.1. Use org.apache.geronimo.genesis/project-config/1.4/pom as the parent (I may get a later version out soon, we'll see). Prune unneeded stuff out of the build such as repositories. Basically get the build to work. 2. in geronimo 2.1 and later, the geronimo-plugin.xml is generated by the car-maven-plugin. The format has also changed a lot. So, you should figure out what bits of the geronimo-plugin.xml are still relevant and correct and get them into the appropriate part of the pom.xml. There's some documentation here: http://cwiki.apache.org/GMOxDOC21/plugin-infrastructure.html http://cwiki.apache.org/GMOxDOC21/constructing-a-special-purpose-server-using-maven.html Let me know if this is starting you off at the wrong level. thanks david jencks djencks wrote: On Jun 19, 2008, at 2:32 PM, jklcom99 wrote: Can some one tell me if the quartz plugin from this link http://www.archivum.info/[EMAIL PROTECTED]/2008-05/ msg00505.html is applicable for Geronimo 2.1? Definitely not. However it should not be too hard to update. I opened https://issues.apache.org/jira/browse/GERONIMO-4140 to track progress on this. I probably won't have time myself to get to this soon but would be happy to give advice if you (or someone else) would like to work on it. thanks david jencks Thank you Kevan Miller wrote: On Jan 16, 2008, at 5:27 PM, Christian Malolepszy wrote: Helo all, is anyone working on a quartz plugin for geronimo 2? I neet the features of quartz to migrate my projects to geronimo2. Hi Christian, I don't recall any quartz plugin work for geronimo 2.0, only 1.1. Could be mistaken. Possible that with a little interest that somebody will have a look... --kevan -- View this message in context: http://www.nabble.com/geronimo-v2-quartz-plugin-tp14897501s134p18018668.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/geronimo-v2-quartz-plugin-tp14897501s134p18076097.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/geronimo-v2-quartz-plugin-tp14897501s134p18142347.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: geronimo v2 quartz plugin
On Jun 27, 2008, at 11:06 AM, jklcom99 wrote: And why is it trying to access org.apache.xbean.naming.reference. instead of org.apache.geronimo.naming.reference.* which is what is imported in QuartzJobFactory.java The Geronimo reference classes extend the xbean reference class. thanks david jencks manucet wrote: Hi, FYI I got the following error too when i tried to build this. [INFO] Failed to configure plugin parameters for: org.codehaus.mojo:xmlbeans-mav en-plugin:2.3.1 (found static expression: 'geronimo-quartz-0.2.xsd' which may act as a defau lt value). Cause: Cannot assign configuration entry 'sourceSchemas' to 'interface java.util .List' from 'geronimo-quartz-0.2.xsd', which is of type class java.lang.String It was because of a wrong configuration entry in the pom base/deployer/pom.xml. Modify geronimo-quartz-0.2.xsd to geronimo-quartz-0.2.xsd and it will build. Good luck with the porting regards Manu On Fri, Jun 27, 2008 at 3:51 AM, David Jencks <[EMAIL PROTECTED]> wrote: On Jun 26, 2008, at 1:20 PM, jklcom99 wrote: Hi David, After reading up on the documents you suggested. I attempted to get quartz to build with G2.1.2-SNAPSHOT. I'm getting compile error: (even I have included geronimo-naming as a dependency). Can you please point out what I'm doing wrong and missing? Also getting error when tried to build eclipse project, see below. Thank you Thu 06/26/2008 15:59:38.32 C:\downloads\apache\qplugin2.0>mvn compile [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Quartz Plugin for Geronimo [INFO] Quartz Scheduler for Geronimo [INFO] Geronimo Quartz Deployer [INFO] Quartz Admin Console for Geronimo [INFO] Quartz Plugins :: Geronimo Dependencies [INFO] Quartz Plugins for Geronimo [INFO] Geronimo Plugin :: Quartz Scheduler [INFO] Geronimo Plugin :: Quartz Deployer [INFO] [INFO] Building Quartz Plugin for Geronimo [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Quartz Scheduler for Geronimo [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://people.apache.org/~ammulder//geronimo/geronimo-kernel/2.1.2- SNAPSHOT/geronimo-kernel-2.1.2-SNAPSHOT.pom Downloading: http://people.apache.org/~ammulder//geronimo/geronimo-naming/2.1.2- SNAPSHOT/geronimo-naming-2.1.2-SNAPSHOT.pom Downloading: http://people.apache.org/~ammulder//geronimo/geronimo-deployment/2. 1.2-SNAPSHOT/geronimo-deployment-2.1.2-SNAPSHOT.pom Downloading: http://people.apache.org/~ammulder//geronimo/geronimo-system/2.1.2- SNAPSHOT/geronimo-system-2.1.2-SNAPSHOT.pom Downloading: http://people.apache.org/~ammulder//opensymphony/quartz/1.5.2/quart z-1.5.2.pom Downloading: http://repo1.maven.org/maven2/opensymphony/quartz/1.5.2/quartz-1.5. 2.pom [INFO] [compiler:compile] [INFO] Compiling 5 source files to C:\downloads\apache\qplugin2.0\base\scheduler \target\classes [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure C:\downloads\apache\qplugin2.0\base\scheduler\src\java\org \gplugins\quartz\Quart zJobFactory.java:[71,42] cannot access org.apache.xbean.naming.reference.SimpleR eference class file for org.apache.xbean.naming.reference.SimpleReference not found ConfigurationAwareReference ref = (ConfigurationAwareReference) value; C:\downloads\apache\qplugin2.0\base\scheduler\src\java\org \gplugins\quartz\Quart zJobFactory.java:[77,33] cannot find symbol symbol : method getContent() location: class org.apache.geronimo.naming.reference.ConfigurationAwareReference I don't see any good reason for this error unless somehow geronimo- naming is included as a provided dependency. Maybe you can get the build to work by including org.apache.xbean xbean-naming 3.3 [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 3 seconds [INFO] Finished at: Thu Jun 26 16:02:01 EDT 2008 [INFO] Final Memory: 6M/11M When I tried to create an Eclipse project, I'm getting this error: [INFO] [INFO] [INFO] Building Ger
Re: Injecting EJB directly into a JSP
On Jul 1, 2008, at 6:21 PM, purdticker wrote: At the top of my jsp: <%! @EJB(name="ejb/ReportTrends") private ReportTrends rt; %> Within the body tags: <% if (rt != null) { out.println(rt.getData()); } else { out.println("rt is null"); } %> The page displays "rt is null". I've tried this same code inside a servlet and rt is not null. Is it possible to inject an EJB directly into a jsp? Annotations/injections are not supported in jsps as far as I can tell from reading the servlet and jsp specs. If you can find some indications they are supported they might not be too hard to implement. thanks david jencks If this is a bug, please create a JIRA. -- View this message in context: http://www.nabble.com/Injecting-EJB-directly-into-a-JSP-tp18228470s134p18228470.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Injecting EJB directly into a JSP
You can also declare resource-refs etc in your web.xml. I think if you switched to jsf you'd be able to use annotations in your managed beans. I can't say I understand how or if struts and jsf relate. Thinking about the annotations-in-jsps issue I don't think we are likely to support it directly since it would either involve analyzing the jsp source (not going to happen IMO) or analyzing the jsp classes as they are loaded (which would involve reversing the philosophy behind geronimo deployment, namely we try to analyze everything at deploy time, not run time). You can probably get them to work now by precompiling the jsps. We might be able to support them by compiling jsps at deploy time. However this would not work with hot redeployment of changed jsps. thanks david jencks On Jul 2, 2008, at 12:22 PM, David Blevins wrote: On Jul 2, 2008, at 11:27 AM, purdticker wrote: So what's the recommended solution to pulling data from database and giving that ResultSet to jsp? Currently, I'm using struts, I'd like to be able to access my datasource from the action class and throw it in request.setAttribute(). However, I can't inject ejb into action class. I also can't seem to inject the datasource into action class... @Resource(name="jdbc/EBSDS") DataSource ds; So how do I access my datasource from action class? If geronimo doesn't support this, what is recommended method? I can't just create servlets for everything. One easy trick is to create a single servlet class and annotate it with all the things you need. Since all injected resources also wind up in JNDI and everything in the webapp shares the same JNDI context, you can use it as a clever way to declare resources that you need in your JSPs. For example, with the @Resource usage you have above, you can lookup via JNDI in your JSP as follows: InitialContext context = new InitialContext(); DataSource ds = (DataSource) context.lookup("java:comp/env/jdbc/ EBSDS"); -David
Re: deploy-offline, Deployer operation failed: Failed to expand the module archive
I think some of your jars have manifest classpath entries that are wrong and were ignored in g 1.1.1. I would advise removing all manifest classpath entries from all the jars and using the javaee 5 ear lib feature to get them into your classpath. I realize this may involve modifying 3rd party jars (oro?) to remove manifest classpath entries that, well, shouldn't be there. BTW other people have spent a lot of time on dead ends with this kind of problem because they made unwarranted assumptions about what the manifests actually are. Be sure to look in the actual artifacts you are deploying, not something you think is being built into them. I use emacs for this which lets me open multiple levels of jar structured archives and look at the files inside. We could look into providing a flag for lenient mfcp evaluation. I'd put it in the geronimo plan. See https://issues.apache.org/jira/browse/GERONIMO-3316 thanks david jencks On Jul 3, 2008, at 8:17 AM, jklcom99 wrote: Now, I'm onto a different error. Error: Unable to distribute myApp.ear: Determining complete manifest classpath unsuccessful: org.apache.geronimo.common.DeploymentException: Determining complete manifest classpath unsuccessful: ... Caused by: java.io.FileNotFoundException: C:\apps\myApp.ear\lib\jakarta-oro.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:114) at java.util.jar.JarFile.(JarFile.java:133) at java.util.jar.JarFile.(JarFile.java:97) at org.apache.geronimo.deployment.DeploymentContext $DefaultJarFileFactory.newJarFile(DeploymentContext.java:269) ... 18 more There is a copy of jakarta-oro-2.0.8.jar in C:\apps\myApp.ear\lib\jakarta-oro-2.0.8.jar but if I rename it to jakarta-oro.jar then I would get the following error:This app works under G1.1.1. Is it something I'm missing or I need to change to migrate to G2.1? Caused by: java.io.FileNotFoundException: C:\apps\myApp.ear\lib\struts-legacy.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:114) at java.util.jar.JarFile.(JarFile.java:133) at java.util.jar.JarFile.(JarFile.java:97) at org.apache.geronimo.deployment.DeploymentContext $DefaultJarFileFactory.newJarFile(DeploymentContext.java:269) ... 18 more -- View this message in context: http://www.nabble.com/deploy-offline%2C-Deployer-operation-failed%3A-Failed-to-expand-the-module-archive-tp18226797s134p18260199.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: deploy-offline, Deployer operation failed: Failed to expand the module archive
On Jul 3, 2008, at 10:01 AM, jklcom99 wrote: Can you elaborate on this? 1) using the javaee 5 ear lib feature to get them into your classpath. It looks like you already put all the jars in the ear lib directory. Thus they will be in the ear classloader and available to all your modules anyway. All you should need to do is remove all the manifest classpaths from all the jars and modules packages 2) We could look into providing a flag for lenient mfcp evaluation. that's the subject of the jira thanks david jencks I'd put it in the geronimo plan djencks wrote: I think some of your jars have manifest classpath entries that are wrong and were ignored in g 1.1.1. I would advise removing all manifest classpath entries from all the jars and using the javaee 5 ear lib feature to get them into your classpath. I realize this may involve modifying 3rd party jars (oro?) to remove manifest classpath entries that, well, shouldn't be there. BTW other people have spent a lot of time on dead ends with this kind of problem because they made unwarranted assumptions about what the manifests actually are. Be sure to look in the actual artifacts you are deploying, not something you think is being built into them. I use emacs for this which lets me open multiple levels of jar structured archives and look at the files inside. We could look into providing a flag for lenient mfcp evaluation. I'd put it in the geronimo plan. See https://issues.apache.org/jira/browse/GERONIMO-3316 thanks david jencks On Jul 3, 2008, at 8:17 AM, jklcom99 wrote: Now, I'm onto a different error. Error: Unable to distribute myApp.ear: Determining complete manifest classpath unsuccessful: org.apache.geronimo.common.DeploymentException: Determining complete manifest classpath unsuccessful: ... Caused by: java.io.FileNotFoundException: C:\apps\myApp.ear\lib\jakarta-oro.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:114) at java.util.jar.JarFile.(JarFile.java:133) at java.util.jar.JarFile.(JarFile.java:97) at org.apache.geronimo.deployment.DeploymentContext $DefaultJarFileFactory.newJarFile(DeploymentContext.java:269) ... 18 more There is a copy of jakarta-oro-2.0.8.jar in C:\apps\myApp.ear\lib\jakarta-oro-2.0.8.jar but if I rename it to jakarta-oro.jar then I would get the following error:This app works under G1.1.1. Is it something I'm missing or I need to change to migrate to G2.1? Caused by: java.io.FileNotFoundException: C:\apps\myApp.ear\lib\struts-legacy.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:114) at java.util.jar.JarFile.(JarFile.java:133) at java.util.jar.JarFile.(JarFile.java:97) at org.apache.geronimo.deployment.DeploymentContext $DefaultJarFileFactory.newJarFile(DeploymentContext.java:269) ... 18 more -- View this message in context: http://www.nabble.com/deploy-offline%2C-Deployer-operation-failed%3A-Failed-to-expand-the-module-archive-tp18226797s134p18260199.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/deploy-offline%2C-Deployer-operation-failed%3A-Failed-to-expand-the-module-archive-tp18226797s134p18263963.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: daytrader/daytrader-derby-datasource build error
I don't know if the plugins from trunk are in a snapshot repository. The fact that you got a timestamp version in the missing car seems to indicate that there are some uploaded snapshots but the date back in may is very old. I would try building geronimo trunk locally, then daytrader. thanks david jencks On Jul 7, 2008, at 3:10 AM, harikaried wrote: I've been trying to build daytrader (svn co latest trunk) and it's getting stuck building the derby-datasource: Maven version: 2.0.9 Java version: 1.5.0_15 OS name: "linux" version: "2.6.9-55.0.2.elsmp" arch: "i386" Family: "unix" [INFO] Building Unnamed - org.apache.geronimo.daytrader:daytrader-derby-datasource:car:2.0- SNAPSHOT [INFO]task-segment: [install] ... [ERROR] BUILD ERROR [INFO] [INFO] could not package plugin Embedded error: Unable to create configuration for deployment Cound not find parent configuration: org.apache.geronimo.configs/system-database/2.2-20080527.231944-2/car org.apache.maven.lifecycle.LifecycleExecutionException: could not package plugin at org .apache .maven .lifecycle .DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 583) Caused by: org.apache.maven.plugin.MojoExecutionException: could not package plugin at org .apache .geronimo.mavenplugins.car.PackageMojo.execute(PackageMojo.java:205) Caused by: org.apache.geronimo.common.DeploymentException: Unable to create configuration for deployment at org .apache .geronimo .deployment .DeploymentContext.createTempConfiguration(DeploymentContext.java:120) Caused by: org.apache.geronimo.kernel.config.LifecycleException: load of org.apache.geronimo.daytrader/daytrader-derby-datasource/2.0- SNAPSHOT/car failed at org .apache .geronimo .kernel .config .SimpleConfigurationManager .loadConfiguration(SimpleConfigurationManager.java:327) Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Error starting configuration gbean org.apache.geronimo.daytrader/daytrader-derby-datasource/2.0- SNAPSHOT/car at org .apache .geronimo .kernel .config .SimpleConfigurationManager.load(SimpleConfigurationManager.java:352) Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Cound not find parent configuration: org.apache.geronimo.configs/system-database/2.2-20080527.231944-2/car at org .apache .geronimo .kernel .config .SimpleConfigurationManager .findParentConfigurations(SimpleConfigurationManager.java:367) -- View this message in context: http://www.nabble.com/daytrader-daytrader-derby-datasource-build-error-tp18313566s134p18313566.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: DeploymentException: POJO web service not configured by any web service builder
There's also a chance that if you include a servlet api jar in your application and set up geronimo classloading to load application classes first there will be a conflict between the servlet api jar in your app and the one geronimo includes. Don't include a servlet api jar in your app, this is always supplied by the environment you are deploying into. david jencks On Jan 1, 2012, at 9:32 AM, Ivan wrote: > From the log, think there is a servlet named ResourceServlet is configured in > the web.xml file, and it did not implement the Servlet interface. It is > invalid except that this is a POJO web service. > If that entry is a POJO webservice class, which means it is annotated with > WebService related annotation, you may need to double check whether there is > a WebService provider is there, for tomcat assembly, it is Axis2, for Jetty > assembly, it is CXF. > > > 2012/1/1 mikedanese > Well maybe i'm a dufus but I'm still stuck on this issue. I have investigate > the tips provided here, along with spending many hours digging in to the > geronimo deployment package, TomcatModuleBuilder, ect. One thing - the > source I am able to find via web search(TomcatModuleBuilder) seems quite > dated(2006)... Anyway, still getting an excpetion when deploying from > eclipse to wsce6.1 (see below). Funny thing is, deployment fails on the > first servlet listed in our war file(there are many, including axis2.4 > further down the list) - which is not a webservice or related to any > webservice at all. So it seems the deployment context is confused by my > configuation. Some things I have tried: edit web.xml to declare various > versions of servlet spec, eg: 2.3, 2.4, created a default geronimo-web.xml > (type=war) and (lots of time on this) trying to get the log-4j properties > file to log the geronimo deployment classes in DEBUG/verbose mode(no > progress here) I also searched under WebSphere and eclipse > directories(ubumtu11.10), including .directories, for additional logging but > no success there(just a short trace (shown below) that comes to eclipse > console. > Any tips appreciated > > POJO web service: ResourceServlet not configured by any web service builder > org.apache.geronimo.common.DeploymentException: POJO web service: > ResourceServlet not configured by any web service builder >at > org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:643) >at > org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174) >at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763) >at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255) >at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140) > >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >at java.lang.reflect.Method.invoke(Method.java:597) >at > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131) >at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883) >at > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245) >at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >at java.lang.reflect.Method.invoke(Method.java:597) >at > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131) >at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883) >at > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245) >at > org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172) >at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) >at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) >at > javax.management.remote.rmi.RMIConnectionImpl.doOperati
Re: JTA TransactionManager and Primary Key Sequencing
Hi Michael, I'm afraid I don't understand your question. A JTA tm doesn't care what kind of resource managers it deals with as long as they follow the xa/jta specification. They could be relationsl databases (for which "primary key" makes sense) or jms message brokers or SAP or CICS or anything else thanks david jencks On Feb 20, 2012, at 5:41 AM, Michael Simons wrote: > Hello, > > This might be a RTFM. If it is, please tell me where I have to look for. > > Is it possible to tell a JTA TransactionManager to use a different database > connection to retrieve primary key values? > If it's not, can you give me a hint how to achieve such behaviour? > > Kind Regards, Michael
Re: classloading
On Mar 19, 2012, at 7:25 AM, Ivan wrote: > > > 2012/3/19 Radim Kolar > Is possible to make stack traces like they are on Jboss 7.1? These traces > includes jar from which was class loaded, this is highly useful when hunting > classloading problems. > > STACKTRACE >at > org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManagerImpl.registerConnection(CachedConnectionManagerImpl.java:265) >at > org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:495) >at > org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129) >at org.apache.jsp.index_jsp._jspService(index_jsp.java:256) >at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > [jbossweb-7.0.13.Final.jar:] >at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) > [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] >at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) > [jbossweb-7.0.13.Final.jar:] > > Seems an interesting function, I am thinking that there maybe two ways to do > this in Geronimo > a. With the StackTraceElement, it is possible to get the class name, then > with the class name, it should be able to find the bundle name with package > admin service, but need to consider more for the current classloading > configuration. > b. Use the internal class,e.g. sun.reflect.Reflection.getCallerClass, seems > that it is able to get the Class instance, then it is easy to find the > classloader, then the bundle name. > OSGI logging service provides the bundle that the logging event came from. I haven't entirely figured out pax logging but I think that the bundle is already available as something you can include in the output. david jencks > > Also if you look at > http://www.slideshare.net/rayploski/jboss-application-server-7 slide 6: > > * Modular > * Only API, no AS implementation exposure > * True isolation > > this is what should be done in AS because its time consuming to hunt app jars > vs application server jars classloading issues. At geronimo i was not able to > run some application at all. > > Yes, you are right, current classloading model in Geronimo 3.0-beta is still > following the multiparent strategy in the past Geronimo versions, and it does > bring issues about class loading conflict. Although hidden-classes could > somewhat solve the issue, it is not easy to find the correct configuration > for the users. The possible solution has been discussed for many times in the > past, need to have a minimal public class set. Actually, in those plugin > builder, there has a default environment for this purpose, hope that Geronimo > could do that in the future versions. > > > > -- > Ivan
Re: changing datasource for daytrader to oracle
Hi Stephen, I haven't heard of anyone trying to get daytrader on g3 + oracle working, but that doesn't mean much. I wonder if you have all the ids for the oracle driver lined up. The maven stack trace looks like it expects groupId= com.oracle artifactId=jdbc-driver but then it's looking for a pom (?) rather than a jar. You've installed the driver in a different location... Do you have any idea where the "http://not.a.real.repository"; comes from? hope this helps david jencks On Apr 11, 2012, at 12:47 PM, Stephen Davidson wrote: > I have followed step 3 instructions in the README and placed the ojdbc14.jar > into the .../repository/oracle/ojdbc14/ojdbc14-10g.jar. > I then tried to build the oracle plugin using this command. > >2) a copy of the Oracle JDBC driver and run the following command: >mvn install:install-file -Dfile=${path to ojdbc14.jar} \ > -DgroupId=oracle \ > -DartifactId=ojdbc14 \ > -Dversion=10g \ > -Dpackaging=jar > > > which seemed to work and created the .jar file in my .m2 directory at that > path. > > So then I modified the pom.xml in the plugins directory and added a module > for oracle, then did > mvn clean install from the main daytrader directory. > > It failed with this. > > [INFO] > > [INFO] Reactor Summary: > [INFO] > [INFO] DayTrader :: Performance Benchmark Sample :: Java EE 6 SUCCESS > [3.087s] > [INFO] Daytrader :: JAVA EE 6 SUCCESS [1.674s] > [INFO] DayTrader :: Java EE 6 :: Modules . SUCCESS [0.143s] > [INFO] DayTrader :: Java EE 6 :: Modules - Utils . SUCCESS [2.943s] > [INFO] DayTrader :: Java EE 6 :: Modules - Entities .. SUCCESS [2.920s] > [INFO] DayTrader :: Java EE 6 :: Modules - Web ... SUCCESS [6.923s] > [INFO] DayTrader :: Java EE 6 :: Assemblies .. SUCCESS [0.045s] > [INFO] DayTrader :: Assemblies - Java EE 6 EAR ... SUCCESS [0.905s] > [INFO] Daytrader plans ... SUCCESS [0.748s] > [INFO] DayTrader :: Plugins .. SUCCESS [1.227s] > [INFO] Daytrader :: Plugins :: Derby DataSource .. SUCCESS [26.119s] > [INFO] Daytrader :: Plugins :: Oracle DataSource . FAILURE [0.489s] > [INFO] Daytrader :: Plugins :: JavaEE JMS Resource ... SKIPPED > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 52.125s > [INFO] Finished at: Fri Apr 13 17:47:27 MDT 2012 > [INFO] Final Memory: 60M/144M > [INFO] > > [ERROR] Failed to execute goal on project daytrader-oracle-datasource: Could > not > resolve dependencies for project > org.apache.geronimo.daytrader.plugins:daytrade > r-oracle-datasource:car:3.0-beta-2-SNAPSHOT: Failed to collect dependencies > for > [org.tranql:tranql-connector-oracle-xa:rar:1.3 (provided), > org.apache.geronimo.f > ramework:geronimo-gbean-deployer:car:3.0-beta-1 (provided), > org.apache.geronimo. > configs:j2ee-deployer:car:3.0-beta-1 (provided), > org.apache.geronimo.configs:con > nector-deployer-1_6:car:3.0-beta-1 (provided), > com.oracle:jdbc-driver:jar:10g (c > ompile)]: Failed to read artifact descriptor for > com.oracle:jdbc-driver:jar:10g: > Could not transfer artifact com.oracle:jdbc-driver:pom:10g from/to > maven.repo.d > rivers (http://not.a.real.repository): not.a.real.repository: Unknown host > not.a > .real.repository -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > swit > ch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > rea > d the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso > lutionException > [ERROR] > [ERROR] After correcting the problems, you can resume the build with the > command > > [ERROR] mvn -rf :daytrader-oracle-datasource > C:\day30beta> > > Man, I am confused. > > Should this post go to the dev list? Can I post there as well? ANyone got > daytrader working with oracle on geronimo 3 and daytrader 3? > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3903655.html > Sent from the Users mailing list archive at Nabble.com.
Re: Problem accessing JSF application with "geronimo-3.0-beta-1-Jetty"
Getting jsf working under osgi has been very tricky. We got it working under tomcat but haven't had the time to investigate jetty very much. I haven't had time lately to even look into what might or might not be working under jetty. I have to say I'm quite surprised at the exception you report and just from the stack trace would think that it would apply to any servlet, not just something jsf related. Since some servlets do work on jetty (e.g. the web console) I wonder if there's something misconfigured in your security. wishing I had more time to investigate, david jencks On Jun 11, 2012, at 7:34 AM, xanadu72 wrote: > Nobodies interested ? > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/Problem-accessing-JSF-application-with-geronimo-3-0-beta-1-Jetty-tp3985056p3985125.html > Sent from the Users mailing list archive at Nabble.com.
Re: CDI & OSGI
Hi Charles At this point we only support cdi in jee contexts, not non-jee osgi contexts. I think there's an osgi spec effort for cdi in osgi bundles. Almost certainly our support will be limited to whatever either OWB or Aries comes up with. My own opinion on cross-bundle injection (from a year ago when I thought about it a little bit) is that it should be mediated by osgi services if it can be done at all. I think this might involve extending the ideas of osgi services to more scopes, e.g. per-request instances and per-conversation instances beyond the current singleton and per-bundle scopes. thanks david jencks On Jun 14, 2012, at 2:12 AM, Charles Moulliard wrote: > Hi, > > As Apache Geronimo platforms 3.X uses Apache Karaf and OSGI runtime, I would > like to know if we can deploy on the platforms bundles and uses CDI > injection. Do you also support to inject dependency in a bundle when a class > has been packaged in another bundle ? > > Regards, > > Charles > Apache Committer > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/CDI-OSGI-tp3985169.html > Sent from the Users mailing list archive at Nabble.com.
Re: Using @EJB annotation instead of looking up for EJB
On Jun 25, 2012, at 11:41 AM, nemesis_sun wrote: > I have done some research and found a geronimo tutorial here discussing about > injecting an instance of EJB into a servlet, and using @EJB with a "name" > element. > In addition to that, geronimo-web.xml also has to be edited by adding a > and a element. > I have done this similarly to the geronimo-application-client.xml in the App > Client module and tried running it, but nothing happened, still the same > null object was returned. > > One more thing is that I didn't add the App Client module to the server, as > there was some stupid error during deployment and I was able to run it using > "Run as Java Application". I don't know if there is any difference, if there > is then I will have to resolve that error too. I'm not sure what you mean by that, I don't use eclipse and run everything from the command line. You need to include the app client in an ear with the ejb (or web including ejbs) module and deploy it as a unit, and you need to start the app client using geronimo. I'm not sure where the instructions are for this any more, basically aside from demos no one has ever used an app client, hopefully the bank sample Forrest pointed at has some instructions. I really doubt there is an easy way to run an app client through eclipse. It would look like starting some kind of server configuration if there is a way. An app client uses large parts of the geronimo server and even if you package it up like a Main-based application it won't work at all without running i through the geronimo app client container. thanks david jencks > > Please help. > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/Using-EJB-annotation-instead-of-looking-up-for-EJB-tp3985253p3985261.html > Sent from the Users mailing list archive at Nabble.com.
Re: [discussion]Time to release to Geronimo 2.2.2 ?
I recently fixed some of my misinterpretations of the jaspic spec in 3.0, and these should be ported back to 2.2.x. thanks david jencks On Jun 27, 2012, at 6:49 PM, Shawn Jiang wrote: > We had some discussion with a user request [1], The initial thought from me > is to include the security patches since G2.2.1 and pull in the recent > openejb 3.1.5 clustering changes. > > But it seems openejb 3.1.5 is not ready now, we have to hold until openejb is > in a good shape. In this period, we at least can clean other things for > G2.2.2, I'd like to use this thread to hear the voice on what else we might > want to put into Geronimo 2.2.2. > > [1]http://apache-geronimo.328035.n3.nabble.com/Request-for-Geronimo-2-2-2-Release-td3985045.html > > > > -- > Shawn
Re: API for nested subjects?
Is this code run in the app client? I think there is no pre-existing logged in Subject? This will mean the oldCallers below will have no Subjects in it. I think you want ContextManager.setCallers(subject, subject); try { //whatever } finally { ContextManager.clearCallers(); } thanks david jencks On Jul 18, 2012, at 8:50 AM, weberjn wrote: > Hi, > > I still need nested security context, to invoke EJBs from an application > client with changing subjects. > > I tried the ContextManager code below, but it does not work, the current > subject is null. > Is there a better code for this? > > Thanks, Juergen > > See also: > https://issues.apache.org/jira/browse/GERONIMO-4765 > https://java2s.com/Open-Source/Java/EJB-Server/geronimo/security/org/apache/geronimo/security/ContextManagerTest.java.htm > > > context.login(); > subject subject = context.getSubject(); > > ContextManager.registerSubject(subject); > Callers oldCallers = ContextManager.pushNextCaller(subject); > // sowhere other in the call chain > try > { > Subject subject1 = ContextManager.getCurrentCaller(); > > System.out.println("getCurrentSubject1() -> " + subject1); > > // invoke EJB here under subject1 > } > finally > { > ContextManager.popCallers(oldCallers); > } > > getCurrentSubject1() -> null > > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/API-for-nested-subjects-tp3985483.html > Sent from the Users mailing list archive at Nabble.com.
Re: API for nested subjects?
Hi Juergen, I don't remember everything about how the openejb remote auth works. Maybe if you show your app client login config it would help :-) In general the server shouldn't trust subjects sent from arbitrary clients, why should it trust the client? The ServerIdentityToken is a private credential, not a principal, right? There's some corba csiv2 stuff you can set up if you really want a way for the server to trust subjects from your app client, but generally the openejb remote login way is simpler. thanks david jencks On Jul 18, 2012, at 11:25 AM, weberjn wrote: > David, > > thanks, I tried this now, > ContextManager.getCurrentCaller() returns after setCallers > Private Credential: org.apache.geronimo.openejb.ServerIdentityToken@c2015793 > > but in the EJB ctx.getCallerPrincipal().getName() returns UNAUTHENTICATED > > This is a 2.1 EJB with > but still I think the principal should be transferred, isn't it? > > Juergen > > > David Jencks wrote >> >> Is this code run in the app client? >> >> I think there is no pre-existing logged in Subject? This will mean the >> oldCallers below will have no Subjects in it. >> >> I think you want >> >> ContextManager.setCallers(subject, subject); >> try { >> //whatever >> } finally { >> ContextManager.clearCallers(); >> } >> >> thanks >> david jencks >> >> On Jul 18, 2012, at 8:50 AM, weberjn wrote: >> >>> Hi, >>> >>> I still need nested security context, to invoke EJBs from an application >>> client with changing subjects. >>> >>> I tried the ContextManager code below, but it does not work, the current >>> subject is null. >>> Is there a better code for this? >>> >>> Thanks, Juergen >>> >>> See also: >>> https://issues.apache.org/jira/browse/GERONIMO-4765 >>> https://java2s.com/Open-Source/Java/EJB-Server/geronimo/security/org/apache/geronimo/security/ContextManagerTest.java.htm >>> >>> >>> context.login(); >>> subject subject = context.getSubject(); >>> >>> ContextManager.registerSubject(subject); >>> Callers oldCallers = ContextManager.pushNextCaller(subject); >>> // sowhere other in the call chain >>> try >>> { >>> Subject subject1 = ContextManager.getCurrentCaller(); >>> >>> System.out.println("getCurrentSubject1() -> " + subject1); >>> >>> // invoke EJB here under subject1 >>> } >>> finally >>> { >>> ContextManager.popCallers(oldCallers); >>> } >>> >>> getCurrentSubject1() -> null >>> >>> >>> >>> -- >>> View this message in context: >>> http://apache-geronimo.328035.n3.nabble.com/API-for-nested-subjects-tp3985483.html >>> Sent from the Users mailing list archive at Nabble.com. >> > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/API-for-nested-subjects-tp3985483p3985485.html > Sent from the Users mailing list archive at Nabble.com.
Re: OSGi Bundle Permissions on Geronimo
I don't think bundle hooks are a suitable approach to this problem. However, if you want to pursue it further, look into the equinox regions bundle and, I'd suggest, the aries subsystem implementation. Using bundle hooks directly is very tricky. Have you looked at osgi conditional permission admin? That looks like a much better fit to your problem. thanks david jencks On Sep 2, 2012, at 11:12 PM, Ivan wrote: > I am not sure whether OSGi security could help on this. But with the Bundle > Hook Service API introduced in v4.3, it is possible to limit/filter the > result of those methods, like getBundles(), and etc. > > There are also other new APIs, which could be used to filter the services and > other things. You may refer to the OSGi v4.3 core spec. > > 2012/8/30 JAEBOO JUNG > I am about to make a enterprise cloud OSGi web-service by using Apache > Geronimo V3.0. > > The final goal is to make custom BundleManager(maybe it is a bundle too) that > can do simple bundle action like install/uninstall/start/stop the other > bundles from any users. > > Each bundle is WAB(web application bundle) and will be added in some > Application Bundle. > > But I encounter some critical problems which can cause security issues. > > > > 1. Although only BundleManager I want to make can manage the bundle's > lifecycle by using BundleContext , but any bundles made by some users can use > BundleContext in Activator or any servlet in their bundles. So, for example, > Bundle A(from user1) can get Bundle B(from user2) from BundleContext and > Bundle A can stop or uninstall Bundle B with no permission though Bundle A is > not BundleManager.. > > > > 2. I used to run java security manager and manipulate its(Bundle A) > permission. but it didn't properly work. Besides I can access Geronimo Web > Admin console with no login process . I think that allpermission in the > policy file cause this situation. > > > > How can I achieve my goal. I heard that Composite bundle can isolate bundles, > but Geronimo didn't support Composite Bundle(CBA). I really wait and > appreciate all ideas. Thanks for all your help in advance :) > > > > > -- > Ivan
Re: Enhydra enlist/delist/enlist woes...
Hi James, An XAConnection is required to always use the same XAResource, so that part of their code is good. I think the problem is here: tx.delistResource(xac.getXAResource(), XAResource.TMSUCCESS); on connection handle close. The TMSUCCESS flag means the next thing you're going to do on the tx is end it (commit or rollback). If you then try to re-enlist it that's an error (IIRC). I think they should be using a different flag here. Haven't had time to look into it in detail though.... david jencks On Sep 13, 2012, at 4:41 AM, James Carman wrote: > I am trying to use enhydra's connection pool/XA support for our > project. It's a ServiceMix-based project, so we're using Aries' > "wrapper" around Geronimo's transaction manager. Anyway, what I'm > seeing is that their XA code seems to be trying to re-enlist the same > connection. Unfortunately, they re-use the same XAResource instance, > so I run into this bit of code causing me an error: > > if (xaRes == manager.getCommitter()) { > throw new IllegalStateException("xaRes " + xaRes + " is a committer > but is not active or suspended"); > } > > Their connection code looks like this: > > > public class StandardXAConnection > extends StandardPooledConnection > implements XAConnection, XAResource, Referenceable, Runnable { > > ... > >/** >* We are required to maintain a 1-1 mapping between an XAConnection >* and its corresponding XAResource. We achieve this by implementing >* both interfaces in the same class. >*/ > public XAResource getXAResource() { > return this; > } > } > > What I'm trying to understand is if they're attempting to do something > silly here or if I have something mis-configured. We're using OpenJPA > and when it goes to close the connection (after it uses it for a > query), enhydra delists it from the current transaction. Inside their > DataSource's "connectionClosed" method: > > if ((tx != null) && (((StandardXAConnection) > xac).connectionHandle.isReallyUsed)) { > try { > tx.delistResource(xac.getXAResource(), XAResource.TMSUCCESS); > // delist the xaResource > log.debug( > "StandardXAPoolDataSource:connectionClosed the resourse is > delisted"); >} catch (Exception e) { > log.error( > "StandardXAPoolDataSource:connectionClosed Exception in > connectionClosed:" > + e); > } > } > > Does this all make sense? Is there something I need to configure to > allow re-enlistment of resources or are they just doing something > bone-headed here?
Re: Enhydra enlist/delist/enlist woes...
Looking a little farther into the geronimo tm code enlist method... TransactionBranch manager = suspendedXaResources.remove(xaRes); if (manager != null) { //we know about this one, it was suspended xaRes.start(manager.getBranchId(), XAResource.TMRESUME); activeXaResources.put(xaRes, manager); return true; } //it is not suspended. for (Iterator i = resourceManagers.iterator(); i.hasNext();) { manager = (TransactionBranch) i.next(); boolean sameRM; //if the xares is already known, we must be resuming after a suspend. if (xaRes == manager.getCommitter()) { throw new IllegalStateException("xaRes " + xaRes + " is a committer but is not active or suspended"); } (ending with what you quoted) note that if the xaresource had been suspended we would already have returned true. The "happy" sequence of calls to the tx is supposed to be like this: tx.enlist(xares) >> xares.begin(xid, TMNOFLAGS or TMJOIN) tx.delist(xares, TMSUSPEND) >>xares.end(xid, TMSUSPEND) repeat as often as desired: tx.enlist(xares) >> xares.begin(xid, TMRESUME) tx.delist(xares, TMSUSPEND) >> xares.end(xid, TMSUSPEND) when you are done tx.delist(xares, TMSUCCESS) >> xares.end(xid, TMSUCCESS) commit. Note the end(TMSUSPEND) immediately followed by end(TMSUCCESS). Geronimo's connection pooling together with the tranql jdbc wrappers do it correctly, but the released versions may not be that easy to set up in osgi by themselves. I have a sandbox version that is a lot more osgi friendly but haven't worked on it in a long time - not even sure if it builds at the moment. https://svn.apache.org/repos/asf/geronimo/sandbox/djencks/txmanager hope this helps david jencks On Sep 13, 2012, at 11:30 AM, David Jencks wrote: > Hi James, > > An XAConnection is required to always use the same XAResource, so that part > of their code is good. > > I think the problem is here: > > tx.delistResource(xac.getXAResource(), XAResource.TMSUCCESS); > > > on connection handle close. > The TMSUCCESS flag means the next thing you're going to do on the tx is end > it (commit or rollback). If you then try to re-enlist it that's an error > (IIRC). > > I think they should be using a different flag here. Haven't had time to look > into it in detail though > > david jencks > > > On Sep 13, 2012, at 4:41 AM, James Carman wrote: > >> I am trying to use enhydra's connection pool/XA support for our >> project. It's a ServiceMix-based project, so we're using Aries' >> "wrapper" around Geronimo's transaction manager. Anyway, what I'm >> seeing is that their XA code seems to be trying to re-enlist the same >> connection. Unfortunately, they re-use the same XAResource instance, >> so I run into this bit of code causing me an error: >> >> if (xaRes == manager.getCommitter()) { >> throw new IllegalStateException("xaRes " + xaRes + " is a committer >> but is not active or suspended"); >> } >> >> Their connection code looks like this: >> >> >> public class StandardXAConnection >> extends StandardPooledConnection >> implements XAConnection, XAResource, Referenceable, Runnable { >> >> ... >> >> /** >> * We are required to maintain a 1-1 mapping between an XAConnection >> * and its corresponding XAResource. We achieve this by implementing >> * both interfaces in the same class. >> */ >> public XAResource getXAResource() { >> return this; >> } >> } >> >> What I'm trying to understand is if they're attempting to do something >> silly here or if I have something mis-configured. We're using OpenJPA >> and when it goes to close the connection (after it uses it for a >> query), enhydra delists it from the current transaction. Inside their >> DataSource's "connectionClosed" method: >> >> if ((tx != null) && (((StandardXAConnection) >> xac).connectionHandle.isReallyUsed)) { >> try { >> tx.delistResource(xac.getXAResource(), XAResource.TMSUCCESS); >> // delist the xaResource >> log.debug( >> "StandardXAPoolDataSource:connectionClosed the resourse is >> delisted"); >> } catch (Exception e) { >> log.error( >> "StandardXAPoolDataSource:connectionClosed Exception in >> connectionClosed:" >> + e); >> } >> } >> >> Does this all make sense? Is there something I need to configure to >> allow re-enlistment of resources or are they just doing something >> bone-headed here? >
Re: Enhydra enlist/delist/enlist woes...
I don't think there are better docs :-) I think I might have included the basics for @Datasource support in my geronimo tm sandbox, in which case I think you can set up a datasource using the "common" tranql bundle and a suitable configuration that specifies the info that would have come from the @Datasource annotation. It's been a long time though and I can't look into it right now :-( david jencks On Sep 13, 2012, at 12:50 PM, James Carman wrote: > Thanks, David! > > So, I found tranql in the maven repository, but the docs on the site > (http://tranql.codehaus.org/) are quite spotty. I see some > sqlserver-specific jars in the repo. I'm wondering if I need those. > Anyway, do you know of any better docs out there for this? > > Thanks, > > James > > On Thu, Sep 13, 2012 at 3:05 PM, David Jencks wrote: >> Looking a little farther into the geronimo tm code enlist method... >> >>TransactionBranch manager = suspendedXaResources.remove(xaRes); >>if (manager != null) { >>//we know about this one, it was suspended >>xaRes.start(manager.getBranchId(), XAResource.TMRESUME); >>activeXaResources.put(xaRes, manager); >>return true; >>} >>//it is not suspended. >>for (Iterator i = resourceManagers.iterator(); i.hasNext();) { >>manager = (TransactionBranch) i.next(); >>boolean sameRM; >>//if the xares is already known, we must be resuming after a >> suspend. >>if (xaRes == manager.getCommitter()) { >>throw new IllegalStateException("xaRes " + xaRes + " is a >> committer but is not active or suspended"); >>} >> >> >> (ending with what you quoted) note that if the xaresource had been >> suspended we would already have returned true. >> >> The "happy" sequence of calls to the tx is supposed to be like this: >> >> tx.enlist(xares) >> xares.begin(xid, TMNOFLAGS or TMJOIN) >> tx.delist(xares, TMSUSPEND) >>xares.end(xid, TMSUSPEND) >> >> repeat as often as desired: >> tx.enlist(xares) >> xares.begin(xid, TMRESUME) >> tx.delist(xares, TMSUSPEND) >> xares.end(xid, TMSUSPEND) >> >> when you are done >> >> tx.delist(xares, TMSUCCESS) >> xares.end(xid, TMSUCCESS) >> >> commit. >> >> Note the end(TMSUSPEND) immediately followed by end(TMSUCCESS). >> >> Geronimo's connection pooling together with the tranql jdbc wrappers do it >> correctly, but the released versions may not be that easy to set up in osgi >> by themselves. I have a sandbox version that is a lot more osgi friendly >> but haven't worked on it in a long time - not even sure if it builds at the >> moment. >> >> https://svn.apache.org/repos/asf/geronimo/sandbox/djencks/txmanager >> >> hope this helps >> david jencks >> >> >> On Sep 13, 2012, at 11:30 AM, David Jencks wrote: >> >>> Hi James, >>> >>> An XAConnection is required to always use the same XAResource, so that part >>> of their code is good. >>> >>> I think the problem is here: >>> >>> tx.delistResource(xac.getXAResource(), XAResource.TMSUCCESS); >>> >>> >>> on connection handle close. >>> The TMSUCCESS flag means the next thing you're going to do on the tx is end >>> it (commit or rollback). If you then try to re-enlist it that's an error >>> (IIRC). >>> >>> I think they should be using a different flag here. Haven't had time to >>> look into it in detail though >>> >>> david jencks >>> >>> >>> On Sep 13, 2012, at 4:41 AM, James Carman wrote: >>> >>>> I am trying to use enhydra's connection pool/XA support for our >>>> project. It's a ServiceMix-based project, so we're using Aries' >>>> "wrapper" around Geronimo's transaction manager. Anyway, what I'm >>>> seeing is that their XA code seems to be trying to re-enlist the same >>>> connection. Unfortunately, they re-use the same XAResource instance, >>>> so I run into this bit of code causing me an error: >>>> >>>> if (xaRes == manager.getCommitter()) { >>>> throw new IllegalStateException("xaRes " + xaRes + " is a committer >>>&
Re: Remote Interface in EAR
I'm not sure what is going on. Would you consider trying putting the client jar in the manifest class-path of the ejb jar? david jencks On Oct 22, 2012, at 9:08 PM, Russell Collins wrote: > I see that there is a ticket for this one. I am getting the same error as > the guy in the ticket. > > JIRA ticket GERONIMO-5984. I am getting this error in version 3.0 release of > Geronimo. Please tell me how I can correct this? > > On 10/22/2012 10:44 PM, Russell Collins wrote: >> Hello? Is someone out there? Can anyone tell me why I cannot deploy an >> application that has a remote interface that is in a separate jar file? I >> have done it successfully many times with Geronimo 2.2. Why can I not do it >> with Geronimo 3.0? >> >> On 10/19/2012 07:30 AM, Russell Collins wrote: >>> One more thing. The error that I am getting when trying to deploy is: >>> >>> The application was not deployed. >>> com/cs/base/remote/interfaces/IEmailManagerRemote >>> java.lang.NoClassDefFoundError: >>> com/cs/base/remote/interfaces/IEmailManagerRemote >>> at java.lang.ClassLoader.defineClass1(Native Method) >>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) >>> at java.lang.ClassLoader.defineClass(ClassLoader.java:615) >>> at >>> org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213) >>> at >>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601) >>> at >>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567) >>> at >>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490) >>> at >>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478) >>> at >>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458) >>> at >>> org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237) >>> at >>> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) >>> at >>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476) >>> at >>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) >>> at >>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) >>> at >>> org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >>> at >>> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345) >>> at >>> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229) >>> at >>> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207) >>> at >>> org.apache.xbean.finder.BundleAnnotationFinder.loadClass(BundleAnnotationFinder.java:67) >>> at >>> org.apache.xbean.finder.AbstractFinder$ClassInfo.get(AbstractFinder.java:775) >>> at >>> org.apache.xbean.finder.AbstractFinder.findAnnotatedClasses(AbstractFinder.java:211) >>> at >>> org.apache.xbean.finder.AbstractFinder.findMetaAnnotatedClasses(AbstractFinder.java:225) >>> at >>> org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:) >>> at >>> org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:356) >>> at >>> org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:286) >>> at >>> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:263) >>> at >>> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:692) >>> at >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:966) >>> at >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getAppInfo(EjbModuleBuilder.java:886) >>> at >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.doInitContext(EjbModuleBuilder.java:796) >>> at >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:775) >>> at >>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.ja
Re: Cannot Lookup EJBs in Geronim 3.0
Are you using CDI and bean validation in your app? Have you done something to define these lookups anywhere? thanks david jencks On Nov 6, 2012, at 7:04 PM, Ali wrote: > hi there, > > I have recently migrated from Geronimo 2.2 to Geronimo 3.0; there is no issue > in deployment yet my lookups are now failing > (javax.naming.NameNotFoundException) and I can see following WARN messages in > the log when application is deployed: > > 2012-11-07 13:47:22,843 WARN [AdminObjectRefBuilder] Failed to build > reference to resource env reference [java:comp/BeanManager, > java:comp/Validator, java:comp/ValidatorFactory] defined in plan file. The > corresponding entry in Geronimo deployment descriptor is missing. > > I am really stuck and have no idea how to fix this after two weeks of > investigation; it used to work same application on G2.2! > > Can you please guide me on this? > > Thank you. > > Regards, > A.
Re: Geronimo connection.
Please post to only one of the geronimo lists, not both. you haven't given us enough information to receive good advice. Since a database can become unavailable at any time, your application has to be able to deal appropriately with the situation that a connection stops working at any time. Normally you have to do something like abandoning the transaction you are in. From the container's point of view, what should be happening is that when your application tries to use a connection that is no longer connected to the db, your application should get an exception, and the container should notice the situation and take the connection out of the connection pool.The db side of this is built into XA connections and connection pool connections, and I'm pretty confident that the geronimo side of this is working properly. So if you are using the tranql informix wrapper with xa then broken connections should be getting discarded. If you are wrapping the plain informix driver with the generic tranql wrapper this might not be working properly. What is your pool minimum size? I don't know how the informix driver works, I'd guess it won't create a connection if it can't reach the database. So if your minimum size is non zero you might get a lot of thrashing around until the db comes up. So, what exactly are you seeing happen? There are a lot of circumstances where a connection may break, and the proper response from the container is to discard it so you can't try to keep using it. Is your application looking up connections each time it needs them or caching them? Geronimo tries to deal with this appropriately but if you are caching them you might run into more problems. Which tranql wrapper are you using? thanks david jencks On Nov 11, 2012, at 3:44 PM, Vibhor Agrawal wrote: > Hi All, > > Need help with Geronimo connection. > > Problem Scenario: Geronimo server is on one box say "A" and informix > daatbase is on other box say "B" . > Problem is suppose due to some reason if > both box went down and we bring both box up so box A having Geronimo server > comes up first compare to box B having database. > When Geronimo Server try to look for > connection that time database is down so it dont get any connection. To > establish connection we need to restart server after box "B" having database > is up. > Is there any way where we can change some > Geronimo settings so it will keep trying for connection or it hit database > itself after 5 min of time. > > Thanks for help in advance. > > >
Re: java.lang.ClassNotFoundException: org.apache.log4j.LogManager on startup of new deployed .war
Are you including a Log4j implementation in your app? Geronimo provides log4j interfaces through pax-logging and the result is that by default you can't use the log4j configuration system in your app. IIRC you can either use geronimo's log4j (remove the log4j from your app and configure app-speciifc logging as described in the docs https://cwiki.apache.org/GMOxDOC30/configuring-application-specific-logging-with-log4j.html ) or configure your app to not import the log4j classes. Unfortunately I don't recall the exact way to exclude the log4j classes, I think you put them in a element in the environment in your plan. hope this helps david jencks On Nov 13, 2012, at 9:09 AM, pueffl wrote: > Hi! > > I'm quite new to Geronimo and just tried to deploy an existing application > to it, but got the following trace: > > org.apache.catalina.LifecycleException: Failed to start component > [StandardEngine[Catalina].StandardHost[0.0.0.0].StandardContext[/WebApp_ID]] > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871) > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) > at > org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:310) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:567) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:1000) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:271) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:105) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:555) > at > org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:110) > at > org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:145) > at > org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:119) > at > org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176) > at > org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:45) > at > org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:254) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:301) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:105) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:127) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:569) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:386) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:466) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:225) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:710) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:689) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:662) > Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/LogManager > at > at.gv.bmi.zps.application.ApplicationInitializer.(ApplicationInitializer.java:22) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:247) > at org.apache.xbean.recipe.RecipeHelper.loadClass(RecipeHelper.java:52) > at org.apache.xbean.recipe.ObjectRecipe.getType(ObjectRecipe.java:353) > at > org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:266) > at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96) > at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61) > at > org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:180) > at > org.apache.geronimo.tomcat.TomcatInstanceManager.newInstance(TomcatInstanceManager.java:64) > at > org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1292) > at >
Re: JNDI Lookup
This looks really odd. IIUC it's saying that the bytes for the EJBException class doesn't have the code bits. Are you sure a real ee jar containing these is on the client class path? I've never seen anything remotely like this. anyone else have a clue? thanks david jencks On Nov 17, 2012, at 5:21 PM, Russell Collins wrote: > Is there anybody out there that can point me in the right direction? > > On 11/16/2012 07:26 AM, Russell Collins wrote: >> I am having problems looking up an ejb remotely. In Geronimo 2.x, this >> worked perfectly. Now I am having issues. First, when I deploy the ear, >> this is the JNDI entries that are created. >> >> >> 7556: 2012-11-14 22:11:33,271 INFO [startup] Assembling app: >> /home/opt/Geronimo3.0/bin/com.cs/base-business/1.0/car >> 7557: 2012-11-14 22:11:33,278 INFO [startup] Jndi(name=CompositionLocal) >> --> Ejb(deployment-id=cs-base-business.jar/Composition) >> 7558: 2012-11-14 22:11:33,279 INFO [startup] >> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/Composition!com.cs.base.interfaces.ICompositionLocal) >> --> Ejb(deployment-id=cs-base-business.jar/Composition) >> 7559: 2012-11-14 22:11:33,279 INFO [startup] >> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/Composition) --> >> Ejb(deployment-id=cs-base-business.jar/Composition) >> 7560: 2012-11-14 22:11:33,279 INFO [startup] Jndi(name=EmailManagerRemote) >> --> Ejb(deployment-id=cs-base-business.jar/EmailManager) >> 7561: 2012-11-14 22:11:33,279 INFO [startup] >> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/EmailManager!com.cs.base.remote.interfaces.IEmailManagerRemote) >> --> Ejb(deployment-id=cs-base-business.jar/EmailManager) >> 7562: 2012-11-14 22:11:33,279 INFO [startup] >> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/EmailManager) --> >> Ejb(deployment-id=cs-base-business.jar/EmailManager) >> >> I try to use this code to access the ejb's. >> >> InitialContext context; >> // Configure Initial context >> try { >> this.m_emailManager = >> (IEmailManagerRemote)context.lookup("EmailManagerRemote"); >> // Other statements >> >> I get this error upon lookup: >> >> java.lang.ClassFormatError: javax/ejb/EJBException : Missing Code attribute >> at java.lang.ClassLoader.defineClass1(Native Method) >> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) >> at java.lang.ClassLoader.defineClass(ClassLoader.java:615) >> at >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) >> at java.net.URLClassLoader.access$000(URLClassLoader.java:58) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:197) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >> at java.lang.ClassLoader.defineClass1(Native Method) >> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) >> at java.lang.ClassLoader.defineClass(ClassLoader.java:615) >> at >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) >> at java.net.URLClassLoader.access$000(URLClassLoader.java:58) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:197) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >> at >> org.apache.openejb.client.JNDIContext.createBusinessObject(JNDIContext.java:202) >> at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:244) >> at javax.naming.InitialContext.lookup(InitialContext.java:392) >> at com.acc.base.ejb.Emailer.sendContactUs(Emailer.java:68) >> at com.acc.base.ejb.EmailerTest.emailerSuccessTest(EmailerTest.java:30) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke
Re: Geronimo 3 + car-maven-plugin + maven3
Is this trying to build geronimo itself? If so you need to do a bootstrap build first, IIRC mvn clean install -Pstage-bootstrap If you are trying to build your own .car file you need to mention the car-maven-plugin as an extension IIRC david jencks On Nov 20, 2012, at 7:50 AM, Marcos Mendez wrote: > > Does anyone know how to solve the "Unknown packaging: car" error using this > plugin with maven3?
Re: Geronimo 3 + car-maven-plugin + maven3
Do you have the element in one of your elements regarding the car-maven-plugin? org.apache.geronimo.buildsupport car-maven-plugin ${project.version} true is in the root pluginManagement geronimo pom. david jencks On Nov 20, 2012, at 9:47 AM, Marcos Mendez wrote: > Hi David, > > I'm trying to build a plugin myself , not building geronimo. :) Just a > separate car plugin so I can deploy my stuff with one file. > > Regards, > Marcos > > On Nov 20, 2012, at 12:45 PM, David Jencks wrote: > >> Is this trying to build geronimo itself? If so you need to do a bootstrap >> build first, IIRC >> >> mvn clean install -Pstage-bootstrap >> >> If you are trying to build your own .car file you need to mention the >> car-maven-plugin as an extension IIRC >> >> david jencks >> >> On Nov 20, 2012, at 7:50 AM, Marcos Mendez wrote: >> >>> >>> Does anyone know how to solve the "Unknown packaging: car" error using this >>> plugin with maven3? >> >
Re: JCA deployment plan schema doesn't include inbound-resourceadapter
It looks to me as if someone took an ra.xml for the amq resource adapter, changed the namespace, and added an environment section. That's not a valid or useful geronimo-ra.xml in any possibly way. Inbound resource adapters are configured via the mdb that they drive. The mdb implements the appropriate interface which selects the message-listener. Then you specify the activation spec properties for the mdb. Admin objects are configured in geronimo-ra.xml, but you specify the class and then have admin-object-instance elements nested for the admin objects of that class. And you need config-property values to do any good at all :-) thanks for noticing this. Anyone have time to fix it? thanks david jencks On Dec 19, 2012, at 9:53 AM, Murray Todd Williams wrote: > I'm in the process of developing a bi-directional JCA adapter, and I'm trying > to deploy the skeleton to Geronimo. While writing the deployment plan > (geronimo-ra.xml) my Eclipse editor is complaining that the schema > (http://geronimo.apache.org/xml/ns/j2ee/connector-1.2) doesn't allow for an > element. > > In other words, the sample plan in the Geronimo v2.2 docs: > > https://cwiki.apache.org/GMOxDOC22/geronimo-raxml.html#geronimo-ra.xml-%3Cadminobject%3E > > doesn't validate! > > Am I missing something? > > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/JCA-deployment-plan-schema-doesn-t-include-inbound-resourceadapter-tp3986165.html > Sent from the Users mailing list archive at Nabble.com.
Re: How to determine in which container code is running?
On Dec 31, 2012, at 7:57 AM, Markku Saarela wrote: > Hi, > > Has Java EE spec any API to determine is code running in EJB or WEB container? no. > > Or is there any better way than examine stacktrace? I'm imagining that you have some library or perhaps CDI code that is called from both a servlet and an ejb? Why do you care? Just to figure out why something is working the way it is, or do you need to take different action depending on what calls this code? You could pass appropriate context information to the code in question from the caller. david jencks > > Rgds, > > Markku
Re: How to determine in which container code is running?
I'm not familiar with this particular way of describing UOW or data mapper, but you might consider whether they are irrelevant with ee facilities. The whole purpose of EJBs is to provide declarative transaction management, which is what UOW usually means. A tiny bit of googling of data mapper makes me ask why you wouldn't use jpa. I haven't read Fowler's books for many years, I thought his refactoring book was really good, but the design patterns ones seemed to me to be reinventing the wheel as far as ee goes. thanks david jencks On Dec 31, 2012, at 8:18 AM, Markku Saarela wrote: > My use case is to implement Martin Fowler's Domain Model enterprise design > pattern with Unit Of Work and Data Mapper. > > This UOW does not work with ThreadLocal in every app server due to thread > pooling. > > So only solution to use different UOW storing mechanism in different layers; > session persistence in web container and pass UOW instance to the EJB > container and store it to TransactionSynchronizationRegistry. Of course > standalone Java client could use TrhreadLocal implementation. > > In UOW static methods to manipulate current UOW instance (getCurrent(), > newCurrent() etc,) must some how decide which implementation to use. > > Markku > > On 12/31/2012 06:06 PM, David Jencks wrote: >> On Dec 31, 2012, at 7:57 AM, Markku Saarela wrote: >> >>> Hi, >>> >>> Has Java EE spec any API to determine is code running in EJB or WEB >>> container? >> no. >>> Or is there any better way than examine stacktrace? >> I'm imagining that you have some library or perhaps CDI code that is called >> from both a servlet and an ejb? Why do you care? Just to figure out why >> something is working the way it is, or do you need to take different action >> depending on what calls this code? You could pass appropriate context >> information to the code in question from the caller. >> >> david jencks >> >>> Rgds, >>> >>> Markku >
Re: Geronimo > OpenLDAP not quite right......
My understanding of ldap is kinda limited but I think that you are asking to authenticate all your users under ou=people but that you want to assign permissions only to the CLINICS group. If you want to only authenticate people in the clinics group you need a query that will only return those people. I'm not sure how to construct such an ldap query. hope this makes sense david jencks On Apr 3, 2013, at 2:10 PM, VPCL wrote: > Hi: > > I'm currently using Geronimo 2.2 and OpenLDAP: slapd 2.3.43. > > I’m trying to create an LDAP Security Realm on the Geronimo server that will > query my OpenLDAP server. For the most part, it works. However, the realm > cannot seem to differentiate between the two different groups on the LDAP > server. Resulting in any member being authenticated no matter which group > they belong to, which is not what I want. I’m only trying to authenticate > users if they are members of the 'CLINICS' group. > > Here’s how my LDAP is setup: > > dc=mydomain,dc=on,dc=ca (objectClass=dcObject, organization) > ou=groups(objectClass=organizationalUnit) >cn=ADMIN (objectClass=groupOfUniqueNames) >cn=CLINICS (objectClass=groupOfUniqueNames) > uid=User1,ou=people,dc=mydomain,dc=on,dc=ca > uid=User2,ou=people,dc=mydomain,dc=on,dc=ca > uid=User3,ou=people,dc=mydomain,dc=on,dc=ca >cn=SUPPLIERS (objectClass=groupOfUniqueNames) > uid=Supplier1,ou=people,dc=mydomain,dc=on,dc=ca > uid=Supplier2,ou=people,dc=mydomain,dc=on,dc=ca > ou=people(objectClass=organizationalUnit) >uid=User1 (objectClass=inetOrgPerson) >uid=User2 (objectClass=inetOrgPerson) >uid=User3 (objectClass=inetOrgPerson) >uid=Supplier1 (objectClass=inetOrgPerson) >uid=Supplier1 (objectClass=inetOrgPerson) > > On the Geronimo Side, here is how I set up my realm: > > Initial Context Factory: com.sun.jndi.ldap.LdapCtxFactory > Connection URL: ldap://localhost:389 > Connect Username: cn=someuser,dc=mydomain,dc=on,dc=ca > Connect Password: secret > Confirm Password: secret > Connect Protocol: > Authentication: simple > User Base: ou=people,dc=mydomain,dc=on,dc=ca > User Search Matching: uid={0} > User Search Subtree: false > Role Base: cn=CLINICS,ou=groups,dc=vpcl,dc=on,dc=ca > Role Name: cn > Role User Search String: uid={0} > Role Search Subtree: false > User Role Search String: memberOf={0} > > > I’ve tried replacing the ‘User Search Matching’ and or the ‘Role User Search > String’ with stuff like: > > (&(uid={0})(cn=CLINICS,ou=groups,dc=mydomain,dc=on,dc=ca)(attr=uniqueMember)) > > But it’s just not working out. > > On a side note: I do have Apache directives using this LDAP database as well > as some PHP Applications. I just don’t know why I can’t get Geronimo to work > with it. > > Any help would be appreciated. > > Thanks... > > Fred > > > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/Geronimo-OpenLDAP-not-quite-right-tp3986519.html > Sent from the Users mailing list archive at Nabble.com.
Re: Geronimo redirects every HttpURLConnection to localhost
It's been years since I've looked at this and I don't recall what the spec says should happen…. however I wonder if you have a wsdl and what host it specifies? david jencks On Jul 26, 2013, at 1:22 AM, Florian Schaetz wrote: > Hi, > > I’ve written a small WebService (for testing purposes mainly) for my Geronimo > 2.2.1, which opens an URLConnection to an http address. Strangly, I was > always getting a FileNotFoundException (in other words, a 404 error), but > when entering the URL into my browser, it worked flawlessly. So, after some > testing and reading the error-output, I found out that Geronimo seemso to > redirect that URLConnection to localhost – which then throws a 404, of course. > > For example… > > http://mydomain.com/somewhere/something.html > > returns the (Geronimo) error html page that /somewhere/something.html does > not exist. Err… Yes, because I didn’t want > localhost:8080/somewhere/something.html… > > Has anyone an idea where this behavior comes from? > > Regards, > > Flo
Re: jndi properties for datasource
Hi, This is all correct but I'm not sure it answers the original question. Geronimo datasources/database pools are designed to only be accessed in the same VM as they are deployed in. You cannot look up a database pool deployed in geronimo from another VM no matter how you configure the remote jndi. One reason for this is that we don't have a distributed transaction manager and certainly couldn't come up with a correctly configured transaction manager in the remote vm through a jndi lookup. If you really want a "standalone" application to be able to use a geronimo datasource consider deploying the app in the app client container and deploying the datasource there. thanks david jencks On Aug 20, 2013, at 8:42 PM, Zhi Xie wrote: > You can create a datasource by a deployment plan. For example, > > Deployment Plan: > > http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";> > xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";> > > console.dbpool > Test > 1.0 > car > > > > mysql > mysql-connector-java > 3.1.14 > jar > > > > > > > > javax.sql.DataSource > > Test > name="DatabaseName">TestDB > name="UserName">admin > name="Password">admin > > > > 10 > 0 > > > > > > > > > > Deploy Command: > To deploy a database pool from the command line using this plan,copy and > paste it to a file (say, plan-file.xml) and save it. Then run a command like: > cd GERONIMO_HOME > java -jar bin/deployer.jar deploy plan-file.xml \ > > \repository\org\tranql\tranql-connector-mysql-local\1.6\tranql-connector-mysql-local-1.6.rar > Add to EAR: > Instead of deploying as a top-level database pool, you can deploy this pool > as part of an EAR. To add a database pool to an EAR using this plan: > Copy and paste the plan to a file > Save the plan file to the top level of your EAR > Copy the RAR file from > GERONIMO_HOME/\repository\org\tranql\tranql-connector-mysql-local\1.6\tranql-connector-mysql-local-1.6.rar > to the top level of your EAR > Create a META-INF/geronimo-application.xml file in your EAR that has a module > entry like this (substituting the correct RAR file name and plan file name) > xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1";> > > > MyApplication > > > > rar-file-name.rar > plan-file-name.xml > > > > You can click "Show Plan" button to refer it when you create database pool. > > > > > > > > > > > 2013/8/19 kiranreddykasa > Hi > > I have created a datasource in geronimo server. > I'm able to connect it via admin console. > > Can anyone let me know how to connect to this datasource by external > standalone application via jndi. > > Specifically i'm not sure about these following values : > > java.naming.factory.initial=TO_BE_CHANGED_BY_USER > java.naming.factory.object=TO_BE_CHANGED_BY_USER > java.naming.factory.state=TO_BE_CHANGED_BY_USER > java.naming.factory.control=TO_BE_CHANGED_BY_USER > java.naming.factory.url.pkgs=TO_BE_CHANGED_BY_USER > java.naming.provider.url=TO_BE_CHANGED_BY_USER > java.naming.dns.url=TO_BE_CHANGED_BY_USER > > And also which jar should be included for this to work ?? > > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/jndi-properties-for-datasource-tp3987125.html > Sent from the Users mailing list archive at Nabble.com. > > > > -- > Best Regards > Gary
Re: DB2 Connection::rollback sometimes called for unknown reason within a committed XA transaction
I suspect that you have not configured the db2 connector to use XA. Could you show the plan for the connector? BTW why are you reconfiguring the connector in config.xml rather than just configuring it directly in the plan? There should be no problem doing this, but I haven't seen it done often. many thanks david jencks On Sep 2, 2013, at 5:07 AM, Stella Lok wrote: > Hi, > > I am using Websphere Application Server Community Edition 2.0.0.2-20080401 on > Windows Server 2003. I am experiencing intermittent problems with an EJB that > inserts a row each into 3 tables. > The datasource used by the EJB is of the TranQL XA Resource Adapter > (tranql-connector-1.4.jar and tranql-connector-db2-common-1.1.jar) for DB2 > pool type, and the driver type is 4. The underlying database is DB2 > v9.5.0.808. > > The EJB is using Bean Managed Transactions. It is coded to: > Get a UserTransaction from SessionContext > Call UserTransaction::begin > Insert a row into Table 1. > Insert a row into Table 2 which has an identity column (i.e. autonumber) > primary key. > Insert a row into Table 3 using the autogenerated number from the row > inserted into table 2. Table 3 has no foreign key constraints. > Publish a JMS message > Call UserTransaction::commit > Intermittently, a problem happens where the EJB has successfully committed > the UserTransaction, but when I inspect the tables, only Table 3 has a new > row. Interestingly, the next row successfully inserted into Table 2 will be > greater than the last row in Table 2 by 2 instead of 1, indicating that the > sequence for the identity column had been incremented during the transaction > during which the problem occurred. Hence, I suspected that although the > UserTransaction had been committed, the insertions into Tables 1 and 2 had > been rolled back. > > To verify if that was true, I configured the Database Pool to set the > TraceFile property. Then, I was able to see from the DB2 trace file that > after the insertion into Table 2, Connection::rollback was called. > > Here is an excerpt of the DB2 trace, that is taken from between the insert > into Table 2 and before the insert into Table 3. The first bolded line shows > that an insert was done into Table 2, as > PreparedStatement::getGeneratedKeys() returned the autonumber primary key of > 145012. The third bolded line shows that rollback was called on the > Connection. > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][PreparedStatement@318a318a] > getGeneratedKeys () returned ResultSet@78da78da > [ibm][db2][jcc][SystemMonitor:start] > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > next () called > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > next () returned true > [ibm][db2][jcc][SystemMonitor:stop] core: 0.129933ms | network: 0.0ms | > server: 0.0ms > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > getInt (1) called > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > getInt () returned 145012 > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > wasNull () called > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > wasNull () returned false > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > getInt (1) called > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > getInt () returned 145012 > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > wasNull () called > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > wasNull () returned false > [ibm][db2][jcc][SystemMonitor:start] > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][ResultSet@78da78da] > close () called > [ibm][db2][jcc][SystemMonitor:stop] core: 0.062957ms | network: 0.0ms | > server: 0.0ms > [ibm][db2][jcc][SystemMonitor:start] > [ibm][db2][jcc][Time:2013-09-02-15:10:00.469][Thread:http-0.0.0.0-8080-3][PreparedStatement@318a318a] > close () called > [ibm][db2][jcc][SystemMonitor:stop] core: 0.075763ms | network: 0.0ms | > server: 0.0ms > [ibm][db2][jcc][Time:2013-09-02-15:10:06.829][Thread:http-0.0.0.0-8080-3][Connection@5fc25fc2] > getMetaData () returned DatabaseMetaData@312e312e > [ibm][db2][jcc][Time:2013-09-02-15:10:06.844][Thread:http-0.0.0.0-8080-3][Connection@5fc25fc2] > getTransactionIsolation () returned 2 > [ibm][db2][jcc][Time:2013-09-02-15:10:06.844]
Re: classloading problem for WARs in an EAR file share classpath
Hi, As far as I can tell, the ee spec doesn't specify that wars in an ear each need their own classloader. Geronimo passes the tck, so if I missed any part of the spec that says this so did the tck writers. I probably just haven't looked at an application like this recently, but I'm having trouble understanding exactly how the CCE arises, especially since the classes appear to be different. Can you deploy the wars separately? thanks david jencks On Sep 3, 2013, at 3:01 PM, Jack Cai wrote: > Hi, > > I package two wars in an ear, web1, and web2. nothing else, and deployed to > geronimo (3.0.1) > > When I tried to access web1, web2's classes are loaded instead. What I found > in the MANIFFEST.MF of the EAR package: > > Bundle-ClassPath: ...,webdemo-jsp.war/WEB-INF/classes,webdemo2-js > p.war/WEB-INF/classes > > after the EAR file is deployed to Geronimo. > > This effectively makes all wars visible to all, and causes the type cast > error: > > java.lang.ClassCastException: com.webapp2.dao.Customer cannot be cast to > com.webapp.dao.Customer > > I thought J2EE app is supposed to isolate classloader of each war to > prevent similar problems. Is there a way to config around this in geronimo? > Thanks > > BTW, the ear application is created using Eclipse EAR for Geronimo. > > Thanks. > > -Jack
Re: classloading problem for WARs in an EAR file share classpath
I don't think (a) will work since it's entirely possible in an ee situation to have packages split between a module (e.g. war) and an application library, and we can't reproduce this with bundles. One reason I originally liked using a bundle for an ee application is that you can export classes and then import them into other bundles or ee applications. However with the increasing support for individual ee standards directly in osgi bundles this is seeming less important: if you want to do something like this you can make your application use the osgi versions of the specs directly instead of using ee packaging. thanks david jencks On Sep 3, 2013, at 7:20 PM, Ivan wrote: > Hi, > > EE specification leaves this classloader visibility scenario to container, > while considering that most developers have this kind of isolation in their > mind, as it is commonly used by most EE application severs, including > Geronimo 2.*. In my opinion, we should fix this, actually, this is one thing > left while Geronimo turned to use OSGi to manage different modules. I could > see the following solutions : > > a. Our original idea is to use N+1 bundles for EAR, we will create each > bundle for each web applications, and create one bundle containing EAR > libraries and EJB libraries. One difficult thing is to build export packages > for the later bundle, and generate the according import-packages for those > web application bundles. Another temporary solution is to use Equonix > classloader hook, with that, we could not do the export/import packages > generation now. > > b. Copy the Geronimo 2.* classloader codes back to Geronimo 3.*, then only > use one bundle as the parent of EAR classloader, which could be used to load > those must classes from server container. > > > 2013/9/4 Jack Cai > Yes. The separate wars can be deployed to Geronimo without any problem. > > Each war uses hibernate, which is the basis of the DAOs. Since the hibernate > library in each war uses identical package and class names, EAR classloader > loads one hibernate library and one dao from one war, when it comes to load > the second dao, it tries to use the first hibernate, that results in CCE. > > We were hoping to use the classloader isolation of EAR and WAR to manage > class loading, so that one EAR app with multiple wars can be deployed > multiple times on the same Geronimo instance. > > Is there a work-around for this? Thanks. > > -Jack > > > > On Tue, Sep 3, 2013 at 5:11 PM, David Jencks wrote: > Hi, > > As far as I can tell, the ee spec doesn't specify that wars in an ear each > need their own classloader. Geronimo passes the tck, so if I missed any part > of the spec that says this so did the tck writers. > > I probably just haven't looked at an application like this recently, but I'm > having trouble understanding exactly how the CCE arises, especially since the > classes appear to be different. > > Can you deploy the wars separately? > > thanks > david jencks > On Sep 3, 2013, at 3:01 PM, Jack Cai wrote: > > > Hi, > > > > I package two wars in an ear, web1, and web2. nothing else, and deployed > > to geronimo (3.0.1) > > > > When I tried to access web1, web2's classes are loaded instead. What I > > found in the MANIFFEST.MF of the EAR package: > > > > Bundle-ClassPath: ...,webdemo-jsp.war/WEB-INF/classes,webdemo2-js > > p.war/WEB-INF/classes > > > > after the EAR file is deployed to Geronimo. > > > > This effectively makes all wars visible to all, and causes the type cast > > error: > > > > java.lang.ClassCastException: com.webapp2.dao.Customer cannot be cast to > > com.webapp.dao.Customer > > > > I thought J2EE app is supposed to isolate classloader of each war to > > prevent similar problems. Is there a way to config around this in geronimo? > > Thanks > > > > BTW, the ear application is created using Eclipse EAR for Geronimo. > > > > Thanks. > > > > -Jack > > > > > > -- > Ivan
Re: Does anybody know how to configure a datasource for informix
I see some hints in informix documentation that it is possible to create a database with no transaction log ("WITH NO LOG"). Is it possible that your database was created this way? thanks david jencks On Sep 16, 2013, at 2:35 AM, Zhi Xie wrote: > I have installed informix jdbc driver 3.50 ifxjdbc.jar,ifxjdbcx.jar into > geronimo2.1.7. > Then configure a datasource to informix. But I got the exeption below. > I don't know why database does not have logging. > > Any comment is appreciated. > > 2013-09-16 16:28:36,258 ERROR [RecoveryController] Recovery error > javax.transaction.SystemException: Could not get XAResource for recovery for > mcf: geronimo:J2EEApplication=null,J2EEServer=geronim > o,JCAConnectionFactory=TestInfo,JCAManagedConnectionFactory=TestInfo,JCAResource=console.dbpool/TestInfo/1.0/car,ResourceAdapter=c > onsole.dbpool/TestInfo/1.0/car,ResourceAdapterModule=console.dbpool/TestInfo/1.0/car,j2eeType=JCAConnectionManager,name=TestInfo > at > org.apache.geronimo.connector.outbound.OutboundNamedXAResourceFactory.getNamedXAResource(OutboundNamedXAResourceFactory > .java:61) > at > org.apache.geronimo.transaction.manager.RecoverTask.run(RecoverTask.java:49) > at > org.apache.geronimo.transaction.manager.ExponentialtIntervalRetryScheduler$TaskWrapper.run(ExponentialtIntervalRetrySch > eduler.java:50) > at java.util.TimerThread.mainLoop(Timer.java:537) > at java.util.TimerThread.run(Timer.java:487) > Caused by: > javax.resource.spi.ResourceAdapterInternalException: Unable to obtain > physical connection to com.informix.jdbcx.IfxXADataSource@77 > d777d7 > at > org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:77) > at > org.tranql.connector.informix.XAMCF.createManagedConnection(XAMCF.java:58) > at > org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:49) > at > org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java > :41) > at > org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterc > eptor.java:69) > at > org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnecti > onInterceptor.java:80) > at > org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.ja > va:49) > at > org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:1 > 09) > at > org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39) > at > org.apache.geronimo.connector.outbound.OutboundNamedXAResourceFactory.getNamedXAResource(OutboundNamedXAResourceFactory > .java:56) > ... 4 more > Caused by: > java.sql.SQLException: Database does not have logging. > at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:412) > at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3549) > at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3871) > at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2661) > at com.informix.jdbcx.IfxXASqli.receiveMessage(IfxXASqli.java:116) > at com.informix.jdbcx.IfxXASqli.executeXAOpen(IfxXASqli.java:182) > at > com.informix.jdbcx.IfxXAPooledConnection.openDBforXA(IfxXAPooledConnection.java:226) > at > com.informix.jdbcx.IfxXAPooledConnection.(IfxXAPooledConnection.java:139) > at > com.informix.jdbcx.IfxXADataSource.getXAConnection(IfxXADataSource.java:98) > at > org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:75) > ... 13 more > Caused by: > java.sql.SQLException > at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:412) > at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3876) > ... 20 more > > -- > Best Regards > Gary
Re: JPA Error
Um, isn't this in your code? Caused by: java.lang.NullPointerException at com.acc.domain.entity.AccClient.hashCode(AccClient.java:213) david jencks On Nov 15, 2013, at 2:38 PM, Collins Solutions wrote: > I have deployed an application to the geronimo server. I am getting an error > when the entity is trying to persis to the database. The error that I am > getting is as follows: > > > org.apache.openjpa.persistence.PersistenceException: error during validation > of >at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2585) >at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2564) >at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2468) >at > org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1077) >at > org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:716) >at > org.apache.geronimo.persistence.CMPEntityManagerTxScoped.persist(CMPEntityManagerTxScoped.java:87) >at com.acc.eao.ejb.ClientEAO.saveClient(ClientEAO.java:124) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >at java.lang.reflect.Method.invoke(Method.java:602) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >at > org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:174) >at > org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:93) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >at java.lang.reflect.Method.invoke(Method.java:602) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129) >at org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45) >at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66) >at > org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >at java.lang.reflect.Method.invoke(Method.java:602) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >at > org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:130) >at > org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:226) >at > org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178) >at > org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:255) >at > org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:235) >at > org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92) >at > org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:284) >at com.sun.proxy.$Proxy116.saveClient(Unknown Source) >at com.acc.base.ejb.EmailerACC.saveClient(EmailerACC.java:172) >at com.acc.base.ejb.EmailerACC.sendContactUs(EmailerACC.java:104) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >at java.lang.reflect.Method.invoke(Method.java:602) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContex
Re: JPA Error
Are you running bean validation outside geronimo? On Nov 16, 2013, at 10:51 AM, Collins Solutions wrote: > The persist to the database works when it is outside the Geronimo container. > None of the persist operations work while inside the container. > > On 11/16/2013 12:36 AM, David Jencks wrote: >> Um, isn't this in your code? >> >> Caused by: java.lang.NullPointerException >>at com.acc.domain.entity.AccClient.hashCode(AccClient.java:213) >> >> >> david jencks >> >> On Nov 15, 2013, at 2:38 PM, Collins Solutions >> wrote: >> >>> I have deployed an application to the geronimo server. I am getting an >>> error when the entity is trying to persis to the database. The error that >>> I am getting is as follows: >>> >>> >>> org.apache.openjpa.persistence.PersistenceException: error during >>> validation of >>>at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2585) >>>at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2564) >>>at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2468) >>>at >>> org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1077) >>>at >>> org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:716) >>>at >>> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.persist(CMPEntityManagerTxScoped.java:87) >>>at com.acc.eao.ejb.ClientEAO.saveClient(ClientEAO.java:124) >>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >>>at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>at java.lang.reflect.Method.invoke(Method.java:602) >>>at >>> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >>>at >>> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >>>at >>> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:174) >>>at >>> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:93) >>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >>>at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>at java.lang.reflect.Method.invoke(Method.java:602) >>>at >>> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >>>at >>> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >>>at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129) >>>at >>> org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45) >>>at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66) >>>at >>> org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72) >>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >>>at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>at java.lang.reflect.Method.invoke(Method.java:602) >>>at >>> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >>>at >>> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >>>at >>> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:130) >>>at >>> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:226) >>>at >>> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178) >>>at >>> org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:255) >>>at >>> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:235) >>>at >>> org.ap
Re: JPA Error
I don't know. Having a hashCode method throw an NPE is not within the expected behavior of java classes. Is there some reason you don't want to fix it, whether or not bean validation is used? david jencks On Nov 16, 2013, at 12:08 PM, Collins Solutions wrote: > I have not specifically run bean validation outside of geronimo. Is there a > way to turn off bean validation inside geronimo? > > On 11/16/2013 01:32 PM, David Jencks wrote: >> Are you running bean validation outside geronimo? >> >> >> On Nov 16, 2013, at 10:51 AM, Collins Solutions >> wrote: >> >>> The persist to the database works when it is outside the Geronimo >>> container. None of the persist operations work while inside the container. >>> >>> On 11/16/2013 12:36 AM, David Jencks wrote: >>>> Um, isn't this in your code? >>>> >>>> Caused by: java.lang.NullPointerException >>>>at com.acc.domain.entity.AccClient.hashCode(AccClient.java:213) >>>> >>>> >>>> david jencks >>>> >>>> On Nov 15, 2013, at 2:38 PM, Collins Solutions >>>> wrote: >>>> >>>>> I have deployed an application to the geronimo server. I am getting an >>>>> error when the entity is trying to persis to the database. The error >>>>> that I am getting is as follows: >>>>> >>>>> >>>>> org.apache.openjpa.persistence.PersistenceException: error during >>>>> validation of >>>>>at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2585) >>>>>at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2564) >>>>>at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2468) >>>>>at >>>>> org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1077) >>>>>at >>>>> org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:716) >>>>>at >>>>> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.persist(CMPEntityManagerTxScoped.java:87) >>>>>at com.acc.eao.ejb.ClientEAO.saveClient(ClientEAO.java:124) >>>>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >>>>>at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>at java.lang.reflect.Method.invoke(Method.java:602) >>>>>at >>>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >>>>>at >>>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >>>>>at >>>>> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:174) >>>>>at >>>>> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:93) >>>>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >>>>>at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>at java.lang.reflect.Method.invoke(Method.java:602) >>>>>at >>>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) >>>>>at >>>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) >>>>>at >>>>> org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129) >>>>>at >>>>> org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45) >>>>>at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66) >>>>>at >>>>> org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72) >>>>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76) >>>>>at >>>>> sun.reflect.DelegatingMethodAcce
Re: Geronimo:wait-for-server is not waiting
Can you be more specific about what is started and what isn't? I haven't looked at the shell command or the underlying functionality in a really long time but I think that the wait-for-server functionality was waiting for all the gbeans in all the cars mentioned in server.xml to start. It won't wait for any apps deployed dynamically. david jencks On Dec 29, 2013, at 4:26 AM, Steve Higham wrote: > Hi, > > I'm trying to automate a Geronimo deployment using v3.0.1. > > I have tried starting a Geronimo server and immediately connecting using SSH. > I can connect to the shell and run Geronimo:wait-for-server (interactively). > However the command returns immediately even though the server is only half > way through its start up. > > Any help appreciated. > > Steve
Re: Step through/Debug geronimo sources
That's going to be hard to set up. You would need Aries blueprint and xbean-blueprint. When I was developing xbean-blueprint I found it rather hard to debug. I'm not sure which aries blueprint binary jar is included in geronimo but I think you'll need either a source checkout or the individual source jars, I don't think there is a source jar for the all-in-one blueprint binary jar. hope this points you in the right direction. david jencks On Jan 7, 2014, at 2:38 AM, Genc, Ömer wrote: > Hey there, > > currently i am trying to debug the geronimo sources. Unfortunately I am > having trouble to do so. > > Here is what I would like to do: > I would like to step through the code of the initialization of the ActiveMQ > module. > In fact, I would like to see the code, when the information from the > configuration file > $GERONIMO_HOME\repository\org\apache\geronimo\configs\activemq-broker-blueprint\3.0.1\activemq-broker-blueprint-3.0.1.car\OSGI-INF\blueprint\activemq.xml > file is loaded and the information it contains are parsed. > > Unfortunately I am not able to find a corresponding entry point for setting a > breakpoint in the sources. Where would I need to set a breakpoint, when I > would like to step through the loading of the module > “org.apache.geronimo.configs/activemq-broker-blueprint/3.0.1/car”? > > I am on Windows7 using Eclipse with a working GEP installation and Geronimo > 3.0.1. > > Thanks in advance for any hints. > > Cheers, > Ömer
Re: MissingDependencyException with geronimo-tomcat6-javaee5-2.1.8
As far as I know there is no way to work around this problem when deploying using the deploy directory. I think your options are to write a script to deploy the applications in the order you need or to pre-deploy them as car files and perhaps build a custom server assembly including them. david jencks On Mar 3, 2014, at 5:36 AM, BLB 4SOFF wrote: > Hi, > > I need help for using geronimo 2.1.8 (I've tested also with 2.2.1 with > the same result). > My goal is to give some EARs and RARs as examples in a Geronimo environment. > > So I put a RAR archive and an EAR one that depends on that RAR in > Geronimo deploy directory. > The deployment is done that way because several EARs can use the same rar. > > It seems that the ear is deployed before the rar so the dependency is > not resolved by Geronimo. > > > I encounter the problem on a linux system (and not with windows 7 for > the moment : perhaps because my windows VM is slower). > > > When Geronimo starts, I get the following exception > > 2014-02-20 14:34:43,349 INFO [DirectoryHotDeployer] Deploying > vsims-ear-4.1.0-SNAPSHOT.ear > 2014-02-20 14:34:43,552 ERROR [DirectoryHotDeployer] Unable to deploy: > Unable to create configuration for deployment > org.apache.geronimo.common.DeploymentException: Unable to create > configuration for deployment > at > org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:151) > at > org.apache.geronimo.deployment.DeploymentContext.(DeploymentContext.java:131) > at > org.apache.geronimo.deployment.DeploymentContext.(DeploymentContext.java:111) > at org.apache.geronimo.j2ee.deployment.EARContext.(EARContext.java:64) > at > org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:521) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851) > at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237) > at > org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) > at > org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61) > at java.lang.Thread.run(Thread.java:744) > Caused by: org.apache.geronimo.kernel.config.LifecycleException: load > of mycompany.demos/vsims-ear/4.1.0-SNAPSHOT/ear failed > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:316) > at > org.apache.geronimo.deployment.DeploymentConfigurationManager.loadConfiguration(DeploymentConfigurationManager.java:115) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:277) > at > org.apache.geronimo.deployment.DeploymentConfigurationManager.loadConfiguration(DeploymentConfigurationManager.java:111) > at > org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:148) > ... 17 more > Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: > Error starting configuration gbean > mycompany.demos/vsims-ear/4.1.0-SNAPSHOT/ear > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.load(SimpleConfigurationManager.java:341) > at > org.apache.geronimo.deployment.DeploymentConfigurationManager.load(DeploymentConfigurationManager.java:119) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:302) > ... 21 more > Caused by: org.apache.geronimo.kernel.repository.MissingDependencyException: > Missing dependency: mycompany.ims/ImsConnectAdapter/3.1.0-SNAPSHOT/rar > at > org.apache.geronimo.kernel.config.ConfigurationResolver.resolve(ConfigurationResolver.java:113) > at > org.apache.geronimo.kernel.config.Configuration.buildClassPath(Configuration.java:415) > at > org.apache.geronimo.kernel.config.Configuration.createConfigurationClasssLoader(Configuration.java:339) > at > org.apache.geronimo.kernel.config.Configuration.(Configuration.java:281) > at > org.apache.geronimo.kernel.config.Sim
Re: [Geronimo 3.0.1 + MyFaces Trinidad] Only HttpServletRequest supported exception
Everything I say is pure speculation, and I don't know how to fix this. Geronimo includes MyFaces for jsf support. I would guess that when you get the error your app has wired to the myfaces copy included in geronimo that probably doesn't work with trinidad 2.1, and for some reason when you restart the whole server your app wires to the myfaces 2.1 copy you have deployed. How are you deploying your app? I think there's a way, in your geronimo-specific deployment plan, to exclude imports of various packages. If you exclude all the javax.faces classes that might force your app to wire to the included myfaces copy. sorry I can't be of more help david jencks On May 17, 2014, at 10:37 PM, Eduardo Garcia wrote: > Hello buddies, I have 3 years doing some development using Geronimo + MyFaces > + Trinidad. Due some requirements I had to migrate a pair of apps from 3.0 > to 3.0.1, and now I have the following problem: > > Everytime I upload an application (WAR or WAB) via eclipse or uploading page > from console, and try to use the application, I get the following error: > > > Only HttpServletRequest supported > > viewId=/index.xhtml > location=/home/eduardo/Desarrollo/Servers/geronimo-3.0.1/repository/application/bse.app/1.0.0-alpha/bse.app-1.0.0-alpha.eba/bse.web_1.0.0.alpha.jar/index.xhtml > phaseId=RENDER_RESPONSE(6) > > Caused by: > java.lang.UnsupportedOperationException - Only HttpServletRequest supported > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.checkHttpServletRequest(ServletExternalContextImpl.java:646) > > > > > This error can be cleared only if I restart the Geronimo Application Server, > and everything in the program start working OK. Just restarting the > application don't make any difference. This only happens with web > applications. > > My configuration is: > > - Geronimo 3.0.1 > - MyFaces 2.1 > - Trinidad 2.1 SNAPSHOT (There is no official release for Myfaces 2.1) > > Thanks in advance, > > > Eduardo García > > > P.D. The stack trace shows the following: > > java.lang.UnsupportedOperationException: Only HttpServletRequest supported > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.checkHttpServletRequest(ServletExternalContextImpl.java:646) > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.encodeResourceURL(ServletExternalContextImpl.java:330) > at > org.apache.myfaces.trinidad.util.ExternalContextURLEncoder.encodeResourceURL(ExternalContextURLEncoder.java:79) > at > org.apache.myfaces.trinidadinternal.config.URLEncoderExternalContext.encodeResourceURL(URLEncoderExternalContext.java:119) > at > javax.faces.context.ExternalContextWrapper.encodeResourceURL(ExternalContextWrapper.java:104) > at > javax.faces.context.ExternalContextWrapper.encodeResourceURL(ExternalContextWrapper.java:104) > at > org.apache.myfaces.trinidad.render.CoreRenderer.renderEncodedResourceURI(CoreRenderer.java:1103) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.StyleSheetRenderer.encodeAll(StyleSheetRenderer.java:128) > at > org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:679) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.HeadRenderer.encodeEnd(HeadRenderer.java:97) > at > org.apache.myfaces.trinidad.render.CoreRenderer.delegateRendererEnd(CoreRenderer.java:719) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:108) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525) > at > org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217) > at javax.faces.component.UIComponent.encodeAll(UIComponent.java:792) > at > javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541) > at > org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1981) > at > org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101) > at > org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:338) > at > org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285) > at > javax.faces.application.ViewHandlerWrapp
Re: EJB Transaction inter server propagation
Hi, Transaction propagation between geronimo server instances is not supported. If you use the cobra transport, then we send whether or not there is an active transaction at the client, so we can determine if the call at the server side is allowed (e.g. mandatory is never allowed, requires new is always allowed, requires is allowed only if there was no transaction on the client). I think that the default openejb remote protocol doesn't support even this level of interop. Unfortunately implementing this is not all that easy. If you want to try to implement it I can try to give advice, but it was a problem I was not able to completely solve. thanks david jencks On Aug 13, 2014, at 7:11 AM, Darv wrote: > I am having some difficulty with transaction propagation between two EJBs on > seperate servers (which I understand can be done based on section 13.2.3 of > the EJB3.1 spec), and I would appreciate if some who might have done this, > could help me. > > I am a bit green with EJBs so please excuse me. My initial thought was to > use RemoteInitialContextFactory to initiate the context and then lookup the > remote EJB. While the EJBs communicate ok, unfortunately the transaction > does not propagate, even if the 2 EJB's are on the same server (but > different projects). The @EJB annotation on the remote interface however > does propagate the transaction when on the same machine (diff projects). > > The prototype code below is where MyFirstEjbBean saves a customer and then > calls MySecondEjbBean which save another customer on a seperate schema. > MyFirstEjbBean can then blow up to test the rollback. What annotations and > xml definitions are required to enable this to work inter servers? An > example would be greatly appreciated. > > @Stateless > public class MyFirstEjbBean implements MyFirstEjb, MyFirstEjbRemote { > > @PersistenceContext(name="EJBPrototypesPU") > private EntityManager em; > > @EJB > MySecondEjbRemote mySecondEjb; > > public void saveCustomers(){ > Customer customer = new Customer("name1", "address1", "city1"); > > em.persist(customer); > > mySecondEjb.saveCustomer(); > > //throw new IllegalStateException("Blowing up!"); > } > } > > > @Stateless > public class MySecondEjbBean implements MySecondEjb, MySecondEjbRemote { > > @PersistenceContext(name="EJBPrototypesPU") > private EntityManager em; > > @TransactionAttribute(TransactionAttributeType.MANDATORY) > public void saveCustomer() { > // TODO Auto-generated method stub > > Customer cust2 = new Customer("name2", "addr2","city2"); > > em.persist(cust2); > } > } > > persistance.xml > > > http://java.sun.com/xml/ns/persistence"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence > http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd";> > > jdbc/dstestxa > jdbc/dstest > >value="buildSchema(ForeignKeys=true)"/> >value="table(Table=OPENJPASEQ, > Increment=1)"/> > > > > > > Note: I am using Geronimo 3.0.1 which supports EJB3.1. > > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/EJB-Transaction-inter-server-propagation-tp3988189.html > Sent from the Users mailing list archive at Nabble.com.
Re: EJB Transaction inter server propagation
I'm afraid I don't remember if you can use injection for this. Asking at the tomee/openejb project might give you better info, although I'm not sure it will directly translate. If we made injection work, I hope you have to configure where the other server is outside the annotations since changing them when your other server moves isn't going to scale well. david jencks On Aug 13, 2014, at 5:04 PM, Darv wrote: > Thx David. What annotations and xml is required in an EJB project to inject > another EJB which will run on another geronimo server without transaction > propagation? How is the location / ip address etc specified. Or do you need > to use the RemoteInitialContextFactory. > > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/EJB-Transaction-inter-server-propagation-tp3988189p3988191.html > Sent from the Users mailing list archive at Nabble.com.
Re: Building Geronemo 3.0.1 on CentOS
Several assemblies are built. The geronimo-framework one is extremely minimal, it only has enough stuff in it so you can install more things, in particular it does''t have a web server, ejb support, or much of anything else. Try one of the geronimo-tomcat or geronimo-jetty assemblies. david jencks On Oct 7, 2014, at 1:28 AM, Gokul Subramanian wrote: > Hi folks. > > I am trying to build (from source) Geronemo 3.0.1 using Maven 3.0.5 on > CentOS. The build succeeds, so that is not a problem.. > > # pwd > /root/geronimo-3.0.1/framework/assemblies/geronimo-framework/target/assembly > > # ls > bin deploy etc hotbundles jsr88 lib LICENSE NOTICE README.txt > RELEASE_NOTES-3.0.1.txt repository schema var > > But when I run the 'geronimo run' command, I am unable to connect to > localhost:8080/console, because the HTTP server is not running. Only the > RMINaming and JMX services are running. This problem does not show up if I > use the binary distribution for geronimo instead. So, what's the difference, > and how am I supposed to make the server work. > > PS: I am relatively new to the Java stack altogether. But I am trying to make > sense out of this fairly powerful application server. > > Following is the output from Maven showing some system information.. > > # mvn --version > Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 > 13:51:28+) > Maven home: /opt/apache/apache-maven-3.0.5 > Java version: 1.6.0_45, vendor: Sun Microsystems Inc. > Java home: /usr/java/jdk1.6.0_45/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux", version: "2.6.32-358.el6.x86_64", arch: "amd64", family: > "unix" > > Thanks for your time!
Re: Error in starting daytrader application
I don't think corba actually works in geronimo 3, so I would advise figuring out how to turn off or remove all the corba related cars. I think the immediate problem is a port conflict with the yoko naming service, do you have 2 servers running on the same machine? david jencks On Dec 20, 2014, at 12:36 AM, Andy Koshii wrote: > I managed to install daytrader 3.0 with mysql using the plan at location > daytrader\javaee6\plans\target\plans-3.0.0 > > However application is not starting up > I am getting the following error. Can you please help > > The application was not successfully started. > start of org.apache.geronimo.daytrader/daytrader/3.0.0/car failed > org.apache.geronimo.kernel.config.LifecycleException: start of > org.apache.geronimo.daytrader/daytrader/3.0.0/car failed > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:726) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:689) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown > start exception > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:527) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:225) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:710) > ... 3 more > Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: > Configuration org.apache.geronimo.configs/j2ee-corba-yoko/3.0.1/car failed to > start due to the following reasons: > The service > ServiceModule=org.apache.geronimo.configs/j2ee-corba-yoko/3.0.1/car,j2eeType=CORBANameService,name=NameServer > did not start because Error starting transient name service on port 1050 > org.apache.geronimo.corba.security.config.ConfigException: Error starting > transient name service on port 1050 > at > org.apache.geronimo.yoko.ORBConfigAdapter.createNameService(ORBConfigAdapter.java:194) > at org.apache.geronimo.corba.NameService.doStart(NameService.java:172) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:1000) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:271) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:105) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:127) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:569) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:386) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:466) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:225) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:710) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:689) > at > org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.yoko.orb.CosNaming.tnaming.TransientServiceException: > Unable to initialize name service > at > org.apache.yoko.orb.CosNaming.tnaming.TransientNameService.initialize(TransientNameService.java:156) > at org.apache.geronimo.yoko.ORBConfigAdapter$1.run(ORBConfigAdapter.java:186) > at > org.apache.geronimo.yoko.ORBConfigAdapter.createNameService(ORBConfigAdapter.java:189) > ... 13 more > Caused by: org.omg.CORBA.COMM_FAILURE: bind() failed: Address already in use: > JVM_Bind: vmcid: Apache minor code: 0x8 completed: No > at org.apache.yoko.orb.OCI.IIOP.Acceptor_impl.(Acceptor_impl.java:542) > at > org.apache.yoko.orb.OCI.IIOP.AccFactory_impl.create_acceptor(AccFactory_impl.java:163) > at > org.apache.yoko.orb.OBPortableServer.POAManagerFactory_impl.create_POAManager(POAManagerFactory_impl.java:252) > at org.apache.yoko.orb.OB.ORBControl.initializeRootPOA(ORBControl.java:539) > at > org.apache.yoko.orb.OBCORBA.ORB_impl.resolve_initial_references(ORB_impl.java:1094) > at > org.apache.yoko.orb.CosNaming.tnaming.TransientNameService.initialize(TransientNameService.java:130) > ... 15 more > Caused by: java.net.BindException: Address already in use: JVM_Bind > at
Re: CMP with OpenJPA on Apache Geronimo 3.0.1
It's been a few years….. IIRC the problem here is that your datasource is not set up correctly. Again IIRC you need both a transactional and a non-transactional datasource for the persistence-unit. Again IIRC this is more likely to work if the transactional datasource is XA. The non transactional datasource must be no-transaction. hope this helps david jencks On Dec 29, 2014, at 10:35 AM, ivan frias wrote: > Hi, > Currently I am developing an application using OpenJPA . I've decide to use > CMP to manage the transactions. > I am able to insert /edit and delete rows from the database ( through a > configured Datasource ), however, it seems that transaction is only commited > at Geronimo level. If I use the datasource control to execute a query ( > inside the management window on Geronimo ) I get the modified rows, however > If I try it outside the container ( e.g. using Sql Developer ) I can't see > the modifications. > > Persistence.xml : > > > > Flea Circus > > org.apache.openjpa.persistence.PersistenceProviderImpl > FleaCircusOracleDS > de.carmedialab.db.entities.ApplicationItem > de.carmedialab.db.entities.FleaResult > de.carmedialab.db.entities.FleaResultType > de.carmedialab.db.entities.ItemAttribute > de.carmedialab.db.entities.ItemGroup > de.carmedialab.db.entities.ItemType > de.carmedialab.db.entities.ItemTypeAttribute > > de.carmedialab.db.entities.ItemTypeOperationAttribute > de.carmedialab.db.entities.Operation > de.carmedialab.db.entities.OperationAttribute > de.carmedialab.db.entities.OperationType > de.carmedialab.db.entities.Role > de.carmedialab.db.entities.UserAccount > de.carmedialab.db.entities.Measurement > de.carmedialab.db.entities.MeasurementType > de.carmedialab.db.entities.MeasurementAttribute > > de.carmedialab.db.entities.MeasurementAttributeType > de.carmedialab.db.entities.Fleet > > >value="validate" /> > > name="openjpa.Compatibility.CheckDatabaseForCascadePersistToDetachedEntity" > value="true" /> > > > > > > TestDaoImpl.java: > > > package de.carmedialab.db.dao; > > import java.util.Calendar; > > import javax.ejb.Remote; > import javax.ejb.Stateless; > import javax.ejb.TransactionAttribute; > import javax.ejb.TransactionAttributeType; > import javax.persistence.EntityManager; > import javax.persistence.PersistenceContext; > import javax.persistence.PersistenceContextType; > import javax.persistence.Query; > > import de.carmedialab.db.entities.ApplicationItem; > import de.carmedialab.db.entities.ItemType; > > @Stateless > @Remote(TestDao.class) > public class TestDaoImpl implements TestDao{ > > @PersistenceContext(type=PersistenceContextType.TRANSACTION) > private EntityManager em; > > @Override > @TransactionAttribute(TransactionAttributeType.REQUIRED) > public void save() { > > try{ > Query query = em.createQuery("select t from ItemType t > where t.ittTypeName = :name"); > query.setParameter("name", "Passenger car"); > ItemType type = (ItemType)query.getSingleResult(); > > ApplicationItem itm = new ApplicationItem(); > itm.setItemType(type); > itm.setItmIsActive("Y"); > itm.setItmItemIdentifier("TEST"); > itm.setItmItemDescription("DESCRIPTION"); > itm.setItmItemName("NAME"); > itm.setItmInsertDate(Calendar.getInstance().getTime()); > itm.setItmInsertUser("SYSTEM"); > > em.persist(itm); > > System.out.println("Item Persisted"); > > }catch(Exception ex){ > ex.printStackTrace(); > } > } > > @Override > @TransactionAttribute(TransactionAttributeType.REQUIRED) > public void delete() { > try
Re: Basic EAR File deployment, Release M2 ?
On Aug 19, 2004, at 7:25 AM, Sai Arunachalam wrote: Hi, I am now trying to port a basic EAR file from WebLogic 6.1 onto Geronimo. The WAR in the original EAR file, has a weblogic.xml that has the following portion in it: ejb/greeter greeter I guess these properties should be appropriately conveyed to Geronimo using geronimo-jetty.xml. 1. Would correspond to in geronimo-jetty.xml? If yes, can somebody please explain as to what the following tags (which come under ) mean in geronimo? a. not yet implemented (at least not tested) intended to let you talk to an ejb on another server using geronimo jndi/openejb b. nyi intended to let you talk to an ejb in the same vm deployed in a different kernel (it is very unlikely you would run more than one kernel in a vm, but it's possible) c. this is the entire object name of the target ejb. If you can set this up with dummy names and deploy the app, together with the debug console, you can then look in the debug console to find out the exact names. d. nyi intended to let you talk to an ejb in a non-openejb container, using a different jndi system. 2. That apart what exactly are the following tags in geronimo-jetty.xml ? a. similar to ejb-ref but for local interfaces b. you'd be better off using message-destination-ref c. this is a mistake. message-destination-refs are resolved entirely within the spec deployment descriptor. In general, I'd advise using links, which do not require entries in the geronimo plan, rather than refs which do. 3. Is Geronimo M2 out yet? If yes, where can I get a binary of it? I don't think it is released. However, you might update from cvs and try out the new running/deployment instructions (see the wiki). thanks david jencks Thanks a lot, Sai
Re: petstore and cloudscape on geronimo
I'll try to make some brief comments now, but I won't be able to look at this carefully until at least wednesday. On Aug 30, 2004, at 1:47 AM, Sai Arunachalam wrote: Hi, I am having a problem in making cloudscape work. I think it's rather my configuration with geronimo-ra.xml that is playing the mischief. (Recap: I am trying to port the PetStore that was there on WebLogic6.1 to Geronimo. WebLogic6.1 has it's own config.xml that has a few tags and attributes that I have to communicate using the geronimo-ra.xml). The scenario is as follows: The weblogic petstore app has a number of ejbs with each one having a weblogic-ejb-jar.xml like the following (this one corresponds to openejb-jar.xml on Geronimo). ... jdbc/EstoreDataSource jdbc.EstoreDB That is the case for a number of EJBs there. Then there is a config.xml file that has the following properties: ... ... ... Now I wanted to make this app run with Cloudscape. So I did the following: I took the cloudscape jars (cloudscape.jar, tools.jar, client.jar and four more...) I checked out the latest version of TranQL from http://cvs.tranql.codehaus.org/connector, built it to get the rar file. Opened the rar file, removed the axion jars, put the cloudscape jars there. I thought of a simpler way to do this, but this should work fine. Then I made the following changes to META-INF/geronimo-ra.xml 1. configId="org/tranql/connector/axion" -> configId="org/tranql/connector/cloudscape" 2. Then I changed the following: DefaultDatasource to jdbc.EstoreDB good 3. name="JdbcDriver">org.axiondb.jdbc.AxionDriver to name="JdbcDriver">COM.cloudscape.core.JDBCDriver 4. jdbc:axiondb:DefaultDatabase to jdbc:cloudscape:EstoreDB [In some of the geronimo-ra.xml's that I saw, the attribute name inside here was ConnectionURL instead of JdbcUrl. Does this matter? Besides, how do I specify the other two DBs namely InventoryDB and SignOnDB? Should I simply replicate the tags in the same fle or is there a different way to do it? ] Look in ra.xml for the correct config property names. Probably one of these is for the obsolete openejb wrapper. As far as InventoryDB etc you should rename these in the openejb-jar.xml files to jdbc.EstoreDB unless you want to connect to different databases. Rest of the properties, I left as they were in geronimo-ra.xml. Now I tried deploying this rar file on geronimo and it got deployed without any errors. When I ran petstore this time alongwith the configId of both the things (petstore and tranql rar), it gave me a long error. So I put the rar file inside the petstore.ear file and redployed it and ran it this time. This time I gave only petstore's configId on starting the server. It got started and I saw the first page (index.html that has a link saying "enter the store"). When I tried going to the next page by pressing the link, it says "Unable to connect to database. Connection not open. Make sure the connection is open"). I don't know where the error is... Just then I found the following file in weblogic's petstore directory called estore_runtimeejb.xml that has portions like the following for each of the ejbs.. TheOrder estore/order jdbc/EstoreDataSource jdbc/Cloudscape estoreuser estore ejb/account/Account estore/account . Does this have something to do with the problem? I don't think so. I think this is roughly the info in openejb-jar.xml and geronimo-ra.xml. There are two more things I wanna know related to this problem. When I looked up the index.properties inside config-store for the already deployed axion database, the configId is given as org/apache/geronimo/DefaultDatabase whereas the geronimo-ra.xml gives the configId as org/openejb/connector/axion. How is this? Are you starting with fresh copies of geronimo? these might be leftovers from earlier deployments. And then, how exactly do I deploy a stand-alone geronimo-ra.xml? you can deploy it as an external plan with the tranql rar. I think I'm doing this in the openejb itests: look in maven.xml for how to do this using the geronimo maven deployment plugin. If I'm not doing this now I hope to update it shortly. thanks david jencks Thanks a lot for your help. Thanks and regards, Sai
Re: javax.naming.NotContextException
You should not need a jndi.properties file to run geronimo, since there is a NamingProperties gbean (in the system plan) that is supposed to be used to set these properties as System properties. Did you add the jndi.properties file or is it still, despite my efforts, included with geronimo? Either way, this exception is rather odd, in that it appears that the Oracle driver is relying on particular jndi settings in its environment. Does the Oracle documentation discuss this? thanks david jencks On Sep 29, 2004, at 6:03 AM, Prem kalyan wrote: Hi all, I was trying to run an application on geronimo. While starting the server I got the following exception. java.sql.SQLException: Io exception: JNDI Package failurejavax.naming.NotContextException: Not an instance of DirContext at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324) at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:266) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java :365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) The application is reading the folowing property from a properties file java.naming.factory.url.pkgs = org.apache.geronimo.naming when i comment the above line the application is running. any help in this regard would be great. thanx in advance. -- regards, prem
Re: Cannot build M2
That's not the maven repo. Thats the plugin installation directory inside the maven installation. I think maven 1 is not really designed for installation in a shared location. For instance, even if you change to a user that is allowed to install plugins, you may be breaking someone else's build since plugins are not versioned. I'd recommend reinstalling maven in your home directory. david jencks On Oct 15, 2004, at 10:16 AM, Alan Cabrera wrote: You can use your own Maven repo. It's odd that you've placed your's there. -Original Message- From: Ugo Cei [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 12:54 PM To: [EMAIL PROTECTED] Subject: Re: Cannot build M2 Il giorno 15/ott/04, alle 18:48, Ugo Cei ha scritto: maven -Dmodule.types=specs Using that, the build seems to be progressing much farther. Here's hoping it doesn't fail after an hour of two of dowloading and building ;-) And fail it did! BUILD FAILED File.. /home/ugo/workspace/geronimo/maven.xml Element... maven:reactor Line.. 454 Column 27 Unable to obtain goal [default] -- /home/ugo/.maven/cache/maven-plugin-plugin-1.5.1/plugin.jelly:65:37: Failed to copy /home/ugo/workspace/geronimo/plugins/maven-geronimo-plugin/target/ geronimo-deployment-plugin-1.0-SNAPSHOT.jar to /usr/local/maven-1.0/plugins/geronimo-deployment-plugin-1.0- SNAPSHOT.jar due to /usr/local/maven-1.0/plugins/geronimo-deployment-plugin-1.0- SNAPSHOT.jar (Permission denied) The problem is due to the fact that maven is installed under /usr/local which is owned by root. I'm starting to have doubts on the sanity of this maven thing, but since I have root access here, I think I can at least allow it to mess around in its own installation directory, temporarily. -- Ugo Cei - http://beblogging.com/ - Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.
Re: web application descriptor
I don't remember exactly what was in M2. Current svn version of (Bgeronimo attempts to translate all servlet 2.2 and 2.3 web.xml to valid (Bequivalent 2.4 descriptors. Could you please try your original 2.3 (Bweb.xml against the latest svn version of geronimo and report if it (Bworks properly? If not, supplying the web.xml to us as a test case (Bwould be very useful. (B (Bmany thanks, (BDavid Jencks (B (BOn Oct 19, 2004, at 6:48 AM, $B'"'`'T'Q'd'm'b'V'S(B $B'3'V'b'T'V'[(B wrote: (B (B> Hi, (B> (B> (B> I have deployed web application in Jetty without any changes in (B> deployment (B> descriptor. (B> But with geronimo (geronimo-1.0-M2) deployment descriptor in (B> web-app_2_3.dtd (B> format do not works. Geronimo requires web-app_2_4.xsd. (B> (B> I removed doctype: (B> (B> (B> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" (B> "http://java.sun.com/dtd/web-app_2_3.dtd"> (B> (B> and changed to (B> (B> http://java.sun.com/xml/ns/j2ee" (B> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" (B> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee (B> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">. (B> (B> After I enclosed tablibs in jsp-config element and then I could deploy (B> the (B> application. It started working. (B> (B> Possibly, such situation is not a problem or an error, but I found (B> dtd-s in (B> geronimo project tree (modules\j2ee-schema\src\j2ee_1_3dtd). (B> (B> So, why "web-app_2_3.dtd" descriptor format is not working? And are (B> there (B> some ways to make "web-app_2_3.dtd"-formated descriptor working without (B> reformating them to another descriptor format? (B> (B> (B> Serg Bogatyrjov. (B>
Changes in ***-refs
I've recently committed fairly extensive changes to how ***-refs are resolved at deployment time in geronimo, per GERONIMO-371. Some documentation is on the wiki at http://wiki.apache.org/geronimo/Naming Here's a brief recap: 1. If your resource-ref has the same name (in the spec descriptor) as the connection factory you are looking up, you can leave out the resource-ref element in your geronimo plan entirely. 2. In your geronimo plan, resource-link now works more or less like an ejb-link: you can supply a name or path#name and geronimo will try to match, first in the current application, then in non-application connector modules. 3. You can specify any subset of a jsr-77 name and geronimo will fill in the rest to match your current context. 4. You can specify the whole name yourself using target-name. note that the roles of target-name and resource-link are more or less reversed from their previous and wrong meaning. resource-env-refs work much the same way. ejb-[local-]refs work similarly except ejb-links do not attempt to resolve outside the current application. ejb-link can be used in your geronimo plan as well as the spec descriptor. If you supply nothing in your geronimo plan, geronimo attempts to resolve the ejb ref by looking for a unique match on home and remote or localhome and local interfaces. So far these changes seem to result in a dramatic reduction in the size of many plans. many thanks, david jencks
Re: Unexpected transaction support element
I didn't immediately see the example in ch1, but the plans for adapters have changed quite a bit from august. You could try comparing the failing plan with the default-database-plan in modules/assembly/src/plan. thanks david jencks On Nov 4, 2004, at 12:46 PM, Lynch, Peter wrote: I'm trying the example from chapter 1 of David Blevins' book (http://today.java.net/pub/a/today/2004/08/02/geronimo.html) and getting this error: Can anyone help? Thanks, Peter Lynch D:\geronimo-1.0-M2>ant install Buildfile: build.xml install: [echo] Installing the Axion Datasource [java] org.apache.geronimo.deployment.DeploymentException: Unexpected transaction support element [java] at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.configu reCon nectionManager(ConnectorModuleBuilder.java:656) [java] at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.addOutb oundG Beans (ConnectorModuleBuilder.java:707) [java] at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.addConn ector GBeans(ConnectorModuleBuilder.java:348) [java] at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.addGBea ns(Co nnectorModuleBuilder.java:286) [java] at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder$$FastCl assBy CGLIB $$a535b6aa.invoke() [java] at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) [java] at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoke r.jav a:38) [java] at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOper ation .java :142) [java] at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:744) [java] at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89) [java] at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationIn voker .java :34) [java] at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMet hodIn terce ptor.java:112) [java] at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9e4 5a280 .addG Beans() [java] at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration (EARC onfig Builder.java:442) [java] at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration (EARC onfig Builder.java:346) [java] at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration (EARC onfig Builder.java:244) [java] at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$ $38e5 6ec6. invoke() [java] at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) [java] at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoke r.jav a:38) [java] at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOper ation .java :142) [java] at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:744) [java] at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89) [java] at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationIn voker .java :34) [java] at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMet hodIn terce ptor.java:112) [java] at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7 a1ca0 ae.bu ildConfiguration() [java] at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:198) [java] at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.inv oke(< gener ated>) [java] at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) [java] at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoke r.jav a:38) [java] at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOper ation .java :142) [java] at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:765) [java] at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBe anSer verIn terceptor.java:218) [java] at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe anSer verIn terceptor.java:121) [java] at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityM BeanS erver Interceptor.java:86) [java] at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe anSer verIn terceptor.java:121) [java] at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe anSer verIn terceptor.java:121) [java] at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke (Cont extCl assLoaderMBeanServerInterceptor.java:205) [java] at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079) [java] at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java
Re: Strategies for Eliminating OOM Exceptions on Redeploys?
I certainly agree this is an important issue. I think so far our main defense has been "good design". Do you have a specific example that causes problems on geronimo, or are you just warning us to check this thoroughly? I take it you are also hinting that we should test with a web app that uses hibernate:-) many thanks, david jencks On Nov 11, 2004, at 12:17 PM, Seth Ladd wrote: Hello, Congrats on releasing another version of Geronimo! I'm hoping someone can shed some light on this subject. On all the application servers/web servers I've tried, they all seem susceptible to (potential) OutOfMemoryExceptions when certain webapps are deployed over and over. This is often the result of some libraries not releasing classes it has loaded. This causes the WebApp ClassLoader to never be released, and thus the memory leak. The Hibernate library comes to mind here with the way it uses cglib. I'm wondering if Geronimo has any strategies for dealing with this problem? I'd love to be able to run a Java Application Server as long as the Apache HTTPD server, but I've never been able to. Too many application redeploys will always crash the server. If Geronimo doesn't have any direct code that explicitly handles this problem, maybe there are other strategies involved? Being able to explicitly destroy the classloader that loaded the application would be incredibly invaluable. We could then have Java App Servers running 24/7! Thanks very much! Seth
Re: No deployer present in kernel error when deploying a database pool
On Nov 15, 2004, at 10:38 PM, [EMAIL PROTECTED] wrote: I attempted to deploying a Server-Wide Database Pool in a freshly built version of Geronimo (at revision 65588) and followed the build instructions on the wiki. Here is an example of the command I used to deploy the Database Pool: D:\geronimo-1.0-SNAPSHOT>java -jar bin/deployer.jar deploy repository/tranql/rars/tranql-connector-1.0-SNAPSHOT.rar my-database-plan.xml Username: system Password: manager Deployment failed Server reports: No deployer present in kernel <<<<= I was expecting the deployer to be present in the kernel when using the default configuration when I had done a clean build (I copied D:\Projects\J2EE\geronimo\modules\assembly\target\geronimo-1.0- SNAPSHOT to D:\geronimo-1.0-SNAPSHOT ). I didn't see anything in the doc saying that I needed to start the server specifying configuration names to be able to deploy. I have included the server window output and plan below. I didn't see the RuntimeDeployer configuration being started.. Should I have? yes. Can you try D:\geronimo-1.0-SNAPSHOT>java -jar bin/server.jar org/apache/geronimo/RuntimeDeployer ? I think I need to add the org/apache/geronimo/RuntimeDeployer to the list of started configurations. thanks david jencks === D:\geronimo-1.0-SNAPSHOT>java -jar bin/server.jar 11:11:25,067 WARN [ToolsJarHack] Could not all find java compiler: lib\tools.jar file not found in C:\Program Files\Java\j2re1.4.2_ 06 or C:\Program Files\Java 11:11:25,082 INFO [Daemon] Server startup begun 11:11:25,332 INFO [Kernel] Starting boot 11:11:25,723 INFO [MBeanServerFactory] Created MBeanServer with ID: 16df84b:1003991d1a1:-8000:SYISissonJ:1 11:11:26,020 INFO [Kernel] Booted 11:11:26,098 INFO [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="org/apache/geronimo/System" 11:11:26,270 INFO [Configuration] Started configuration org/apache/geronimo/System 11:11:26,457 INFO [RMIRegistryService] Started RMI Registry on port 1099 11:11:26,629 INFO [ReadOnlyRepository] Repository root is file:/D:/geronimo-1.0-SNAPSHOT/repository/ 11:11:26,707 INFO [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="org/apache/geronimo/Server" 11:11:28,160 INFO [HttpServer] Statistics on = false for [EMAIL PROTECTED] 11:11:28,613 INFO [Configuration] Started configuration org/apache/geronimo/Server 11:11:28,613 INFO [HttpServer] Version Jetty/5.1.0 11:11:28,613 INFO [Container] Started [EMAIL PROTECTED] 11:11:28,691 INFO [SocketListener] Started SocketListener on 0.0.0.0:8080 11:11:28,723 INFO [HOWLLog] Initiating transaction manager recovery 11:11:28,957 WARN [HOWLLog] Received unexpected log record: [EMAIL PROTECTED] 11:11:28,957 INFO [HOWLLog] In doubt transactions recovered from log 11:11:31,254 INFO [LoginService] Login server has been started 11:11:31,254 INFO [ThreadPool] Thread pool DefaultThreadPool started 11:11:31,301 INFO [PropertiesFileSecurityRealm] Properties File Realm - geronimo-properties-realm - refresh 11:11:31,301 INFO [PropertiesFileSecurityRealm] Properties File Realm - geronimo-properties-realm - started 11:11:31,582 INFO [RMIConnectorServer] RMIConnectorServer started at: service:jmx:rmi://localhost/jndi/rmi:/JMXConnector 11:11:31,582 INFO [server:name=localhost,role=JMXService] Started JMXConnector service:jmx:rmi://localhost/jndi/rmi:/JMXConnector 11:11:31,613 INFO [SecurityServiceMBean] Security service started 11:11:31,691 INFO [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="org/apache/geronimo/SystemDatabase" 11:11:32,129 INFO [Configuration] Started configuration org/apache/geronimo/SystemDatabase 11:11:32,973 INFO [DerbySystem] Started in D:\geronimo-1.0-SNAPSHOT\var\derby 11:11:33,051 INFO [DerbyNetwork] Started on host 127.0.0.1:1527 11:11:33,176 INFO [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="org/apache/geronimo/SystemJMS" 11:11:33,207 INFO [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="org/apache/geronimo/ActiveMQServer" 11:11:33,473 INFO [Configuration] Started configuration org/apache/geronimo/ActiveMQServer 11:11:33,519 INFO [BrokerContainerImpl] ActiveMQ JMS Message Broker (possibly-unique-broker) is starting 11:11:33,535 INFO [BrokerContainerImpl] For help or more information please see: www.protique.com 11:11:33,535 INFO [JdbmPersistenceAdapter] Creating JDBM based message store in directory: D:\geronimo-1.0-SNAPSHOT\var\activemq 11:11:33,691 INFO [JdbmPreparedTransactionStore] Recovering prepared transactions 11:11:33,754 INFO [BrokerContainerImpl] ActiveMQ JMS Message Broker (possibly-unique-broker) has started 11:11:33,785 INFO [VmTransportServerChannel] Listening for connections at: vm://localhost 11:11:33,785 INFO [BrokerConnector
Re: One more time: unable to deploy ear
I agree it is extremely frustrating when this happens. Unfortunately I haven't figured out how to implement more informative behavior. What happens when you try to deploy using an external plan? What is the exact command you are using to deploy? thanks david jencks On Nov 23, 2004, at 7:04 PM, Lajos wrote: Howdy - I asked this while ya'll were at ApacheCon and I suppose everyone was kind of busy. But I would appreciate it if anyone has some sugestions about where to look. I'm trying to deploy an EAR in M3, and keep getting this error: org.apache.geronimo.deployment.DeploymentException: No deployer found:, moduleFile/ Since there is no other error, and of course the file exists, I can only assume that something in the packaging is not to Geronimo's liking. Can someone tell me if this is a valid directory structure for M3? .jar .war META-INF/application.xml META-INF/geronimo-application.xml As I understand, both META-INF/geronimo-application.xml and a deployment plan are technically optional in M3, particularly for a simple session bean. Within .jar, I have the classes and both ejb-jar.xml and openejb-jar.xml. If I just try to deloy the EJB jar in Geronimo, then I get a NullPointeException: at org.openejb.deployment.OpenEJBModuleBuilder.initContext(OpenEJBModuleBu ilder.java:308) Any insight would be appreciated! Regards, Lajos -- Lajos Moczar Open Source Support, Consulting and Training Tomcat Unleashed (www.amazon.com/exec/obidos/tg/detail/-/0672326361) Cocoon Developer's Handbook (www.amazon.com/exec/obidos/tg/detail/-/0672322579) _ _ / \ / /___\ / / \ / http://www.galatea.com -- powered by AzSSL
Re: Anyone have a sample EAR?
I think the activemq itest involves deploying an ear. david jencks On Nov 24, 2004, at 1:55 PM, Lajos wrote: I'm trying to debug my own .ear, which won't deploy in Geronimo. Does anyone have a super-simple .ear application that runs on M3? I would be very grateful if you could post it or email it to me. I'm hoping it is just a matter of some descriptor that I have wrong ... Thanks! Lajos -- Lajos Moczar Open Source Support, Consulting and Training Tomcat Unleashed (www.amazon.com/exec/obidos/tg/detail/-/0672326361) Cocoon Developer's Handbook (www.amazon.com/exec/obidos/tg/detail/-/0672322579) _ _ / \ / /___\ / / \ / http://www.galatea.com -- powered by AzSSL
Re: Getting Started Geronimo.
We have schema definitions, however these are still definitely subject to change. You can find them after a build collected in modules/assembly/target/geronimo-1.0-SNAPSHOT/schema/ I strongly encourage you to look into xdoclet2 since my experience with xdoclet 1 is that the templates quickly turn into an unmaintainable mess. I don't actually know that xdoclet2 is any better, but the developers claim it should be. I personally think that the "template" for xml descriptors should an annotated schema of the document you are trying to generate, the annotations consisting of queries against the model extracted from the javadoc tags. thanks david jencks On Dec 3, 2004, at 9:21 AM, L. Yeung wrote: Sounds interesting and I'm willing give it a try. Are there any geronimo tag specifications posted on the page? I'm just an intermediate Java developer, I'm not a Java Guru or any PhD under my belt though. Keep in touch. -len --- Jacek Laskowski <[EMAIL PROTECTED]> wrote: L. Yeung wrote: I'm relying on XDoclet heavily for my SessionBeans. I'ved checked out XDoclet's documentation but there seems no geronimo tags supported. I can't get any more information about this. Hi, I'm not at all surprised. I've seen no information about XDoclet and Geronimo working together, so it's time to have it. What would you say if you were invited to develop it? ;) More information about configuration of Geronimo is on Geronimo Wiki: http://wiki.apache.org/geronimo. If it's not there, it may certainly mean that the requested feature doesn't exist yet. And don't forget to check out Geronimo JIRA as it may now be worked out. len Jacek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Deploying GBean Problem
public static GBeanInfo getBeanInfo() { should be public static GBeanInfo getGBeanInfo() { Note that some tools and naming conventions would prefer getGbeanInfo which will not work. thanks david jencks On Dec 20, 2004, at 8:12 AM, L. Yeung wrote: Hi! I'm following the steps found in wiki.apache.geronimo/GBeans on deploying a gbean and I'm using geronimo-1.0-M3. I copied my mygbean-1.0.jar to ${geronimo.home}/repository. My configuration: http://geronimo.apache.org/xml/ns/deployment"; configId="example1/MyGBean"> mygbean-1.0.jar My source file: package example1; import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; /** * Hello world! * * * @geronimo.config config-id="example1/MyGBean" * @geronimo.config-dependency uri="mygbean-1.0.jar" * @geronimo.config-gbean name="geronimo.examples:name=My first simple GBean" */ public class MyGBean { public static final GBeanInfo GBEAN_INFO; static { GBeanInfoBuilder infoFactory = new GBeanInfoBuilder( "MyGBean", MyGBean.class); GBEAN_INFO = infoFactory.getBeanInfo(); } public static GBeanInfo getBeanInfo() { return GBEAN_INFO; } } When I tried deploying it geronimo dumps this: D:\home\ming\geronimo-1.0-M3>java -jar bin/deployer.jar deploy \home\ming\geroni mo-apps\target\xdoclet\hibernatedoclet\example1\MyGBean.xml Username: system Password: manager Deployment failed Server reports: Unable to create GBean from class example1.MyGBean org.apache.geronimo.deployment.DeploymentException: Unable to create GBean from class example1.MyGBean at org.apache.geronimo.deployment.service.GBeanBuilder.(GBeanBuild er.java:54) at org.apache.geronimo.deployment.service.GBeanHelper.addGbean(GBeanHelp er.java:31) at org.apache.geronimo.deployment.service.ServiceConfigBuilder.buildConf iguration(ServiceConfigBuilder.java:116) at org.apache.geronimo.deployment.service.ServiceConfigBuilder$$FastClas sByCGLIB$$9f173be6.invoke() at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo ker.java:38) at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp eration.java:142) at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:823) at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89) at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperation Invoker.java:34) at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibM ethodInterceptor.java:112) at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$ $7a1ca0ae.buildConfiguration() at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:174) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:60) at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.i nvoke() at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87) at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo ker.java:38) at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp eration.java:142) at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:844) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Sou rce) at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Sour ce) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run (Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(U nknown Source) at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
Re: Geronimo XDoclet (geronimo-jetty tags)
On Dec 25, 2004, at 9:38 AM, L. Yeung wrote: I'm looking at geronimo-jetty specs and I'm planning to implement it in coming days. The things that I'm wondering are as follows: a. One thing that I can think of currently is that the tag should start with @geronimo.web instead of @geronimo.jetty. What if Geronimo starts to support tomcat, should the it also support a tag of @geronimo.tomcat? Are there any plans to support different specs for different web containers? Maybe one universal geronimo web tags should implement jetty, geronimo and other future web containers. I agree. We are thinking of changing the default plan name to geronimo-web.xml since we hope that jetty and tomcat can use exactly the same plan. b. Are the tags made as class level sufficient enough. I honestly don't have much experience with web deployment descriptors. At the moment, I don't see how to usefully use xdoclet to construct a geronimo web plan, since all the information in the plan is at the web application level rather than the servlet level, which the class level tags would correspond to. Since none of the information is specific to a particular servlet, I don't think any information should be provided by a particular class. Am I missing something? Constructing the standard web.xml deployment descriptor could be useful, but this does not rely on anything having to do with geronimo. many thanks, david jencks -len __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
Re: Geronimo XDoclet (geronimo-jetty tags)
On Dec 25, 2004, at 11:46 AM, L. Yeung wrote: b. Are the tags made as class level sufficient enough. I honestly don't have much experience with web deployment descriptors. At the moment, I don't see how to usefully use xdoclet to construct a geronimo web plan, since all the information in the plan is at the web application level rather than the servlet level, which the class level tags would correspond to. Since none of the information is specific to a particular servlet, I don't think any information should be provided by a particular class. Am I missing something? Constructing the standard web.xml deployment descriptor could be useful, but this does not rely on anything having to do with geronimo. (I dont know if I get this question right). I mean class level tags for geronimo-jetty.xml, such as security access, resource references and etc (???) Those are the principal things that need to be resolved, but they apply across the entire web application rather than per servlet, so I question how appropriate it is to include the information needed to resolve them in a particular (servlet) source file. For ejbs, the jndi references are per ejb instance rather than per ejb application/module, but the security role-mapping still applies across the entire module. IIRC xdoclet suffers from a similar problem even for the spec deployment descriptors, in that a particular class may appear many times in a descriptor with a different environment each time, whereas xdoclet only provides the means to include it once, with a single environment specified in the source file. I have no idea how to solve this problem or even if it has already been solved in xdoclet 2. many thanks, david jencks Thanks. -len __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: build failure on mac os x
I have no idea about the scout problem: I've never built it, I think there is an up to date version that will be downloaded automatically. I'm confused by the geronimo problem, I haven't experienced that one. It looks like you might have checked out between 2 related commits??? However, I believe there is a different problem in the geronimo/openejb build at the moment that makes openejb not compile. I am hoping it will be fixed later this morning (PST). I will check in a workaround if it does not get fixed properly. I'll post again when I get a clean build to work. thanks david jencks On Mar 8, 2005, at 8:35 AM, Christofer 'boz' Jennings wrote: I can't get the subversion source to build. The Scout build fails. Then the Geronimo build fails. Any ideas? I'm running mac os x 10.3.8 with java java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) The output for the scout and geronimo build are attached. I saw the presentations at TSSJS and wanna check this thing out! Thanks!, boz