Re: Saving login and password info in 2.1.3

2009-05-05 Thread Jack Cai
Yes it's a know problem that was fixed in 2.1.4. See [1].

-Jack

[1] https://issues.apache.org/jira/browse/GERONIMO-1367

2009/5/1 user2111 ypka...@hotmail.com


 Hi,

 I saved my user Id and password using the ./deploy.sh login command.
 However
 I notice that the ./geronimo.sh stop command still prompts me for login and
 password in ver 2.1.3. In ver 2.1.4, it does not. Is this a known
 issue/limitation of 2.1.3? Any workaround?

 Thanks in advance.
 --
 View this message in context:
 http://www.nabble.com/Saving-login-and-password-info-in-2.1.3-tp23321449s134p23321449.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Re: Deployment takes forever with many files

2009-05-05 Thread Jack Cai
Are the data all static contents such as images, videos etc.? Is there a
deep directory structure?

-Jack

2009/5/4 Patrick Kranz patrick.kr...@immobilienscout24.de

 Hi Ivan,

 sorry it took me so long to answer.

 No, the log files don“t give any hint about what is going on. It only
 prints messages coming from our application and those messages are the same
 for both cases (started with all data on the local disk and started with
 data located on an NFS share).

 Patrick



 Ivan schrieb:

 Does Geronimo output anything in the deployment process, could you please
 show us those logs ?
 Ivan

 2009/4/30 Patrick Kranz patrick.kr...@immobilienscout24.de mailto:
 patrick.kr...@immobilienscout24.de


Sorry, I forgot to mention: I am doing a deployment with the
--inPlace parameter, so the application is not being copied to the
Geronimo repository.

Greets,
Patrick

Patrick Kranz schrieb:

Hello list,

I“ve been working with Geronimo for some days now and I have a
question regarding the deployment process, especially about
what happens behind the scenes.

I am working on a project that has a lot of content (mainly
JSPs but also images, pdfs and so on). For the development
environment this content is reduced to a minimum, that is
something around 800MB. The live system has more data because
customers can upload images and even small videos. This data
is placed on a file server and mounted via NFS on the
development machines, where the content is linked from the
docroot using symbolic links.

If I start this scenario with Tomcat, the application start
takes about 3,5 minutes (really application startup, no
copying of data). If I try the same with Geronimo startup
takes about 30 minutes with the system almost being idle and
enormous network traffic. If I copy all the static content to
my system and start geronimo it takes about 5 minutes.

So, my question is, what does Geronimo do in the background
that causes this startup time if the content is on a network
share and can I prevent this from happening?

Thanks in advance for every help!

Greets,
Patrick


Geronimo 2.1.4
System: Linux CentOS 5





 --
 Ivan





Re: Deployment takes forever with many files

2009-05-05 Thread Patrick Kranz
No, it´s not only images and videos. There are also a lot of JSPs in the 
structure. The deepest directory structure should be something around 5 
or 6 levels but find -type d returns 8904 folders. So, I guess you could 
say it is a rather complex structure.



Jack Cai schrieb:
Are the data all static contents such as images, videos etc.? Is there 
a deep directory structure?


-Jack

2009/5/4 Patrick Kranz patrick.kr...@immobilienscout24.de 
mailto:patrick.kr...@immobilienscout24.de


Hi Ivan,

sorry it took me so long to answer.

No, the log files don“t give any hint about what is going on. It
only prints messages coming from our application and those
messages are the same for both cases (started with all data on the
local disk and started with data located on an NFS share).

Patrick



Ivan schrieb:

Does Geronimo output anything in the deployment process, could
you please show us those logs ?
Ivan

2009/4/30 Patrick Kranz patrick.kr...@immobilienscout24.de
mailto:patrick.kr...@immobilienscout24.de
mailto:patrick.kr...@immobilienscout24.de
mailto:patrick.kr...@immobilienscout24.de


   Sorry, I forgot to mention: I am doing a deployment with the
   --inPlace parameter, so the application is not being copied
to the
   Geronimo repository.

   Greets,
   Patrick

   Patrick Kranz schrieb:

   Hello list,

   I“ve been working with Geronimo for some days now and I
have a
   question regarding the deployment process, especially about
   what happens behind the scenes.

   I am working on a project that has a lot of content (mainly
   JSPs but also images, pdfs and so on). For the development
   environment this content is reduced to a minimum, that is
   something around 800MB. The live system has more data
because
   customers can upload images and even small videos. This
data
   is placed on a file server and mounted via NFS on the
   development machines, where the content is linked from the
   docroot using symbolic links.

   If I start this scenario with Tomcat, the application start
   takes about 3,5 minutes (really application startup, no
   copying of data). If I try the same with Geronimo startup
   takes about 30 minutes with the system almost being
idle and
   enormous network traffic. If I copy all the static
content to
   my system and start geronimo it takes about 5 minutes.

   So, my question is, what does Geronimo do in the background
   that causes this startup time if the content is on a
network
   share and can I prevent this from happening?

   Thanks in advance for every help!

   Greets,
   Patrick


   Geronimo 2.1.4
   System: Linux CentOS 5





-- 
Ivan








Re: Could not auto-map to resource problem when using EJB annotations only

2009-05-05 Thread fmeili



Rex Wang-2 wrote:
 
 Hi Frank, sorry for the confusing, it can not be added to the
 application.xml, but should be added to the web.xml / ejb-jar.xml...
 
 here is an example in attachment.
 
 HTH
 
 rex.
 

Hi Rex,

thanks for your answer. But this, I think, is the problem. My EAR consits
out of 40 EJB's and 25 WAR's and all are using the @Resource injection for
the database. Til now I don't have descriptors for the EJB's (no
ejb-jar.xml) - I thought they are no longer neccessary in JEE5. And the
deployment descriptors of the WAR's (web.xml) only contains the
servlet-mappings. (This EAR file can successfully deployed in JBoss and in
GlassFish without modifications.)

To be able to deploy this in Geronimo do I really need to add 40 new
openejb-jar.xml, 40 new ejb-jar.xml and 25 new geronimo-web.xml files
- and also change 25 web.xml files to place the resource-ref tag? Is
there no way to just use injection without specifying it in all descriptors?
Maybe there is a way to define a jdbc resource globally in Geronimo to use
in with injection?

Thanks,
 Frank
-- 
View this message in context: 
http://www.nabble.com/%22Could-not-auto-map-to-resource%22-problem-when-using-EJB-annotations-only-tp23316686s134p23382575.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Unable to start WICKET+OpenJPA application

2009-05-05 Thread Donald Woods
Believe you may be mixing concepts here.  Try putting the persistence 
info in a META-INF/persistence.xml file instead of your 
geronimo-web.xml, like the Bank example in the Geronimo Samples -

https://svn.apache.org/repos/asf/geronimo/samples/branches/2.1/samples/bank/bank
-ejb/src/main/resources/META-INF/persistence.xml

http://cwiki.apache.org/GMOxDOC21/bank-ejb-sample-application.html
http://cwiki.apache.org/GMOxDOC21/working-with-jsf-and-jpa.html


-Donald


Garimella Srinivas wrote:
I have a small wicket example application with data stored in a List and 
it runs in Geronimo ok. Now I have added the data to derby and want to 
use openjpa for data access and manipulation. With the following 
Geronimo-web.xml and web.xml I have installed the application. But it 
refuses to start. Please help.


WEB.XML

?xml version=1.0 encoding=UTF-8?
web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;

context-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
/context-param
 
filter

filter-nameWicketApplication/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param
param-nameapplicationClassName/param-name
param-valuecheeseUI.CheesrApplication/param-value
/init-param
/filter
filter-mapping
filter-nameWicketApplication/filter-name
url-pattern/*/url-pattern
/filter-mapping
session-config
session-timeout300/session-timeout
/session-config
welcome-file-list
welcome-fileIndex.html/welcome-file
/welcome-file-list
   
/web-app


GERONIMO-WEb.XML

?xml version=1.0 encoding=UTF-8 standalone=no?
web:web-app 
xmlns:app=http://geronimo.apache.org/xml/ns/j2ee/application-2.0; 
xmlns:client=http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0; 
xmlns:conn=http://geronimo.apache.org/xml/ns/j2ee/connector-1.2; 
xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2; 
xmlns:ejb=http://openejb.apache.org/xml/ns/openejb-jar-2.2; 
xmlns:name=http://geronimo.apache.org/xml/ns/naming-1.2; 
xmlns:pers=http://java.sun.com/xml/ns/persistence; 
xmlns:pkgen=http://openejb.apache.org/xml/ns/pkgen-2.1; 
xmlns:sec=http://geronimo.apache.org/xml/ns/security-2.0; 
xmlns:web=http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1;

dep:environment
dep:moduleId
dep:groupIddefault/dep:groupId
dep:artifactIdcheesrApplication/dep:artifactId
dep:version1.0/dep:version
dep:typecar/dep:type
/dep:moduleId
dep:dependencies
  dep:dependency
  dep:groupIdconsole.dbpool/dep:groupId
  dep:artifactIdCheesrDBPool/dep:artifactId
  /dep:dependency
/dep:dependencies
   
/dep:environment

web:context-root/cheesrApplication/web:context-root
   
pers:persistence version=1.0

pers:persistence-unit name=cheesrData transaction-type=JTA
pers:descriptionDB2 Account Management/pers:description
pers:provider
org.apache.openjpa.persistence.PersistenceProviderImpl
  /pers:provider
   
pers:jta-data-sourceCheesrDBPool/pers:jta-data-source

pers:non-jta-data-sourceCheesrDBPool/pers:non-jta-data-source

pers:classcheesr.Cheese/pers:class
/pers:persistence-unit
/pers:persistence
   
/web:web-app



Thanks
Garimella Srinivas




Re: Deployment takes forever with many files

2009-05-05 Thread Kevan Miller


On May 5, 2009, at 3:19 AM, Patrick Kranz wrote:

No, it´s not only images and videos. There are also a lot of JSPs in  
the structure. The deepest directory structure should be something  
around 5 or 6 levels but find -type d returns 8904 folders. So, I  
guess you could say it is a rather complex structure.


Interesting... So, what happens if you reduce the amount of static  
content? e.g. fewer video/pdf files? Does the behavior change if you  
don't use the --inplace option?


--kevan

Re: Could not auto-map to resource problem when using EJB annotations only

2009-05-05 Thread David Jencks


On May 5, 2009, at 12:42 AM, fmeili wrote:





Rex Wang-2 wrote:


Hi Frank, sorry for the confusing, it can not be added to the
application.xml, but should be added to the web.xml / ejb-jar.xml...

here is an example in attachment.

HTH

rex.



Hi Rex,

thanks for your answer. But this, I think, is the problem. My EAR  
consits
out of 40 EJB's and 25 WAR's and all are using the @Resource  
injection for

the database. Til now I don't have descriptors for the EJB's (no
ejb-jar.xml) - I thought they are no longer neccessary in JEE5.  
And the

deployment descriptors of the WAR's (web.xml) only contains the
servlet-mappings. (This EAR file can successfully deployed in JBoss  
and in

GlassFish without modifications.)

To be able to deploy this in Geronimo do I really need to add 40 new
openejb-jar.xml, 40 new ejb-jar.xml and 25 new geronimo- 
web.xml files
- and also change 25 web.xml files to place the resource-ref  
tag? Is
there no way to just use injection without specifying it in all  
descriptors?
Maybe there is a way to define a jdbc resource globally in Geronimo  
to use

in with injection?


I think you should be able to avoid geronimo plans for each module.

You need to

1. make sure that the name specified in the annotations or dd resource- 
ref is the same as the datasource name you specify when you deploy the  
connection pool.
2. make the connection pool visible to your application by adding  
its id as a dependency to the geronimo plan for your application.


This should be enough to make the auto-map work.

hope this helps
david jencks





Thanks,
Frank
--
View this message in context: 
http://www.nabble.com/%22Could-not-auto-map-to-resource%22-problem-when-using-EJB-annotations-only-tp23316686s134p23382575.html
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Building Apache Day Trader for JBoss

2009-05-05 Thread Andrig



kevan wrote:
 
 
 On May 4, 2009, at 9:31 PM, Andrig wrote:
 

 I have another missing artifact.  If you could point me in the right
 direction on where to get it, it would be appreciated:

 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Failed to resolve artifact.

 Missing:
 --
 1) org.apache.openejb:ejb31-api-experimental:jar:3.1.1-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.openejb
 -DartifactId=ejb31-api-experimental -Dversion=3.1.1-SNAPSHOT - 
 Dpackaging=jar
 -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the  
 file
 there:
  mvn deploy:deploy-file -DgroupId=org.apache.openejb
 -DartifactId=ejb31-api-experimental -Dversion=3.1.1-SNAPSHOT - 
 Dpackaging=jar
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
  1)
 org.apache.geronimo.daytrader:daytrader-derby-datasource:car:2.2- 
 SNAPSHOT
  2) org.apache.geronimo.configs:system-database:car:2.2-SNAPSHOT
  3) org.apache.geronimo.configs:transaction:car:2.2-SNAPSHOT
  4) org.apache.geronimo.configs:j2ee-server:car:2.2-SNAPSHOT
  5) org.apache.geronimo.framework:rmi-naming:car:2.2-SNAPSHOT
  6) org.apache.geronimo.framework:jee-specs:car:2.2-SNAPSHOT
  7) org.apache.openejb:ejb31-api-experimental:jar:3.1.1-SNAPSHOT
 
 OpenEJB has moved the location of their SNAPSHOT repository. Adding  
 the following to your pom.xml in the repositories section should fix  
 our problem. However, I'm a bit confused by the version numbers that  
 your missing. What version of DayTrader are you trying to build?
 
  repository
  idapache.nexus.snapshots/id
  nameApache Nexus Repository/name
 
 urlhttps://repository.apache.org/content/repositories/snapshots 
 /url
  layoutdefault/layout
  snapshots
  enabledtrue/enabled
  updatePolicydaily/updatePolicy
  checksumPolicyignore/checksumPolicy
  /snapshots
  releases
  enabledfalse/enabled
  /releases
  /repository
 
 --kevan
 
 

Okay, this helped get passed that issue, and I ran into another one:

org.apache.geronimo.framework/j2ee-system/2.2-SNAPSHOT/car: LOADING
org.apache.geronimo.framework/j2ee-system/2.2-SNAPSHOT/car: SUCCEEDED
org.apache.geronimo.framework/xmlbeans/2.2-SNAPSHOT/car: LOADING
org.apache.geronimo.framework/xmlbeans/2.2-SNAPSHOT/car: SUCCEEDED
org.apache.geronimo.framework/jee-specs/2.2-SNAPSHOT/car: LOADING
org.apache.geronimo.framework/jee-specs/2.2-SNAPSHOT/car: FAILED: Error
starting configuration gbean
org.apache.geronimo.framework/jee-specs/2.2-SNAPSHOT/car
FINISHED

org.apache.geronimo.kernel.config.LifecycleException: load of
org.apache.geronimo.framework/geronimo-gbean-deployer/2.2-SNAPSHOT/car
failed
at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:327)
at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:280)
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:616)
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:815)
at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at
org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$3960751e.loadConfiguration(generated)
at
org.apache.geronimo.mavenplugins.car.PackageMojo.buildPackage(PackageMojo.java:289)
at
org.apache.geronimo.mavenplugins.car.PackageMojo.execute(PackageMojo.java:209)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)

JNDI context

2009-05-05 Thread govinda

Thanks all for your valuable answers. I'm a WebSphere user, new to geronimo.
I'm migrating applications from websphere to geronimo. I thought I could
avoid modifying the code with 
Context envContext  = (Context)initContext.lookup(java:comp/env); . I have
specified jdbc/LiferayPool for an example, not seeking help with liferay.


This message was accepted by the d...@geronimo.apache.org mailing list. 
How do I connect to a datasource thru code without context java:comp/env 

Context envContext  = (Context)initContext.lookup(java:comp/env); 

I just want to connect to DB like this 

DataSource ds = (DataSource)initContext.lookup(jdbc/LiferayPool); 

Is it possible, if so where do I specify java jndi context (java:comp/env)
outside the code? 

Thanks
 

 Re: JNDI context  
by djencks May 04, 2009; 07:08pm :: Rate this Message:- Use ratings to
moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message 

This is a user list question.  If you have further questions on this   
subject pleas ask there and only there. 
On May 4, 2009, at 8:19 AM, govinda wrote: 

 
 How do I connect to a datasource thru code without context   
 java:comp/env 
 
 Context envContext  = (Context)initContext.lookup(java:comp/env); 
 
 I just want to connect to DB like this 
 
 DataSource ds = (DataSource)initContext.lookup(jdbc/LiferayPool); 

Any such jndi name is going to be container specific.  The java:comp/   
stuff is there specifically so you can use the same jndi name in every   
container, so you don't have to recompile your app for every container. 

For information on the geronimo absolute jndi names, see
http://cwiki.apache.org/GMOxDOC21/jndi.html

Basically what you should do is deploy your datasource, restart   
geronimo, and look in var/log/geronimo.log for the log message telling   
you what the jndi location is. 

 
 
 Is it possible, if so where do I specify java jndi context   
 (java:comp/env) 
 outside the code? 

As far as I understand what you are asking for in this sentence, it is   
not possible. 

thanks 
david jencks 
 
 
 Thanks 
 -- 
 View this message in context:
 http://www.nabble.com/JNDI-context-tp23370580s134p23370580.html
 Sent from the Apache Geronimo - Dev mailing list archive at   
 Nabble.com. 
 

 

 Re: JNDI context  
by Jack Cai May 04, 2009; 10:59pm :: Rate this Message:- Use ratings to
moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message 

What's your real purpose behind this (not specifying java:comp/env)? 

If it is just that you hate this string, you can use the @Resource
annotation to inject the datasource in container-managed artifacts (Servlet,
EJB, etc.).
@Resource (name=jdbc/LiferayPool)
private DataSource ds;

-Jack


2009/5/5 David Jencks david_jen...@...

This is a user list question.  If you have further questions on this subject
pleas ask there and only there.

On May 4, 2009, at 8:19 AM, govinda wrote:



How do I connect to a datasource thru code without context java:comp/env

Context envContext  = (Context)initContext.lookup(java:comp/env);

I just want to connect to DB like this

DataSource ds = (DataSource)initContext.lookup(jdbc/LiferayPool);



Any such jndi name is going to be container specific.  The java:comp/ stuff
is there specifically so you can use the same jndi name in every container,
so you don't have to recompile your app for every container.

For information on the geronimo absolute jndi names, see
http://cwiki.apache.org/GMOxDOC21/jndi.html

Basically what you should do is deploy your datasource, restart geronimo,
and look in var/log/geronimo.log for the log message telling you what the
jndi location is.





Is it possible, if so where do I specify java jndi context (java:comp/env)
outside the code?



As far as I understand what you are asking for in this sentence, it is not
possible.

thanks
david jencks




Thanks
-- 
View this message in context:
http://www.nabble.com/JNDI-context-tp23370580s134p23370580.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.





 

 Re: JNDI context  
by Peter Petersson-2 May 05, 2009; 03:10am :: Rate this Message:- Use
ratings to moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message 

govinda wrote: 
 How do I connect to a datasource thru code without context java:comp/env 
 
 Context envContext  = (Context)initContext.lookup(java:comp/env); 
 
 I just want to connect to DB like this 
 
 DataSource ds = (DataSource)initContext.lookup(jdbc/LiferayPool); 
 
 Is it possible, if so where do I specify java jndi context
 (java:comp/env) 
 outside the code? 
   
...[show rest of quote]
If I have not misunderstood you last question and although I am not a G 
developer I hope no one minds I jump in an try to help out. 

In Liferay there are several ways to set up a database connection but 
you probably want 

Re: Geronimo2.1.0 build failure with Java5 (method getContentType() not found)

2009-05-05 Thread Jarek Gawor
Is there a reason why you're trying to build 2.1.0 instead of our
latest released version 2.1.4?

Jarek

On Mon, May 4, 2009 at 7:23 AM, Mohanraj Loganathan
mohanra...@gmail.com wrote:
 Hello,

 I was trying to build geronimo2.1.0 version of source with sunJDK5. I end up
 with the following failure

 [INFO] Compiling 24 source files to
 D:\g\2.1.0\plugins\webservices\geronimo-webservices\target\classes
 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO]
 
 [INFO] Compilation failure
 D:\g\2.1.0\plugins\webservices\geronimo-webservices\src\main\java\org\apache\geronimo\webservices\WebServiceContainerInvoker.java:[214,27]
 cannot find symbol
 symbol  : method getContentType()
 location: interface javax.servlet.http.HttpServletResponse



 D:\g\2.1.0\plugins\webservices\geronimo-webservices\src\main\java\org\apache\geronimo\webservices\WebServiceContainerInvoker.java:[214,27]
 cannot find symbol
 symbol  : method getContentType()
 location: interface javax.servlet.http.HttpServletResponse


 Please help me out. Am i missing anything?

 --
 Mohan