Re: AW: AW: Accessing the local interface of an Session EJB from a WAR

2007-02-27 Thread David Jencks


On Feb 27, 2007, at 7:59 AM, Norbert Rieger wrote:


Hi Mark,

maybe my question was not exactly enough (my EJB learning curve is  
still in it's infancy).


The EJB is already running in Geronimo, the remote interface works  
fine for client applications (java) and web applications.


Due to performance issues I would like to use the local interface  
within my web application, which is running in the same Geronimo  
instance.


The EJB and the web application are deployed separately (EAR and WAR).


According to the j2ee specs you can't do this, the war and ejb app  
have to be in the same ear to use local interfaces.


In geronimo we make this work as long as the war has the ejb app as a  
parent (or ancestor) which is pretty much necessary anyway so the ejb  
interface classes get loaded in the same classloader for both apps.


So, you need a geronimo-web.xml plan and you need to include the ejb  
app as a dependency in the environment section.  You should use a  
plan for the ejb app as well so you are sure what it's module Id is.


You definitely need an ejb-local-ref element in your web.xml.

As long as there is only one ejb with this localhome and local  
interface, you shouldn't need anything in the geronimo-web.xml  
related to this ejb-ref: geronimo will look for a unique ejb with the  
interfaces specified in the web.xml ejb-local-ref and hook up to it  
if found: if there's 0 or more than 1 matches it will complain.


Hope this helps
david jencks




Regards,

Norbert
-Ursprüngliche Nachricht-
Von: Mark Aufdencamp [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 27. Februar 2007 16:34
An: user@geronimo.apache.org
Betreff: RE: AW: Accessing the local interface of an Session EJB  
from a WAR


I'm not sure about the answer to your question.  I was under the  
impression that an EAR had to be in place for a local definition  
and subsequent invocation, but haven't gotten that far in my  
learning curve yet.


My approach to learning EJB's on Geronimo was to:

1. Build a simple stateless session bean with a method that  
returned a String and manage to get it deployed.  I'm using  
MyEclipse, and it along with their tutorials on EJB and XDoclet  
helped immensely.  They also have a tutorial on EAR's that I'm just  
starting to work through.


2. Call the EJB from an Eclipse Debug session as a remote object.   
This is standard J2EE stuff that required the right JNDI lookup  
information and the proper client libraries to be defined in the  
classpath


3. Make the same call from inside a webapp JSP.  I did this with a  
remote lookup, as most of the examples I viewed did this.  I  
finally found the pattern info for the ejb-ref component  
documented in the 1.2 documentation yesterday and got my sample going.


I would guess that you'll want/need an ejb-jar.xml, and an openejb- 
jar.xml in your EJB deployment.

 Original Message 
Subject: AW: Accessing the local interface of an Session EJB from a  
WAR

From: Norbert Rieger [EMAIL PROTECTED]
Date: Tue, February 27, 2007 8:23 am
To: user@geronimo.apache.org

Hi Mark,

thanks a lot for your detailed explanations.

1. I thought ejb-ref is used for accessing the remote interface,  
for the local interface ejb-local-ref with children local and  
local-home must be used. Isn't this correct ?


I've neither an openejb-jar.xml nor an ejb-jar.xml in my war file,  
only web.xml and geronimo-web.xml. If it's necessary the have them  
in the web app, I'll added them


regards,

Norbert
-Ursprüngliche Nachricht-
Von: Mark Aufdencamp [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 27. Februar 2007 16:01
An: user@geronimo.apache.org
Betreff: RE: Accessing the local interface of an Session EJB from a  
WAR



Hi Norbert,

I'm no expert here, but just got done working on a similar learning  
curve.  I believe that local can only be defined if an EAR/ 
application.xml/ geronimo-application.xml file exist, defining an  
enterprise application project.  I'm using a remote rather than  
local session bean and managed to get it to work. Your problem is  
most likely all about deployment descripitors and package  
dependencies.


So here goes:

1. web.xml - This should have an ejb-ref component.  It should  
contain a ejb-ref-name which serves as the local JNDI lookup  
suffix.  It will serve as the lookup string for the Context.lookup 
(java:comp/env/ejb/MfcSessionEJB).  It also serves as the linkage  
to the ref-name in the geronimo-web.xml.  This will factory a  
MfcSessionEJBHome object for   creation of a reference to a  
MfcSessionEJB.  It should also contain a ejb-ref-type along with  
a home and remote, which serves as the link to the EJB  
definition in the geronimo deployment descripitor for the webapp  
(geronimo-web.xml)



...
ejb-ref
 ejb-ref-nameejb/MfcSessionEJB/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homegltd.domain.app.interfaces.MfcSessionEJBHome/home

Re: Timer already canceled

2007-02-28 Thread David Jencks
It's a little hard to tell from this, especially without knowing the  
geronimo version.

LocalAttributeManager
line 642 is in the doFail method in my copy, which would mean  
something pretty serious happened to prevent server startup from  
continuing.  Did you really supply the entire stack trace?  I'd  
expect something more in the blank lines.  Maybe var/log/geronimo.log  
has more detail?


You might get more information by setting load=false for your app in  
config.xml and then starting the app using the admin console.


thanks
david jencks



On Feb 28, 2007, at 12:37 PM, Spotts, Joel ((ISS Atlanta)) wrote:

I am getting the following exception when geronimo starts up and  
tries to initialize my ear. What could cause the geronimo timer to  
be canceled?


[*** ] 93%  70s Starting iss/SiteProtector/1.0...
[*** ] 93%  70s Starting iss/SiteProtector/ 
1.0...2007-02-23 10:52:49,687 [main] ERROR [GBeanInstanceState]  
Error while starting; GBean is now in the FAILED state:  
abstractName=iss/SiteProtector/1.0/car?J2EEApplication=iss/ 
SiteProtector/1.0/car,j2eeType=WebModule,name=spmain.war


java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:354)
at java.util.Timer.schedule(Timer.java:170)
at  
org.apache.geronimo.system.configuration.LocalAttributeManager.attribu 
teChanged(LocalAttributeManager.java:642)


at  
org.apache.geronimo.system.configuration.LocalAttributeManager.setValu 
e(LocalAttributeManager.java:295)
at  
org.apache.geronimo.gbean.runtime.GBeanInstance.updateManageableAttrib 
ute(GBeanInstance.java:765)
at  
org.apache.geronimo.gbean.runtime.GBeanInstance.setAttribute 
(GBeanInstance.java:718)
at  
org.apache.geronimo.gbean.runtime.GBeanInstance.setAttribute 
(GBeanInstance.java:698)
at org.apache.geronimo.gbean.runtime.RawInvoker.setAttribute 
(RawInvoker.java:53)
at  
org.apache.geronimo.kernel.basic.RawSetAttributeInvoker.invoke 
(RawSetAttributeInvoker.java:35)
at  
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.tomcat.TomcatContainer$ 
$EnhancerByCGLIB$$914f4ec.setCatalinaHome(generated)
at org.apache.geronimo.tomcat.TomcatContainer.init 
(TomcatContainer.java:87)
at org.apache.geronimo.tomcat.TomcatContainer$ 
$EnhancerByCGLIB$$914f4ec.init(generated)
at org.apache.geronimo.tomcat.TomcatContainer$ 
$EnhancerByCGLIB$$914f4ec$$FastClassByCGLIB$$6f2babf5.newInstance 
(generated)


at net.sf.cglib.reflect.FastClass.newInstance 
(FastClass.java:91)
at org.apache.geronimo.kernel.basic.BasicProxyManager 
$ManagedProxyFactory.createProxy(BasicProxyManager.java:213)


at  
org.apache.geronimo.kernel.basic.BasicProxyManager.createProxy 
(BasicProxyManager.java:103)
at  
org.apache.geronimo.gbean.runtime.GBeanSingleReference.start 
(GBeanSingleReference.java:82)
at  
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance 
(GBeanInstance.java:887)
at  
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
GBeanInstanceState.java:267)
at  
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
(GBeanInstanceState.java:102)
at  
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive 
(GBeanInstanceState.java:124)
at  
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive 
(GBeanInstance.java:540)
at  
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean 
(BasicKernel.java:379)
at  
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
GBeans(ConfigurationUtil.java:374)
at  
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
GBeans(ConfigurationUtil.java:411)
at  
org.apache.geronimo.kernel.config.KernelConfigurationManager.start 
(KernelConfigurationManager.java:187)
at  
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
iguration(SimpleConfigurationManager.java:527)


at  
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
iguration(SimpleConfigurationManager.java:508)


at  
org.apache.geronimo.kernel.config.SimpleConfigurationManager$ 
$FastClassByCGLIB$$ce77a924.invoke(generated)

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at  
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
(RawInvoker.java:57)
at  
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
(RawOperationInvoker.java:35

Re: java.lang.ClassNotFoundException: [Ljavax.net.ssl.KeyManager; in classloader geronimo/jetty/1.1.1/car

2007-02-28 Thread David Jencks
My guess is that you might not be running with a full certified jdk?   
Geronimo 1.1.1 works with sun and ibm jdks = 1.4.2_08 but not with  
the gpl partial jvms such as gjc that often come as default on linux  
distros.


What does java -version say?

thanks
david jencks

On Feb 28, 2007, at 2:54 PM, Miki wrote:


Hi,

I just downloaded geronima an when i try to start the server I get  
the following error message:

.
java.lang.ClassNotFoundException: [Ljavax.net.ssl.KeyManager; in  
classloader geronimo/jetty/1.1.1/car

.

I use (X)ubuntu 6.06.
The full log is attached.

Any ideea?

Thanks

geronimo.log




Re: Update Database Pool Password using JMX

2007-03-01 Thread David Jencks
I've never tried it, but I think it might well work.  You need to  
figure out the ObjectName of the ManagedConnectionFactoryWrapper  
gbean and the name of the password attribute and then you should be  
able to use jmx (even remote jmx) to change it.  You might need to  
restart the gbean to get it to take effect.  I think you can see the  
object name and attribute name if you look in the right place in the  
admin console, although possibly this is only available in more  
recent geronimo versions.


thanks
david jencks




On Mar 1, 2007, at 4:44 PM, Ghattu, Satya [CCC-OT_IT] wrote:


Folks,

Is there a way to update the Database Pool configuration using JMX  
or a

Java program? I am using Geronimo 1.1.

Thank You,
-satya




Re: Programatically querying security realm

2007-03-02 Thread David Jencks


On Mar 2, 2007, at 7:28 AM, Aman Nanner/MxI Technologies wrote:



Hi,

I have a custom security realm defined that uses a database login  
module.

What I would like to do is, from a custom GBean, query the
realm/login-module somehow to test if a given username/password is  
valid.
So I will have a username string and a password string, and I would  
like to

validate it and get back a boolean indicating its validity.  I think I
would use the Kernel to grab an instance of some security-related  
GBean to
do this and invoke an operation on it, but I'm not sure which one I  
would

have to use.  Anybody have any ideas?


Why not simply

new LoginContext(realmName, callbackHandler).login()


with an appropriately setup CallbackHandler?

thanks
david jencks





Thanks,
Aman

__ 

* This message is intended only for the use of the individual or  
entity to which it is addressed, and may contain information that  
is privileged, confidential and exempt from disclosure under  
applicable law. Unless you are the addressee (or authorized to  
receive for the addressee), you may not use, copy or disclose the  
message or any information contained in the message. If you have  
received this message in error, please advise the sender by reply e- 
mail , and delete the message, or call (collect) 001 613 747 4698. *






Re: NoSuchElementException in SinglePoolMatchAllConnectionInterceptor.internalGetConnection

2007-03-04 Thread David Jencks

Could you please open a jira on this problem?

I'm worried about your proposed fix since it seems to me that if we  
don't have enough locking/synchronization on this side then removing  
idle connections could also break the other side where we are trying  
to get a connection from the pool to use it.  I'd rather figure out  
how to have enough locking so there are no more race conditions.


thanks
david jencks

On Mar 1, 2007, at 4:38 PM, Nathanael Bruce wrote:


Hi,



I am using Jencks-1.1.3 which uses the Geronimo connector  
internally.  Sporadically I seem to get the following exception  
after calling allocateConnection:




java.util.NoSuchElementException
java.util.HashMap$HashIterator.nextEntry(Unknown Source)
java.util.HashMap$EntryIterator.next(Unknown Source)
java.util.HashMap$EntryIterator.next(Unknown Source)
 
org.apache.geronimo.connector.outbound.SinglePoolMatchAllConnectionInt 
erceptor.internalGetConnection 
(SinglePoolMatchAllConnectionInterceptor.java:84)
 
org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInt 
erceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java: 
71)
 
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.get 
Connection(ConnectionHandleInterceptor.java:43)
 
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection 
(TCCLInterceptor.java:39)
 
org.apache.geronimo.connector.outbound.AbstractConnectionManager.alloc 
ateConnection(AbstractConnectionManager.java:57)



The exception usually happens once every 30 minutes in a controlled  
environment with only two max connections.  Increasing the maximum  
connection count seems to diminish this exception greatly.  Also,  
the exception usually happens after filling the pool, waiting a  
little while, and then hitting the connection a couple more times.




After searching the mailing list I found another person who is  
having the same type of exception in the same location, but no one  
has responded to his message.  The name of the message is  
“NoSuchElementException when using JCAFlow” and can be found here:


http://mail-archives.apache.org/mod_mbox/geronimo-servicemix-users/ 
200611.mbox/[EMAIL PROTECTED]




I can not find any issue relating to this in JIRA.



(I am not sure if this is the write list to be talking about the  
code, but…)




After looking at the code:



org.apache.geronimo.connector.outbound.SinglePoolMatchAllConnectionInt 
erceptor.internalGetConnection 
(SinglePoolMatchAllConnectionInterceptor.java:84)


82 :if (connectionCount == maxSize) {
83 :Iterator iterator = pool.entrySet().iterator();
84 :ManagedConnectionInfo kill = (ManagedConnectionInfo)  
((Map.Entry) iterator.next()).getValue();

85 :iterator.remove();
86 :ConnectionInfo killInfo = new ConnectionInfo(kill);
87 :internalReturn(killInfo, ConnectionReturnAction.DESTROY);
88 :}

I am wondering if there is a possible race condition between the if  
check on line 82 and the call to iterator.next() on line 84.  In  
between those two lines all of the connections in the pool could be  
destroyed? (Note: This is just a wild guess without studying the  
code closely.) If this is the case then shouldn’t a simply catching  
of the NoSuchElementException fix this? (I presume that if the pool  
is empty at this point then everything is okay.)















Re: JMS Queue/Topic definitions and external ActiveMQ XBean configuration

2007-03-07 Thread David Jencks
I don't know how likely it is to work, but what happens if you define  
the admin objects in both the xbean activemq plan (so your message  
bridge can work) and also in your ear (so geronimo believes they  
exist)?  I have the rather unsubstantiated impression that AMQ thinks  
a topic or queue is just a name and is happy to treat any use of the  
same name as the same topic or queue.


thanks
david jencks

On Mar 7, 2007, at 5:00 PM, Aman Nanner/MxI Technologies wrote:



Hi,

I'm currently trying to configure an ActiveMQ JMS message bridge.   
In order
to do this, I had to recompile Geronimo 1.2 so that it would pick  
up its
ActiveMQ broker configuration from an external XBean configuration  
file.  I
also deploy an EAR to Geronimo that consists of our application.   
Within

this EAR, I have an ActiveMQ RAR adapter with an XML plan, in which I
define all my JMS topics and queues.

The first problem is that I cannot configure a message bridge to my  
JMS
topics and queues, because the ActiveMQ broker cannot see these  
topics
and queues in my EAR (my EAR is the last module to start up).   
Because of
this problem, I considered moving all my JMS topics and queues  
outside of
my EAR and into the ActiveMQ XBean configuration itself.  However,  
once I
do that, I can no longer deploy my EAR to the server due to an  
error that I

get.  It appears that the deployer does not like my references to the
queues in my ejb-jar.xml and openejb-jar.xml descriptors, as it can no
longer find the definitions of the queues in my EAR.  The actual  
error I

get during deployment is:

 [java] Deployer operation failed: Can not resolve admin object  
ref
?j2eeType=JCAAdminObject,name=com/mxi/mx/jms/LocalTopic# in  
configuration

Mxi/Testing/1/ear
 [java] org.apache.geronimo.common.DeploymentException: Can not  
resolve
admin object ref ?j2eeType=JCAAdminObject,name=com/mxi/mx/jms/ 
LocalTopic#

in configuration Mxi/Testing/1/ear

Does anybody have any suggestions as how to resolve this circular
problem?

__ 

* This message is intended only for the use of the individual or  
entity to which it is addressed, and may contain information that  
is privileged, confidential and exempt from disclosure under  
applicable law. Unless you are the addressee (or authorized to  
receive for the addressee), you may not use, copy or disclose the  
message or any information contained in the message. If you have  
received this message in error, please advise the sender by reply e- 
mail , and delete the message, or call (collect) 001 613 747 4698. *






Re: Running Apache Roller on Geronimo

2007-03-11 Thread David Jencks
I think there have been modifications to that code since your  
geronimo version.  Is there any chance you could compile geronimo 1.2  
from svn and see if anything other than the line number is different?


I'd like to try this but I'm not sure I'm going to have time to set  
up mysql.  Is there any chance we could try with derby?


I'd recommend calling the database jdbc/rollerdb in the database plan  
so you won't need any mapping in the geronimo plan for roller.  I  
also think you don't need the mysql jar in the geronimo plan.  Except  
for specifying the db for hibernate, you could then swap databases by  
using the var/config/artifact_aliases.properties file without  
redeploying roller.


thanks
david jencks



On Mar 11, 2007, at 2:19 PM, Peter Petersson wrote:


Hi

Having tried to get Apache Roller 3.0 running under Geronimo 1.1.1  
and 1.2 beta (see the Runing Apache Roller 3.0 on Geronimo 1.1.1)  
without any luck. I got hold of Apache Roller 3.1 RC4 ( http:// 
people.apache.org/~snoopdave/ ) and at first it seemed to run  
smother than v3.0 but then exceptions started appeared in the log  
and everything got downhill from there


18:40:16,959 WARN  [ReferrerProcessingJob] Trouble processing referrer
org.apache.roller.RollerException
   at  
org.apache.roller.business.hibernate.HibernatePersistenceStrategy.flus 
h(HibernatePersistenceStrategy.java:228)

(full stack trace below)

but this time I got some more information. Dose anyone have any  
ideas on what may cause this HibernateGeronimo problem ?


--- ROOT CAUSE ---
java.lang.NullPointerException
   at  
org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTr 
ackingCoordinator.handleReleased(ConnectionTrackingCoordinator.java: 
127)
   at  
org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTr 
ackingCoordinator$$FastClassByCGLIB$$5d33aabf.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
(full stack trace below)

Here is the geronimo-web.xml
-- 
-- 
--

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;  
xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.1;  
xmlns:sec=http://geronimo.apache.org/xml/ns/security-1.1;  
xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.1;

 sys:environment
   sys:moduleId
 sys:groupIdroller/sys:groupId
 sys:artifactIdroller/sys:artifactId
 sys:version3.1/sys:version
 sys:typewar/sys:type
   /sys:moduleId sys:dependencies
 sys:dependency
sys:groupIdmysql/sys:groupId
sys:artifactIdmysql-connector-java/sys:artifactId
sys:version3.1.12/sys:version
sys:typejar/sys:type / 
sys:dependency sys:dependency

sys:groupIdconsole.dbpool/sys:groupId
sys:artifactIdMySqlDB_roller/sys:artifactId
 /sys:dependency
   /sys:dependencies
   sys:hidden-classes
   sys:filterantlr/sys:filter
   /sys:hidden-classes
 /sys:environment

 context-root/roller/context-root
   sys:resource-ref
sys:ref-namejdbc/rollerdb/sys:ref-name
sys:resource-linkMySqlDB_roller/sys:resource-link
 /sys:resource-ref
/web-app
-- 
-- 
--


Settings in roller-custom.properties
-- 
-- 
--

uploads.dir=/var/local/roller/roller_data/uploads
search.index.dir=/var/local/roller/roller_data/search-index

# Database configuration settings
# Hibernate dialect:
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
-- 
-- 
--


Database connection pool
-- 
-- 
--

?xml version=1.0 encoding=UTF-8?
connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/ 
connector-1.1
   dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/ 
deployment-1.1

   dep:moduleId
   dep:groupIdconsole.dbpool/dep:groupId
   dep:artifactIdMySqlDB_roller/dep:artifactId
   dep:version1.0/dep:version
   dep:typerar/dep:type
   /dep:moduleId
   dep:dependencies
   dep:dependency
   dep:groupIdmysql/dep:groupId
   dep:artifactIdmysql-connector-java/dep:artifactId
   dep:version3.1.12/dep:version
   dep:typejar/dep:type
   /dep:dependency

Re: Message not getting delivered to MDB

2007-03-13 Thread David Jencks
Which geronimo version?  mdbs are just starting to work in geronimo  
trunk.  They should work fine in earlier versions.


thanks
david jencks

On Mar 13, 2007, at 8:34 AM, anish pathadan wrote:


Hi All,
  I created new JMS resource group, connection factory and  
topic for Active MQ server.I could successfully send some messages  
to the Topic and I could read that message using a receiver. Now I  
wrote another EJB module having one MDB listening to that Topic. It  
seems that messages are not delivered to the MDB.Is there anything  
wrong in my open-ejb-jar.xml or am I missing anything. Please help me.



?xml version=1.0 encoding=UTF-8?

openejb-jar xmlns=http://www.openejb.org/xml/ns/openejb-jar-2.1;  
xmlns:dep= http://geronimo.apache.org/xml/ns/deployment-1.1;


dep:environment

dep:moduleId

dep:groupIddefault/dep:groupId

dep:artifactIdmymdb/dep:artifactId

dep:version1.0/dep:version

dep:typejar/dep:type

/dep:moduleId

dep:dependencies

dep:dependency

dep:groupIdconsole.jms/dep:groupId

dep:artifactIdTestServiceConnectionGroup/dep:artifactId

dep:version1.0/dep:version

dep:typerar/dep:type

/dep:dependency

/dep:dependencies

dep:hidden-classes/

dep:non-overridable-classes/

/dep:environment


enterprise-beans

message-driven

ejb-nameTestMDB/ejb-name

resource-adapter

resource-linkTestServiceConnectionGroup/resource-link

/resource-adapter

activation-config

activation-config-property

activation-config-property-namedestination/activation-config- 
property-name


activation-config-property-valueTestServiceTopic/activation- 
config-property-value


/activation-config-property

activation-config-property

activation-config-property-namedestinationType/activation-config- 
property-name


activation-config-property-valuejavax.jms.Topic/activation- 
config-property-value


/activation-config-property

/activation-config

resource-ref

ref-namejms/TestServiceConnectionFactory/ref-name

resource-linkTestServiceConnectionFactory/resource-link

/resource-ref

resource-env-ref

ref-namejms/TestServiceTopic/ref-name

message-destination-linkTestServiceTopic/message-destination-link

/resource-env-ref

/message-driven

/enterprise-beans


/openejb-jar




and ejb-jar.xml is:-
?

xml version=1.0 encoding=UTF-8?


ejb-jar id=ejb-jar_ID version=2.1 xmlns= http://java.sun.com/ 
xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance   
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http:// 
java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd


display-nametestejb /display-name

enterprise-beans

message-driven

ejb-nameTestMDB/ ejb-name

ejb-classejb.TestMDB /ejb-class

messaging-typejavax.jms.MessageListener /messaging-type

transaction-typeContainer /transaction-type

message-destination-typejavax.jms.Topic /message-destination-type

message-destination-linkTestServiceTopic /message-destination-link

resource-ref

descriptionJMS Broker /description


res-ref-namejms/TestServiceConnectionFactory /res-ref-name

res-typejavax.jms.ConnectionFactory /res-type

res-authContainer/ res-auth

/resource-ref


resource-env-ref


resource-env-ref-namejms/TestServiceTopic /resource-env-ref-name

resource-env-ref-typejavax.jms.Topic /resource-env-ref-type

/resource-env-ref

/message-driven

/enterprise-beans

assembly-descriptor

container-transaction

method

ejb-nameTestMDB/ ejb-name

method-name*/ method-name

/method

trans-attributeRequired /trans-attribute

/container-transaction

/assembly-descriptor
/

ejb-jar



--
Best Regards,
Anish Pathadan




Re: Message not getting delivered to MDB

2007-03-13 Thread David Jencks
The only thing I see that looks questionable is that you have a  
message-destination-link with no message-destination for it to link  
to.  I think the info in the openejb plan should be enough to find  
the topic, so I would first try removing the message-destination-link  
element and if that doesn't work try putting it back and including a  
message-destination.


thanks
david jencks

On Mar 13, 2007, at 9:02 AM, anish pathadan wrote:


Hi David,
   Version is 1.1.

Thanks,
Anish


On 3/13/07, David Jencks [EMAIL PROTECTED] wrote:
Which geronimo version?  mdbs are just starting to work in geronimo  
trunk.  They should work fine in earlier versions.



thanks
david jencks


On Mar 13, 2007, at 8:34 AM, anish pathadan wrote:


Hi All,
  I created new JMS resource group, connection factory and  
topic for Active MQ server.I could successfully send some messages  
to the Topic and I could read that message using a receiver. Now I  
wrote another EJB module having one MDB listening to that Topic.  
It seems that messages are not delivered to the MDB.Is there  
anything wrong in my open-ejb-jar.xml or am I missing anything.  
Please help me.



?xml version=1.0 encoding=UTF-8?

openejb-jar xmlns=http://www.openejb.org/xml/ns/openejb-jar-2.1  
 xmlns:dep= http://geronimo.apache.org/xml/ns/deployment-1.1;


dep:environment

dep:moduleId

dep:groupIddefault/dep:groupId

dep:artifactIdmymdb/dep:artifactId

dep:version1.0/dep:version

dep:typejar/dep:type

/dep:moduleId

dep:dependencies

dep:dependency

dep:groupIdconsole.jms/dep:groupId

dep:artifactIdTestServiceConnectionGroup/dep:artifactId

dep:version1.0/dep:version

dep:typerar/dep:type

/dep:dependency

/dep:dependencies

dep:hidden-classes/

dep:non-overridable-classes/

/dep:environment



enterprise-beans

message-driven

ejb-nameTestMDB/ejb-name

resource-adapter

resource-linkTestServiceConnectionGroup/resource-link

/resource-adapter

activation-config

activation-config-property

activation-config-property-namedestination/activation-config- 
property-name


activation-config-property-valueTestServiceTopic/activation- 
config-property-value


/activation-config-property

activation-config-property

activation-config-property-namedestinationType/activation- 
config-property-name


activation-config-property-valuejavax.jms.Topic/activation- 
config-property-value


/activation-config-property

/activation-config

resource-ref

ref-namejms/TestServiceConnectionFactory/ref-name

resource-linkTestServiceConnectionFactory/resource-link

/resource-ref

resource-env-ref

ref-namejms/TestServiceTopic/ref-name

message-destination-linkTestServiceTopic/message-destination-link

/resource-env-ref

/message-driven

/enterprise-beans



/openejb-jar





and ejb-jar.xml is:-
?

xml version=1.0 encoding=UTF-8?


ejb-jar id=ejb-jar_ID version=2.1 xmlns= http://java.sun.com/ 
xml/ns/j2ee xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance  
 xsi:schemaLocation= http://java.sun.com/xml/ns/j2ee http:// 
java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd 



display-nametestejb / display-name


enterprise-beans


message-driven


ejb-nameTestMDB/ ejb-name


ejb-classejb.TestMDB / ejb-class


messaging-typejavax.jms.MessageListener /messaging-type


transaction-typeContainer /transaction-type


message-destination-typejavax.jms.Topic /message-destination-type


message-destination-linkTestServiceTopic /message-destination- 
link



resource-ref


descriptionJMS Broker / description




res-ref-namejms/TestServiceConnectionFactory /res-ref-name


res-typejavax.jms.ConnectionFactory /res-type


res-authContainer/ res-auth


/resource-ref




resource-env-ref




resource-env-ref-namejms/TestServiceTopic /resource-env-ref-name


resource-env-ref-typejavax.jms.Topic /resource-env-ref-type


/resource-env-ref


/message-driven


/enterprise-beans


assembly-descriptor


container-transaction


method


ejb-nameTestMDB/ ejb-name


method-name*/ method-name


/method


trans-attributeRequired /trans-attribute


/container-transaction


/assembly-descriptor
/

ejb-jar



--
Best Regards,
Anish Pathadan






--
Best Regards,
Anish Pathadan




Re: Geronimo 2.0M3 broken?

2007-03-14 Thread David Jencks
This is known and fixed in trunk.  I believe you can use the command  
line deployer to deploy a database resource.


thanks
david jencks

On Mar 14, 2007, at 2:20 PM, Hans J. Prueller wrote:


Hi there,



I recently downloaded GMO2.0-M3 and wanted to play around with EJB3  
features and JPA. Unfortunately I have


to say that it is impossible to deploy a simple JDBC database  
resource because GMO fails with an exception on


the console. This worked fine in M2 – anybody else experiences such  
a problem?




Hans



===
virtually hanzz...



http://hanzz.zapto.org (personal)
http://www.cse.dmu.ac.uk/~hansp (research)








Re: reconciling geronimo common libs and standalone maven2 repository

2007-03-15 Thread David Jencks


On Mar 15, 2007, at 5:13 PM, CedricHurst wrote:



I have another question regarding Geronimo and Maven2 interaction.

In the lab we're building, we have quite a few dependencies (Spring,
Hibernate, org.json, Derby Client).  We're using Maven2 to define  
these
dependencies within the project and inject them in the WAR file,  
but we're
wondering if there's a better way.  I've often stared at the common  
libs
portlet in the admin console and wondered if there was a way to get  
that
talking to our standalone maven repository.  This would would allow  
us to

pull down the dependency trees through the maven command and have them
available inside the Geronimo installation at-large (instead of  
manually
adding 20+ libraries by hand from the admin console).  That way,  
instead of
specifying the dependencies in the pom.xml and deploying a 100MB+  
war file,

we could define the dependencies in the deployment plan and push much
smaller files to the server, relying on common libs to supply the  
needed

jars.  Is this possible?


Yes.  That's kind of how we build the server.  The car-maven-plugin  
uses the local maven repository as the geronimo repository and  
basically starts a server up using the maven repo, and runs some  
deploy command, and then copies the result(s) back into the local  
maven repo.  Assembly looks at the recorded geronimo dependencies in  
each module/configuration we install and pulls its dependencies from  
the local maven repo into the repository of the server being assembled.


There's also the plugin system which is pretty much like what the  
assembly stuff does except it can work with remote maven repos.  It  
has an additional xml file describing more about the plugin, but I'm  
not exactly sure what.


There are some problems relating the geronimo and maven concepts of  
repository, mostly about how to resolve versions, but I'm not sure  
they are insurmountable, just very annoying when you run into them.


So, I'm not really clear on what you are trying to do, but I think if  
you study these a bit you can figure out a way to have a slim war  
with no external jars in it and use a collection of maven and  
geronimo repositories to load all the classes.


One thing the car plugin does for you if you use it to predeploy  
your app is copy the maven dependencies from the pom.xml into your  
geronimo plan: that's why the plans in our configs dir don't have an  
environment element in them.  This is slightly problematical due to  
the different meanings of scope in maven and geronimo and we might  
adopt a different system soon but might still be worth looking at.


I think I'd recommend you go for a plugin.

Hope this helps, perhaps I'll understand better exactly what you want  
to do with your next reply.


thanks
david jencks



--
View this message in context: http://www.nabble.com/reconciling- 
geronimo-common-libs-and-standalone-maven2-repository- 
tf3411000s134.html#a9503712
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: reconciling geronimo common libs and standalone maven2 repository

2007-03-15 Thread David Jencks


On Mar 15, 2007, at 6:19 PM, Cedric Hurst wrote:



I looked into plugins a few times before but I wasn't quite sure  
how they
would work with Maven repositories directly.  From my  
understanding, the
repo must have a geronimo-plugins.xml file to work as a remote  
repository

for Geronimo.

I guess I'm really just trying to gain access to the rich library  
of maven2

libraries from within the geronimo common libs.
Unfortunately, the Geronimo Plugins catalog seems relatively  
limited so far.
I can't any of my required dependencies on geronimoplugins.com,  
whereas I
can find them all on http://mirrors.ibiblio.org/pub/mirrors/ 
maven2/.  I'd
like to be able to say say I need hibernate-3.2 in my deployment  
plan and
have Geronimo go out to the Maven2 central repository and download  
hibernate

and all its dependencies.


so, I didn't explain myself very well, all too common... hopefully I  
won't make things worse


Geronimo is built up out of modules (formerly called configurations)  
which are more or less pre-deployed applications with dependency  
information in a form geronimo can understand.  Geronimo plugins are  
modules with a little more metadata, but I'm not quite sure what it  
is, just that it makes it easier to move them around and install them  
from remote plugin repos.


So, I think you want to end up with your app as a geronimo module, or  
more likely a geronimo plugin.  There are a couple ways to do that.   
I think the most satisfactory for you will probably be to use the  
geronimo car-maven-plugin to directly build the module/plugin using  
maven, and then it will be in your local maven repo.  You can also  
deploy it to remote repos using mvn deploy (I think, I have't tried  
this).  To turn it into a plugin you just include an xml file in the  
appropriate spot after figuring out what goes inside.


OK, now you have your module, and you need to get it into a geronimo  
server.  This is the part where I'm not sure what functionality is  
currently available where.  i think if its a plugin then the plugin  
installer will pull the dependencies you need, but I'm not exactly  
sure where they are specified or pulled from.  You can also just  
install a car file but I don't think that pulls dependencies from  
anywhere -- the deployer does't know about maven repos.  the maven  
assembly stuff definitely knows how to install a car file from your  
local repo into a geronimo repo, and pull all the dependencies  
transitively into the g. repo.  However I don't know whether it can  
do this with an existing server -- the only places its used now are  
to build a whole new server.


I think what we need is a way to run the assembly functionality in  
the car plugin so it installs the car + dependencies into a specified  
geronimo server.  I don't know if it can do this right now but all  
the basic functionality is there, at most we'd need to wire it up  
appropriately.


thanks
david jencks





djencks wrote:



On Mar 15, 2007, at 5:13 PM, CedricHurst wrote:



I have another question regarding Geronimo and Maven2 interaction.

In the lab we're building, we have quite a few dependencies (Spring,
Hibernate, org.json, Derby Client).  We're using Maven2 to define
these
dependencies within the project and inject them in the WAR file,
but we're
wondering if there's a better way.  I've often stared at the common
libs
portlet in the admin console and wondered if there was a way to get
that
talking to our standalone maven repository.  This would would allow
us to
pull down the dependency trees through the maven command and have  
them

available inside the Geronimo installation at-large (instead of
manually
adding 20+ libraries by hand from the admin console).  That way,
instead of
specifying the dependencies in the pom.xml and deploying a 100MB+
war file,
we could define the dependencies in the deployment plan and push  
much

smaller files to the server, relying on common libs to supply the
needed
jars.  Is this possible?


Yes.  That's kind of how we build the server.  The car-maven-plugin
uses the local maven repository as the geronimo repository and
basically starts a server up using the maven repo, and runs some
deploy command, and then copies the result(s) back into the local
maven repo.  Assembly looks at the recorded geronimo dependencies in
each module/configuration we install and pulls its dependencies from
the local maven repo into the repository of the server being  
assembled.


There's also the plugin system which is pretty much like what the
assembly stuff does except it can work with remote maven repos.  It
has an additional xml file describing more about the plugin, but I'm
not exactly sure what.

There are some problems relating the geronimo and maven concepts of
repository, mostly about how to resolve versions, but I'm not sure
they are insurmountable, just very annoying when you run into them.

So, I'm not really clear on what you are trying to do, but I think

Re: Sharing resources in an MDB

2007-03-16 Thread David Jencks


On Mar 15, 2007, at 9:02 PM, Glenn Owen wrote:


I'm sure I should have learned this in MDB 101, but I'll ask here
anyway.

I have an MDB that reads incoming messages, does a bunch of work, and
then writes data to another outgoing JMS Queue.

As the load increases, Geronimo will create multiple instances of the
MDB and I was getting exceptions after about the 10th instance,  
because

I could not get enough outgoing Queue connections.

Originally each MDB was looking up the outgoing connection factory and
queue and creating a connection,session,producer in onMessage().

But since I was getting the above error, I modified it to get the
outgoing  connection factory,queue and connection in ejbCreate() and
holding onto those is *static* variables, so all instances of the MDB
shared the same connection.
The onMessage() still gets it's own session and producer.

That solved my problem, but I'm not sure it is right.

It is OK to share the factory/queue/connection across multiple  
instances

of an MDB?


It might possibly work for activemq if you don't use any  
transactions, but if you use transactions I would expect it to  
completely break and give pretty random behavior.  I don't think  
there's any reason to expect it to work even without transactions.


I have trouble keeping all the places you can configure sizes  
straight, but one way to limit the number of active mdbs is to give  
the inbound resource adapter its own thread pool and limit that  
size.  I think there's a more direct way but don't recall what it is.


If the number of outbound connections is at least the number of mdbs  
I would expect you wouldn't run into problems.


Maybe someone with more actual experience can give some more informed  
advice.


thanks
david jencks









Re: java:comp/ORB

2007-03-17 Thread David Jencks


On Mar 17, 2007, at 5:34 PM, Andres wrote:



We are porting an application from Websphere 6.1 to Geronimo  
1.1.1.  We have

a CORBA component (not EJB) that used to obtain the ORB by looking up
java:comp/ORB.  Is there a way to do this in the present release  
using JNDI
or will this be available in 1.2./2.0 when global JNDI support is  
completed?



if this is a corba service that runs in a thread started by the orb,  
and doesn't go through any j2ee components, I'm not sure you will be  
able to bind the orb under java:comp even in 1.2/2.0.  In 1.2  you'll  
be able to write some extra code to bind an orb anywhere you want in  
global jndi, but I'm not sure whether you can bind into the  
java:comp context since that is pretty heavily specified for use by  
j2ee components.  It might work, I don't know.  In 2.0 this will be  
at least as possible and the orb may be pre-bound (although AFAIK  
that isn't implemented yet)


If the thread this runs on went through a j2ee component before  
getting to your code, there should be an orb bound to java:comp/ORB  
already so long as the orb module is actually running.  We've  
generally shipped with the orb turned off and turn it on when we  
detect an app using corba transport for ejbs.  So one thing you want  
to do is look in var/config/config.xml or the admin console and see  
if its on.  In 1.2/2.0 I think the module is called  
org.apache.geronimo.configs.corba-yoko/${version}/car, and in 1.1.1  
probably geronimo/openejb-corba-sun/1.1.1/car.


Hope this helps,  feel free to ask more.

david jencks



Thanks.
--
View this message in context: http://www.nabble.com/java%3Acomp-ORB- 
tf3420569s134.html#a9533637
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Geronimo 2.0-M3 Interceptors

2007-03-19 Thread David Jencks


On Mar 19, 2007, at 5:26 AM, t.maus wrote:



Hi there ...

I am trying to use EJB3 Initerceptors for a poc project.

I was properly able to add and execute a @PostConstruct annotation  
to my

Stateless Session Bean.

Adding a @AroundInvoke or a manually create Annotation like  
@SpringBean

however failed to work.

Is the complete Interceptor framework already implemented and  
available for

M3 or should I stop playing around within for now ??


I'm pretty sure the interceptor support is in trunk (openejb3 +  
geronimo) but not yet implemented in g 2.0M3.  The Openejb developers  
have been quite good at pushing snapshots so if you build geronimo  
trunk online you should get something with interceptor support.


thanks
david jencks



Please find my used impl. below

--- used class ---
@Stateless
@Interceptors(SpringBeanInterceptor.class)
public class Calculator implements CalculatorLocal {

private EchoBean echoBean;

 private static Log log = LogFactory.getLog(Calculator.class);

 @PostConstruct public void init()
 {
 System.out.println(PostConstruct is properly working !!!);
 }


@AroundInvoke
public Object invoke(InvocationContext ctx) throws Exception
{
System.out.println(***invoked);
return ctx.proceed();
}


public int sum(int add1, int add2) {
return add1+add2;
}

public int multiply(int mul1, int mul2) {
return mul1*mul2;
}


@SpringBean
public void setEchoBean(EchoBean bean) {
log.debug(entered setEchoBean);
System.out.println(entering setEchoBean);
this.echoBean = bean;
}



}

thanks for your help
--
View this message in context: http://www.nabble.com/Geronimo-2.0-M3- 
Interceptors-tf3425894s134.html#a9548679
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: java.lang.Exception: Could not load 1.0/com/sun/codemodel/CodeWriter.class

2007-03-21 Thread David Jencks
Could you tell us what version of geronimo you are using and give  
more of the stack trace for this exception?  I don't recall seeing  
anything much like this before.  Also, the code appears to be trying  
to load a class file as a resource which seems a bit odd, as well as  
the extra directory segment in the name.


thanks
david jencks

On Mar 21, 2007, at 12:32 AM, ibiddles wrote:



Hi,

I am very new to Geronimo. I have a web services application that uses
Spring 2.0.3 and Spring web services. It runs in Tomcat 5.5.20 and  
6.0.10.


It has all its dependent JAR files in the WEB-INF/lib directory in  
the WAR
file so I was hoping that I could simply deploy the WAR file to  
Geronimo.


When I try to do so, there is a pause and then the console (a  
command prompt
window) gets into a whole series of exception stack traces until  
the process

runs out of memory or I stop it.

The first is as listed in the subject line of this emai:

 java.lang.Exception: Could not load
1.0/com/sun/codemodel/CodeWriter.class

This class is in one of the JAR files (jaxb-xjc-2.0.1.jar) in my  
WEBINF/lib
directory but the system does not seem to be able to find it. Every  
one of
the classes in that JAR file appear in similar stack traces one  
after the
other. The classes all seem to be in that same JAR file at least as  
far as I

get.

I am probably way off base with what I'm doing but does anyone have  
any idea

of what is going wrong?

Best wishes, Ivan.
--
View this message in context: http://www.nabble.com/ 
java.lang.Exception%3A-Could-not-load-1.0-com-sun-codemodel- 
CodeWriter.class-tf3438319s134.html#a9587182
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Own implemented XAResource unable to register with Geronimo Transaction Manager

2007-03-21 Thread David Jencks

Some more details that might help someone help you...

which geronimo version
have you found the transaction manager in your code or are you  
looking for it

when are you registering with the TM
what happens when you try to register with the TM
have you provided a NamedXAResource by implementing the interface  
directly or wrapping your XAResource with one of our wrappers

how do you register on startup for recovery.

thanks
david jencks

On Mar 21, 2007, at 7:01 AM, sanjoy_m wrote:

Hi All, I have written one simple class (XAListResource.java) which  
implements javax.transaction.xa.XAResource. Now I want to register  
it with the Geronimo transaction manager so that this XA resource  
can take part in global transaction. But I am unable to do that.  
Anybody who know the answer please reply with your help. Thanks   
Regards, Sanjoy
View this message in context: Own implemented XAResource unable to  
register with Geronimo Transaction Manager
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.




Re: GBean multi-valued references

2007-03-21 Thread David Jencks


On Mar 21, 2007, at 11:56 AM, [EMAIL PROTECTED] wrote:


Hi to All

Can anybody suggest where to find samples and documentation for  
GBean multi-valued references ? There are few lines here and there  
in books, but that's not enough.


They are used all over the place in geronimo, especially in the  
builder frameworks, for example NamingBuilderCollection.  AFAIK there  
isn't any reliable documentation, although you might try Aaron's book.


What do you want to know about them?  They seem sort of self- 
explanatory to me, making it difficult for me to explain without a  
specific question.


thanks
david jencks



Wishes  Regards

Vladimir




Re: java.lang.Exception: Could not load 1.0/com/sun/codemodel/CodeWriter.class

2007-03-21 Thread David Jencks
This looks to me as if it's a bug in the JAXWSServiceBuilder.  The  
inverseclassloading is still available, but it might be configured  
differently than Aaron explains -- I'm not sure how old his book is.   
Anyway this won't be affected by inverse classloading IMO.


The first thing to do is try building geronimo trunk yourself to see  
if the problem is still there.  If it is could you post a jira issue  
with some steps to reproduce the problem?  If you're not sure about  
whether to post a jira issue moving the discussion to dev list will  
get you wider attention :-)


thanks
david jencks



On Mar 21, 2007, at 12:35 PM, ibiddles wrote:



Dear David,

I'm sorry I didn't realize that I missed out the version of  
Geronimo. It is

2.0M3 with JDK1,5,0_1.

The stack trace is (and I have to retype this so hopefully there  
won't be

any mistakes):

   at org.apache.xbean.finder.ClassFinder.readClassDef (690)
   at org.apache.xbean.finder.ClassFinder.init (139)
   at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServi 
ces

(157)
   at  
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.WebServices (83)

   at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.$ 
$FastClassByCGLIB.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke (53)
   at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (127)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (820)
   at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (57)
   at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (35)
   at  
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (96)

   at
org.apache.geronimo.j2ee.deployment.WebServiceBuilder$ 
$EnhancerByCGLIB$$890c4531.findWebServices

(generated)
   at
org.apache.geronimo.web25.deployment.AbstractModuleBuilder.buildSubsti 
tutionGroups

(688)
   at  
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext

(253)
   at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$ 
$FastClassByCGLIB.invoke

(generated)

Hopefully that is enough.

It seems that the system may not be using the JAR files from my WEB- 
INF/lib.
I tried using the inverse-classloading tab that Aaron Muldur talks  
about ikn

his book but it seems that no longer applies in 2.0M3.

Anyway, thanks for any help you can give me.

Best wishes, Ivan



djencks wrote:


Could you tell us what version of geronimo you are using and give
more of the stack trace for this exception?  I don't recall seeing
anything much like this before.  Also, the code appears to be trying
to load a class file as a resource which seems a bit odd, as well as
the extra directory segment in the name.

thanks
david jencks

On Mar 21, 2007, at 12:32 AM, ibiddles wrote:



Hi,

I am very new to Geronimo. I have a web services application that  
uses

Spring 2.0.3 and Spring web services. It runs in Tomcat 5.5.20 and
6.0.10.

It has all its dependent JAR files in the WEB-INF/lib directory in
the WAR
file so I was hoping that I could simply deploy the WAR file to
Geronimo.

When I try to do so, there is a pause and then the console (a
command prompt
window) gets into a whole series of exception stack traces until
the process
runs out of memory or I stop it.

The first is as listed in the subject line of this emai:

 java.lang.Exception: Could not load
1.0/com/sun/codemodel/CodeWriter.class

This class is in one of the JAR files (jaxb-xjc-2.0.1.jar) in my
WEBINF/lib
directory but the system does not seem to be able to find it. Every
one of
the classes in that JAR file appear in similar stack traces one
after the
other. The classes all seem to be in that same JAR file at least as
far as I
get.

I am probably way off base with what I'm doing but does anyone have
any idea
of what is going wrong?

Best wishes, Ivan.
--
View this message in context: http://www.nabble.com/
java.lang.Exception%3A-Could-not-load-1.0-com-sun-codemodel-
CodeWriter.class-tf3438319s134.html#a9587182
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.







--
View this message in context: http://www.nabble.com/ 
java.lang.Exception%3A-Could-not-load-1.0-com-sun-codemodel- 
CodeWriter.class-tf3438319s134.html#a9598065
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Installing Running an Application Client

2007-03-21 Thread David Jencks


On Mar 21, 2007, at 12:44 PM, Norbert Rieger wrote:


Hello,

I'm trying to install an App Client, packed within an EAR.

When deploying the ear geronimo says  The application was  
successfully deployed. The application was successfully started


Looking at Application EARs also says State is running, but wenn  
I look at App Clients the state of my application client ist  
stopped.
The only available command is Uninstall, there is neither a  
Start nor a Restart command.


What can be the reasons for this, how do I start an application  
client ?


You can't run an app client inside the server :-)

What you need to do is open another terminal window in your geronimo  
home directory and look carefully at the moduleId for the app client  
you see in the console and run


java -jar bin/client.jar moduleId

(I think there's a script too, but I don't use them)

Hope this helps
david jencks



Thanks a lot for your answers.

Norbert




Re: java:comp/ORB

2007-03-21 Thread David Jencks


On Mar 21, 2007, at 10:47 PM, Andres wrote:



In our situation, we have a startup servlet that is looking for an ORB
because we need to make a callback to another CORBA component.  It  
sounds
like we should have access to java:comp/ORB since the code is  
running in a
servlet, but I tried it (after turning the ORB on) in Geronimo 1.2  
and it

throws an exception (javax.naming.NameNotFoundException: ORB).  Our
workaround is to call ORB.init if java:comp/ORB is not found.  I was
originally having problems shutting the ORB down using destroy() using
Geronimo 1.1/Sun ORB, but since I moved to Geronimo 1.2, this  
appears to no

longer be a problem with the Yoko ORB.


I think if you add a dependency on the yoko module (j2ee-corba-yoko)  
in the environment of your servlet plan you will be able to look up  
the orb in jndi.  When deciding whether to turn on the orb for you we  
look for corba style ejb references or an explicit dependency on the  
orb module: if neither is present we try to simplify the server by  
not starting the orb.


Hope this helps
david jencks



Andres


djencks wrote:



On Mar 17, 2007, at 5:34 PM, Andres wrote:



We are porting an application from Websphere 6.1 to Geronimo
1.1.1.  We have
a CORBA component (not EJB) that used to obtain the ORB by  
looking up

java:comp/ORB.  Is there a way to do this in the present release
using JNDI
or will this be available in 1.2./2.0 when global JNDI support is
completed?



if this is a corba service that runs in a thread started by the orb,
and doesn't go through any j2ee components, I'm not sure you will be
able to bind the orb under java:comp even in 1.2/2.0.  In 1.2  you'll
be able to write some extra code to bind an orb anywhere you want in
global jndi, but I'm not sure whether you can bind into the
java:comp context since that is pretty heavily specified for use by
j2ee components.  It might work, I don't know.  In 2.0 this will be
at least as possible and the orb may be pre-bound (although AFAIK
that isn't implemented yet)

If the thread this runs on went through a j2ee component before
getting to your code, there should be an orb bound to java:comp/ORB
already so long as the orb module is actually running.  We've
generally shipped with the orb turned off and turn it on when we
detect an app using corba transport for ejbs.  So one thing you want
to do is look in var/config/config.xml or the admin console and see
if its on.  In 1.2/2.0 I think the module is called
org.apache.geronimo.configs.corba-yoko/${version}/car, and in 1.1.1
probably geronimo/openejb-corba-sun/1.1.1/car.

Hope this helps,  feel free to ask more.

david jencks



Thanks.
--
View this message in context: http://www.nabble.com/java%3Acomp-ORB-
tf3420569s134.html#a9533637
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.







--
View this message in context: http://www.nabble.com/java%3Acomp-ORB- 
tf3420569s134.html#a9607529
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: java:comp/ORB

2007-03-23 Thread David Jencks

You shouldn't.

I don't have a copy of the 1.2 easily accessible right now, but if  
you wanted to investigate I'd recommend putting a breakpoint in  
CorbaRefBuilder.matchesDefaultEnvironment and deploying your app with  
the debugger on.  If the method returns false maybe you can figure  
out why if it returns true then we have a bigger problem.


thanks
david jencks

On Mar 23, 2007, at 2:58 PM, Andres wrote:



I verified that if I add a dependency to j2ee-corba-yoko, the ORB gets
started (port 6882 gets opened) when starting our WAR.  However, my  
servlet

still cannot see java:comp/ORB.  Do I need any other dependencies?

Thanks,

Andres


djencks wrote:



On Mar 21, 2007, at 10:47 PM, Andres wrote:



In our situation, we have a startup servlet that is looking for  
an ORB

because we need to make a callback to another CORBA component.  It
sounds
like we should have access to java:comp/ORB since the code is
running in a
servlet, but I tried it (after turning the ORB on) in Geronimo 1.2
and it
throws an exception (javax.naming.NameNotFoundException: ORB).  Our
workaround is to call ORB.init if java:comp/ORB is not found.  I was
originally having problems shutting the ORB down using destroy()  
using

Geronimo 1.1/Sun ORB, but since I moved to Geronimo 1.2, this
appears to no
longer be a problem with the Yoko ORB.


I think if you add a dependency on the yoko module (j2ee-corba-yoko)
in the environment of your servlet plan you will be able to look up
the orb in jndi.  When deciding whether to turn on the orb for you we
look for corba style ejb references or an explicit dependency on the
orb module: if neither is present we try to simplify the server by
not starting the orb.

Hope this helps
david jencks



Andres


djencks wrote:



On Mar 17, 2007, at 5:34 PM, Andres wrote:



We are porting an application from Websphere 6.1 to Geronimo
1.1.1.  We have
a CORBA component (not EJB) that used to obtain the ORB by
looking up
java:comp/ORB.  Is there a way to do this in the present release
using JNDI
or will this be available in 1.2./2.0 when global JNDI support is
completed?



if this is a corba service that runs in a thread started by the  
orb,
and doesn't go through any j2ee components, I'm not sure you  
will be
able to bind the orb under java:comp even in 1.2/2.0.  In 1.2   
you'll
be able to write some extra code to bind an orb anywhere you  
want in

global jndi, but I'm not sure whether you can bind into the
java:comp context since that is pretty heavily specified for  
use by

j2ee components.  It might work, I don't know.  In 2.0 this will be
at least as possible and the orb may be pre-bound (although AFAIK
that isn't implemented yet)

If the thread this runs on went through a j2ee component before
getting to your code, there should be an orb bound to java:comp/ORB
already so long as the orb module is actually running.  We've
generally shipped with the orb turned off and turn it on when we
detect an app using corba transport for ejbs.  So one thing you  
want

to do is look in var/config/config.xml or the admin console and see
if its on.  In 1.2/2.0 I think the module is called
org.apache.geronimo.configs.corba-yoko/${version}/car, and in 1.1.1
probably geronimo/openejb-corba-sun/1.1.1/car.

Hope this helps,  feel free to ask more.

david jencks



Thanks.
--
View this message in context: http://www.nabble.com/java%3Acomp- 
ORB-

tf3420569s134.html#a9533637
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.







--
View this message in context: http://www.nabble.com/java%3Acomp-ORB-
tf3420569s134.html#a9607529
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.







--
View this message in context: http://www.nabble.com/java%3Acomp-ORB- 
tf3420569s134.html#a9641265
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: How to deploy JPA?

2007-03-28 Thread David Jencks
Unless someone changed the code a lot while I wasn't looking I don't  
think that will work.


 I think you need to
(1) make sure your pool module is an ancestor of your ejb app: the  
easiest way is to make it a dependency in the geronimo plan for the  
ejb app.  This has the same effect as the ext-module in daytrader.
(2) assuming you do want jta :-) use jta-data-sourceMyTestPool/jta- 
data-source  or jta-data-sourcename=MyTestPool/jta-data-source


thanks
david jencks


On Mar 28, 2007, at 7:43 AM, David Carew wrote:

You should be able to do it in your persistence.xml file. with the   
jta-data-source element

e.g.  jta-data-sourcejava:comp/env/MyTestPool/jta-data-source

On 3/28/07, Ueberbach, Michael [EMAIL PROTECTED] wrote:
Hello,

I need some help in finding out the right way to deploy an ejb- 
application in Geronimo 2.0M3.

Szenario is as follows:
There is a connection-pool already deployed to an existing MySQL- 
Database, let's say MyTestPool.
The application has some entity beans and stateless session beans  
using EJB3.0 annotations. I want to use JPA

for persistence.
Can someone give an example what way the mimimum persistence.xml  
and the neccessary corresponding entries in the openejb-jar.xml


have to look like to get right connection between the application  
and the connection-pool?


I've had already a look at the daytrader example (2.0M2-jpa- 
plan.xml), but (if I got it right) this makes use of an ext-module


entry for the database connection. Is this really neccessary? How  
can I describe a reference to my existing connection-pool?


Thanks for every hint.

Michael







Re: A few questions

2007-03-30 Thread David Jencks


On Mar 30, 2007, at 12:45 PM, leonard flournoy wrote:

The answers may depend on the geronimo version you are using.  I'll  
assume you are bleeding edge and using 2.0 :-)



1) Is it possible to change the version of tomcat ?


You should be able to just put the version of tomcat you want in the  
geronimo repo (at the appropriate location, e.g. repository/org/ 
apache/tomcat/catalina/6.0.12/catalina-6.0.12.jar).  If you want to  
downgrade tomcat you will need to remove the tomcat jars that are  
already present.


This will work as long as the version is not specified in the  
dependency on tomcat jars in the geronimo-dependencies.xml file in  
the geronimo-tomcat jar.  If your version of geronimo happens to  
mistakenly have versions there, you'd have to rebuild g. with the  
tomcat version you want specified.


2) Is it possible to specify the parser that geronio uses by default ?


xml parser?  Isn't this specified by a system property?  I think  
you'll need to put the jaxp jars you want in lib/endorsed to get them  
appropriately on the classpath and I think you'll need to specify the  
property on the command line rather than with the SystemProperties  
gbean that would probably be too late.


3) How do you configre Geronimo to use a single class loader when  
loading ear files?


don't let any wars in the ear? :-)  all ejb and connector modules in  
an ear currently share a classloader.  Each war gets a child  
classloader, and there's not way to change that.  What exactly are  
you trying to do?


4) Does Geronimo offer a service simular to JBoss's  
SystemPropertiesService which allows users to access system  
properties.


can you explain this service?  i thought users could use  
System.getProperty().  We do have a SystemProperties gbean, maybe  
that is similar?


thanks
david jencks



Thanks in advance!





Re: Class cast issue with geronimo-tomcat6-jee5-2.0-M2, spring, hibernate that doesn't occur in tomcat standalone

2007-04-02 Thread David Jencks
Activemq makes a non-string system property that hibernate attempts  
to cast as a string.


Solutions:
- if you don't use jms, turn off the activemq and activemq-broker  
modules in your config.xml
- use hibernate 3.2 where this problem is supposed to be fixed (I  
haven't checked)
- there's also a system property that will make activemq behave  
better but I can't find what it is at the moment.  If you need it we  
can look harder.


thanks
david jencks

On Apr 2, 2007, at 8:24 AM, Jim Barrows wrote:


When I deploy a war file to geronimo it gives me:
Caused by:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext
resource [/WEB-INF/applicationContext/db.xml]: Invocation of init
method failed; nested exception is java.lang.ClassCastException:
java.util.HashSet
Caused by:
java.lang.ClassCastException: java.util.HashSet
	at org.hibernate.util.PropertiesHelper.resolvePlaceHolders 
(PropertiesHelper.java:88)
	at org.hibernate.cfg.Configuration.buildSessionFactory 
(Configuration.java:1173)
	at  
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionF 
actory(LocalSessionFactoryBean.java:804)
	at  
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessio 
nFactory(LocalSessionFactoryBean.java:744)
	at  
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPro 
pertiesSet(AbstractSessionFactoryBean.java:131)
	at  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanF 
actory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)


Which tomcat standalone does not give me.  Deploying the same war.  In
both cases it's being deploy as a directory, not as a .war file from
eclipse.

In both cases the offending bit of code is in the spring xml file, and
not in code, and I'm not doing anything with the constructor.
I've added
sys:hidden-classes
sys:filterorg.springframework/sys:filter
sys:filterorg.hibernate/sys:filter
sys:filterantlr/sys:filter
sys:filterorg.apache.xerces/sys:filter
sys:filterorg.apache.commons.digester/sys:filter
/sys:hidden-classes
to geronimo-web.xml file, to no avail.
Can anyone point me in the right direction to sovle this?

Geronimo Version: 2.0-M2
Java Version 1.5.0_11
OS: Fedora Core 6 - 2.6.20-1.2925
Spring 2.0.2
Hibernate - 3

--
James A Barrows




Re: Issue with deploying a service in correct path

2007-04-03 Thread David Jencks

Again I'm not entirely sure what your requirements are, but...

Geronimo needs the war file unpacked in some way in order to work  
with your application.  There are basically 2 ways this can happen:


1. If you deploy a war normally, geronimo will unpack it into the  
car directory it creates in the geronimo repository.  You can get  
to the jsp files there and with the normal tomcat or jetty  
configuration changes in the jsp files will get picked up by jasper.


2. If you start with an unpacked war (e.g. your app is laid out like  
a war file, but in a directory myapp.war rather than an actual war  
file, you can use the --inPlace deployment option and your app will  
not be copied into the geronimo repository, and you can change the  
jsps as you like.


There may be more development options if you are using eclipse and  
the eclipse plugins but I'm not familiar with them.


 hope this helps
david jencks

On Apr 3, 2007, at 8:56 AM, Sting Ray wrote:




Hi,

you got me right. That I also figured out just now while reading  
more about

paths.

Do you have an idea how to employ that JSP without archiving it?

That issue keeps on puzzling me ... :-)

Thanks David, appreciate it.

BRs,
Jori


djencks wrote:


I can't tell since you only show one desired path, but if all the
jsps need to be under mobilesolution then you can specify this path
as the context-root element in a geronimo plan.  If there is no such
common path component then you can specify the context-root as /
and specify the entire path in a servlet-mapping element in web.xml.

Does this answer your question or did I misunderstand what you are
asking?

thanks
david jencks

On Apr 3, 2007, at 1:53 AM, Sting Ray wrote:



Hey all,

a newbie for Geronimo is behind this question. I could not find an
answer
for it and would appreciate some assistance.

There is a service developed for Tomcat 4.1. In this service
solution, some
XML is generated on a JSP page, which must be available for
existing mobile
clients to parse as it is in a preset and known server path. This
means I'm
not able to archive (.war, for example) the JSPs in order to deploy
them on
Geronimo and I should get them configured to a certain path like
http://server.servertest.com:8080/mobilesolution/menu.jsp; or
similar.

Any suggestions how could I configure certain JSPs to a certain
path and
deploy them like with Tomcat 4.1.

Cheers!

Thanks a bunch!
--
View this message in context: http://www.nabble.com/Issue-with-
deploying-a-service-in-correct-path-tf3510556s134.html#a9805946
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.







--
View this message in context: http://www.nabble.com/Issue-with- 
deploying-a-service-in-correct-path-tf3510556s134.html#a9816461
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Library conflict

2007-04-04 Thread David Jencks


On Apr 4, 2007, at 11:23 AM, jgunz wrote:



Is there any other way other than hidden-classes to create a new
classloader (say a URLClassLoader) within my GBean and only specify  
the Jars

within my War file and then use that from there on out?

I can create the URLClassLoader fine but I don't know how (and  
don't think
there is a way) to replace the current/default classloader that's  
running
with my new one. I don't want to stomp on the system wide  
classloader I just

want to isolate my GBean so that it runs independent of the container.


The only think that comes to my mind is to take the needed jars out  
of your war, install them in the geronimo repo, and put your gbean in  
a module (car file) that depends on those jars and only those jars  
(you'll also need the j2ee-system module for the gbean classes)  Then  
you can have your geronimo-web.xml depend on this new module with  
your gbean in it.  This will put the jars from the war lib dir in a  
parent classloader of the webapp classloader.


hope this helps

david jencks




--
View this message in context: http://www.nabble.com/Library- 
conflict-tf3512229s134.html#a9842737
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Running portlets in Geronimo - Documentation

2007-04-04 Thread David Jencks


On Apr 4, 2007, at 2:34 PM, Paul McMahan wrote:


On Apr 4, 2007, at 5:01 PM, Hernan Cunico wrote:

A limitation of the data source creation wizard is that you cannot  
specify some of the values, more specifically all those that make  
the moduleId. Liferay plugin is specifically looking for a  
connection pool named *LiferayPool*  and with the following  
moduleId *liferay/liferay-pool/4.2.1/car*. If you use the console  
you'll get something like console.dbpool/LiferayPool/1.0/rar and  
installing the portal server plugin will fail.


Hernan, you're exactly right.  I had forgotten about that  
limitation of the data source wizard and how that the portal plugin  
relies on the datasource plugin to use a certain module name.  The  
original reason I put that dependency in place was to facilitate  
the relationship between the plugins so that if you install portal  
plugin it will automatically download and install the datasource  
plugin.  Or you could deploy a customized datasource beforehand  
(like the mysql one you provided instructions for) and the plugin  
installer wouldn't try to replace it with the derby one.  The end  
goal was to minimize the number of steps it takes new users to get  
a working portal server, while still allowing more advanced users  
to use an external database like mysql or DB2.


At least that's how it used to work.  Now I believe the plugin  
catalog lists the datasource plugin as a prerequisite of the  
portal plugin instead of just a dependency, so the plugin  
installer lists the portal plugin as unavailable until you have  
installed the datasource plugin.  The Liferay team maintains the  
catalog so that may be how they prefer things.  Or they might want  
to refine that part of their plugin catalog when we look into  
updating it for Geronimo's upcoming 1.2 release.


What I'm hoping for in the future for these kinds of situations is  
that there can be plugins configured for each of several databases,  
e.g. mysql, db2, firebird, etc and to switch the backend all you need  
to do is change a line in artifact_aliases.properties.  I'm trying  
this out with Peter Petersson with the roller plugin we've started in  
the plugins dir.


Anyway, I think its generally better to have the other project  
supply plugins for the databases they support rather than asking  
users to create one themselves.  Making the process easy... that will  
be the challenge.


thanks
david jencks



Best wishes,
Paul




Re: Unable to save connection pool error

2007-04-05 Thread David Jencks

This is fixed in svn and the not-exactly released M4

thanks
david jencks

On Apr 5, 2007, at 9:04 AM, Bulat wrote:



When i'm trying to create db2 connection pool, i get such error:

ERROR [DatabasePoolPortlet] Unable to save connection pool
javax.enterprise.deploy.spi.exceptions.InvalidModuleException: No  
configurer

for module type: rar registered
at
org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager.createC 
onfiguration(JMXDeploymentManager.java:302)

at
org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet 
.save(DatabasePoolPortlet.java:880)

at
org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet 
.processAction(DatabasePoolPortlet.java:341)
	at org.apache.pluto.core.PortletServlet.dispatch 
(PortletServlet.java:229)
	at org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java: 
163)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
	at org.apache.pluto.core.PortletServlet.service 
(PortletServlet.java:153)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:290)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:206)

at
org.apache.catalina.core.ApplicationDispatcher.invoke 
(ApplicationDispatcher.java:687)

at
org.apache.catalina.core.ApplicationDispatcher.doInclude 
(ApplicationDispatcher.java:590)

at
org.apache.catalina.core.ApplicationDispatcher.include 
(ApplicationDispatcher.java:505)

at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke 
(PortletInvokerImpl.java:120)

at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action 
(PortletInvokerImpl.java:68)

at
org.apache.pluto.PortletContainerImpl.processPortletAction 
(PortletContainerImpl.java:164)

at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPo 
rtletAction(PortletContainerWrapperImpl.java:82)

at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
at org.apache.pluto.portalImpl.Servlet.doPost(Servlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:290)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:206)

at
org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:228)

at
org.apache.catalina.core.StandardContextValve.invoke 
(StandardContextValve.java:175)

at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke 
(DefaultSubjectValve.java:56)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke 
(AuthenticatorBase.java:525)

at
org.apache.geronimo.tomcat.GeronimoStandardContext 
$SystemMethodValve.invoke(GeronimoStandardContext.java:338)

at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke 
(GeronimoBeforeAfterValve.java:47)

at
org.apache.catalina.core.StandardHostValve.invoke 
(StandardHostValve.java:128)

at
org.apache.catalina.valves.ErrorReportValve.invoke 
(ErrorReportValve.java:105)

at
org.apache.catalina.core.StandardEngineValve.invoke 
(StandardEngineValve.java:109)

at
org.apache.catalina.valves.AccessLogValve.invoke 
(AccessLogValve.java:517)

at
org.apache.catalina.connector.CoyoteAdapter.service 
(CoyoteAdapter.java:212)

at
org.apache.coyote.http11.Http11Processor.process 
(Http11Processor.java:844)

at
org.apache.coyote.http11.Http11Protocol 
$Http11ConnectionHandler.process(Http11Protocol.java:634)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run 
(JIoEndpoint.java:445)

at java.lang.Thread.run(Thread.java:619)

Drivers loaded successfully. Connection test have been passed.

I'm using:
geronimo-tomcat6-jee5-2.0-M3-bin
jdk 1.6.0-b105
Windows XP SP2

After that, I tried to create connection pool for Derby embedded  
and under

Linux Mandriva 10.1 with the same version of Geronimo, but there is no
changes.

--
View this message in context: http://www.nabble.com/Unable-to-save- 
connection-pool--error-tf3532432s134.html#a9858759
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Global Spring ApplicationContext

2007-04-07 Thread David Jencks
 component modules, each providing  
implementations of services whose interfaces are in the shared module.
Finally you have numerous web apps all of which need access to the  
services but which should not be able to access the service  
implementation classes directly.


As far as modules/classloaders this is easy to set up in geronimo.   
For each module you just need a plan that specifies the jars and  
parents as dependencies.  The geronimo-web plans for the web app  
would include the shared module as a dependency.


I don't know enough about Spring to know how to set up the  
implementation module registration with the spring instance.  What I  
would try to do is:


- write a spring server gbean that would be configured in the  
shared module that would start the spring server and await  
registrations from the implementation  modules
- write a spring plan registration gbean that would be configured  
in each of the implementation modules that would find the appropriate  
spring plans for the module and register/start/whatever-the-correct- 
word-is them with the spring server


Do you need to assure that particular services start before  
particular web apps?  This can be assured in one way by the order in  
which the modules are started.  If you need something more robust so  
that startup will fail if someone tries to start things  in the wrong  
order we might have to add something to let you specify web app  
dependencies directly.


I've been wanting something like this for relatively complicated  
spring apps such as jetspeed2


Hope this helps

thanks
david jencks





Thanks,
Rich





Re: XDoclet Support for OpenEJB - Generating the openejb-jar.xml with MyEclipse

2007-04-09 Thread David Jencks
I cannot express how strongly I recommend that you use jpa rather  
than cmp for any project you have any control over, such as new  
development.


I believe the xdoclet stuff you refer to doesn't work at all with  
geronimo-openejb, I think it is for openejb 1 which is not integrated  
with geronimo.  In any case using ejb 3.0 with annotations is a much  
better solution.


thanks
david jencks

On Apr 9, 2007, at 9:08 AM, Mark Aufdencamp wrote:


Hi All,

I've been quietly lurking on the list for the last eight weeks  
working on the opposite ends of a web application.  I've scaled the  
AJAX-JavaScript-Struts integration mountain and I've just completed  
deploying my first Entity Bean's using CMP.  You'll may recall that  
I previously conquered web container realm authentication and  
application security integration, as well as Session EJB's.  Throw  
in some HTML and CSS learning for good measure and in a manner of  
four months I've completely re-tooled myself for serious  
application development.  It's a lot to digest end to end, but it  
is possible to learn and do.


I selected the MyEclipse plugin as a necessity to travel this kind  
of development spectrum.  Using Eclipse was without question, and I  
needed the breadth of tools bundled by MyEclipse.  It didn't hurt  
that it had an attractive price for the features.  These were the  
same reasons that I selected Geronimo as an Application Server  
Platform.


The largest problems I've had in this journey have been integration  
between the development environment, Eclipse, and the Application  
Server, Geronimo.  I now completely understand the term Death by  
Configuration.  I've also lacked a decent end to end tutorial for  
this integration.  I've humped through the MyEclipse examples using  
JBoss or Weblogic and successfully transposed them into Geronimo  
utilizing the wiki examples and a little help from the list.


At last, I see the nirvana of configuration management available  
via XDoclet!


So here's the question:

How do I get OpenEJB XDoclet support integrated into MyEclipse?   
I've tried adding the openejb subtask to the Standard EJB task and  
I generate a blank openejb-jar.xml file.  I'd really like to manage  
my CMP field mappings in ths manner if possible.



Is anyone using XDoclet support to generate the openejb-jar.xml, or  
geronimo-application.xml, or geronimo-web.xml?  If so, where do I  
find documentation/tutorial on its usage?




Perhaps all the answers lie at http://xdoclet.sourceforge.net/ 
xdoclet/ant/xdoclet/modules/openejb/ejb/OpenEJBSubTask.html , and I  
will be studying it further.  I would however prefer to find some  
sage advice in my journey:)




Thanks to All for the work everyone does on Geronimo!

Mark Aufdencamp
[EMAIL PROTECTED]





Re: GBean - NoClassDefFoundError javax.jms.TopicConnectionFactory

2007-04-09 Thread David Jencks
Generally if you use dependencies on jars that are also present in  
server classloaders you will get into trouble, although I'm a little  
surprised at NCDFE.


Try replacing all the geronimo dependencies with one on the connector  
configuration


dependencies
  dependency
groupIdgeronimo/groupId
artifactIdj2ee-server/artifactId
typecar/type
  /dependency

(I think that's correct for 1.1.1, I'm a lot more familiar with 1.2  
and trunk at the moment).


thanks
david jencks


On Apr 9, 2007, at 4:21 PM, Oli Kessler wrote:


Hi all,

We are trying to deplay a custom GBean which incorporates JMS  
interaction using a deployment plan that is shown below.


The deployment runs without errors, but as soon as the GBean tries  
to access the JMS, the following error is thrown:


Exception in thread syslog worker-0  
java.lang.NoClassDefFoundError: javax/jms/TopicConnectionFactory
at ch.ncode.logquest.jms.JmsHelper.getPublisher 
(JmsHelper.java:71)
at ch.ncode.logquest.syslog.SyslogPacketHandler.run 
(SyslogPacketHandler.java:321)

at java.lang.Thread.run(Thread.java:613)

If we add another dependency to org.apache.geronimo.specs/geronimo- 
jms_1.1_spec/1.0.1/jar, nothing changes.


Thanks for any help,
-ok



The deployment plan :

module xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://geronimo.apache.org/xml/ns/ 
deployment-1.1 /opt/geronimo-1.1.1/schema/geronimo-module-1.1.xsd

  xmlns=http://geronimo.apache.org/xml/ns/deployment-1.1;

  environment
moduleId
  groupIdch.ncode.logserver/groupId
  artifactIdLogServer-Syslog/artifactId
  version1.0/version
  typecar/type
/moduleId


dependencies
  dependency
groupIdgeronimo/groupId
artifactIdgeronimo-connector/artifactId
version1.1.1/version
typejar/type
  /dependency
  dependency
groupIdgeronimo/groupId
artifactIdgeronimo-transaction/artifactId
version1.1.1/version
typejar/type
  /dependency
  dependency
groupIdgeronimo/groupId
artifactIdgeronimo-j2ee/artifactId
version1.1.1/version
typejar/type
  /dependency
  dependency
groupIdgeronimo/groupId
artifactIdgeronimo-management/artifactId
version1.1.1/version
typejar/type
  /dependency
  dependency
groupIdcommons-lang/groupId
artifactIdcommons-lang/artifactId
version2.1/version
typejar/type
  /dependency

dependency
groupIdch.ncode.logserver/groupId
artifactIdLogServer-Controller/artifactId
version1.0/version
typecar/type
  /dependency
  dependency
groupIdch.ncode.logserver/groupId
artifactIdSyslog-GBean/artifactId
version0.0.1/version
typejar/type
  /dependency

  dependency
groupIdch.ncode.logserver/groupId
artifactIdLogServer-Core/artifactId
version0.0.1/version
typejar/type
  /dependency



/dependencies

  /environment

  gbean name=ncode.SyslogServer  
class=ch.ncode.logquest.syslog.SyslogGBean


!--reference the JMS here--
reference name=managedConnectionFactoryWrapper
  namencodeTopicConnectionFactory/name
/reference

  /gbean
/module







Re: XDoclet Support for OpenEJB - Generating the openejb-jar.xml with MyEclipse

2007-04-10 Thread David Jencks


On Apr 9, 2007, at 10:20 AM, Mark Aufdencamp wrote:

Thanks for the advice David.  I'm still using Geronimo 1.1 and  
haven't even looked at 2.0 yet.  MyEclipse is also lacking in  
support of EJB 3.0 standards.


I have the O'Reilly Enterprise JavaBeans 3.0 sitting on my desk.   
I'm mired in that bleeding edge boundary and have been trying to  
learn the current production (EJB 2.1 and Geronimo 1.1/1.2) method  
while keeping an eye towards the future (EJB 3.0 and Geronimo  
2.0).  Having tutorials on the legacy way have significantly  
influenced my learning direction.


I've presumed that a migration path exists for 2.1x CMP to JPA.   
I've also looked at Hibernate from the web container as an option.   
The apps not very big at this point, so I can afford to re-tool it  
in the next version.


I think you will have to convert any cmp entity beans you have to jpa  
by yourself. IMO its a much much much better approach to start with  
jpa if there is any possibility at all.  There are quite extensive  
docs for openjpa, and it only took me a couple of days starting from  
no jpa knowledge to convert daytrader to jpa using those docs.


I don't have any first hand experience with hibernate but have heard  
rumors that openjpa performs better.  In any case if you go with  
hibernate I hope you use the jpa interfaces to enable portability.




Does a document exist yet on the geronimo specifics of performing a  
migration from 1.1/1.2 to 2.0 that discusses the shift from CMP to  
JPA?


1.2 supports jpa, although you have to tell it about the persistence  
units and persistent unit refs in a non-spec compliant way.   
Container manager persistence contexts are available from web and ejb  
applications.


Not having an IDE based tutorial that takes one through the whole  
stack with the application server really extends the learning curve!


maybe. cmp bean mapping stuff could easily be harder to learn  
with a tutorial than jpa with the openjpa docs.


thanks
david jencks





Anyway, thanks for the answer on the lack of decent XDoclet support.

 Original Message 
Subject: Re: XDoclet Support for OpenEJB - Generating the
openejb-jar.xml with MyEclipse
From: David Jencks [EMAIL PROTECTED]
Date: Mon, April 09, 2007 9:50 am
To: user@geronimo.apache.org

I cannot express how strongly I recommend that you use jpa rather  
than cmp for any project you have any control over, such as new  
development.


I believe the xdoclet stuff you refer to doesn't work at all with  
geronimo-openejb, I think it is for openejb 1 which is not  
integrated with geronimo.  In any case using ejb 3.0 with  
annotations is a much better solution.


thanks
david jencks

On Apr 9, 2007, at 9:08 AM, Mark Aufdencamp wrote:


Hi All,

I've been quietly lurking on the list for the last eight weeks  
working on the opposite ends of a web application.  I've scaled  
the AJAX-JavaScript-Struts integration mountain and I've just  
completed deploying my first Entity Bean's using CMP.  You'll may  
recall that I previously conquered web container realm  
authentication and application security integration, as well as  
Session EJB's.  Throw in some HTML and CSS learning for good  
measure and in a manner of four months I've completely re-tooled  
myself for serious application development.  It's a lot to digest  
end to end, but it is possible to learn and do.


I selected the MyEclipse plugin as a necessity to travel this kind  
of development spectrum.  Using Eclipse was without question, and  
I needed the breadth of tools bundled by MyEclipse.  It didn't  
hurt that it had an attractive price for the features.  These were  
the same reasons that I selected Geronimo as an Application Server  
Platform.


The largest problems I've had in this journey have been  
integration between the development environment, Eclipse, and the  
Application Server, Geronimo.  I now completely understand the  
term Death by Configuration.  I've also lacked a decent end to  
end tutorial for this integration.  I've humped through the  
MyEclipse examples using JBoss or Weblogic and successfully  
transposed them into Geronimo utilizing the wiki examples and a  
little help from the list.


At last, I see the nirvana of configuration management available  
via XDoclet!


So here's the question:

How do I get OpenEJB XDoclet support integrated into MyEclipse?   
I've tried adding the openejb subtask to the Standard EJB task and  
I generate a blank openejb-jar.xml file.  I'd really like to  
manage my CMP field mappings in ths manner if possible.



Is anyone using XDoclet support to generate the openejb-jar.xml,  
or geronimo-application.xml, or geronimo-web.xml?  If so, where do  
I find documentation/tutorial on its usage?




Perhaps all the answers lie at http://xdoclet.sourceforge.net/ 
xdoclet/ant/xdoclet/modules/openejb/ejb/OpenEJBSubTask.html , and  
I will be studying it further.  I would however prefer to find  
some sage advice

Re: Connector(container-managed-security) in LoginModule

2007-04-10 Thread David Jencks
This is a bug, I've opened https://issues.apache.org/jira/browse/ 
GERONIMO-3083 to track it.  it should be fairly simple to fix.


Many thanks for finding this!

david jencks

On Apr 10, 2007, at 2:16 AM, Bert_nor wrote:



Whether it is possible to use connector(container-managed- 
security)  in the

LoginModule

   In  DWLoginModule.login(...)

  .
  DataSource ds = (DataSource) factory.getConnectionFactory();
  try {
conn = ds.getConnection(cbUsername, cbPassword); --
java.lang.NoClassDefFoundError
// or  conn = ds.getConnection();
  } catch (Exception e) {
throw new FailedLoginException(e.getMessage());
 }
 select roles for current user

javax.security.auth.login.LoginException:  
java.lang.NoClassDefFoundError:

org/apache/geronimo/security/ContextManager
at
org.apache.geronimo.connector.outbound.SubjectInterceptor.getConnectio 
n(SubjectInterceptor.java:46)

at
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.get 
Connection(ConnectionHandleInterceptor.java:43)

at
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection 
(TCCLInterceptor.java:39)

at
org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.g 
etConnection(ConnectionTrackingInterceptor.java:66)

at
org.apache.geronimo.connector.outbound.AbstractConnectionManager.alloc 
ateConnection(AbstractConnectionManager.java:61)
	at org.tranql.connector.jdbc.DataSource.getConnection 
(DataSource.java:69)
	at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke 
(generated)

at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept 
(ConnectorMethodInterceptor.java:54)

at
$javax.sql.DataSource$$EnhancerByCGLIB$$2424dcb1.getConnection 
(generated)

at
com.promo.j2r.system.security.DWLoginModule.login 
(KDWLoginModule.java:162)


In console
Classloader jta11/car:
org.apache.geronimo.connector.outbound.SubjectInterceptor
   j2ee-security/car:
com.promo.j2r.system.security.DWLoginModule and ContextManager

--
View this message in context: http://www.nabble.com/Connector% 
28container-managed-security%29-in-LoginModule- 
tf3551902s134.html#a9916264
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: GBean - NoClassDefFoundError javax.jms.TopicConnectionFactory

2007-04-10 Thread David Jencks
I can't quite see how this  could make a difference but you might try  
setting the ThreadContextClassloader on the threads you create to the  
same as the gbeans TCCL.


thanks
david jencks


On Apr 10, 2007, at 1:39 PM, Oli Kessler wrote:


It might be a threading issue.

Our GBean spawns some more threads, each instrumented with a new  
connection to the JMS. In this scenario, all threads fail with the  
NCDFE.



However, if the GBean accesses the JMS on it's own (in the same  
thread), everything works.
The broker implementation starts up, the logging is indicating  
success (Journal open, channel at vm://localhost open, client gets  
added)


The test code is the following:

logger.info(uuuhh - trying direct JMS access);
TopicConnection con = ((TopicConnectionFactory) 
this.managedConnectionFactoryWrapper.$getResource 
()).createTopicConnection();

con.setClientID(customGBean-main);
con.start();
javax.jms.TopicSession s = con.createTopicSession(false,  
Session.AUTO_ACKNOWLEDGE);

javax.jms.Topic t = s.createTopic(this.jmsTopicName);
TopicPublisher pub = s.createPublisher(t);
logger.info(Publisher is  + pub);


If however I run this code in a separate thread spawned by the  
GBean, the startup fails with the NCDFE.


Do I have to use thread pools or any other special means in this case?

Thanks in advance
-ok

PS: now on geronimo-1.2beta



On 10.04.2007, at 02:25, David Jencks wrote:

Generally if you use dependencies on jars that are also present in  
server classloaders you will get into trouble, although I'm a  
little surprised at NCDFE.


Try replacing all the geronimo dependencies with one on the  
connector configuration


dependencies
  dependency
groupIdgeronimo/groupId
artifactIdj2ee-server/artifactId
typecar/type
  /dependency

(I think that's correct for 1.1.1, I'm a lot more familiar with  
1.2 and trunk at the moment).


thanks
david jencks










Re: Global Spring ApplicationContext

2007-04-12 Thread David Jencks


On Apr 12, 2007, at 9:50 AM, Richard Wallace wrote:


I think I found the source of the problem described below.  I've tried
deploying a simple ear with a webapp that has the following jsp

html
  head
titleHidden Classes Test/title
  /head
  body bgcolor=white
%
  Object o = new  
org.apache.xbean.propertyeditor.ArrayListEditor ();

  out.println (o);
%
  /body
/html

I tested this with Geronimo 1.1.  I copied the
repository/org/apache/xbean directory to my Geronimo 1.1 repository  
from

my Geronimo 2.0-M3 installation.  If I leave the
geronimo-application.xml file without any hidden-classes or
dependencies, this JSP won't compile because
org.apache.xbean.propertyeditor.ArrayListEditor cannot be resolved  
to a
type.  To get it to work in Geronimo 1.1 I have to manually  
specify in

the geronimo-application.xml that I want to use the xbean-reflect
package in the Geronimo 1.1 repository.

In Geronimo 2.0-M3, it appears as tho everything in the Geronimo
repository is available to the application.


No.  What is happening is that xbean-reflect is used in the web  
container whose classloader is a parent of your app's classloader.



So, when I deploy the
application and hit the above JSP, it is able to successfully  
create the

ArrayListEditor, even when there are no dependencies listed in the
geronimo-application.xml file.  It also seems that if I try to hide  
the

package with this geronimo-application.xml file

?xml version=1.0 encoding=UTF-8?
application
  xmlns=http://geronimo.apache.org/xml/ns/j2ee/application-1.2;
  environment
xmlns=http://geronimo.apache.org/xml/ns/deployment-1.2;
moduleId
  groupId${pom.groupId}/groupId
  artifactId${pom.artifactId}/artifactId
  version${version}/version
  typeear/type
/moduleId
hidden-classes
  filterorg.apache.xbean/filter
/hidden-classes
  /environment

/application

the JSP is able to compile and run just fine, leading me to believe  
that

the hidden-classes in my geronimo-application.xml file are being
ignored.  Am I missing something or is this a bug?


I think that if you exclude the class in a geronimo-web.xml it will  
be successfully excluded.  It's getting pulled in from the web  
container's classloader which is a parent of the web app classloader  
but not the ear classloader.


Hope I'm right and this helps :-)
david jencks



Thanks,
Rich

Richard Wallace wrote:

I'm trying to get the full Geronimo 2 working just for my own
edification and am still running into some problems.  I tried just
disabling the cxf stuff, but it seemed to keep getting reenabled.  I
uninstalled it and got past that problem.  Now I'm running into a
problem with the xbean library.  I'm getting the following:

org.springframework.beans.factory.access.BootstrapException:  
Unable to

initialize group definition. Group resource name
[classpath:/shared-context.xml], factory key [shared-context]; nested
exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'shared-context' defined in class path
resource [shared-context.xml]: Instantiation of bean failed; nested
exception is org.apache.xbean.propertyeditor.PropertyEditorException:
Value is not an instance of String
Caused by:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'shared-context' defined in class path
resource [shared-context.xml]: Instantiation of bean failed; nested
exception is org.apache.xbean.propertyeditor.PropertyEditorException:
Value is not an instance of String
Caused by:
org.apache.xbean.propertyeditor.PropertyEditorException: Value is not
an instance of String
at
org.apache.xbean.propertyeditor.AbstractConverter.setValue 
(AbstractConverter.java:67)

at
org.springframework.beans.TypeConverterDelegate.doConvertValue 
(TypeConverterDelegate.java:269)

at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary 
(TypeConverterDelegate.java:192)

at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary 
(TypeConverterDelegate.java:107)

at
org.springframework.beans.BeanWrapperImpl.convertIfNecessary 
(BeanWrapperImpl.java:356)

at
org.springframework.beans.factory.support.ConstructorResolver.createA 
rgumentArray(ConstructorResolver.java:422)

at
org.springframework.beans.factory.support.ConstructorResolver.autowir 
eConstructor(ConstructorResolver.java:140)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBean 
Factory.autowireConstructor 
(AbstractAutowireCapableBeanFactory.java:773)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBean 
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java: 
716)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBean 
Factory.createBean(AbstractAutowireCapableBeanFactory.java:386)

at
org.springframework.beans.factory.support.AbstractBeanFactory 
$1

Re: Taglibs, JEE5, and EAR /lib

2007-04-14 Thread David Jencks
Can you try using svn trunk?  A lot of problems with finding tlds  
have been fixed since M3.


thanks
david jencks

On Apr 13, 2007, at 9:18 PM, Richard Wallace wrote:


I've got my Struts2 jar in my EARs lib directory and I'm deploying to
Geronimo 2.0-M3 with Jetty.  My webapp is able to successfully start
the struts FilterDispatcher, but when I try and hit a jsp page using
the struts taglib I'm getting a 500 error saying that the /struts-tags
file could not be found.  I know that if I put the struts jar in the
wars WEB-INF/lib directory the servlet engine will automatically find
the tld.  Do I need to pull the tld out and put it in the WEB-INF/tld
directory or is there a better way to make the servlet container get
the tld out of the struts jar?

Thanks,
Rich





Re: Problem with starting the server

2007-04-15 Thread David Jencks
Edit var/config/config.xml and remove the elements for the apps that  
used to be in your in-place directory.  You probably also want to  
remove the configuration stuff for them from the geronimo repository.


AFAIK you can't fix this using the command line.

If you marked the elements load=false in config.xml you could  
undistribute the applications and geronimo would remove the stuff  
from the repository for you.


thanks
david jencks

On Apr 15, 2007, at 12:33 AM, vikas patil wrote:


Hello all,
  I got my inplace deployed directory corrupted and had to  
remove it completely. But now the server refuses to start and  
throws an error saying that the specified directory is not present.  
It fails to boot up because of this.
  Are there any options that can be specified at the  
command line during startup such that it does not load the users  
previously deployed wars.

 Thanks in advance for the replies.

--
Yours ,

Vikas A Patil




Re: Usign Databasepool inside of an EAR Application

2007-04-17 Thread David Jencks
The resource-ref element you show should go in geronimo-web.xml, not  
geronimo-application.xml.  I'm not sure why geronimo isn't  
complaining about where you put it.


I'd recommend naming your datasource documentDataSource in which  
case you should be able to leave out the resource-ref element from  
the geronimo plan.


thanks
david jencks

On Apr 17, 2007, at 2:05 AM, Jochen Zink wrote:


Hello at all,

I have (maybe a simple) problem.

I want to deploy an EAR Archive to geronimo 1.1.1. Inside this ear  
is only one module and one global JAR Archive.


ear:
 |--WebApplication.war
 |--META-INF
   |--MANIFEST.MF
 |--WEB-INF
|--web.xml
|--geronimo-web.xml
|--lib
|--DatabaseAccess.jar
|--application.xml
|--geronimo-application.xml



The WebApplication uses the DatabaseAccess.jar to connect to a  
ServiceWide ConnectionPool. This works, if I deploy the  
WebApplication.war as a standalone WAR. In this case, the  
DatabaseAccess.jar is placed inside the WebApplication.war.


But if I excluded the jar and pack everything together in a EAR  
archive, it dosen't work.


The Message is: Unable to resolve resource reference  
'documentDataSource' (Could not find resource 'MySQLComServerPool'.  
Perhaps it has not yet been configured, or your application does  
not have a dependency declared for that resource module?) 



I don't find a solution for this problem. In which deployment  
files, I have to declare the dependency to the ConnectionPool?


The web.xml and geronimo-web.xml contains the correct declarations.  
This works standalone!


I try to add the dependency to geronimo-application.xml (you can  
see it, on the end of my mail), but it does not work.


So, I don't no where the miss configuration is.

Thanks for help!

geronimo-application.xml

application
.. namespaceStuff...

sys:environment
sys:moduleId
sys:groupIdedocbox/sys:groupId
sys:artifactIdcomserver/sys:artifactId
sys:version1.0/sys:version
/sys:moduleId   

sys:dependencies
sys:dependency
sys:groupIdconsole.dbpool/sys:groupId
sys:artifactIdMySQLComServerPool/sys:artifactId
/sys:dependency
/sys:dependencies
/sys:environment


resource-ref
 ref-namedocumentDataSource/ref-name
pattern
groupIdconsole.dbpool/groupId
artifactIdMySQLComServerPool/artifactId
nameMySQLComServerPool/name
/pattern
/resource-ref

module

webDocumentTransferService.war/web
/module
/application




___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192





Re: Usign Databasepool inside of an EAR Application

2007-04-18 Thread David Jencks


On Apr 18, 2007, at 1:09 AM, Jochen Zink wrote:


I deploy it with the geronimo console. Not with the deployer tool.

The geronimo-application.xml is in META-INF directory of the EAR.


That should work, but the behavior you describe imply that geronimo  
is not finding it.  Could you try deploying with the plan separate  
from the ear?


thanks
david jencks



Thanks




-Ursprüngliche Nachricht-
Von: user@geronimo.apache.org
Gesendet: 18.04.07 10:06:00
An: user@geronimo.apache.org
Betreff: Re: Usign Databasepool inside of an EAR Application






On Apr 18, 2007, at 12:15 AM, Jochen Zink wrote:


Thanks for your answers, but I can't get it run.

I removed the resource-ref from geronimo-application.xml and put
them to geronimo-web.xml. But I get the same error:


I'm confused... with standalone Webapplication, it works pretty
fine. Also using the same name for the resource in web.xml and the
datasourcePool is not running. Can't automap ... is the message.
I believe the problem is not the resource-ref. But I believe
Geronimo does not find the dependency I declared in environment  
part.


I have another strange think. Maybe this is the reason, why
geronimo can't resolve the datasource.

In geronimo-application.xml I defined a module ID:
application
xmlns=http://geronimo.apache.org/xml/ns/j2ee/application-1.0;
xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.1;
xmlns:security=http://geronimo.apache.org/xml/ns/security-1.1;
sys:environment
sys:moduleId
sys:groupIdedocbox/sys:groupId
sys:artifactIdcomserver/sys:artifactId
sys:version1.0/sys:version
sys:typecar/sys:type
/sys:moduleId
...


But after deployment, the moduleid looks like default/
74155533/  This is geronimo random stuff, if no moduleID is
configured. The geronimo-web.xml has also a moduleID inside.

Maybe there comes the problem from?


I think you are correct.  How are you deploying your ear file and
where is the geronimo-application.xml?

thanks
david jencks



Thanks
Jochen





-Ursprüngliche Nachricht-
Von: user@geronimo.apache.org
Gesendet: 17.04.07 17:40:06
An: user@geronimo.apache.org
Betreff: Re: Usign Databasepool inside of an EAR Application





The resource-ref element you show should go in geronimo-web.xml,  
not

geronimo-application.xml.  I'm not sure why geronimo isn't
complaining about where you put it.

I'd recommend naming your datasource documentDataSource in which
case you should be able to leave out the resource-ref element from
the geronimo plan.

thanks
david jencks

On Apr 17, 2007, at 2:05 AM, Jochen Zink wrote:


Hello at all,

I have (maybe a simple) problem.

I want to deploy an EAR Archive to geronimo 1.1.1. Inside this ear
is only one module and one global JAR Archive.

ear:
 |--WebApplication.war
 |--META-INF
   |--MANIFEST.MF
 |--WEB-INF
|--web.xml
|--geronimo-web.xml
|--lib
|--DatabaseAccess.jar
|--application.xml
|--geronimo-application.xml



The WebApplication uses the DatabaseAccess.jar to connect to a
ServiceWide ConnectionPool. This works, if I deploy the
WebApplication.war as a standalone WAR. In this case, the
DatabaseAccess.jar is placed inside the WebApplication.war.

But if I excluded the jar and pack everything together in a EAR
archive, it dosen't work.

The Message is: Unable to resolve resource reference
'documentDataSource' (Could not find resource  
'MySQLComServerPool'.

Perhaps it has not yet been configured, or your application does
not have a dependency declared for that resource module?) 


I don't find a solution for this problem. In which deployment
files, I have to declare the dependency to the ConnectionPool?

The web.xml and geronimo-web.xml contains the correct  
declarations.

This works standalone!

I try to add the dependency to geronimo-application.xml (you can
see it, on the end of my mail), but it does not work.

So, I don't no where the miss configuration is.

Thanks for help!

geronimo-application.xml

application
.. namespaceStuff...

sys:environment
sys:moduleId
sys:groupIdedocbox/sys:groupId
sys:artifactIdcomserver/sys:artifactId
sys:version1.0/sys:version
/sys:moduleId   

sys:dependencies
sys:dependency
sys:groupIdconsole.dbpool/sys:groupId
sys:artifactIdMySQLComServerPool/ 
sys:artifactId

/sys:dependency
/sys:dependencies
/sys:environment


resource-ref
 ref-namedocumentDataSource/ref-name
pattern
groupIdconsole.dbpool/groupId
artifactIdMySQLComServerPool/artifactId
nameMySQLComServerPool/name
/pattern
/resource-ref

module

webDocumentTransferService.war/web
/module
/application

Re: Making Classes Available to Tomcat (Geronimo 1.1.1) on Startup

2007-04-19 Thread David Jencks
I'm trying to install a set of global Servlet Filters in Tomcat.   
I've modified the global Tomcat var/catalina/conf/web.xml  
configuration and added the references to my filters.  But I don't  
know where to place the class files to make them available to  
Tomcat during Geronimo startup.


Putting them in the var/shared/lib (or var/shared/classes) didn't  
work (I get a ClassNotFoundException).  I think this means that the  
Tomcat container doesn't include a dependency to the SharedLib  
GBean or maybe this dependency isn't fully realized on startup?


I have looked through the attributes of the TomcatWebConnector and  
some of the other GBeans that are installed by default with  
Geronimo to see if there was something I could tweak to set an  
extra bootstrap classpath location, but I haven't found anything.


I could modify the geronimo.bat file to add my classes to the Java  
classpath during the Geronimo startup, but I'm hoping to find a  
solution more integrated with Geronimo.  I'm also trying to avoid  
having to re-build Geronimo from source if possible.


Any ideas?


you might be able to put them in a module or web app that you use as  
a parent of all your other web apps, but since in my experience  
tomcat starts a default web app I have doubts this will be easy to  
make work.  You would probably have to move most of the gbeans in the  
tomcat module into your parent web app plan.  (you can turn off the  
gbeans in the tomcat module by including load=false in config.xml  
for each gbean).


It would probably be simpler to build your own tomcat module and  
install it instead of the one we ship.


There might be other approaches I haven't thought of.

thanks
david jencks



Daniel.




Re: JZOS JNI callback into Geronimo - how?

2007-04-20 Thread David Jencks
Usually weblogic startup classes are best imitated by geronimo  
gbeans.  Basically you write a class, include some metadata about  
what attributes and operations it has (GBeanInfo), and write a  
geronimo plan configuring an instance of it.  When you deploy the  
plan it gets included in the geronimo server and whenever the server  
starts, so does your gbean.


thanks
david jencks

On Apr 20, 2007, at 11:39 AM, weberjn wrote:



Hi,

we'd like to run Geronimo under z/OS. To include the server into  
systems

management, we'd like to use the JZOS Toolkit
(http://www.alphaworks.ibm.com/tech/zosjavabatchtk)

Basically, the toolkit is a JNI library which calls back into Java  
when

there is a message from systems management.

Operator stops - z/OS - JZOS - JNI callback - Java callback  
handler -

JMX to Geronimo - stop Web app

What would be the best way to deploy the Java callback handler in  
Geronimo?

An inbound resource adapter?

Into Weblogic server you can plug-in pure Java classes called startup
classes which would do that. Is there something like this in Geronimo?

Thanks for any hints,
Juergen

--
View this message in context: http://www.nabble.com/JZOS-JNI- 
callback-into-Geronimo---how--tf3619911s134.html#a10107880
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Sun Jsf and Geronimo

2007-04-24 Thread David Jencks


On Apr 23, 2007, at 8:47 PM, Arinté wrote:

I have tried installing the jsf files through geronimo and  
including in the

war file and they both give the same error.


IMO you should build from source to get reasonable results.  We  
include apache myfaces instead of the jsf ri and the jsf ri won't  
work in geronimo (at least the javaee features such as annotations  
and resource injection won't work.  Everything else is likely to  
conflict with myfaces).  Most of the support has been added since 2.0- 
M3 and a significant amount since the not-exactly-released M4.


thanks
david jencks



Paul McMahan [EMAIL PROTECTED] wrote
in message news:[EMAIL PROTECTED]
Hello,  How are you trying to use the sun jsf impl?  For example are
you including it in your WEB-INF/lib?  If so then I don't expect that
would work since Geronimo filters the jsf classes from a webapps
classloader.  This is a result of the JSF 1.2 specification 10.2.5
and 10.2.6 which says that webapps should not include the jsf classes
in their archive.  As we move forward I think it would be a great
idea to make the jsf implementation pluggable, but this will probably
be done by using Geronimo's plugin system instead of bundling the JSF
jars in a webapp's archive due to this language in the specification
and because of jsf implementation-specific functionality like
resource injection for managed beans.

The jsf support in Geronimo 2.0-M4 is more complete so I think you'll
have better luck with it.  However, that version has not been
officially released yet so you will need to build it from svn tag or
look in the [EMAIL PROTECTED] archive for the announcement of M4 release
candidate binaries.

Best wishes,
Paul


On Apr 23, 2007, at 7:52 AM, Arinté wrote:

I am trying to run sun jsf impl 1.2 on Geronimo, but I keep  
running  into

errors, is it even possible?  My current error is this:
javax.servlet.ServletException:
org/apache/commons/lang/builder/HashCodeBuilder
at javax.faces.webapp.FacesServlet.service  
(FacesServlet.java:152)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)

Even though I have commons lang in my geronimo.xml.  Also, when I   
export

this project to just plain tomcat 6 it works without me adding the
commons
lang jar file anywhere, meaning I don't think sun uses it, but  
somehow

myfaces is getting injected in here.

Any tips or guides on getting this working?  I am using Geronimo 2  
M3.

Thanks












Re: Sharing resources in an MDB

2007-04-25 Thread David Jencks


On Apr 25, 2007, at 8:14 AM, ananner wrote:



I also have a requirement to limit a certain MDB to a maximum of one
instance, but I am a bit confused as to your response.  Are you  
saying that

I should put a pool size limit on the outbound-resourceadapter which
defines the Connection Factory that my MDB subscribes to?


The ResourceAdapter instance gets a BootstrapContext instance when  
its started, and the BootstrapContext basically includes a thread  
pool.  So if you give it a thread pool with only one thread


In geronimo you specify which thread pool to use with this part:

workmanager
gbean-linkDefaultWorkManager/gbean-link
/workmanager


So you could include a thread pool:

gbean name=SingleThreadPool  
class=org.apache.geronimo.pool.ThreadPool

attribute name=keepAliveTime5000/attribute
attribute name=poolSize1/attribute
attribute name=poolName SingleThreadPool /attribute
/gbean

and use it:

workmanager
gbean-linkSingleWorkManager/gbean-link
/workmanager

This is a horrible solution because you have to set up a resource  
adapter instance for each mdb that needs its size limited in this  
way.  Hopefully there's a way to restrict the mdb pool size that I  
don't know about.


BTW, I recall hearing James Strachan talk about message groups.  If  
your requirements are that you get sets of messages that, within the  
set, must be processed in order rather than all messages must be  
processed in order you might be able to introduce some concurrency by  
using message groups.



Hope this helps
david jencks



Thanks,
Aman


djencks wrote:



It might possibly work for activemq if you don't use any
transactions, but if you use transactions I would expect it to
completely break and give pretty random behavior.  I don't think
there's any reason to expect it to work even without transactions.

I have trouble keeping all the places you can configure sizes
straight, but one way to limit the number of active mdbs is to give
the inbound resource adapter its own thread pool and limit that
size.  I think there's a more direct way but don't recall what it is.

If the number of outbound connections is at least the number of mdbs
I would expect you wouldn't run into problems.

Maybe someone with more actual experience can give some more informed
advice.

thanks
david jencks











--
View this message in context: http://www.nabble.com/Sharing- 
resources-in-an-MDB-tf3412013s134.html#a10182882
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: A Geronimo complaint

2007-04-26 Thread David Jencks
You aren't really specifying enough context to know for sure what you  
are asking about.


If this is an excerpt from a geronimo plan, I suggest leaving out the  
version; geronimo will then choose the latest version in the geronimo  
repository at runtime.  From your request for a minimum version  
number I would think this would satisfy your requirements.
If this is an excerpt from a maven 2 pom then you should ask the  
maven team to make version ranges work more reliably.


Hope this is relevant to what you are asking about.

thanks
david jencks

On Apr 25, 2007, at 8:37 PM, Arinté wrote:

If I have a Geronimo project that declares some  dependencies like  
this:

dependency
groupIdorg.apache.myfaces.core/groupId
artifactIdmyfaces-api/artifactId
version1.2.0-SNAPSHOT/version
typejar/type
/dependency

When I move to another version of Geronimo I have to go through my  
xml and

redefine all these dependencies that sucks.  Maybe, the version number
should represent a minimum and then that way migration up can be a lot
easier.

comments/questions?







Re: Any support plans

2007-04-26 Thread David Jencks


On Apr 26, 2007, at 4:50 PM, Arinté wrote:

I see pluto 1.0.1 is installed, but that is very old.  What are the  
plans on updating the pluto version or moving to jetspeed?




It's only used for the console and is not really easy to use for any  
other purpose.  It would be great to move the console onto pluto 1.1  
(or later) but that requires someones time would you like to work  
on it?


We'd like to integrate jetspeed2 (I worked on it a bit about a year  
ago and hope to get back to it) but we're not planning on running the  
console on it since it is much larger than pluto and we don't really  
need most of the portal features just for the console.


There's also a liferay plugin hosted at liferay, for another full  
featured portal on geronimo.


thanks
david jencks



Re: Error at getting datasource from connector(container-managed-security)

2007-04-28 Thread David Jencks
Probably this is a bug, although I'm surprised we haven't seen it  
before.


Can you please outline your scenario a bit more?

- is this work done from a secured part of your application, so there  
is a subject available?
- do you want database access to be secured based on the default  
user/password supplied in the connector plan, or do you want the  
password credentials to be determined from the user in some way (such  
as using the user/pw of the actual user to access the database).


If you want the db credentials to be determined from the actual user,  
then this is only a configuration problem in your app.  You need to  
include a login module in your login configuration that will  
construct the PasswordCredential for the connector framework to use.   
However, AFAIK this hasn't been tested much for a long time and may  
have broken.  You include the   
CallerIdentityPasswordCredentialLoginModule and install it in the  
login config using the PasswordCredentialLoginModuleWrapperGBean  
instead of the regular LoginModuleGBean.   You can also write a  
different LoginModule that can apply some mapping between the actual  
user and database user.


thanks
david jencks

On Apr 27, 2007, at 11:49 PM, Bert_nor wrote:



The Subject in org.tranql.connector.CredentialExtractor.matches 
(...) is not

null, but not contain private credential
javax.resource.spi.security.PasswordCredential for extract username  
and

password.

Stack trace:
0.9.7-incubating-SNAPSHOT nonfatal general error
org.apache.openjpa.persistence.PersistenceException:  
java.sql.SQLException

at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException 
(DBDictionary.java:3781)

at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore 
(SQLExceptions.java:94)

at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore 
(SQLExceptions.java:80)

at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore 
(SQLExceptions.java:56)

at
org.apache.openjpa.jdbc.sql.OracleDictionary.ensureDriverVendor 
(OracleDictionary.java:235)

at
org.apache.openjpa.jdbc.sql.OracleDictionary.toSelect 
(OracleDictionary.java:344)

at
org.apache.openjpa.jdbc.sql.DBDictionary.toSelect(DBDictionary.java: 
1959)
	at org.apache.openjpa.jdbc.sql.SelectImpl.toSelect(SelectImpl.java: 
200)
	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java: 
331)
	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java: 
314)

at
org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute 
(LogicalUnion.java:404)
	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:215)
	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:205)

at
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open 
(SelectResultObjectProvider.java:91)
	at org.apache.openjpa.kernel.QueryImpl.singleResult(QueryImpl.java: 
1270)

at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1207)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:982)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:791)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:761)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:757)
at
org.apache.openjpa.kernel.DelegatingQuery.execute 
(DelegatingQuery.java:514)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java: 
225)

at
org.apache.openjpa.persistence.QueryImpl.getSingleResult 
(QueryImpl.java:287)

at ru.mev.j2report.ejb.session.UserBean.getUserInfo(UserBean.java:19)
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:585)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext 
$Invocation.invoke(ReflectionInvocationContext.java:135)

at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee 
d(ReflectionInvocationContext.java:118)

at
org.apache.openejb.core.interceptor.InterceptorStack.invoke 
(InterceptorStack.java:73)

at
org.apache.openejb.core.stateful.StatefulContainer._invoke 
(StatefulContainer.java:408)

at
org.apache.openejb.core.stateful.StatefulContainer.businessMethod 
(StatefulContainer.java:370)

at
org.apache.openejb.core.stateful.StatefulContainer.invoke 
(StatefulContainer.java:249)

at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod 
(EjbObjectProxyHandler.java:184)

at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke 
(EjbObjectProxyHandler.java:60)

at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke 
(BaseEjbProxyHandler.java:215)

at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke

Re: Classloader/Classpath Problems with Webapp and EJB-jar in same EAR.

2007-05-15 Thread David Jencks


On May 15, 2007, at 7:55 AM, Jochen Zink wrote:


Hello all,

I have an EAR Archive. The archive contains a WAR-File (WebApp.war)  
and a JAR File (ejb.jar). The JAR contains a MessageDrivenBean. In  
a lib folder inside the ear are some JAR-Libs. Some of these libs  
are used from the webapp and some from the MDB.


My Problem is:
Both, the war and the ejb jar Archive have a MANIFEST.MF in the  
META-INF Directory. In that manifest the class-path attribute is  
set to some libs in the lib folder inside the ear. This works fine  
if I does not place ejb.jar in the ear and the war archive is the  
only one inside the ear. But if both archives are inside the ear  
some strange errors happens. While deploying the Webapp, geronimo  
does not find the libs which are placed in lib folder of the ear  
(NoClassDefFound). Whithout the ejb.jar, the Webapplication is  
loaded correctly. If I define exactly the same class-path attribute  
in manifest.mf of the ejb-jar, the webapplication starts correctly.  
So, it seems that the ejb.jar manipulate the classpath of the  
webapplication.


With two Webapplications inside the same ear, everythink works  
fine. The problem raised only with WAR nad EJB-Jar archives.


Has anyone an idea why this happen?


Please always supply complete information on which version of  
geronimo you are using.  We occasionally have fixed bugs :-)


NoClassDefFound usually means the class is in an unexpected  
classloader, not that it isn't there at all.  What is the exact  
error?  Do any classes in the lib jars load classes from the war?


The ejb jars' classloader is going to be a parent of the war  
classloader, so if you remove the manifest classpath entries from the  
war that are also present in the ejb jars manifest classpath the lib  
classes should be available to both the ejbs and the web layer, both  
loaded in the same classloader.


Hope this helps
thanks
david jencks



Thanaks a lot!

structure:
ear:
|-- lib/
  |--jarFileA.jar
  |--jarFileB.jar
|-- META-INF/
  |--application.xml
  |--geronimo-application.xml
|-- WebApp.war
  |-- WEB-INF/
  |--- // Some webapp stuff
  |-- META-INF/
  |-- web.xml
  |-- geronimo-web.xml
  |-- MANIFEST.MF
|-- ejb.jar
  |-- META-INF
  |-- ejb-jar.xml
  |-- openejb-jar.xml
  |-- MANIFEST.MF

_
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071distributionid=0066





Re: Web Application Migration to Geronimo

2007-05-18 Thread David Jencks
 are  
getting a NCDFE rather than ClassNotFoundException it's likely that  
the class is available but we're trying to load it from a parent  
classloader.  Can you supply more of the stack trace?  Are any of  
your classes also in any other classloaders geronimo might be using  
or are they only present in the ear?


thanks
david jencks




Layout for FrancePolicyServer.ear
-
META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml
META-INF/ibm-application-bnd.xmi
META-INF/ibm-application-ext.xmi
AdvCommon.jar
AdvisorSvr.jar
FrancePolicyServer_EJB.jar
FrancePolicyServer_WEB.war
InnovatorRT.jar
jaxen.jar
license.jar

Manifest for EAR
...
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 2.3 (IBM Corporation)
Built-By: Blaze Advisor Quick Deployer


Layout for FrancePolicyServer_EJB.jar
-
META-INF/
META-INF/MANIFEST.MF
com/
com/capecomputing/
com/capecomputing/france/
com/capecomputing/france/webservice/
com/capecomputing/france/webservice/FrancePolicyIF.class
com/capecomputing/france/webservice/FrancePolicyIFHome.class
com/capecomputing/france/webservice/FrancePolicyIF_RI.class
com/capecomputing/france/webservice/ 
FrancePolicyServiceSoapBindingImpl.class

META-INF/ejb-jar.xml
META-INF/ibm-webservices-bnd.xmi
META-INF/ibm-webservices-ext.xmi
META-INF/jaxrpc-mapping.xml
META-INF/openejb-jar.xml
META-INF/webservices.xml
META-INF/wsdl/
META-INF/wsdl/FrancePolicyService.wsdl
qdfrancepolicy/
qdfrancepolicy/FrancePolicyBean.class
qdfrancepolicy/FrancePolicyBusiness.class
qdfrancepolicy/FrancePolicyHome.class
qdfrancepolicy/FrancePolicyIF.class
qdfrancepolicy/FrancePolicyRemote.class

MANIFEST for EJB
...
Manifest-Version: 1.0
Created-By: 2.3 (IBM Corporation)
Class-Path: AdvCommon.jar Advisor.jar AdvisorSvr.jar InnovatorRT.jar
license.jar jaxen.jar
Built-By: Blaze Advisor Quick Deployer
Ant-Version: Apache Ant 1.7.0


Layout for WAR
--
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/ibm-web-bnd.xmi
WEB-INF/ibm-web-ext.xmi
WEB-INF/web.xml

MANIFEST for WAR
...
Manifest-Version: 1.0
Class-Path: FrancePolicyServer_EJB.jar








Re: Web Application Migration to Geronimo

2007-05-19 Thread David Jencks
I don't see any obvious way this could be happening.  I would  
investigate by putting a breakpoint just before where the exception  
is thrown and looking at the classloader and what is being loaded in  
the debugger.


Can you think of something that geronimo could do that would make it  
so you didn't need to debug to solve this problem?


thanks
david jencks

On May 19, 2007, at 7:09 AM, Doug Lochart wrote:


David or anyone else,

Have you had any chance to look at the full stack trace of my  
exception yet?  Here it is again.


12:17:31,183 DEBUG [Configuration] Started configuration france/ 
FrancePolicyServerEar/1.0/car
12:17:32,803 DEBUG [Configuration] Stopping configuration france/ 
FrancePolicyServerEar/1.0/car
12:17:32,816 ERROR [Deployer] Deployment failed: plan=/mnt/ 
steve_d/Blaze65/deployfrancepolicy/./geronimo-application.xml,  
module=/mnt/steve_d/Blaze65/deployfrancepolicy/ 
FrancePolicyServer.ear
org.apache.geronimo.common.DeploymentException: Unable to  
initialize EJBContainer GBean: ejbNameFrancePolicyServer
   at  
org.openejb.deployment.SessionBuilder.addEJBContainerGBean 
(SessionBuilder.java:315)
   at org.openejb.deployment.SessionBuilder.buildBeans 
(SessionBuilder.java:192)
   at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans 
(OpenEJBModuleBuilder.java:514)
   at org.openejb.deployment.OpenEJBModuleBuilder$ 
$FastClassByCGLIB$$11bd7b20.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
   at  
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:817)
   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.j2ee.deployment.ModuleBuilder$ 
$EnhancerByCGLIB$$7afc2c82.addGBeans(generated)
   at  
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurat 
ion(EARConfigBuilder.java:562)
   at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
$FastClassByCGLIB$$38e56ec6.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
   at  
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:817)
   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.deployment.ConfigurationBuilder$ 
$EnhancerByCGLIB$$86e934f4.buildConfiguration(generated)
   at org.apache.geronimo.deployment.Deployer.deploy 
(Deployer.java:302)
   at org.apache.geronimo.deployment.Deployer.deploy 
(Deployer.java:124)
   at org.apache.geronimo.deployment.Deployer$ 
$FastClassByCGLIB$$734a235d.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
   at  
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:852)
   at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
(BasicKernel.java:239)
   at org.apache.geronimo.kernel.KernelGBean.invoke 
(KernelGBean.java:338)
   at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB 
$$1cccefc9.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
   at  
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:852)
   at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
(BasicKernel.java:239)
   at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke 
(MBeanGBeanBridge.java:168)
   at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke 
(DynamicMetaDataImpl.java:231)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke 
(MetaDataImpl.java:238)
   at  
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke 
(DefaultMBeanServerInterceptor.java:833)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke 
(JmxMBeanServer.java:802

Re: geronimo plan help

2007-05-21 Thread David Jencks
Can the eclipse plan editors be based on jsr-88 DConfigBeans?  We  
certainly don't have complete DConfigBean support for our plans, but  
having an actual editor using them might provide some incentive to  
keep the jsr-88 support up to date and complete.  The more up to date  
parts of the deployment wizards in the admin console use DConfigBeans.


I think there's supposed to be some kind of generic dconfigbean based  
plan editor in NetBeans, but I've never tried it.


thanks
david jencks

On May 21, 2007, at 6:04 AM, Sachin Patel wrote:

The primary issue is based on past experiences I chose EMF as the  
modeling framework around the plans, but after several releases  
came to the quick realization that it was too heavyweight for our  
purpose.  This and the fact that are schemas each release have not  
been cumulative additions and this makes it painful to provide UI  
support for every version of the schema.  Thus I've unfortunately  
considered this a dying effort.  What I would like to eventually do  
is simplify at least the use of EMF and just use the XMLBeans  
generated code and generate the editors out of it.  There is a good  
bit of migration work to do this, but in the long wrong it would  
simplify this greatly as well as reduce some footprint.


The other option and one I like much better, is something we can do  
in addition but prior to rebuilding the editors is  to extend the  
XML structured text editor in WTP to build a custom deployment plan  
editor for eclipse that provides full dynamic content assist into  
our plans.  So though this won't provide a UI, it will provide a  
reliable XML editor that will correctly display element choices as  
you write your plans.  I think this would be much more valuable  
since it would provide 100% coverage and thus more used than the  
above and the maintainability would be a whole lot easier than  
maintaining a full set of form editors.


-sachin


On May 21, 2007, at 7:47 AM, Shiva Kumar H R wrote:

Please read Aaron's book on Geronimo http:// 
www.chariotsolutions.com/geronimo/geronimo-1.1/geronimo-html-one- 
page.html . I find it to be a great documentation for almost  
anything related to Geronimo Deployment Plans.


I can understand your frustrations. It's no different for me when  
it comes to manually creating Geronimo Deployment Plans.


I have always wished that Geronimo Development Tools (like  
Geronimo Eclipse Plug-in) provide some facility for auto-creating/ 
updating those deployment plans. I have created a wiki page  
summarizing my proposal:  http://cwiki.apache.org/GMOxPMGT/ 
geronimo-deployment-plans-how-to-simplify-creation-or-updation.html


Would be useful if you and other users/developers can provide  
feedback on it as well post new proposals if any on that page. I  
think it would be useful if I float a separate mail on User list  
for this.


- Shiva

On 5/19/07, Doug Lochart  [EMAIL PROTECTED] wrote: Lin,

Thanks for trying to help.  I do appreciate it.  I may not have  
made my

questions/gripes clear.  So I will reiterate after your replies.

Lin Sun wrote:
 Hi, I am not a plan expert at all but I'll try answer your  
questions...


 What I find most useful besides reading the existing samples and
 documentations, is to use the schema files (generally located at  
the

 server_home\schema directory.)  For example, I am looking at my
 geronimo 2.0 server now, and the geronimo-module-{version}.xsd  
is the

 schema for namespace
  http://geronimo.apache.org/xml/ns/deployment-{version} .  You  
'll

 want to look at the geronimo-application-{version}.xsd for
 geronimo-application.xml file.

I have looked at the examples and what I have now is from them as  
well

as help from the forum.  What I am griping about is that even the
documents are syntactically described in the xsd they are not  
described
verbally as to what they mean or how they are used.  I can read  
and use

a schema but it doesn't help if I don;t know how or why I am
constructing the xml document.

The other issue I had was that I have an EAR with a WAR and EJB-JAR
inside.  Nowhere in the documentation did it cover the rules of what
plans are required.  Almost all examples attacke either a WAR or EJB
alone.  The one example that starts doing an EAR is never completed.

So when I was creating mine I had a geronimo-application.xml (which I
kept outside the ear), a geronimo-web.xml in the WAR, and an
openejb-jar.xml in the ejb.jar.  One forum member asked me to  
remove the
geronimo-web.  It seemed to not break anything and I think it may  
have
made things go farther but again I still have no clue what  
combinations

(or why) of geronimo specific plans are required in an ear.

 Doug Lochart wrote:


 openejb-jar xmlns=http://www.openejb.org/xml/ns/openejb- 
jar-2.1 

  dep:environment
 xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.1;
dep:moduleId
  dep:groupIdqdfrancepolicy./dep:groupId
  dep:artifactIdFrancePolicyServverEjb

Re: Exception when using CORBA in 2.0 M5: Invalid ORB class

2007-05-21 Thread David Jencks
The java base corba classes from sun have some mistakes, so we use  
the yoko ones.  To use the (yoko) orb you need to start geronimo  
something like


java -Djava.endorsed.dirs=lib/endorsed -jar bin/server.jar --long

To also get on the fly jpa enhancement you need to include - 
javaagent:bin/jpa.jar before the -jar


hope this helps

david jencks

On May 21, 2007, at 2:51 PM, Michael Ivanov wrote:


I am very new to using Geronimo, and recently switched from 1.1 to 2.0
M5.  I deployed my application fine, and most aspects seem to work
great except CORBA.  When my application initializes the ORB, by
calling

org.omg.CORBA.ORB global_orb = org.omg.CORBA.ORB.init(no_args, null);

it fails with the following stack trace:

org.omg.CORBA.INITIALIZE: Invalid ORB class:
org.apache.yoko.orb.CORBA.ORB:  vmcid: 0x0 minor code: 0x0  completed:
No
   at org.omg.CORBA.ORB.init(ORB.java:191)
   at com.company.iman.ImanOrb.init(ImanOrb.java:272)
   at com.company.iman.ImanOrb.init(ImanOrb.java:83)
   at com.company.iman.ImanOrb.init(ImanOrb.java:76)
   at ControllerServlet.createDatabase(ControllerServlet.java: 
5309)

   at ControllerServlet.doGet(ControllerServlet.java:1494)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:231)
   at org.apache.catalina.core.StandardContextValve.invoke 
(StandardContextValve.java:175)
   at  
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke 
(DefaultSubjectValve.java:56)
   at org.apache.geronimo.tomcat.GeronimoStandardContext 
$SystemMethodValve.invoke(GeronimoStandardContext.java:333)
   at  
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke 
(GeronimoBeforeAfterValve.java:47)
   at org.apache.catalina.core.StandardHostValve.invoke 
(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke 
(ErrorReportValve.java:104)
   at org.apache.catalina.core.StandardEngineValve.invoke 
(StandardEngineValve.java:109)
   at org.apache.catalina.valves.AccessLogValve.invoke 
(AccessLogValve.java:543)
   at org.apache.catalina.connector.CoyoteAdapter.service 
(CoyoteAdapter.java:238)
   at org.apache.coyote.http11.Http11Processor.process 
(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol 
$Http11ConnectionHandler.process(Http11Protocol.java:634)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run 
(JIoEndpoint.java:445)

   at java.lang.Thread.run(Thread.java:595)

Again, everything worked fine in geronimo 1.1 and previous versions.
Thanks for any hints.

Mike




Re: Developing a MessageDrivenBean

2007-05-22 Thread David Jencks
I am not really an mdb/jms expert so there may be a way to do  
this with acknowledgements.  However one sure way to do this is with  
transactional delivery.   If the mdb can't process the message it can  
call setRollbackOnly on the MessageDrivenContext.  According to what  
I've heard this is likely to be significantly slower than non- 
transactional delivery.


thanks
david jencks

On May 22, 2007, at 4:43 AM, Jochen Zink wrote:


Hello,

I have a simple MDB which works as a JMSReceiver. The MDB  
subscribes to a JMS-Topic. Everything works fine. If a new message  
is published to the Topic, the MDBs onMessage Method is called.


I want, that the bean can receive the same message over again, If  
an error inside the bean is raised. Normally I can deal with  
jmsmessage.acknowledge(); Method to notify, that the reciever  
handled the message correctly. If an error is raised on the  
receivers side, no acknowledge() is called. Normally in this case I  
expected, the message would send over again. But not with a MDB. It  
does not matter if I call acknowledge or not. The MDB creates the  
JMSSession where I can configure, that the session runs in  
CLIENT_ACKNOWLEDGE mode.


What musst I do to get this behavior?

I want, that the messageDrivenBean can say, that everything is  
correct and the message can be deleted from the topic if all  
subscibers have it received. But if the Bean raised an error, it  
should be possible for the bean, to receive the same message over  
again after a while.


Maybe it is only configuration stuff. But I can't find infos on  
activeMQ or openEJB Homepage.


Can someone help me?
thanks!

___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192





Re: Different Exception during deploy this time

2007-05-22 Thread David Jencks

Try putting the ibm jar in shared/lib and including

 sys:dependency
 sys:groupIdgeronimo/sys:groupId
 sys:artifactIdsharedlib/sys:artifactId
 sys:typecar/sys:type
 /sys:dependency

in the dependencies of the ear plan (next to the axis dependency)

(I'm hoping this version of was ce has the shared/lib feature:  
otherwise you need to install the jar into the geronimo repo and use  
a dependency to its repo location. )


I would guess that if the war only has stuff to make the ejb web  
service work on was 6.1 and nothing else you will have better results  
on geronimo if you remove the war.


Hope this helps.
david jencks


On May 22, 2007, at 6:59 AM, Doug Lochart wrote:

Due to the parameters I must work under at the moment I have not  
gotten the all clear to deploy this directly on Geronimo and use  
the debugger.  So I am still using WAS CE.  So what I did was I  
installed WAS 6.1 trial edition to make sure the app deploys.  It  
did not.  So I cleaned out the build area and reran the build.   
This EAR was a bit bigger (I forgot I removed the WAR from the  
earlier one as a test).  This new build deployed properly on WAS  
6.1 so I knew that I had something better to work with.  I tried  
deploying this new EAR and I seemed to get a lot farther but I  
recieved this excpetion:


org.apache.geronimo.kernel.config.LifecycleException: start of  
france/FrancePolicyServerEar/1.0/car failed
   at  
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
iguration(SimpleConfigurationManager.java:544)
   at  
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
iguration(SimpleConfigurationManager.java:508)
   at  
org.apache.geronimo.kernel.config.SimpleConfigurationManager$ 
$FastClassByCGLIB$$ce77a924.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
   at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:852)
   at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
(BasicKernel.java:239)
   at org.apache.geronimo.kernel.KernelGBean.invoke 
(KernelGBean.java:338)
   at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$ 
$1cccefc9.invoke(generated)

   at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
   at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)
   at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:122)
   at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:852)
   at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
(BasicKernel.java:239)
   at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke 
(MBeanGBeanBridge.java:168)
   at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke 
(DynamicMetaDataImpl.java:231)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke 
(MetaDataImpl.java:238)
   at  
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke 
(DefaultMBeanServerInterceptor.java:833)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke 
(JmxMBeanServer.java:802)
   at javax.management.remote.rmi.RMIConnectionImpl.doOperation 
(RMIConnectionImpl.java:1423)
   at javax.management.remote.rmi.RMIConnectionImpl.access$100 
(RMIConnectionImpl.java:96)
   at javax.management.remote.rmi.RMIConnectionImpl 
$PrivilegedOperation.run(RMIConnectionImpl.java:1260)
   at java.security.AccessController.doPrivileged 
(AccessController.java:275)
   at  
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation 
(RMIConnectionImpl.java:1363)
   at javax.management.remote.rmi.RMIConnectionImpl.invoke 
(RMIConnectionImpl.java:797)

   at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)

   at java.lang.reflect.Method.invoke(Method.java:615)
   at sun.rmi.server.UnicastServerRef.dispatch 
(UnicastServerRef.java:309)

   at sun.rmi.transport.Transport$1.run(Transport.java:168)
   at java.security.AccessController.doPrivileged 
(AccessController.java:275)

   at sun.rmi.transport.Transport.serviceCall(Transport.java:164)
   at sun.rmi.transport.tcp.TCPTransport.handleMessages 
(TCPTransport.java:506)
   at sun.rmi.transport.tcp.TCPTransport 
$ConnectionHandler.handleRequest(TCPTransport.java:838)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
(TCPTransport.java:912)

   at java.lang.Thread.run(Thread.java:799)
Caused by:  
org.apache.geronimo.kernel.config.InvalidConfigException: Unknown  
start exception
   at  
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
GBeans(ConfigurationUtil.java

Re: How important is simplifying Creation/Updation of Geronimo Deployment Plans?

2007-05-23 Thread David Jencks
You may get in trouble with these tools related to the followin  
situations:


1. We have some abstract types and substitution groups for various  
things such as gbeans.  I'm not sure how you can supply the complete  
set of schemas needed to the tool so it can recognize all the  
possible valid elements.  In geronimo, we have a really bad  
workaround to this where we ignore validation errors (which show up  
as NPEs or assertion errors) when the validator encounters a concrete  
type/ substitution element it doesn't recognize.


2. We may be using the same bad workaround to allow you to include a  
persistence.xml document in your plan and have treated as an  
alternate gbean definition.  I might have fixed this to explicitly  
allow this element in our plans in the appropriate places, I don't  
recall.


Also, the geronimo deployer does a lot of xml fixup, namespace  
substitution, etc to allow you to deploy with plans that are not  
valid as written.  This is how we try to provide support for  
deployment of older plan schemas.  You may want to consider using  
some of that code in any validation or editor code.


thanks
david jencks

On May 23, 2007, at 5:05 AM, Shiva Kumar H R wrote:


Thanks for the comments Kanchana.

I did a quick search for tools to validate XML against multiple  
schema and I found this interesting: http://xmlbeans.apache.org/ 
docs/2.0.0/guide/tools.html#validate


After including XMLBeans' bin directory under 'Path', I tried these:
1) Used 'dayTrader-plan.xml' available from WAS-CE v1.1.0.1 samples  
and ran
validate AG-install-dir\schema\geronimo-application-1.1.xsd e: 
\dayTrader-plan.xml

and it said,
e:\dayTrader-plan.xml valid.

2) Introduced an error in dayTrader-plan.xml (removed  
dep:artifactId element) and ran the above validate command. As  
expected it threw below errors:


e:\dayTrader-plan.xml NOT valid.
e:\dayTrader-plan.xml:6:7: error: cvc-complex-type.2.4a: Expected  
element '[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/ 
deployment-1.1 ' instead of '[EMAIL PROTECTED]://geronimo.apache.org/xml/ 
ns/deployment-1.1' here in element moduleId@ http:// 
geronimo.apache.org/xml/ns/deployment-1.1

...

Is this what you were looking for?

- Shiva

On 5/22/07, Kanchana Welagedara  [EMAIL PROTECTED] wrote:
Hi Shiva

Went through the proposal posted.Also believe Creating or updating of
Geronimo Deployment Plans has always been a tedious and erroneous task
since in geronimo, user has to work on so much of manual editing in
deployment plans.So it's obvious new users find problems and issues  
when

it comes to correctly creating Geronimo deployment plans.Also user has
no way to verify the deployment plan before the deployment process
starts.Deployment errors are tracked at the level of deployment.How
about a adding a deployment plan validator(setting the xsd in the xml
file and using the schema location) feature in this proposal for the
people who used to create deployment plans manually and can reuse  
it for
future developments.Because it will take time to come out this  
proposal

as a product.

Regards
Kanchana

On Tue, 2007-05-22 at 10:29 +0530, Shiva Kumar H R wrote:
 As recommended by Hernan, I have moved the proposal wiki page
 (mentioned at the beginning of mail chain) to another space. Please
 use this new link for accessing it:
 http://cwiki.apache.org/GMOxDEV/geronimo-deployment-plans-how-to- 
simplify-creation-or-updation.html


 - Shiva

 On 5/22/07, Shiva Kumar H R  [EMAIL PROTECTED]  wrote:
 Great. Thanks for your valuable comments Mark.

 As you suggest a tool/wizard for auto creating Geronimo
 Deployment Plan by scanning the corresponding Java-EE
 plan/annotation would fit best within Admin Console,  
may be

 as an extension to the Deploy New tool.

 In addition, as you point out, it could also be useful to
 enable Developers to specify Geronimo specific deployment
 information through Annotations (may be as JSR-175  
annotations

 instead of XDoclet based Annotations). One our Committers
 'Sachin Patel' had started one such discussion
 http://www.mail-archive.com/[EMAIL PROTECTED]/ 
msg39760.html . Your feedback here has  helped clarify that  
discussion also.


 Thanks again Mark. User feedbacks have always been Gold  
Mines.

 Please keep pouring your suggestions and feedback in future.

 If I understand correctly David Jencks, Aaron Mulder, David
 Blevins, Tim McConnell and Others are the experts in  
Geronimo
 Deployment Plans and Annotations. It would be valuable if  
they

 too can post their view on this.

 Thanks,
 Shiva


 On 5/21/07, Mark Aufdencamp [EMAIL PROTECTED]  wrote:
 It's definitely needed!  I'm the Architecture/ 
Project
 Manager type with twenty years in the business.   
I've

 been engaged in re-learning the JEE stack

Re: Different Exception during deploy this time

2007-05-23 Thread David Jencks

oops, too many things going on at once here

This nasty and remarkably uninformative exception usually occurs  
because some other exception occurred and was ignored earlier in your  
app deployment.  IIRC I haven't found a way to get tomcat to tell you  
what the problem is rather than blythely continuing on as if nothing  
is wrong, and then presenting this misleading exception.  IIRC I have  
always been forced to debug through the tomcat deployment code to  
find out what is wrong.


It's possible my memory is bad that if you make sure logging is set  
high enough and scour your geronimo log or command line console  
tomcat actually does hint at the cause earlier.


thanks
david jencks

On May 23, 2007, at 8:16 AM, Doug Lochart wrote:

I looked into the code where the exception is occuring and it seems  
to be choking (Null Pointer Exception) on the context.  Evidently  
the context is null.  I see there is a setContext() method on the  
TomcatWebAppContext.java class but do not know where it is called  
from.


I am focusing on the following part of the stack trace I recieved.

java.lang.NullPointerException
  at java.util.Hashtable.put(Hashtable.java:630)
  at org.apache.naming.resources.DirContextURLStreamHandler.bind 
(DirContextURLStreamHandler.java:233)
  at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart 
(TomcatWebAppContext.java:443)
  at  
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance 
(GBeanInstance.java:981)
   Am I correct in thinking it is a null context OR that part of  
the context is null?  Any idea what would cause this?  I do NOT  
have a geronimo-web.xml in the WAR that is deployed with the ear.   
This is the web.xml that is in the WAR.


?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http:// 
www.w3.org/2001/XMLSchema-instance id=WebApp_ID version=2.4  
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http:// 
java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
   display-nameHTTP router for FrancePolicyServer_EJB.jar/ 
display-name
   display-nameHTTP router for FrancePolicyServer_EJB.jar/ 
display-name

   servlet
   display-nameWeb services Router servlet for port-component  
FrancePolicyService/display-name
   display-nameWeb services Router servlet for port-component  
FrancePolicyService/display-name

   servlet-nameFrancePolicyService/servlet-name
   servlet- 
classcom.ibm.ws.webservices.engine.transport.http.WebServicesServlet 
/servlet-class

   /servlet
   servlet-mapping
   servlet-nameFrancePolicyService/servlet-name
   url-patternservices/FrancePolicyService/url-pattern
   /servlet-mapping
/web-app

see double instances for display-name and I am wondering could that  
be the cause of anything.  If so it should have choked during  
deployment and not at runtime.
This is what was generated my the tool I have to use.  Believe it  
or not this is one of 3 xml files that make up the entire contents  
of the WAR.  The WebServicesServlet class is in the jar that I  
installed as a common lib.  The other 2 xml docs are WAS 6.0  
specific so should be ignored.  I may take David's advice and try  
to deploy again without the WAR but as of now the powers that be  
want to to try the whole shebang.  I have a feeling the servlet  
routing class will need the WAS files to route the service requests  
anyway.


Anybody know what might cause the NPE?  I will try and deploy  
without the WAR next


thanks

Doug



Doug Lochart wrote:
Anybody have any idea what might cause this exception?  Since the  
Ear deployed and it is trying to start I would assume it is  
something with the EAR however I find it odd that a root cause is  
a Null Pointer Exception.  Do any one of you developers know the  
area of code the NPE is occurring and what might be causing it?


thanks

Doug

Doug Lochart wrote:
I used the webconsole and added it to Common Libs.  It ended up  
creating a directory under the repository named dlochart (not  
sure where it got that from) and dropped the jar under the name I  
gave it.  I looked and I saw axis so i blindly followed and added  
this to my plan.


sys:dependency
sys:groupIdgeronimo/sys:groupId
sys:artifactIdsharedlib/sys:artifactId
sys:typecar/sys:type
 /sys:dependency

I still received the same exception so I looked again and I saw  
there was an axis under geronimo which told me that I need to  
sdjust my dependency so I guessed it would need to be this:


sys:dependency
sys:groupIddlochart/sys:groupId
sys:artifactIdibm-runtime/sys:artifactId
sys:typejar/sys:type
 /sys:dependency

Am I correct on this considering I have a jar under  
$geronimo_home/repositories/dlochart/ibm-runtime/6.1.0 ?


Either way I recieved the same exception as below.  Any idea what  
the exception might mean?


thanks


org.apache.geronimo.kernel.config.LifecycleException: start of  
france/FrancePolicyServerEar/1.0/car failed

Re: Library problem with Geronimo 2 M5

2007-05-24 Thread David Jencks
NCDFE generally means that the class that depends on the missing  
class is present in a parent classloader that doesn't have access to  
the needed class.  Can you figure out which class is trying to load  
the dom4j class?  If so you might be able to figure out which  
classloader has loaded that class.  Also, are you using the jetty or  
tomcat geronimo version?  You might try the other one to see if  
there's a difference in behavior.


thanks
david jencks

On May 23, 2007, at 12:11 PM, Christopher Gibbs wrote:


Hello all,

I'm fairly new to Geronimo but I'm trying to deploy Atlassian's
Confluence 2.5.2 war file to Geronimo 2 M5.

I can successfully deploy it to Geronimo 1.1.1 but when I try it
Geronimo 2 M5 I get the following error:
13:26:52,539 ERROR [[/confluence]] Exception sending context
initialized event to listener instance of class
com.atlassian.confluence.setup.ConfluenceConfigurationListener
java.lang.NoClassDefFoundError: org/dom4j/Element

I can see that it's not finding the dom4j library but what I don't
know is why. The library file exists within the confluence .war file
WEB-INF/lib directory. Is there something I should have in my
geronimo-web.xml file to set the library/class path?

Here is my current geronimo-web.xml:

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;
   environment
   moduleId
   groupIdatlassian/groupId
   artifactIdconfluence/artifactId
   version2.5.2/version
   /moduleId
   dependencies
   dependency
   groupIdconsole.dbpool/groupId
   artifactIdConfluencePool/artifactId
   /dependency
   /dependencies
   /environment
   context-root/confluence/context-root
   !-- security settings, if any, go here --
   resource-ref
   ref-namejdbc/ConfluenceDS/ref-name
   resource-linkConfluencePool/resource-link
   /resource-ref
/web-app

Any help is appreciated!

- Chris




Re: AJP Issues

2007-05-27 Thread David Jencks
We haven't hooked up ajp in jetty6 yet, so if you need ajp you could  
supply a patch :-) or you will need to use tomcat until someone else  
fixes it.


thanks
david jencks

On May 27, 2007, at 4:13 AM, Giulio Ferro wrote:


Scenario:
freebsd 6.2 stable + java native (diablo) diablo-jdk-1.5.0.07.01_4
+ Geronimo jetty6 2.0M5

When I try to create a AJP Connector from the console this is what
I get:

-
java.lang.NullPointerException
   at  
org.apache.geronimo.console.apache.jk.AJPHandler.actionBeforeView 
(AJPHandler.java:52)
   at org.apache.geronimo.console.MultiPagePortlet.processAction 
(MultiPagePortlet.java:114)
   at org.apache.pluto.core.PortletServlet.dispatch 
(PortletServlet.java:229)
   at org.apache.pluto.core.PortletServlet.doGet 
(PortletServlet.java:158)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
   at org.apache.pluto.core.PortletServlet.service 
(PortletServlet.java:153)
   at org.mortbay.jetty.servlet.ServletHolder.handle 
(ServletHolder.java:467)
   at  
org.apache.geronimo.jetty6.InternalJettyServletHolder.handle 
(InternalJettyServletHolder.java:65)
   at org.mortbay.jetty.servlet.ServletHandler.handle 
(ServletHandler.java:367)
   at org.mortbay.jetty.security.SecurityHandler.handle 
(SecurityHandler.java:216)
   at  
org.apache.geronimo.jetty6.handler.JettySecurityHandler.handle 
(JettySecurityHandler.java:133)
   at org.mortbay.jetty.servlet.SessionHandler.handle 
(SessionHandler.java:181)
   at  
org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle 
(ThreadClassloaderHandler.java:46)
   at  
org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle 
(InstanceContextHandler.java:67)
   at org.mortbay.jetty.handler.ContextHandler.handle 
(ContextHandler.java:715)
   at org.mortbay.jetty.webapp.WebAppContext.handle 
(WebAppContext.java:405)
   at org.mortbay.jetty.servlet.Dispatcher.include 
(Dispatcher.java:192)
   at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke 
(PortletInvokerImpl.java:120)
   at org.apache.pluto.invoker.impl.PortletInvokerImpl.action 
(PortletInvokerImpl.java:68)
   at org.apache.pluto.PortletContainerImpl.processPortletAction 
(PortletContainerImpl.java:164)
   at  
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPo 
rtletAction(PortletContainerWrapperImpl.java:82)

   at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
   at org.mortbay.jetty.servlet.ServletHolder.handle 
(ServletHolder.java:467)
   at  
org.apache.geronimo.jetty6.InternalJettyServletHolder.handle 
(InternalJettyServletHolder.java:65)
   at org.mortbay.jetty.servlet.ServletHandler.handle 
(ServletHandler.java:367)
   at org.mortbay.jetty.security.SecurityHandler.handle 
(SecurityHandler.java:216)
   at  
org.apache.geronimo.jetty6.handler.JettySecurityHandler.handle 
(JettySecurityHandler.java:133)
   at org.mortbay.jetty.servlet.SessionHandler.handle 
(SessionHandler.java:181)
   at  
org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle 
(ThreadClassloaderHandler.java:46)
   at  
org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle 
(InstanceContextHandler.java:58)
   at org.mortbay.jetty.handler.ContextHandler.handle 
(ContextHandler.java:715)
   at org.mortbay.jetty.webapp.WebAppContext.handle 
(WebAppContext.java:405)
   at  
org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle 
(ComponentContextHandler.java:47)
   at org.mortbay.jetty.handler.ContextHandlerCollection.handle 
(ContextHandlerCollection.java:211)
   at org.mortbay.jetty.handler.HandlerCollection.handle 
(HandlerCollection.java:114)
   at org.mortbay.jetty.handler.HandlerWrapper.handle 
(HandlerWrapper.java:139)

   at org.mortbay.jetty.Server.handle(Server.java:285)
   at org.mortbay.jetty.HttpConnection.handleRequest 
(HttpConnection.java:470)
   at org.mortbay.jetty.HttpConnection 
$RequestHandler.headerComplete(HttpConnection.java:792)

   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:510)
   at org.mortbay.jetty.HttpParser.parseAvailable 
(HttpParser.java:208)
   at org.mortbay.jetty.HttpConnection.handle 
(HttpConnection.java:359)
   at org.mortbay.jetty.bio.SocketConnector$Connection.run 
(SocketConnector.java:226)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run 
(BoundedThreadPool.java:442)

-

Geronimo-tomcat (same version) works ok.

Is it something freebsd related or there's some bug in the release?

Thanks in advance.




Re: How do I put Resource Reference in openejb-jar.xml?

2007-05-27 Thread David Jencks


On May 27, 2007, at 6:35 AM, ptriller wrote:



Well,  that solves the problem, but I am deploying quite a number of
EJBs in my app, (namely MDBs listening to a Topic) and I really would
like to avoid to have to map the same resource 20 times. Is there
any global mapping possible as it is in the geronimo-web.xml ?


David Blevins may have introduced something like this for OpenEJB3 in  
geronimo trunk, I'm not sure. There's nothing like this in geronimo  
1.x.  However if you name the resource the same as the resource-ref  
you can just leave out the resource-ref in the geronimo plan.


That is,

  resource-ref
  ref-namejdbc/MyFooDataSource/ref-name
  resource-linkjdbc/MyFooDataSource/resource-link
  /resource-ref

can be omitted.

thanks
david jencks




Thanks


Peter



Aaron Mulder wrote:


The resource-ref element needs to go inside the session, entity, or
message-driven element for the EJB that declares the resource
reference.  It looks like you have it as a direct child of openejb- 
jar

instead.

Thanks,
Aaron

On 2/14/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Hi, all, many thanks in advance first.

I am try to deploy an EAR file that contains an EJB jar, I put

  resource-ref
  ref-namejdbc/MyDataSource/ref-name
  resource-linkjdbc/MyRealDataSource/resource- 
link

  /resource-ref

in META-INF/openejb-jar.xml and got the following error message upon
deployment

Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
descriptor:
[error: cvc-complex-type.2.4a: Expected elements
'[EMAIL PROTECTED]://www.openejb.org/xml/ns/openejb-jar-2.0
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/naming-1.0
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/security-1.1
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.0' instead of
'[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/naming-1.0' here]
Descriptor: xml-fragment configId=myejb
xmlns:open=http://www.openejb.org/xml/ns/openejb-jar-2.0;
xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.0;
  open:enterprise-beans
open:session
  open:ejb-nameSomeEJBService/open:ejb-name
  open:jndi-nameejb/com/somwhere/SomeEJBHome/open:jndi-name
/open:session
  /open:enterprise-beans
  nam:resource-ref
nam:ref-namejdbc/MyDataSource/nam:ref-name
nam:resource-linkjdbc/MyRealDataSource/nam:resource-link
  /nam:resource-ref
/xml-fragment
at
org.apache.geronimo.schema.SchemaConversionUtils.validateDD 
(SchemaConversionUtils.java:594)

at
org.apache.geronimo.schema.SchemaConversionUtils.fixGeronimoSchema 
(SchemaConversionUtils.java:365)

at
org.openejb.deployment.OpenEJBModuleBuilder.getOpenejbJar 
(OpenEJBModuleBuilder.java:261)

... 34 more







--
View this message in context: http://www.nabble.com/How-do-I-put- 
Resource-Reference-in-openejb-jar.xml--tf1123024s134.html#a10824831
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: method to check for existence of a module?

2007-05-29 Thread David Jencks
I'm not sure what you are trying to find out: there are at least  
three possible states for a module


- in the repo
- loaded in the kernel
- running.

First you need a kernel.  If your code is in a gbean you can get it  
as a gbean attribute.  Otherwise you can use  
KernelRegistry.getSingleKernel() (unless you are running more than  
one kernel in the vm, something I think no one has done yet)


Then

ConfigurationManager configurationManager =  
ConfigurationUtil.getConfigurationManager(kernel);

Artifact moduleId = Artifact.create(mycom/myapp/1.0/car);
configurationManager.isInstalled(moduleId);
configurationManager.isLoaded(moduleId);
configurationManager.isRunning(moduleId);

Another approach in a gbean is to have a collection valued reference  
of type Configuration and put the name of the desired configuration  
in the plan: then your code can check the cardinality of the  
collection to see if the other configuration is running.


thanks
david jencks


On May 29, 2007, at 9:42 AM, pgrey wrote:


Is there a way to ask the Geronimo container whether or not a specific
module (by name) is deployed.  I'd like to do something like

String moduleId = mycom/myapp/1.0/car;
if (moduleExists(moduleId) {
doSomething();
} else {
doSomethingElse();
}

Possibly the class
org.apache.geronimo.kernel.repository.DefaultArtifactResolver will  
provide
this functionality, but I have fiddled with it a bit and it doesn't  
seem

immediately apparent exactly how to use it.

Thanks all...







Re: Safe shutdown

2007-05-29 Thread David Jencks


On May 29, 2007, at 3:09 PM, Mark Aufdencamp wrote:

I would guess this probably depends on your application, but it  
doesnt sound like a good idea.  I would think that an EJB container  
would need to be able to safely complete transactions and passivate/ 
deallocate it's Beans particular CMP Entity Beans.  The Web  
container might also maintain Application scoped information that  
needs a clean safe shutdown as well.


However, both the shutdown jar or console command and hitting ctrl-c  
on your console have approximately the same effect in code -- calling  
the shutdown hook that stops and unloads all the running  
configurations in reverse order of their starting.If your  
application uses transactions properly any kind of shutdown shouldn't  
result in data corruption, but you may lose partially computed  
results in process.  We don't make any attempt I'm aware of to finish  
processing in flight requests before turning off a gbean.


thanks
david jencks


Mark Aufdencamp
[EMAIL PROTECTED]


 Original Message 
Subject: Safe shutdown
From: Joel Spotts [EMAIL PROTECTED]
Date: Tue, May 29, 2007 5:05 pm
To: user@geronimo.apache.org

Is there any danger in stopping geronimo by simply killing the  
application as opposed to running the shutdown.jar or shutdown.bat?  
For various reasons (which I can get into if the answer is that it  
is not safe) I cannot easily stop the server with the shutdown tool.


Thanks,

Yoel Spotts




Re: Safe shutdown

2007-05-30 Thread David Jencks
I don't immediately see why this is happening but also don't see a  
likely way out.  One approach might be to write a couple classes that  
are basically scripts that start the appropriate jar in a new vm.


thanks
david jencks

On May 30, 2007, at 5:03 AM, Joel Spotts wrote:


I should probably go into more detail the issue we are having:

We are wrapping Geronimo in a windows service using JavaService  
(http://forge.objectweb.org/projects/javaservice/). It is similar  
to Java Service Wrapper. You can specify the java class path as a  
systme property when the application the service wraps startsup and  
shuts down. You also provide the start class as well as optionally  
the stop class. You can only provide one classpath -- to be used  
for the start class as well as the stop class. So we configure the  
start class as org.apache.geronimo.system.main.Daemon and for the  
stop class: org.apache.geronimo.deployment.cli.StopServer. In order  
for that stop method to be on the classpath we configure the  
classpath as follows:


bin/server.jar;bin/shutdown.jar. If we leave out shutdown.jar, the  
StopServer.jar is missing.


So far so good, and that works out ok, but here is the rub: hot  
deployment will not work. We get the dreaded ClassNotFOundException:


Exception in thread Geronimo hot deploy scanner  
java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/ 
plugin/ConfigIDExtractor

at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass 
(SecureClassLoader.java:124)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at  
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass 
(MultiParentClassLoader.java:227)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at  
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass 
(MultiParentClassLoader.java:227)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at  
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass 
(MultiParentClassLoader.java:227)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at  
org.apache.geronimo.deployment.hot.DirectoryMonitor.calculateModuleId( 
DirectoryMonitor.java:358)
at org.apache.geronimo.deployment.hot.DirectoryMonitor.initialize 
(DirectoryMonitor.java:230)
at org.apache.geronimo.deployment.hot.DirectoryMonitor.run 
(DirectoryMonitor.java:206)

at java.lang.Thread.run(Thread.java:619)

There seems to be some sort of class loader clash.

Now, if we remove the server.jar from the classpath, hot deployment  
works just fine, but of course we can't use the shutdown class  
then. That prompted my original question. The JavaService states:
If no stop_class is specified, the process containing the Virtual  
Machine is simply terminated when the service is stopped.


I do notice much less logging when removing the stop class, so it  
seems like the shutdown hooks are not called.


So do I have any options to get both the shutdown hook and hot  
deployment?


Thanks,

Yoel Spotts
graycol.gif
David Jencks [EMAIL PROTECTED]


David Jencks [EMAIL PROTECTED]
05/29/2007 07:18 PM
Please respond to
user@geronimo.apache.org

ecblank.gif

To
ecblank.gif

user@geronimo.apache.org
ecblank.gif

cc
ecblank.gif

ecblank.gif

Subject
ecblank.gif

Re: Safe shutdown
ecblank.gif
ecblank.gif

On May 29, 2007, at 3:09 PM, Mark Aufdencamp wrote:

I would guess this probably depends on your application, but it  
doesnt sound like a good idea.  I would think that an EJB container  
would need to be able to safely complete transactions and passivate/ 
deallocate it's Beans particular CMP Entity Beans.  The Web  
container might also maintain Application scoped information that  
needs a clean safe shutdown as well.


However, both the shutdown jar or console command and hitting ctrl- 
c on your console have approximately the same effect in code --  
calling the shutdown hook that stops and unloads all the running  
configurations in reverse order of their starting.If your  
application uses transactions properly any kind of shutdown  
shouldn't result in data corruption, but you may lose partially  
computed results in process.  We don't make any attempt I'm aware  
of to finish processing in flight requests before turning off a gbean.


thanks
david jencks

Mark Aufdencamp
[EMAIL PROTECTED]


 Original Message 
Subject: Safe shutdown
From: Joel Spotts [EMAIL PROTECTED

Re: Login Module not found

2007-05-31 Thread David Jencks


On May 31, 2007, at 7:20 AM, MoleSon wrote:



Hello out there!

I have a problem with the login system of my enterprise  
application. I need
to install an application, that is meant to run on a Websphere App  
Server

5.1 on a Websphere CE (- Geronimo).
Here is my problem:
Deploying works fine, but I am not able to log in to my  
application. For the
login process I use JAAS and the login modules developed by our  
company.

When I try to log in following exception occurs:
GeronimoSecurityException: Unable to instantiate login module
caused by
ClassNotFoundException: MyLoginClassFile
I have set the environment variables:
java.security.auth.login.config
java.security.policy


Don't set these environment variables.  They won't help and might  
break the geronimo login configuration mechanism.  At best they will  
be confusing.  If you have specific needs for them, that might  
require another discussion.


And I have created a security realm, which is referenced by my  
web.xml file.

I found a forum where somebody with a similar problem got suggested to
deploy the authentification files seperatly to the server, but this  
is not
possible, because they reference ejbs and classes from all over the  
project.
I am working on this for days now and have really searched every  
forum I

found about this topic.
Would be really happy if somebody could help me.


If you could outline the structure of the project and indicate  
exactly where you've specified the security realm that would be  
helpful. Since you mention ejbs I assume that you are deploying an  
ear. In geronimo, for an ear, there is one ear classloader that  
includes all the ejb jar and rar classes, together with the stuff  
pointed to by manifest class-paths, and then each web app gets  
another, child, classloader.  So, if the security realm definition is  
in the geronimo-application.xml or an openejb-jar.xml plan, all the  
classes it needs need to be in ejb jars, rars, or jars in the  
manifest classpath of these.  If the security realm definition is in  
the geronimo-web.xml then it can use classes from that war and the  
ejb jars and wars and manifest classpaths, but not other wars.


Hope this helps
david jencks




Regards, Sascha

--
View this message in context: http://www.nabble.com/Login-Module- 
not-found-tf3846639s134.html#a10894283
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Sun Jsf and Geronimo

2007-05-31 Thread David Jencks


On May 31, 2007, at 3:37 PM, Don Hill wrote:


Hi,

I have actually written the JSF-RI modules for geronimo, I am still  
testing them. I have successfully tested some sample apps and they  
seem to work fine, a starting point anyways.


Did you implement their AnnotationProcessor interface?

thanks
david jencks



Don

On 4/24/07, Donald Woods [EMAIL PROTECTED] wrote:
You can also download and try one of the daily builds that Prasad  
posts

to the [EMAIL PROTECTED] mailing list -

 Original Message 
Subject: [BUILD] TRUNK: Successful for Revision: 532103
Date: 24 Apr 2007 22:32:43 -
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

OpenEJB trunk at 532101
Geronimo Revision: 532103 built with tests skipped

See the full build-1800.log file at
http://people.apache.org/~prasad/binaries/20070424/build-1800.log
Download the binaries from
http://people.apache.org/~prasad/binaries/20070424



Arinté wrote:
 I have tried installing the jsf files through geronimo and  
including in the

 war file and they both give the same error.

 Paul McMahan [EMAIL PROTECTED] wrote
 in message news:[EMAIL PROTECTED] ...
 Hello,  How are you trying to use the sun jsf impl?  For example are
 you including it in your WEB-INF/lib?  If so then I don't expect  
that

 would work since Geronimo filters the jsf classes from a webapps
 classloader.  This is a result of the JSF 1.2 specification 10.2.5
 and 10.2.6 which says that webapps should not include the jsf  
classes

 in their archive.  As we move forward I think it would be a great
 idea to make the jsf implementation pluggable, but this will  
probably
 be done by using Geronimo's plugin system instead of bundling the  
JSF

 jars in a webapp's archive due to this language in the specification
 and because of jsf implementation-specific functionality like
 resource injection for managed beans.

 The jsf support in Geronimo 2.0-M4 is more complete so I think  
you'll

 have better luck with it.  However, that version has not been
 officially released yet so you will need to build it from svn tag or
 look in the [EMAIL PROTECTED] archive for the announcement of M4 release
 candidate binaries.

 Best wishes,
 Paul


 On Apr 23, 2007, at 7:52 AM, Arinté wrote:

 I am trying to run sun jsf impl 1.2 on Geronimo, but I keep  
running  into

 errors, is it even possible?  My current error is this:
 javax.servlet.ServletException:
 org/apache/commons/lang/builder/HashCodeBuilder
 at javax.faces.webapp.FacesServlet.service  
(FacesServlet.java:152)

 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
 (ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter
 (ApplicationFilterChain.java :206)

 Even though I have commons lang in my geronimo.xml.  Also, when  
I  export

 this project to just plain tomcat 6 it works without me adding the
 commons
 lang jar file anywhere, meaning I don't think sun uses it, but  
somehow

 myfaces is getting injected in here.

 Any tips or guides on getting this working?  I am using Geronimo  
2 M3.

 Thanks















Re: Library problem with Geronimo 2 M5

2007-05-31 Thread David Jencks


On May 31, 2007, at 3:23 PM, Don Hill wrote:


Hi,

I have also hit this today and seems to me that the issue is the  
jaxen jar located in the parent classloader, and I think jaxen also  
has a reference to dom4j if your using the XPATH stuff. I have tto  
use dependency entries in geronimo-web.xml but that doesn't seem to  
work.


Dave, Is there a way to isolate or load web-inf classes first,  
seems the inverse entry has gone away, at least its commented out  
in the schema?


All our classloaders can now load their classes child-first, by  
setting the

inverse-classloading/

 element in the environment element.

david jencks



Don

On 5/24/07, David Jencks [EMAIL PROTECTED] wrote:
NCDFE generally means that the class that depends on the missing
class is present in a parent classloader that doesn't have access to
the needed class.  Can you figure out which class is trying to load
the dom4j class?  If so you might be able to figure out which
classloader has loaded that class.  Also, are you using the jetty or
tomcat geronimo version?  You might try the other one to see if
there's a difference in behavior.

thanks
david jencks

On May 23, 2007, at 12:11 PM, Christopher Gibbs wrote:

 Hello all,

 I'm fairly new to Geronimo but I'm trying to deploy Atlassian's
 Confluence 2.5.2 war file to Geronimo 2 M5.

 I can successfully deploy it to Geronimo 1.1.1 but when I try it
 Geronimo 2 M5 I get the following error:
 13:26:52,539 ERROR [[/confluence]] Exception sending context
 initialized event to listener instance of class
 com.atlassian.confluence.setup.ConfluenceConfigurationListener
 java.lang.NoClassDefFoundError: org/dom4j/Element

 I can see that it's not finding the dom4j library but what I don't
 know is why. The library file exists within the confluence .war file
 WEB-INF/lib directory. Is there something I should have in my
 geronimo-web.xml file to set the library/class path?

 Here is my current geronimo-web.xml:

 ?xml version= 1.0 encoding=UTF-8?
 web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;
environment
moduleId
groupIdatlassian/groupId
artifactIdconfluence/artifactId
version2.5.2/version
/moduleId
dependencies
dependency
groupIdconsole.dbpool/groupId
artifactIdConfluencePool/artifactId
/dependency
/dependencies
/environment
context-root/confluence/context-root
!-- security settings, if any, go here --
resource-ref
ref-namejdbc/ConfluenceDS/ref-name
resource-linkConfluencePool/resource-link
/resource-ref
 /web-app

 Any help is appreciated!

 - Chris






Re: Sun Jsf and Geronimo

2007-06-01 Thread David Jencks


On Jun 1, 2007, at 7:37 AM, Don Hill wrote:


David,

I have some cycles to spend on the annotation impl now, can you  
give me a little guidance in how you think we should implement this  
for JSF-RI, I saw something on jetty annotations, does this pertain  
to this topic.


Of course in my opinion the best solution is to convince the ri to  
adopt the same kind of interface we are using for MyFaces, tomcat,  
and, almost, jetty.  However I doubt this is likely :-)


I would look in geronimo-myfaces to see how we set up MyFaces.  The  
only hard part is that you have to come up with some code to install  
the injections into an existing instance.  I would look at borrowing  
code from xbean-reflect to support this.  I don't have an opinion yet  
on whether this support should be in xbean-reflect itself or in the  
jsf-ri integration. Maybe Dain and/or David Blevins have an opinion?


thanks
david jencks



Don

On 5/31/07, David Jencks [EMAIL PROTECTED] wrote:

On May 31, 2007, at 3:37 PM, Don Hill wrote:


Hi,

I have actually written the JSF-RI modules for geronimo, I am  
still testing them. I have successfully tested some sample apps  
and they seem to work fine, a starting point anyways.


Did you implement their AnnotationProcessor interface?

thanks
david jencks



Don

On 4/24/07, Donald Woods  [EMAIL PROTECTED] wrote:
You can also download and try one of the daily builds that Prasad  
posts

to the [EMAIL PROTECTED] mailing list -

 Original Message 
Subject: [BUILD] TRUNK: Successful for Revision: 532103
Date: 24 Apr 2007 22:32:43 -
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

OpenEJB trunk at 532101
Geronimo Revision: 532103 built with tests skipped

See the full build-1800.log file at
http://people.apache.org/~prasad/binaries/20070424/build-1800.log
Download the binaries from
http://people.apache.org/~prasad/binaries/20070424



Arinté wrote:
 I have tried installing the jsf files through geronimo and  
including in the

 war file and they both give the same error.

 Paul McMahan [EMAIL PROTECTED] wrote
 in message news:[EMAIL PROTECTED] ...
 Hello,  How are you trying to use the sun jsf impl?  For example  
are
 you including it in your WEB-INF/lib?  If so then I don't expect  
that

 would work since Geronimo filters the jsf classes from a webapps
 classloader.  This is a result of the JSF 1.2 specification 10.2.5
 and 10.2.6 which says that webapps should not include the jsf  
classes

 in their archive.  As we move forward I think it would be a great
 idea to make the jsf implementation pluggable, but this will  
probably
 be done by using Geronimo's plugin system instead of bundling  
the JSF
 jars in a webapp's archive due to this language in the  
specification

 and because of jsf implementation-specific functionality like
 resource injection for managed beans.

 The jsf support in Geronimo 2.0-M4 is more complete so I think  
you'll

 have better luck with it.  However, that version has not been
 officially released yet so you will need to build it from svn  
tag or

 look in the [EMAIL PROTECTED] archive for the announcement of M4 release
 candidate binaries.

 Best wishes,
 Paul


 On Apr 23, 2007, at 7:52 AM, Arinté wrote:

 I am trying to run sun jsf impl 1.2 on Geronimo, but I keep  
running  into

 errors, is it even possible?  My current error is this:
 javax.servlet.ServletException:
 org/apache/commons/lang/builder/HashCodeBuilder
 at javax.faces.webapp.FacesServlet.service  
(FacesServlet.java:152)

 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
 (ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter
 (ApplicationFilterChain.java :206)

 Even though I have commons lang in my geronimo.xml.  Also, when  
I  export

 this project to just plain tomcat 6 it works without me adding the
 commons
 lang jar file anywhere, meaning I don't think sun uses it, but  
somehow

 myfaces is getting injected in here.

 Any tips or guides on getting this working?  I am using  
Geronimo 2 M3.

 Thanks


















Re: Login Module not found

2007-06-04 Thread David Jencks


On Jun 4, 2007, at 12:42 AM, MoleSon wrote:




Don't set these environment variables.

Doesn't make any difference...

Since you mention ejbs I assume that you are deploying an
ear.

Yes, I am deploying an EAR

If you could outline the structure of the project and indicate
exactly where you've specified the security realm that would be
helpful
It is hard to outline the structure of the porject, because it  
contains

about 4000 classes and ca. 30 modules. Generally it is an EAR-file
containing the module .jars and only one .war archive.


Where are the jar(s) containing the login module class and the  
classes it needs to work?



I tried to deploy a
server wide security realm via the administrative console, but this  
did not

work. For now I'm trying to add my security realm configuration to my
geronimo-application.xml file, to deploy it wlith the application  
but I am
not able to get it working because I have no idea where and how to  
put it.

Here is one way I tried it, but geronimo did not like it:
?xml version=1.0 encoding=UTF-8?
application application-name=app
xmlns=http://geronimo.apache.org/xml/ns/j2ee/application-1.1;
xmlns:sec=http://geronimo.apache.org/xml/ns/security-1.1;
xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.1;
sys:environment
...
/sys:environment
module
webWeb.war/web
...
/module
all the other modules
gbean name=realm
class=org.apache.geronimo.security.realm.GenericSecurityRealm
attribute name=realmNamerealm/attribute
reference name=ServerInfo
nameServerInfo/name
/reference
reference name=LoginService
nameJaasLoginService/name
/reference
xml-reference name=LoginModuleConfiguration
log:login-config

xmlns:log=http://geronimo.apache.org/xml/ns/loginconfig-1.1;
log:login-module control-flag=REQUIRED
server-side=true 
wrap-principals=false
log:login-domain-name
realm
/log:login-domain-name
log:login-module-class
ourLoginClass
/log:login-module-class
/log:login-module
/log:login-config
/xml-reference
/gbean
/application


This should work.  Along with telling us exactly where the missing  
classes actually are, and if they aren't in an ejb jar how they get  
into the classpath, please show the stack trace from the  
ClassNotFoundException.


I also tried to add the gbean to the web module part as well as to  
create a

new module that just holds it. - also did not work

That should also work :-)

Could anybody tell me if trying to deploy the securtity realm  
together with
the ear file could help me solve my problem and if yes: how do I do  
that?


What you are trying looks ok to me, so I hope your answers to my  
additional questions will let us see where the problem lies.


thanks
david jencks



Thanks a lot so far, Sascha



djencks wrote:



snip


Re: Maven build error - sourceSchema

2007-06-06 Thread David Jencks
From prasad's build failure it looks like you might have a new  
xmlbeans-maven-plugin-2.0.1-20070605.204758-11.jar

I have xmlbeans-maven-plugin-2.0.1-20070122.162531-10.jar which works.

I haven't really looked at what changed yet.

thanks
david jencks

On Jun 5, 2007, at 7:52 PM, Aman Nanner/MxI Technologies wrote:



I just recently started getting the following build error when  
trying to
build Geronimo 2.0-SNAPSHOT.  Anybody happen to know what would be  
wrong?


---

 [exec] [INFO] [install:install]
 [exec] [INFO] Installing
D:\g20\g\modules\geronimo-deploy-config\target\geronimo-deploy- 
config-2.0-SNAPSHOT.jar

 to
D:\.m2\org\apache\geronimo\modules\geronimo-deploy-config\2.0- 
SNAPSHOT\geronimo-deploy-config-2.0-SNAPSHOT.jar

 [exec] [INFO]
-- 
--

 [exec] [INFO] Building Geronimo :: Service :: Builder
 [exec] [INFO]task-segment: [clean, install]
 [exec] [INFO]
-- 
--

 [exec] [INFO] [clean:clean]
 [exec] [INFO] Deleting directory
D:\g20\g\modules\geronimo-service-builder\target
 [exec] [INFO] Deleting directory
D:\g20\g\modules\geronimo-service-builder\target\classes
 [exec] [INFO] Deleting directory
D:\g20\g\modules\geronimo-service-builder\target\test-classes
 [exec] [INFO] [enforcer:enforce {execution: default}]
 [exec] [INFO]
-- 
--

 [exec] [ERROR] BUILD ERROR
 [exec] [INFO]
-- 
--

 [exec] [INFO] Failed to configure plugin parameters for:
org.codehaus.mojo:xmlbeans-maven-plugin:2.0.1-SNAPSHOT

 [exec] (found static expression:
'geronimo-module-1.2.xsd,geronimo-javabean-xmlattribute-1.0.xsd'  
which may

act
 as a default value).


 [exec] Cause: Cannot assign configuration entry  
'sourceSchemas' to

'interface java.util.List' from 'geronimo-module
-1.2.xsd,geronimo-javabean-xmlattribute-1.0.xsd', which is of type  
class

java.lang.String
 [exec] [INFO]
-- 
--

 [exec] [INFO] For more information, run Maven with the -e switch
 [exec] [INFO]
-- 
--

 [exec] [INFO] Total time: 2 minutes 12 seconds
 [exec] [INFO] Finished at: Tue Jun 05 17:57:12 EDT 2007
 [exec] [INFO] Final Memory: 74M/132M
 [exec] [INFO]
-- 
--


__ 

* This message is intended only for the use of the individual or  
entity to which it is addressed, and may contain information that  
is privileged, confidential and exempt from disclosure under  
applicable law. Unless you are the addressee (or authorized to  
receive for the addressee), you may not use, copy or disclose the  
message or any information contained in the message. If you have  
received this message in error, please advise the sender by reply e- 
mail , and delete the message, or call (collect) 001 613 747 4698. *






Re: 1.2 Bug ClassCastException with Properties

2007-06-07 Thread David Jencks
I opened https://issues.apache.org/activemq/browse/AMQ-1254 to deal  
with a similar problem for org.apache.activemq.kaha.impl.KahaStore.   
I'll try to scrape together some time to add to the patch for this  
property also.


I think we can set the property you've located in a geronimo  
SystemProperties gbean, there's one called ServerSystemProperties in  
j2ee-server.  It would be great if you can open a geronimo jira for  
this problem and even better if you could test out using the  
ServerSystemProperties gbean to fix it.


thanks
david jencks

On Jun 7, 2007, at 10:54 AM, [EMAIL PROTECTED] wrote:


I could not locate a definitive answer on Geronimo's website so could
somebody please post this information where people will see it.
People will be frustrated with Geronimo even though the problem was
not created by the Geronimo team.  The certification news will attract
attention, but people will go away and not come back if their favorite
applications error.

The latest Geronimo 1.2 and 2.0 use ActiveMQ.
ActiveMQ adds a HashMap as a global Property named
org.apache.activeio.journal.active.lockMap.
Global Properties must be Strings.
This causes any code reading all the Properties and expecting  
Strings to error.


I found the error with Cocoon's SitemapVariableHolder for XMAP  
constants:

map:component-configurationsglobal-variables
myConstantHello World/myConstant
/global-variables/map:component-configurations
{global:myConstant} errors

The permanent fix if for Geronimo to update to a better version of
ActiveMQ, either downgrading to before the bug was programmed or wait
for the ActiveMQ team to follow the standards.  That is unlikely to be
tested and released quickly.

The quick fix  is to disable the offensive code.  For Geronimo 1.2 on
Windows, add this line at the beginning of STARTUP.BAT:
SET GERONIMO_OPTS=- 
Dorg.apache.activeio.journal.active.DisableLocking=true

%GERONIMO_OPTS%

solprovider




Re: Passing application server commands

2007-06-07 Thread David Jencks


On Jun 7, 2007, at 12:11 PM, Christopher Gibbs wrote:


Thanks for the help David.

Is there somewhere I can find a list of the gbeans contained within
each module and their options? I ask because I don't have the gbean
ServerSystemProperties anywhere in my config.xml file and I can't
quite seem to make it work.


I think there's a gbean/mbean viewer available somewhere near the  
bottom of the admin console.  Alternatively you can look at the plans  
in configs.


I have tried what you suggested (in both the rmi-naming and the
j2ee-server modules) but I don't know what other properties I need and
Geronimo errors on startup every time.


I don't have a copy of the g. 1.1.1 source handy.  It's quite  
possible that the gbean is named something else (SystemProperties?)  
or in yet another module I haven't thought of yet :-)


Thinking about this more a better  and more self contained solution  
would be to include a SystemProperties gbean to set this property in  
the geronimo plan for this app.  Then you can package confluence as a  
geronimo plugin that won't require additional external  
configuration.  With the current code it's possible that this  
approach would not set the system property before it's read by  
confluence.  If you try this please let us know how it works, it  
should be pretty easy to fix the timing problem at least in 1.2 and 2.0.


hope this helps
david jencks



- Chris

On 6/7/07, David Jencks [EMAIL PROTECTED] wrote:


On Jun 7, 2007, at 7:23 AM, Christopher Gibbs wrote:

 I want to pass a command to Tomcat when Geronimo starts up a  
specific

 application but don't know how to go about doing it.

 I am running Atlassian Confluence 2.5.3 in Geronimo 1.1.1 w/ 
Tomcat and
 need to pass - 
Dconfluence.disable.peopledirectory.anonymous=true to

 Tomcat when Confluence starts up.
 http://confluence.atlassian.com/display/DOC/Hiding+the+People
 +Directory

 Can someone point me in the right direction?

If you start geronimo with your own command line (rather than a
script) you can just include the system property in the command
line.  There's probably a way to do this with our scripts, but I am
not familiar with them.

We also have a SystemProperties gbean class.  If I remember correctly
in g. 1.1.1 there's an instance in the rmi-naming or j2ee-server
module.  You can reconfigure it in var/config/config.xml something
like this:


 gbean name=ServerSystemProperties
  attribute name=systemProperties
   !--copy the existing properties here, I don't have a
copy of 1.1.1 handy to copy from --
  confluence.disable.peopledirectory.anonymous=true
  /attribute
 /gbean

Hope this helps

thanks
david jencks



 Thanks!

 - Chris




--
Christopher Gibbs
Email / LDAP Administrator
Web Integration  Programming
Abilene Christian University




Re: Problems in configuring dependency on EAR

2007-06-08 Thread David Jencks


On Jun 8, 2007, at 4:25 AM, Alex Korostov wrote:



I'm using Geronimo 1.1 and 1.1.1 with Tomcat.

I have a EAR that includes JARs and a WAR. This application works  
fine.


Also I have another (second) WAR application that is NOT included  
in that
EAR, but have to use some classes from the JARs and a WAR resided  
in the

EAR.
I declared dependency on this EAR module in the geronimo-web.xml of  
the
second WAR. However I got the NoClassDefFoundError exceptions when  
trying to

use the classes from EAR's JARs or WAR.
It looks like that by default, if I create a dependency on EAR I  
still do

not have the EAR's classes in the classpath.

Note, that if I have two WARs (not inside EARs), the same  
dependency between

WARs works well. Even classes from the JARs located in the WEB-INF/lib
folder are accessible for the second WAR.


Since this works I think that you have successfully figured out to  
depend on the deployed module car file rather than the undeployed  
war/ear/whatever file.




What should I do to get the same approach work if I need use  
classes from

EAR?


In an ear, we set up one classloader for all the rar and ejb jar  
modules, together with their manifest classpath (I'll call this the  
ear classloader), and one classloader for each war file.  If you have  
a dependency on the ear module you just get the classes in the ear  
classloader.  I don't think it's possible to have a dependency on one  
of the internal war classloaders.  So I think your options are:


- use 2.0-M6 and put all the classes you need in jars in a lib  
directory inside the ear
- use 1.1.1 and add a fake ejb jar that has a deployment descriptor  
but no ejbs.  Either put the classes you need externally in this jar  
or reference the jars in the manifest classpath.


You could also open a jira requesting the ability to depend on wars  
inside ears.


thanks
david jencks



--
View this message in context: http://www.nabble.com/Problems-in- 
configuring-dependency-on-EAR-tf3889208s134.html#a11024722
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Data source problems while deploying EAR

2007-06-08 Thread David Jencks


On Jun 8, 2007, at 8:12 AM, Erik B. Craig wrote:

I'm having a good amount of troubles trying to get an EAR deployed  
from a relatively small Geronimo application on geronimo 1.1.1


Here is the output I'm getting

C:\geronimo-1.1.1\bindeploy --user system --password manager  
deploy c:\j2g-demo

-app\bin\geronimo-application.xml c:\j2g-demo-app\bin\TravelApp.ear
Using GERONIMO_BASE:   C:\geronimo-1.1.1
Using GERONIMO_HOME:   C:\geronimo-1.1.1
Using GERONIMO_TMPDIR: C:\geronimo-1.1.1\var\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.5.0_11
Error: Unable to distribute TravelApp.ear: Unable to resolve
resource reference 'jdbc/DefaultDS' (Could not auto-map to  
resource.

 Try adding a resource-ref mapping to your Geronimo deployment
plan.)


I'm relatively sure this issue is coming from the openejb-jar.xml  
file, and in the cmp-connection-factory resource-link tag at that.

Here is that segment of that particular XML
  naming:cmp-connection-factory
naming:resource-linkDefaultDS/naming:resource-link
  /naming:cmp-connection-factory


This isn't a jndi based resource-ref, so it's not the source of the  
problem.  In 1.1.1 we also never try to add standard prefixes like  
jdbc/ for datasources.


(The reason I believe it to be here is due to the fact that  
changing defaultds in that tag changes the defaultds in the  
deployment error)

Are you sure?

I think the problem might be that in the spec dd one of your resource- 
refs is for jdbc/DefaultDS whereas in the plan below you map jdbc/ 
TravelDB


just a guess...
Personally I usually set up a database pool with the same name as in  
the resource-ref itself so I don't have to do the mapping since it is  
such a pain to set up.


thanks
david jencks



I've tried to do as it recommends, with adding a resource-ref  
mapping, but can't quite figure out the proper location/syntax for it


I'm GUESSING there is something that I'm just missing due to  
inexperience, and am hoping one of you guys that's a good deal more  
seasoned might be able to point it out ot me.


Thanks!

For reference here is a copy of the entire openejb-jar.xml file.
-
?xml version=1.0 encoding=UTF-8?

openejb-jar xmlns= http://www.openejb.org/xml/ns/openejb-jar-2.1;  
xmlns:naming=http://geronimo.apache.org/xml/ns/naming-1.1   
xmlns:security=http://geronimo.apache.org/xml/ns/security-1.1;  
xmlns:sys= http://geronimo.apache.org/xml/ns/deployment-1.1;

  sys:environment
sys:moduleId
  sys:groupIdj2g.java/sys:groupId
  sys:artifactIdejb-module/sys:artifactId
  sys:version1.0/sys:version
  sys:typejar/sys:type
/sys:moduleId
sys:dependencies
sys:dependency
  sys:groupIdj2g/sys:groupId
  sys:artifactIdjms/sys:artifactId
  sys:version1.0/sys:version
  sys:typerar/sys:type
/sys:dependency
sys:dependency
sys:groupId j2g.java/sys:groupId
sys:artifactIdDefaultDS/sys:artifactId
/sys:dependency
sys:dependency
  sys:groupIdj2g/sys:groupId
  sys:artifactIdsecurity/sys:artifactId
  sys:version1.0/sys:version
  sys:typerar/sys:type
/sys:dependency
/sys:dependencies
  /sys:environment
  naming:cmp-connection-factory
naming:resource-linkDefaultDS/naming:resource-link
  /naming:cmp-connection-factory
  enforce-foreign-key-constraints/
  enterprise-beans
entity
  ejb-nameCustomerEJB/ejb-name
  table-nameCustomer/table-name
  cmp-field-mapping
cmp-field-nameid/cmp-field-name
table-columnID/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namelastName/cmp-field-name
table-columnLAST_NAME/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namefirstName/cmp-field-name
table-columnFIRST_NAME/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-nameemail/cmp-field-name
table-columnEMAIL/table-column
  /cmp-field-mapping
resource-ref
ref-namejdbc/TravelDB/ref-name
pattern
  groupId j2g.java/groupId
  artifactIdDefaultDS/artifactId
  nameDefaultDS/name
/pattern
/resource-ref
/entity
entity
  ejb-nameAgentEJB/ejb-name
  table-nameAgent/table-name
  cmp-field-mapping
cmp-field-nameid/cmp-field-name
table-columnID/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namefirstName/cmp-field-name
table-columnFIRST_NAME/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namelastName/cmp-field-name
table-columnLAST_NAME/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-nameorganization/cmp-field-name
table-columnORGANIZATION/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namelogin/cmp-field-name
table-columnLOGIN/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namepasswordHash/cmp-field-name

Re: Data source problems while deploying EAR

2007-06-08 Thread David Jencks


On Jun 8, 2007, at 8:57 AM, Erik B. Craig wrote:

Well, I guess my next question is... (again from a lack of  
understanding how this is actually working)
My database pool is named DefaultDS, the actual database is named  
TravelDB...

which should be used in which situation?


Unless I forgot one there are 3 layers:

1. resource-ref in your spec dd: this is how your application program  
finds the datasource in jndi


2. connection factory name in rar plan: this is how geronimo refers  
to the datasource.  If the name is the same as (1) and the  
dependencies are set up right, geronimo will map (1) to (2)  
automatically.  Otherwise you need a resource-ref element in your  
geronimo plan to map them.  In geronimo 2 we're starting to allow a  
little slop in terms of adjusting for prefixes like jdbc/, but this  
is not complete yet.


3. database name.  I assume you mean the name that the database  
engine uses to locate the database instance you are interested in.   
This is set in a database specific way in the config-properties of  
the rar plan and geronimo doesn't interpret this in any way  
whatsoever.  Depending on the database you use this might not even  
exist.  There is no relationship between this and (1) or (2)


Hope this answers your question...
david jencks




On 6/8/07, David Jencks [EMAIL PROTECTED] wrote:

On Jun 8, 2007, at 8:12 AM, Erik B. Craig wrote:

I'm having a good amount of troubles trying to get an EAR deployed  
from a relatively small Geronimo application on geronimo 1.1.1


Here is the output I'm getting

C:\geronimo-1.1.1\bindeploy --user system --password manager  
deploy c:\j2g-demo

-app\bin\geronimo-application.xml c:\j2g-demo-app\bin\TravelApp.ear
Using GERONIMO_BASE:   C:\geronimo- 1.1.1
Using GERONIMO_HOME:   C:\geronimo-1.1.1
Using GERONIMO_TMPDIR: C:\geronimo-1.1.1\var\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.5.0_11
Error: Unable to distribute TravelApp.ear: Unable to resolve
resource reference 'jdbc/DefaultDS' (Could not auto-map to  
resource.

 Try adding a resource-ref mapping to your Geronimo deployment
plan.)


I'm relatively sure this issue is coming from the openejb-jar.xml  
file, and in the cmp-connection-factory resource-link tag at that.

Here is that segment of that particular XML
  naming:cmp-connection-factory
naming:resource-linkDefaultDS/naming:resource-link
  /naming:cmp-connection-factory


This isn't a jndi based resource-ref, so it's not the source of the  
problem.  In 1.1.1 we also never try to add standard prefixes  
like jdbc/ for datasources.


(The reason I believe it to be here is due to the fact that  
changing defaultds in that tag changes the defaultds in the  
deployment error)

Are you sure?

I think the problem might be that in the spec dd one of your  
resource-refs is for jdbc/DefaultDS whereas in the plan below you  
map jdbc/TravelDB


just a guess...
Personally I usually set up a database pool with the same name as  
in the resource-ref itself so I don't have to do the mapping since  
it is such a pain to set up.


thanks
david jencks



I've tried to do as it recommends, with adding a resource-ref  
mapping, but can't quite figure out the proper location/syntax for it


I'm GUESSING there is something that I'm just missing due to  
inexperience, and am hoping one of you guys that's a good deal  
more seasoned might be able to point it out ot me.


Thanks!

For reference here is a copy of the entire openejb-jar.xml file.
-
?xml version=1.0 encoding=UTF-8?

openejb-jar xmlns= http://www.openejb.org/xml/ns/openejb- 
jar-2.1 xmlns:naming=http://geronimo.apache.org/xml/ns/ 
naming-1.1  xmlns:security=http://geronimo.apache.org/xml/ns/ 
security-1.1 xmlns:sys= http://geronimo.apache.org/xml/ns/ 
deployment-1.1

  sys:environment
sys:moduleId
  sys:groupIdj2g.java/sys:groupId
  sys:artifactIdejb-module/sys:artifactId
  sys:version1.0/sys:version
  sys:typejar/sys:type
/sys:moduleId
sys:dependencies
sys:dependency
  sys:groupIdj2g/sys:groupId
  sys:artifactIdjms/sys:artifactId
  sys:version1.0 /sys:version
  sys:typerar/sys:type
/sys:dependency
sys:dependency
sys:groupId j2g.java/sys:groupId
sys:artifactIdDefaultDS/sys:artifactId
/sys:dependency
sys:dependency
  sys:groupIdj2g/sys:groupId
  sys:artifactIdsecurity/sys:artifactId
  sys:version1.0/sys:version
  sys:typerar/sys:type
/sys:dependency
/sys:dependencies
  /sys:environment
  naming:cmp-connection-factory
naming:resource-linkDefaultDS/naming:resource-link
  /naming:cmp-connection-factory
  enforce-foreign-key-constraints/
  enterprise-beans
entity
  ejb-nameCustomerEJB/ejb-name
  table-nameCustomer/table-name
  cmp-field-mapping
cmp-field-nameid/cmp-field-name
table-columnID/table-column
  /cmp-field-mapping
  cmp-field-mapping
cmp-field-namelastName/cmp-field-name
table-columnLAST_NAME/table

Re: MessageDriven Bean in EE5

2007-06-11 Thread David Jencks
dunno about examples but showing a bit of configuration might help.   
The message you show below suggests to me that perhaps you have tried  
to configure the queue in xml as a resource-ref rather than resource- 
env-ref or message-destination-ref.  I've seen indications that this  
might work in some other app servers but it doesn't work in geronimo.


On the other hand if you are using an @Resource annotation then  
geronimo should figure out what it is for you.


thanks
david jencks

On Jun 11, 2007, at 1:43 PM, ptriller wrote:



Hello !
Is there anywhere a small simple demo app for message-driven beans  
with EE5

in Geronimo. I am failing utterly at mapping the required resources.

I always get the error

   Unable to resolve resource reference  
'ScheduleManagerQueue' (Could

   not find resource 'ScheduleManagerQueue'.  Perhaps it has not yet
   been configured, or your application does not have a dependency
   declared for that resource module?


and I have tried everything I can think of to map this resource.

I am using geronimo-tomcat6-jee5-2.0-M6-r1 but I got exactly the
same results using M5.

Thanks a lot


Peter Triller
--
View this message in context: http://www.nabble.com/MessageDriven- 
Bean-in-EE5-tf3903980s134.html#a11068434
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: MessageDriven Bean in EE5

2007-06-11 Thread David Jencks
I'm not quite sure what you mean in this last comment.  In any case,  
there's a problem with the openejb plan you showed:


message-driven
ejb-nameScheduledTestEJB/ejb-name
naming:resource-adapter

naming:resource-linkActiveMQ.tcp.default/naming:resource-link
/naming:resource-adapter
naming:resource-ref

naming:ref-nameScheduleTopicConnectionFactory/naming:ref-name

naming:resource-linkScheduleTopicConnectionFactory/naming:resource- 
link

/naming:resource-ref
naming:resource-ref

naming:ref-nameScheduleManagerQueue/naming:ref-name

naming:resource-linkScheduleManagerQueue/naming:resource-link
/naming:resource-ref
naming:resource-ref

naming:ref-nameScheduledTopic/naming:ref-name

naming:resource-linkScheduledTopic/naming:resource-link
/naming:resource-ref
/message-driven


in that you are putting the admin objects (queue/topic) in as  
resource-ref rather than resource-env-refs.  However since the link  
name is the same as the name the spec dd/annotations know about, you  
can just leave them out and geronimo should link them for you.  So,


message-driven
ejb-nameScheduledTestEJB/ejb-name
naming:resource-adapter

naming:resource-linkActiveMQ.tcp.default/naming:resource-link
/naming:resource-adapter
/message-driven

removes the error and

message-driven
ejb-nameScheduledTestEJB/ejb-name
naming:resource-adapter

naming:resource-linkActiveMQ.tcp.default/naming:resource-link
/naming:resource-adapter
naming:resource-ref

naming:ref-nameScheduleTopicConnectionFactory/naming:ref-name

naming:resource-linkScheduleTopicConnectionFactory/naming:resource- 
link

/naming:resource-ref
naming:resource-env-ref

naming:ref-nameScheduleManagerQueue/naming:ref-name
naming:admin-object-linkScheduleManagerQueue/naming:admin- 
object-link

/naming:resource-env-ref
naming:resource-env-ref

naming:ref-nameScheduledTopic/naming:ref-name

naming:admin-object-linkScheduledTopic/naming:admin-object-link
/naming:resource-env-ref
/message-driven

should also work.

thanks
david jencks

On Jun 11, 2007, at 2:16 PM, ptriller wrote:



Addendun:

using an env-ref does not change anything at all.This is just a  
copy of my

current working
copy.. I probably should have searched for a best effort in my  
repository.


Sorry


Peter

ptriller wrote:


Ok,

1st I added a VM listener since its all in one appserver:
Console shows: ActiveMQ.vm.default ActiveMQ vm 666 running

2nd I added the ConnectionFactory and queue I needed:
console shows:
Connection Factory ScheduledQueueConnectionFactory Server-wide   
running

Queue ScheduleManagerQueue Server-wide  running
Topic ScheduledTopic Server-wide  running

then I made a bean:

@MessageDriven(
name=ScheduledTestEJB,

activationConfig = {
@ActivationConfigProperty(
propertyName=destinationType,

propertyValue=javax.jms.Topic),
@ActivationConfigProperty(
propertyName=destination,
propertyValue=ScheduledTopic),
@ActivationConfigProperty(
propertyName=destinationName,
propertyValue=ScheduledTopic)
})
public class ScheduledTestEJB implements MessageListener {

@Resource(name=ScheduleManagerQueue)
private Destination jmsDestination;

@Resource(name=ScheduledQueueConnectionFactory)
.
.
.


you see the Reference was done in a @Resource annotation,
but removing them (not that anything woudl work without them)
only changed the error .. now it cant map the resource-adapter

right now my openejb-jar-xml snippet looks like that, but thats only
one of many incarnations
message-driven

Re: Virtual host configuration with Tomcat

2007-06-12 Thread David Jencks
Your original post said you wanted to expose applications on  
different IP addresses, which IIUC is different hosts, not different  
vhosts.  AFAIK the only way to have apps on different ip addresses is  
the method outlined in http://cwiki.apache.org/GMOxDOC11/exposing-web- 
applications-on-distinct-ports.html.  What exactly broke when you  
tried that?


IIUC vhosts would be if you had several names mapped to the same IP  
address and wanted to distinguish them.  This is a lot easier than  
different IP addresses.


IIRC there's a simpler way with jetty...

thanks
david jencks

On Jun 11, 2007, at 8:32 PM, Brandon Dooley wrote:


Hey Jeff,

Thanks for the help guys. My situation is this, I have two  
applications

and I can't get them to co-exist on different vhosts, same
geronimo-1.1.1 tomcat instance. One is a working EAR that contains my
web-content in a WAR, and my EJB's in a jar. I'd like to get that on a
tomcat vhost.

My other application, isn't an application at the moment, because  
of my

vhost problem. So for the time, I haven't included the EJBs and have
only deployed a WAR, which I do have working on a tomcat vhost. But  
when
I attempt to add that working WAR into its own EAR, I get an error  
along

the lines of no application in the root-context.

I will include any config files you'd like to see. I appreciate the  
help.


Brandon



Matt Hogstrom wrote:

Jeff,

I was talking with Sniped on IRC and he is looking for a  
configuration

that will allow for multiple Vhosts with Tomcat.  I can't find the
last one I had and I was hoping you can help out.  Sniped, can you
fill in a few more details in this thread ?

Cheers.

!DSPAM:466e0c1c109513810966309!







Re: JAR in Geronimo overrides JAR in WAR

2007-06-13 Thread David Jencks
From a quick look at what you say the problems you are experiencing  
are from cocoon requiring a more recent JAXP implementation than is  
in the geronimo 1.2-beta you are using.  AFAICT the jaxp  
implementation has to be installed in lib/endorsed and cannot be  
affected by any application classpaths or classloader settings (such  
as inverse-classloading).   I believe that in the geronimo 1.2 branch  
code and the 2.0 trunk code we have successfully navigated through  
various problems I can't discuss here that kept us at antique jaxp  
versions for a long time and include fairly up to date jaxp  
implementations and apis.  In any case you can certainly replace or  
install xml libraries in lib/endorsed to what you need.


thanks
david jencks

On Jun 13, 2007, at 8:37 AM, [EMAIL PROTECTED] wrote:


[I started this as a response to David Jencks' 20070608 post about
classpaths for EARs, WARs, and JARs.]

Please correct me if I misrepresent anything.  My understanding was
one of the primary benefits of J2EE was independent class loading.

My application uses Cocoon with
org.apache.cocoon.components.modules.input.XMLFileModule configured in
cocoon.xconf.

I created a Cocoon WAR using the ant build target.
Sometimes I deply the WAR to Geronimo.  Sometimes I create an EAR.  I
have not tested if the results differ depending on the format
deployed.

I used Eclipse 3.2 to create an EAR project.
I used Eclipse 3.2 to Import the WAR with the Add project to an  
EAR option.

The next screen states: Select the web library jars from the list
below to be imported as web library projects.  Unselected web
libraries will be imported as jars in the WEB-INF/lib directory.
No libraries were selected so all libraries are imported to
cocoon.war\WEB-INF\lib.
I deployed the EAR on Geronimo.

The Cocoon pipeline using XMLFileModule errors:
java.lang.NoSuchMethodError:
javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;

I solved this by copying Cocoon's lib/endorsed/xml-apis-1.3.04.jar to
Geronimo's lib/endorsed directory. (I planned to remove
xmlParserAPIs-2.6.2.jar but this proved unnecessary, probably because
xmlParserAPIs-2.6.2 is ancient.)

Should the Cocoon WAR use the JARs in the WAR before the JARs in  
Geronimo?


solprovider
USING geronimo-tomcat-j2ee-1.2-beta




Re: Help needed in creating enterprise application deployment plan

2007-06-13 Thread David Jencks


On Jun 13, 2007, at 9:03 AM, [EMAIL PROTECTED] wrote:


On 6/13/07, Hernan Cunico [EMAIL PROTECTED] wrote:

Did you see these docs
http://cwiki.apache.org/GMOxDOC11/deployment-plans.html

There are also some sample apps here
http://cwiki.apache.org/GMOxDOC11/sample-applications.html

HTH

Cheers!
Hernan


I have yet to find documentation about the benefits of creating a
plan.  I think plans are just  platform-specific overrides for web.xml
with platform-specific extended configuration.

Is this correct?


More or less, yes.  You need plans for datasources to tell where your  
database is.  Often you need to map jndi names to stuff like  
datasource names, although usually you can avoid this by careful  
naming.  You can also use the environment element in a plan to  
specify the classloader for your app very precisely.  This can for  
instance let you put all the dependency jars in the geronimo  
repository where they can be shared rather than in WEB-INF/lib where  
each app needs its own copy.  You can also use one app as a parent of  
another which can let you split up large apps without duplicating  
classes.  You can construct a classloader with a lot of dependency  
jars in it and use it as a parent of all your apps, so the dependency  
classes are only loaded once.  etc etc.


The Geronimo documentation includes an inverse-classloading setting.
This setting may be required to make Geronimo sane.  I just posted
about an issue that may have been solved with this setting.  Why is
this not the default?


I don't think inverse-classloading should affect the problem you  
described with jaxp libraries: if it does i'd be inclined to regard  
it as a bug, although it might be a misconfiguration.  I think that  
generally one wants to have only one copy of a class in a classloader  
graph, its the simplest and least error-prone situation.  We provide  
inverse-classloading and the hidden-classes and non-overridable- 
classes so that if for some reason you need to deal with multiple  
copies of a class, you can usually come up with  some way to get the  
one you want, where you want it.  But its often better to try to  
eliminate the problem by having only one version of each class.


thanks
david jencks


solprovider




Re: MDB trouble with references

2007-06-13 Thread David Jencks
You need to include the resource plan as a parent of your web-app in  
the geronimo-web environment element.  If this doesn't help please  
show your entire geroniimo-web.xml.


You can eliminate the resource-ref type stuff from your geronimo- 
web.xml if you make the names exactly the same  e.g. naming the  
connection factory jms/CommonConnectionFactory


There's some support for automatically mapping common prefixes but  
I don't think I got to jms yet :-)


hope this helps
david jencks

On Jun 13, 2007, at 10:21 AM, Viet Hung Nguyen wrote:

I am trying to get a simple MDB to work using annotations. However,  
when I deploy it into Geronimo 2.0, I get the following error. This  
is with the ConnectionFactory and Queue set up in Geronimo already:


Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to
resolve resource reference 'jms/CommonConnectionFactory' (Could not
auto-map to resource.  Try adding a resource-ref mapping to your
Geronimo deployment plan.

My deployment plan for the ConnectionFactory and Queues looks like  
this:


connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/ 
connector-1.1
   dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/ 
deployment-1.2

   dep:moduleId
   dep:groupIdorg.apache.geronimo.samples/dep:groupId
   dep:artifactIdjms-resources/dep:artifactId
   dep:version1.2/dep:version
   dep:typerar/dep:type
   /dep:moduleId
   dep:dependencies
   dep:dependency
   dep:groupIdorg.apache.geronimo.configs/dep:groupId
   dep:artifactIdactivemq-broker/dep:artifactId
   dep:typecar/dep:type
   /dep:dependency
   /dep:dependencies
   /dep:environment
   resourceadapter
   resourceadapter-instance
   resourceadapter-nameCommonConnectionFactory/ 
resourceadapter-name
   config-property-setting name=Passwordgeronimo/ 
config-property-setting
   config-property-setting name=UserNamegeronimo/ 
config-property-setting
   nam:workmanager xmlns:nam=http://geronimo.apache.org/ 
xml/ns/naming-1.1

   nam:gbean-linkDefaultWorkManager/nam:gbean-link
   /nam:workmanager
   /resourceadapter-instance
   outbound-resourceadapter
   connection-definition
   connectionfactory- 
interfacejavax.jms.QueueConnectionFactory/connectionfactory- 
interface

   connectiondefinition-instance
   nameCommonConnectionFactory/name
   connectionmanager
   xa-transaction
   transaction-caching/
   /xa-transaction
   single-pool
   match-one/
   /single-pool
   /connectionmanager
   /connectiondefinition-instance
   /connection-definition
   /outbound-resourceadapter
   /resourceadapter
   adminobject
   adminobject-interfacejavax.jms.Queue/adminobject-interface
   adminobject-classorg.activemq.message.ActiveMQQueue/ 
adminobject-class

   adminobject-instance
   message-destination-nameOrderQueue/message- 
destination-name
   config-property-setting name=PhysicalNameOrderQueue/ 
config-property-setting

   /adminobject-instance
   adminobject-instance
   message-destination-nameConsignmentQueue/message- 
destination-name
   config-property-setting  
name=PhysicalNameConsignmentQueue/config-property-setting

   /adminobject-instance
   /adminobject
   adminobject
   adminobject-interfacejavax.jms.Topic/adminobject-interface
   adminobject-classorg.activemq.message.ActiveMQTopic/ 
adminobject-class

   /adminobject
/connector

I have the MDB with the following annotation

@MessageDriven(activationConfig = {
   @ActivationConfigProperty(propertyName=destinationType,  
propertyValue=javax.jms.Queue),
   @ActivationConfigProperty(propertyName=destination,  
propertyValue=jms/OrderQueue)

})

I have a Servlet with the following annotated Queue and  
ConnectionFactory:


   @Resource(mappedName=jms/OrderQueue)
   private static Queue receivingQueue;
   @Resource(mappedName=jms/CommonConnectionFactory)
   private static QueueConnectionFactory factory;

I have the geronimo-web.xml file which has the following:

 resource-ref
   ref-namejms/CommonConnectionFactory/ref-name
   resource-linkCommonConnectionFactory/resource-link
 /resource-ref
 resource-env-ref
  ref-namejms/OrderQueue/ref-name
  admin-object-linkOrderQueue/admin-object-link
 /resource-env-ref

However, I think that these references are unnecessary when the  
annotations are present. But I am new to EJBs in general so I am  
not sure.


And I also have a web.xml with the following references too

   resource-ref
   res-ref-namejms/CommonConnectionFactory/res-ref-name
   res-typejavax.jms.QueueConnectionFactory/res-type
   res-authContainer/res-auth
   res

Re: Unable to resolve resource reference on 3.0 with annotations

2007-06-13 Thread David Jencks
You need a geronimo plan for your (ejb? ear? app) that includes the  
jms module you have deployed as a parent, otherwise the references  
won't be able to be resolved.


Also we ignore the mappedName, you should specify the name and make  
sure it's the same as what's in the jms module plan.


Hope this helps
david jencks

On Jun 13, 2007, at 8:27 PM, Avorcor wrote:



Okay, I tried to find a similar situation as this on this forum and  
on the

web, but have not had any luck.

I am using Geroimo 2.0M5

I have deployed a new ActiveMQ Resource Adapter with 2 queues and 1  
topic.

The factory name is Factory1

I have a single session bean that publishes to a JMS queue.   The  
bean has
one method publishAsset(), which performs the publishing act to the  
queue.


This is a stateless session bean.

it is declared with
@Stateless
@Remote( { AssetRecordRemote.class })

I have a connection factory object declared in my code:

	@Resource(mappedName = java:/comp/env/jms/Factory1)  
ConnectionFactory

connectionFactory;

The package this is in is called com.avorcor.fm
The bean name is AssetSessionBean

I jar this up with my remote interface and call

deploy AssetSessionBean.jar

I get an error deploying:

Error: Unable to distribute AssetSessionBean.jar:
org.apache.geronimo.common.DeploymentException: Unable to resolve
resource reference
com.avorcor.fm.AssetSessionBean/connectionFactory'
(Could not auto-map to resource.  Try adding a resource-ref  
mapping

to your Geronimo deployment plan.

If I remove all references to JMS, this will deploy just fine.   
Although, it
deploys in the default package instead of com.avorcor.fm .  I would  
like to
hear thoughts on this as well if anyone knows, but my primary  
concern is for
trying to understand why Geronimo cannot find the resource  
reference and

what I could try to correct this situation.

Thank you.


--
View this message in context: http://www.nabble.com/Unable-to- 
resolve-resource-reference-on-3.0-with-annotations- 
tf3919298s134.html#a3134
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: MDB trouble with references

2007-06-13 Thread David Jencks
Also I noticed you are using mappedName which we ignore, try using  
name instead.


thanks
david jencks

On Jun 13, 2007, at 8:31 PM, David Jencks wrote:

You need to include the resource plan as a parent of your web-app  
in the geronimo-web environment element.  If this doesn't help  
please show your entire geroniimo-web.xml.


You can eliminate the resource-ref type stuff from your geronimo- 
web.xml if you make the names exactly the same  e.g. naming the  
connection factory jms/CommonConnectionFactory


There's some support for automatically mapping common prefixes  
but I don't think I got to jms yet :-)


hope this helps
david jencks

On Jun 13, 2007, at 10:21 AM, Viet Hung Nguyen wrote:

I am trying to get a simple MDB to work using annotations.  
However, when I deploy it into Geronimo 2.0, I get the following  
error. This is with the ConnectionFactory and Queue set up in  
Geronimo already:


Error: Unable to distribute order-ear-2.0-SNAPSHOT.ear: Unable to
resolve resource reference 'jms/CommonConnectionFactory' (Could not
auto-map to resource.  Try adding a resource-ref mapping to your
Geronimo deployment plan.

My deployment plan for the ConnectionFactory and Queues looks like  
this:


connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/ 
connector-1.1
   dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/ 
deployment-1.2

   dep:moduleId
   dep:groupIdorg.apache.geronimo.samples/dep:groupId
   dep:artifactIdjms-resources/dep:artifactId
   dep:version1.2/dep:version
   dep:typerar/dep:type
   /dep:moduleId
   dep:dependencies
   dep:dependency
   dep:groupIdorg.apache.geronimo.configs/dep:groupId
   dep:artifactIdactivemq-broker/dep:artifactId
   dep:typecar/dep:type
   /dep:dependency
   /dep:dependencies
   /dep:environment
   resourceadapter
   resourceadapter-instance
   resourceadapter-nameCommonConnectionFactory/ 
resourceadapter-name
   config-property-setting name=Passwordgeronimo/ 
config-property-setting
   config-property-setting name=UserNamegeronimo/ 
config-property-setting
   nam:workmanager xmlns:nam=http://geronimo.apache.org/ 
xml/ns/naming-1.1

   nam:gbean-linkDefaultWorkManager/nam:gbean-link
   /nam:workmanager
   /resourceadapter-instance
   outbound-resourceadapter
   connection-definition
   connectionfactory- 
interfacejavax.jms.QueueConnectionFactory/connectionfactory- 
interface

   connectiondefinition-instance
   nameCommonConnectionFactory/name
   connectionmanager
   xa-transaction
   transaction-caching/
   /xa-transaction
   single-pool
   match-one/
   /single-pool
   /connectionmanager
   /connectiondefinition-instance
   /connection-definition
   /outbound-resourceadapter
   /resourceadapter
   adminobject
   adminobject-interfacejavax.jms.Queue/adminobject-interface
   adminobject-classorg.activemq.message.ActiveMQQueue/ 
adminobject-class

   adminobject-instance
   message-destination-nameOrderQueue/message- 
destination-name
   config-property-setting  
name=PhysicalNameOrderQueue/config-property-setting

   /adminobject-instance
   adminobject-instance
   message-destination-nameConsignmentQueue/message- 
destination-name
   config-property-setting  
name=PhysicalNameConsignmentQueue/config-property-setting

   /adminobject-instance
   /adminobject
   adminobject
   adminobject-interfacejavax.jms.Topic/adminobject-interface
   adminobject-classorg.activemq.message.ActiveMQTopic/ 
adminobject-class

   /adminobject
/connector

I have the MDB with the following annotation

@MessageDriven(activationConfig = {
   @ActivationConfigProperty(propertyName=destinationType,  
propertyValue=javax.jms.Queue),
   @ActivationConfigProperty(propertyName=destination,  
propertyValue=jms/OrderQueue)

})

I have a Servlet with the following annotated Queue and  
ConnectionFactory:


   @Resource(mappedName=jms/OrderQueue)
   private static Queue receivingQueue;
   @Resource(mappedName=jms/CommonConnectionFactory)
   private static QueueConnectionFactory factory;

I have the geronimo-web.xml file which has the following:

 resource-ref
   ref-namejms/CommonConnectionFactory/ref-name
   resource-linkCommonConnectionFactory/resource-link
 /resource-ref
 resource-env-ref
  ref-namejms/OrderQueue/ref-name
  admin-object-linkOrderQueue/admin-object-link
 /resource-env-ref

However, I think that these references are unnecessary when the  
annotations are present. But I am new to EJBs in general so I am  
not sure.


And I also have a web.xml with the following references too

   resource-ref

Re: Unable to resolve resource reference on 3.0 with annotations

2007-06-14 Thread David Jencks


On Jun 13, 2007, at 8:58 PM, Avorcor wrote:



Well, that sure did fix that in a hurry.Thank you.

Now, if I may, one final question.  Now that my session bean is  
deployed,
aren't I supposed to be able to access it as web service through  
EJB?  If

so, what do I need to do to make that happen?


sacrifice some chickens in the right order :-) ?

You need to do something to indicate what the interface it's exposing  
as a web service is.  There's a way to do this with annotations but  
I'm not sure exactly what it is.  I'm also not sure if you have to   
provide a wsdl file or if it can be generated from the interface, nor  
how to specify the wsdl file location.   Hopefully someone who knows  
will tell you more.


thanks
david jencks



Thank you again.

JP

djencks wrote:


You need a geronimo plan for your (ejb? ear? app) that includes the
jms module you have deployed as a parent, otherwise the references
won't be able to be resolved.

Also we ignore the mappedName, you should specify the name and make
sure it's the same as what's in the jms module plan.

Hope this helps
david jencks

On Jun 13, 2007, at 8:27 PM, Avorcor wrote:



Okay, I tried to find a similar situation as this on this forum and
on the
web, but have not had any luck.

I am using Geroimo 2.0M5

I have deployed a new ActiveMQ Resource Adapter with 2 queues and 1
topic.
The factory name is Factory1

I have a single session bean that publishes to a JMS queue.   The
bean has
one method publishAsset(), which performs the publishing act to the
queue.

This is a stateless session bean.

it is declared with
@Stateless
@Remote( { AssetRecordRemote.class })

I have a connection factory object declared in my code:

@Resource(mappedName = java:/comp/env/jms/Factory1)
ConnectionFactory
connectionFactory;

The package this is in is called com.avorcor.fm
The bean name is AssetSessionBean

I jar this up with my remote interface and call

deploy AssetSessionBean.jar

I get an error deploying:

Error: Unable to distribute AssetSessionBean.jar:
org.apache.geronimo.common.DeploymentException: Unable to  
resolve

resource reference
com.avorcor.fm.AssetSessionBean/connectionFactory'
(Could not auto-map to resource.  Try adding a resource-ref
mapping
to your Geronimo deployment plan.

If I remove all references to JMS, this will deploy just fine.
Although, it
deploys in the default package instead of com.avorcor.fm .  I would
like to
hear thoughts on this as well if anyone knows, but my primary
concern is for
trying to understand why Geronimo cannot find the resource
reference and
what I could try to correct this situation.

Thank you.


--
View this message in context: http://www.nabble.com/Unable-to-
resolve-resource-reference-on-3.0-with-annotations-
tf3919298s134.html#a3134
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.







--
View this message in context: http://www.nabble.com/Unable-to- 
resolve-resource-reference-on-3.0-with-annotations- 
tf3919298s134.html#a3427
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: How to configure a datasource to use OracleDataSource for Datasource pooling

2007-06-14 Thread David Jencks


On Jun 14, 2007, at 7:29 AM, Piers Geyman wrote:



Hi,

I can get a connection running to Oracle just using the tranql  
connector
that uses the tranQL/geronimo connection pooling, but I need to use  
the

Oracle Connection Pooling as I am using Oracle RAC and oracle needs to
manage the connections in the pool based on information it receives  
from the

Oracle RAC.

Do I need to develop my own Resource Adapter to be able to have  
database

connection served by the Oracle Connection Factory Pool
(oracle.jdbc.pool.OracleDataSourceFactory), or am I missing some  
obvious
configuration of geronimo/tranQL that would allow me to specify the  
Oracle
class (oracle.jdbc.pool.OracleDataSourceFactory) as my connection  
pool?




At the moment there's no way to have oracle manage a connection pool,  
and it doesn't fit into the idea of the connector architecture.  I  
looked for some RAC documentation and it looks like there's a way for  
weblogic to do the pooling at least for oracle 10g  
(bestpracticesforxaandrac.pdf, p.6).  That makes me suspect that  
there is some way to use RAC through a resource adapter.  For  
instance, does oracle supply an XADataSource?


Do you know what the oracle connection pooling does?  Why is this  
something that would be difficult for the connection manager to do?


If there's really no way to avoid Oracle managing the connections it  
should still be fairly easy to write a modified ConnectionManager  
that doesn't do pooling but delegates to oracle.  If you don't need  
jta transactions at all there's probably an even simpler way to do  
this by writing a gbean that creates the datasource, and has a method  
called $getResource that returns it.  If you then name this gbean  
correctly it should fit into our jndi lookup mechanism.


Is there publicly available documentation on how to use RAC in a java  
enterprise environment, e.g. javadoc or some indication of what  
classes are available and for what purposes?


thanks
david jencks


Thanks and regards

Piers



Lin Sun-2 wrote:


Hi, I tried this with Geronimo 1.1 w/ daytrader.  Basically I need to
copy the oracle tranql rar file and the oracle jar file into my
repository, and specify the dependency of the oracle jar file  
somewhere

in the plan -


   dep:dependency
 dep:groupIdoracle/dep:groupId
 dep:artifactIdclasses12/dep:artifactId
 dep:version10g/dep:version
 dep:typejar/dep:type
   /dep:dependency


and develop a resource adapter plan like below  (below is an  
application

scoped connection pool plan, but it can also be a server wide plan).

   ext-module
 connectorTradeDataSource/connector

external-pathtranql/tranql-connector-oracle-xa/1.1/rar/external- 
path

 connector
xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector-1.1;
   resourceadapter
 outbound-resourceadapter
   connection-definition

connectionfactory-interfacejavax.sql.DataSource/ 
connectionfactory-interface

 connectiondefinition-instance
   namejdbc/TradeDataSource/name
   config-property-setting
name=UserNametrade/config-property-setting
   config-property-setting
name=Passwordtrade/config-property-setting
   config-property-setting
name=DatabaseNametradedb/config-property-setting
   config-property-setting
name=DataSourceNameTradeDataSource/config-property-setting
   config-property-setting
name=ServerNamelinsun2/config-property-setting
   config-property-setting
name=PortNumber1521/config-property-setting
   config-property-setting
name=DriverTypethin/config-property-setting
   connectionmanager
 xa-transaction
   transaction-caching/
 /xa-transaction
 single-pool
   max-size10/max-size
   min-size0/min-size

blocking-timeout-milliseconds5000/blocking-timeout-milliseconds
   idle-timeout-minutes30/idle-timeout-minutes
   match-one/
 /single-pool
   /connectionmanager
 /connectiondefinition-instance
   /connection-definition
 /outbound-resourceadapter
   /resourceadapter
 /connector
   /ext-module

The oracle tranql rar file isn't in the geronimo assembly,
unfortunatelly.  So you'll have to get it from the Tranql project
(http://tranql.codehaus.org/Download).  You can download the binary
(that is a bit old than what I used) or build it yourself.  The  
ra.xml

inside of the rar file contains what configuration parameters you can
specify in the connection pool plan.

HTH, Lin

Piers Geyman wrote:

Hi,

I am trying to migrate from tomcat to geronimo and I am having  
trouble

being
able to configure my Oracle RAC datasource in geronimo to use the  
Oracle

Driver's connection pooling rather than the default geonimo pooling.

In tomcat I configured my datasource

Re: How to configure a datasource to use OracleDataSource for Datasource pooling

2007-06-14 Thread David Jencks


On Jun 14, 2007, at 9:03 AM, Piers Geyman wrote:



Hi David,

More background info:
I can connect to RAC successfully using the oracle tranQL Resource  
Adapter,
but this method does not allow the ability to use the more powerful  
features
of the RAC environment, namely Fast Connection Failover (FCF). With  
FCF the
Oracle Datasource Connection pool  
(oracle.jdbc.pool.OracleDataSourceFactory)
is used to obtain and manage DataSources. The  
OracleDataSourceFactory uses

the Oracle Notification Service (ONS) to subscribe to RAC notification
events to help it manage its pool of connections. When a RAC node  
goes down
the RAC will send a notification via ONS to any subscribers to let  
them know

that the Node is no longer available. The OracleDataSourceFactory will
receive this event and then remove any of the connections to that  
Node in
its pool instantly, so that any new connections requested will be  
valid.
This means that the application will get valid connections if a  
node goes
down, rather than getting connections that are invalid and having  
handle the

event - hence Fast Connection Failover.

The following document describes most of this:
http://www.oracle.com/technology/products/database/clustering/pdf/ 
twpracwkldmgmt.pdf


We have some projects that do not use JTA, do you have any examples  
of how

to create this gbean?
Newer projects we are working on do require jta though, so a proper
solution would be better.



I'm somewhat mystified why Oracle doesn't expose or advertise how to  
use this stuff in app servers other than their own.  You might poke  
around in their jars to see if they actually have a  
ManagedConnectionFactory or ResourceAdapter hidden in there.


I think that the main functions hidden in the driver can be exposed  
through a j2ca resource adapter pretty easily:


-- adapter has to track all the connections itself and keep track of  
which ones go to which oracle cluster member.  This should probably  
be done in a ResourceAdapter instance, since ManagedConnectionFactory  
instances might be created over and over.
-- on notification that a node is down, adapter sends a  
ConnectionErrorOccurred notification to all the connections attached  
to that cluster member.  This causes the app server's connection  
manager to remove them from the pool and destroy them right away.   
It's likely to confuse applications that are currently using these  
connections, but they would have gotten equally confused when the  
connection stopped working anyway.
-- the service level information needs to get fed into the  
ManagedConnectionFactory so when the ConnectionManager attempts to  
match connections the MCF can select one from a low-load cluster member.


The only missing part I see compared to the advertised features is  
automatic creation of idle connections to a low-load cluster member.


So I think it should be possible to extend the tranql oracle adapter  
to deal with all these RAC features.




My memories are slowly coming back to me when Jeremy Boynes  
originally implemented the tranql oracle adapter we ran into this  
oracle wants to do the pooling feature and added a no-pooling  
option to our connection manager to support it.  I'm not sure if/when  
anyone has tried it recently but specifying pooling with no-pool/  
should make our connection manager not have a pool, letting oracle  
deal with pooling however it wants.  I don't know if the tranql  
adapter is using the correct oracle class to get the RAC-aware  
datasources you need, but if not it should be a simple change.  Again  
I don't understand the configuration involved but if you need to set  
up different config-properties this is pretty easy to do.


I think that at least short term this is the best option.  I don't  
know how you'd get xa access with  this approach, but if you can  
locate an XADataSource or XAConnection in the oracle classes this too  
should be fairly simple.




Finally if using the tranql connector with no pooling doesn't work I  
think you can write a gbean something like this:


public class OracleFoo implements ConnectionFactorySource {

   private Object ds;

public OracleFoo() {
//create the oracle datasource
ds = ???;
}

public Object $getResource() {
return ds;
}

   public static final GBeanInfo GBEAN_INFO;
static {
GBeanInfoFactory infoFactory = GBeanInfoFactory.createStatic 
(OracleFoo.class, JCAManagedConnectionFactory);

GBEAN_INFO = infoFactory.createGBeanInfo();
}
public static GBeanInfo getGBeanInfo() {
return GBEAN_INFO;
}
}

The important parts are implements ConnectionFactorySource and  
JCAManagedConnectionFactory  which is also available as  
NameFactory.JCA_MANAGED_CONNECTION_FACTORY


Hope this helps
david jencks





Regards

Piers


djencks wrote:



On Jun 14, 2007, at 7:29 AM, Piers Geyman wrote:



Hi,

I can get a connection running

Re: Web app with jpa -- configuration help needed

2007-06-15 Thread David Jencks

I'm not sure jays' info is correct.

You can get an EntityManager in a servlet as long as you look it up  
in jndi, just don't inject it using annotations or cache it in a  
field in your servlet.


I think the problem is that you are looking up java:comp/env/jdbc/ 
jBasicDB which is where the datasource is expected to be, not the  
EntityManager.  Also in your geronimo plan you have a persistence- 
unit-ref specified but you want a persistence-context-ref since you  
are looking for an EntityManager, not an EntityManagerFactory.


I would suggest that you look up java:comp/env/jBasicDB in your  
servlet, and include this in your web.xml and then you won't need  
anything in your geronimo-web plan:


persistence-context-ref
persistence-context-ref-namejBasicDB/persistence-context-ref- 
name

!-- I can't remember if anything else is required --
/persistence-context-ref

Also I strongly recommend including a non-jta-datasource in the  
persistence.xml, I haven't been able to get anything to work with  
derby without that.  mysql may be more forgiving/less prone to weird  
deadlocks.  Leave out all the connect-to-mysql parameters in  
persistence.xml and use the datasource.


You don't need a resource-ref anywhere if you aren't using the db  
directly from your servlet.


I assume you've found the jpa sample under testsuite/.? It uses  
derby but does show a (usually) working configuration.


Hope this helps
david jencks

On Jun 15, 2007, at 12:20 PM, Jay D. McHugh wrote:


Peter,

I just realized - if you are doing resource_local access, you don't  
actually need the database pool.


OpenJPA will create connections as it needs them.

I would leave the database pool there though - it doesn't hurt  
anyone having it there.


Once you manage to get your app deployed, take a look in the jmx  
viewer of the admin console under J2EE Managed Objects/Persistence  
Unit to make sure it got deployed correctly.  Also, when you  
deploy, there will be a message dumped to the log about a property  
being unrecognized - you can ignore it.  It is an issue with  
OpenJPA that already has a JIRA filed for it.


Make sure you have the synchronizeMappings property set in your  
persistence.xml - otherwise the Geronimo default will kick in and  
try to recreate your tables and destroy all of your data.


If I have time to try fixing my app to use the jta datasource -  
I'll let you know what needs to change.



Jay

Jay D. McHugh wrote:

Hi Peter,

In a webapp, you are not allowed to directly get an EntityManager  
(they aren't threadsafe).  Instead, you need to get an  
EntityManagerFactory.


I was originally not able to get access to a jta-datasource, I had  
to go with resource-local.  I never went back to try accessing a  
database pool - so I'm going to tell you how I got things working  
in my current setup (using your values).


_persistence.xml

_?xml version=1.0 encoding=UTF-8?
persistence xmlns=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;
   persistence-unit transaction-type=RESOURCE_LOCAL  
name=jbasicDB

providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ 
provider

   classnu.m4u.jbasic.control.jpa.Users/class
   exclude-unlisted-classes /
   properties
   property name=openjpa.ConnectionURL  
value=jdbc:mysql://localhost:3306/jbasic/
   property name=openjpa.ConnectionDriverName  
value=com.mysql.jdbc.Driver/
   property name=openjpa.ConnectionUserName  
value=x/
   property name=openjpa.ConnectionPassword  
value=x/
   property name=openjpa.Log value=DefaultLevel=WARN,  
Tool=INFO/
   property name=openjpa.jdbc.DBDictionary value=mysql 
(SupportsSubselect=true) /

   property name=openjpa.Log value=DefaultLevel=INFO /
   property name=openjpa.AutoDetach value=close /
   property name=openjpa.DetachState value=all /
   property name=openjpa.DataCache value=false /
   property name=openjpa.Optimistic value=true /
   property name=openjpa.Multithreaded value=true /
   property name=openjpa.TransactionMode value=local /
   property name=openjpa.NontransactionalRead  
value=true /

   property name=openjpa.RestoreState value=all /
   property name=openjpa.jdbc.SynchronizeMappings  
value=false /

   /properties
   /persistence-unit
/persistence

_geronimo-web.xml:_

Remove all of the persistence unit info -

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.2;
   xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.1;
   xmlns:sec=http://geronimo.apache.org/xml/ns/security-1.1;
   xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.1;
sys:environment
  sys:moduleId
sys:groupIdjbasic

Re: ejb 3.0--connecting to a DB

2007-06-19 Thread David Jencks

I'm a bit confused.

-- the persistence-unit-ref is in a web.xml whereas the annotation  
appears to be in an ejb
-- Since you are supplying datasources,  leave out the connection  
info from the properties
-- your web-app is version 2.4 whereas jpa stuff is only supported in  
2.5 (although I think geronimo won't object to this)



All this being said I'd expect a lot of exceptions in the geronimo  
log from trying to deploy or run this.


I don't see anything that I think would make this fail, so please  
check the logs.


You are using 2.0-M6 or trunk, right?

thanks
david jencks

On Jun 19, 2007, at 4:23 PM, Viet Hung Nguyen wrote:


I am unable to get a handle on a EntityManagerFactory.

I have the following configuration using Derby as the DB on  
Geronimo 2.0:


--*persistence.xml *which is in the JAR file under META-INF--
?xml version=1.0 encoding=UTF-8?
persistence xmlns=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

   persistence-unit name=BankPU transaction-type=JTA
   descriptionEntity Beans for Bank/description

providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ 
provider

   classorg.apache.geronimo.samples.bank.ejb.Account/class
   classorg.apache.geronimo.samples.bank.ejb.Customer/class
   classorg.apache.geronimo.samples.bank.ejb.ExchangeRate/ 
class

   exclude-unlisted-classes /
   properties
   property name=openjpa.ConnectionURL  
value=jdbc:derby:BankDB /
   property name=openjpa.ConnectionDriverName  
value=org.apache.derby.jdbc.EmbeddedDriver /
   property name=openjpa.ConnectionUserName  
value=system /
   property name=openjpa.ConnectionPassword  
value=manager /

   property name=openjpa.Log value=DefaultLevel=INFO /
   property name=openjpa.AutoDetach value=close /
   property name=openjpa.DetachState value=all /
   property name=openjpa.DataCache value=false /
   property name=openjpa.Optimistic value=true /
   property name=openjpa.Multithreaded value=true /
   property name=openjpa.TransactionMode value=local /
   property name=openjpa.NontransactionalRead  
value=true /

   property name=openjpa.RestoreState value=all /
   property name=openjpa.jdbc.SynchronizeMappings  
value=false /

   /properties
   jta-data-sourceBankPool/jta-data-source
   non-jta-data-sourceNoTxDatasource/non-jta-data-source
   /persistence-unit
/persistence

--*web.xml*--
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http:// 
java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

   version=2.4
 welcome-file-list
   welcome-file/jsp/index.jsp/welcome-file
   /welcome-file-list

   servlet
   display-nameCustomerServiceServlet/display-name
   servlet-nameCustomerServiceServlet/servlet-name
   servlet- 
classorg.apache.geronimo.samples.bank.web.CustomerServiceServlet/ 
servlet-class

   /servlet
 servlet
   display-nameCommonServiceServlet/display-name
   servlet-nameCommonServiceServlet/servlet-name
   servlet- 
classorg.apache.geronimo.samples.bank.web.CommonServiceServlet/ 
servlet-class

   /servlet
   servlet-mapping
   servlet-nameCustomerServiceServlet/servlet-name
   url-pattern/customer_info/url-pattern
   /servlet-mapping
 servlet-mapping
   servlet-nameCommonServiceServlet/servlet-name
   url-pattern/exchange_rates/url-pattern
   /servlet-mapping

   persistence-unit-ref
   persistence-unit-ref-nameBankPU/persistence-unit-ref-name
   persistence-unit-nameBankPU/persistence-unit-name
   /persistence-unit-ref
/web-app

Here is a snippet of code of how I am I trying to access the EMF:

@Stateless
public class BankManagerFacadeBean {
 @PersistenceUnit(unitName=BankPU)
   protected EntityManagerFactory emf;

   // other stuff

   public CollectionAccount getAccountInformation(String  
customerId) {

   EntityManager em = emf.createEntityManager();

   String query = SELECT * FROM Account WHERE customerId=' +  
customerId + ';
   CollectionAccount accountBeanList = (CollectionAccount) 
em.createQuery( query ).getResultList();


   em.close();
   return accountBeanList;
   }
}

However, 'emf' is actually null after I had mapped BankPU to it.

Is there something that I am missing?

Thanks,
Viet Nguyen




Re: ejb 3.0--connecting to a DB

2007-06-19 Thread David Jencks


On Jun 19, 2007, at 10:26 PM, Viet Hung Nguyen wrote:

Thanks David, I resolved the PersistenceUnit problem from the hints  
that you gave me.



Excellent!


However, once all of that was resolved I am having problems  
connecting to the DB


It looks like you generated the db pool plan from the console.  I'm  
not an expert on how well the console works, but I think there are  
some questionable things here:


-- In my experience derby connectors don't work very well unless they  
get their classes from the system-database configuration where the  
derby engine is running.  Unless you use non-embedded derby client  
and maybe even then, you tend to run into classloading problems.  So  
I would replace the dependency on derby with a dependency on  
org.apache.geronimo.configs/system-database//car


- Unless you have previously created your database, you need to include
config-property-setting  
name=CreateDatabasetrue/config-property-setting

to get derby to create it for you when you try to use it.

- You haven't got this far yet :-) but the jta and non-jta datasource  
should be pointing to the same database or you will get very strange  
results when openjpa tries to generate  a key.  It's also likely that  
all the tables will be generated in one of the databases and not  
available in the other.


I'm not sure which tranql connector you are using, either.  I would  
copy the system-database plan and remove the gbeans from it and  
change the dependencies so it depends on system-database and change  
the db names.


How are you deploying the db pool?

Hope this helps
david jencks




I have the following:

--BankPool.xml--
connector xmlns=http://geronimo.apache.org/xml/ns/j2ee/ 
connector-1.1
   dep:environment xmlns:dep=http://geronimo.apache.org/xml/ns/ 
deployment-1.1

   dep:moduleId
   dep:groupIdconsole.dbpool/dep:groupId
   dep:artifactIdBankPool/dep:artifactId
   dep:version1.0/dep:version
   dep:typerar/dep:type
   /dep:moduleId
   dep:dependencies
   dep:dependency
   dep:groupIdorg.apache.derby/dep:groupId
   dep:artifactIdderby/dep:artifactId
   dep:typejar/dep:type
   /dep:dependency
   /dep:dependencies
   /dep:environment
   resourceadapter
   outbound-resourceadapter
   connection-definition
   connectionfactory-interfacejavax.sql.DataSource/ 
connectionfactory-interface

   connectiondefinition-instance
   nameBankPool/name
   config-property-setting  
name=Driverorg.apache.derby.jdbc.EmbeddedDriver/config-property- 
setting
   config-property-setting name=UserNameapp/ 
config-property-setting
   config-property-setting  
name=ConnectionURLjdbc:derby:BankDB/config-property-setting

   connectionmanager
   local-transaction/
   single-pool
   max-size10/max-size
   min-size0/min-size
   match-one/
   /single-pool
   /connectionmanager
   /connectiondefinition-instance
   /connection-definition
   /outbound-resourceadapter
   /resourceadapter
/connector

--persistence.xml--
?xml version=1.0 encoding=UTF-8?
persistence xmlns=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

   persistence-unit name=BankPU transaction-type=JTA
   descriptionEntity Beans for Bank/description

providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ 
provider

   classorg.apache.geronimo.samples.bank.ejb.Account/class
   classorg.apache.geronimo.samples.bank.ejb.Customer/class
   classorg.apache.geronimo.samples.bank.ejb.ExchangeRate/ 
class

   exclude-unlisted-classes /
   jta-data-sourceBankPool/jta-data-source
   non-jta-data-sourceNoTxDatasource/non-jta-data-source
   /persistence-unit
/persistence


--web.xml--

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http:// 
java.sun.com/xml/ns/j2ee/web-app_2_5.xsd

   version=2.5
 welcome-file-list
   welcome-file/jsp/index.jsp/welcome-file
   /welcome-file-list

   servlet
   display-nameCustomerServiceServlet/display-name
   servlet-nameCustomerServiceServlet/servlet-name
   servlet- 
classorg.apache.geronimo.samples.bank.web.CustomerServiceServlet/ 
servlet-class

   /servlet
 servlet
   display-nameCommonServiceServlet/display-name
   servlet-nameCommonServiceServlet/servlet-name
   servlet

Re: Problems with AMQ RA under Geronimo MDB container

2007-06-20 Thread David Jencks
What happens if the thread pool is say 3 X larger than the number of  
message endpoints/sessions?  The code looks a little bit like it  
needs twice as many threads as message endpoints (???)


Do any messages get through?

just guessing...
thanks
david jencks

On Jun 20, 2007, at 1:49 PM, vineetc wrote:



Hello All Geronimo Users and Developers,

I am trying to build a MDB based recv. application that will process
messages delivered by AMQ RA.

ENVIRONMENT
Windows XP
JDK 1.6.0_01
ActiveMQ 4.1.1 and the the RA provided by the dist.
Geronimo1.1.1
MySQL 5x

I have set the maxSessions to 29 and maxMessagesPerSession to  
900 on the
ActivationSpec. for the MDB. These properties are made available by  
AMQ for

performance tuning. MaxSession corresponds to the number of AMQ
ServerSession's or MessageEndpoint (listeners) i believe and
maxMessagesPerSession is the number of messages kept in RAM.

Scenario:
I send a bunch of messages while the EAR is not running.
After the messages have been sent (say 1000 messages) I start the EAR
application.
The EAR application seems to hang and or deadlock after processing 29
messages.

The JEECA's connector Thread Pool is configured with a size of 30  
threads

and the property waitWhenBlocked is set to true.
This WorkManager thread pool is provided by Geronimo server.
After looking at the threads from JConsole i saw following stack  
trace(s)

for Connector Threads which are stuck.

The first thread from connector thread pool had following stack trace.

Name: ConnectorThreadPool 0
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar.await 
(CondVar.java:75)
edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue.take 
(ArrayBlockingQueue.java:318)
org.apache.activemq.transport.FutureResponse.getResult 
(FutureResponse.java:42)
org.apache.activemq.transport.ResponseCorrelator.request 
(ResponseCorrelator.java:75)
org.apache.activemq.ActiveMQConnection.syncSendPacket 
(ActiveMQConnection.java:1175)
org.apache.activemq.ActiveMQConnectionConsumer.init 
(ActiveMQConnectionConsumer.java:86)
org.apache.activemq.ActiveMQConnection.createConnectionConsumer 
(ActiveMQConnection.java:1085)
org.apache.activemq.ra.ActiveMQEndpointWorker$1.run 
(ActiveMQEndpointWorker.java:164)

   - locked [EMAIL PROTECTED]
org.apache.geronimo.connector.work.WorkerContext.run 
(WorkerContext.java:291)

org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run 
(ThreadPool.java:289)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown  
Source)

java.lang.Thread.run(Thread.java:619)


All of the rest 29 threads from the connector thread pool have the  
same

stack trace as below.

Name: ConnectorThreadPool 29
State: WAITING on
[EMAIL PROTECTED]
Total blocked: 156  Total waited: 1

Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar.await 
(CondVar.java:75)
edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue.take 
(ArrayBlockingQueue.java:318)
org.apache.activemq.transport.FutureResponse.getResult 
(FutureResponse.java:42)
org.apache.activemq.transport.ResponseCorrelator.request 
(ResponseCorrelator.java:75)
org.apache.activemq.ActiveMQConnection.syncSendPacket 
(ActiveMQConnection.java:1175)
org.apache.activemq.TransactionContext.setXid 
(TransactionContext.java:578)
org.apache.activemq.TransactionContext.end(TransactionContext.java: 
329)
org.apache.activemq.ra.LocalAndXATransaction.end 
(LocalAndXATransaction.java:90)
org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end 
(WrapperNamedXAResource.java:51)
org.apache.geronimo.transaction.manager.TransactionImpl.delistResource 
(TransactionImpl.java:209)
   - locked  
[EMAIL PROTECTED]
org.apache.geronimo.transaction.context.InheritableTransactionContext. 
delistResource(InheritableTransactionContext.java:99)
org.openejb.mdb.EndpointHandler.teardownDelivery 
(EndpointHandler.java:360)
org.openejb.mdb.EndpointHandler.afterDelivery(EndpointHandler.java: 
256)

org.openejb.mdb.EndpointProxy.afterDelivery(EndpointProxy.java:72)
org.apache.activemq.ra.MessageEndpointProxy 
$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:126)
org.apache.activemq.ra.MessageEndpointProxy.afterDelivery 
(MessageEndpointProxy.java:65)
org.apache.activemq.ra.ServerSessionImpl.afterDelivery 
(ServerSessionImpl.java:216)

org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java: 
165)
org.apache.geronimo.connector.work.WorkerContext.run 
(WorkerContext.java:291)

org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run 
(ThreadPool.java:289)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown

Re: Problems with AMQ RA under Geronimo MDB container

2007-06-20 Thread David Jencks


On Jun 20, 2007, at 2:22 PM, vineetc wrote:



I can try that.
BTW what makes you feel it needs twice the Threads as number of  
Sessions?


It looks to me as if all the threads came out of the pool and are  
trying to do amq work and are blocked looking for an additional  
thread.  It's entirely possible we have misunderstood the effect of  
the amq settings and it really needs 900 X 2 or 900 X 29 X 2  
threads  If you make the settings lower do messages start flowing?


I'm just guessing :-(

thanks
david jencks


Just curious to know.

Will get back with the results soon...:)

Thanks,
Vineet
--
View this message in context: http://www.nabble.com/Problems-with- 
AMQ-RA-under-Geronimo-MDB-container-tf3954028s134.html#a11219383
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Don't find a place to set the class path

2007-06-22 Thread David Jencks


On Jun 22, 2007, at 1:49 PM, Jerry Luo wrote:



I am trying to deploy a application on geronimo 1.1.1. And the  
application
needs to visit some resource files, and the resource files are in a  
path.
But I didn't find any place to set the path into the class path. In  
JBOSS,
WEBLOGIC, I can add the path to class path by modifying its start  
up script.
But I don't know how to add it into Geronimo start up script. I  
tried to add

'CLASSPATH' to geronimo.bat, but it didn't work.


There are two recommended ways to do this in geronimo:

1. If your resources can be relocated and are in a jar file, install  
the jar file at an appropriate location in the geronimo repository  
and include a dependency on the jar file in your geronimo deployment  
plan.  For instance your plan might start something like this:


web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;
environment xmlns=http://geronimo.apache.org/xml/ns/ 
deployment-1.1

moduleId
groupIdorg.mycompany/groupId
artifactIdmyproject/artifactId
version$1.0/version
typecar/type
/moduleId
dependencies
dependency
groupIdorg.mycompany/groupId
artifactIdmyresourcesjar/artifactId
typejar/type
/dependency
/dependencies
/environment
.


2. If you can't move the resources into the geronimo repo or they  
aren't in a jar file, add a SharedLib gbean to your geronimo  
deployment plan, and point it to where you want to put the files.   
For instance the configuration might look like:


gbean name=SharedLib  
class=org.apache.geronimo.system.sharedlib.SharedLib
attribute name=classesDirs/absolute/path/to/the/ 
resources/attribute

reference name=ServerInfo
nameServerInfo/name
/reference
/gbean


Both of these methods get the resources into the classloader of your  
app without forcing them into every application running in geronimo.


hope this helps
david jencks


--
View this message in context: http://www.nabble.com/Don%27t-find-a- 
place-to-set-the-class-path-tf3966076s134.html#a11257037
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: Secured connection

2007-06-24 Thread David Jencks


On Jun 24, 2007, at 12:13 PM, Tero Mäntyvaara wrote:


David Jencks wrote:

Please send to only one list at a time, this is more appropriate for
the user list.

I am really sorry, I will not do that again. :-/


On Jun 21, 2007, at 7:45 AM, Tero Mäntyvaara wrote:

Does latest G support secured (read encrypted) connection between  
server

and client?


That depends on the protocol you want to use and possibly on the
version of geronimo you want to use.  I'll assume you are using
geronimo 2.0 (trunk)

I was thinking the latest, so it will be then 2.0.


web/https -- yes
jaxrpc/jaxws/soap -- yes
ejb using corba -- yes
ejb using openejb proprietary protocol -- not turned on by default,
and I'm not sure if you can turn it on without extra programming.
I was planning to use encrypted connection between remote EJB- 
component
and Java-application. So my alternatives are CORBA and openEJB. I  
would

like to use this J2EE compliant CORBA-connection. How has this
en-/decryption been accomplished then?


It's not clear to me if your java-application is the client or server  
here, nor if it is running in a javaee container.  I'm going to  
assume that  it  is the client and is either a javaee client  
application running in geronimo app client container or another  
javaee application.  It's possible to use corba from a non-javaee  
application but you have to set up quite a bit of configuration in code.


I would start by looking at the examples in geronimo server trunk/ 
testsuite/corba-testsuite.  These are all set up to use no security,  
but you can see which objects you need to configure.  On the server  
side you need a TSSBeanGBean that specifies the required and allowed  
security properties to use the server ejb, and on the client side  
there's a corresponding CSSBeanGBean that specifies what the client  
is willing to supply.


There are a lot of choices.  There are 3 layers involved.
- transport layer.  You can specify unprotected, ssl, or ssl with  
client certificate.  IIRC the client certificate can be used identify  
the client.
- AS layer (Application Security??? I can't remember what it stands  
for)  At this layer you can specify that the client will identify  
itself using username/password.  (GSSUP)
- SAS layer.  (Security Attribute Service) If the client is working  
on behalf of a user other than the user who is running the client  
itself (for instance if it is a server), you can propagate the actual  
user identity using an identity token.  However the user will not be  
reauthenticated on the server: the server will trust that the client  
has already performed proper authentication.  Note that this is  
reasonable if e.g. you have authenticated the client via a trusted  
client certificate and are using ssl transport.


There are some schemas for the css and tss bean configurations, corba- 
css-config-2.1.xsd and corba-tss-config-2.1.xsd.  If you have trouble  
figuring out what to specify, tell us what options you want and we'll  
try to help come up with an appropriate configuration.


thanks
david jencks




thanks
david jencks




Tero Mäntyvaara

Tero Mäntyvaara




Re: How to read and write a bundle properties in a war?

2007-07-05 Thread David Jencks


On Jul 5, 2007, at 2:44 AM, appel wrote:




appel wrote:


Hi,

I have inside my war file, which is extracted when deployed in  
Geronimo, a
properties file I want to both read, and also write. Reading the  
file is

easy with ResourceBundle, but I can't think of a way to modify the
properties file... for instance changing the value of some property.

I can open the file manually with a full path, but I don't want my  
web app
to be dependent on the system it's deployed, for instance if I  
have to
deploy it on another computer using Geronimo and it's located in  
another

directory.



However, I don't want to override any changes to the properties  
file if I
redeploy the application, so I need to generate the properties file  
the

first time the application is run and keep it OUTSIDE the
extracted-directory.

That is...

My Geronimo installation is located in /opt/geronimo, and my  
deployed web

application is located in
/opt/geronimo/repository/stuff/SomeApp/0.1/SomeApp-0.1.war/

But, if I write a file (with no path) it will be written into
/opt/geronimo/bin/somefile. I want this somefile to be written  
into
/opt/geronimo/repository/stuff/SomeApp/0.1/, but this path can  
change

depending on how I deploy it and where.

Any ideas?


I'm glad you realized that writing files into your application may  
lead to problems :-)


Geronimo has a var directory for this purpose, I suggest you put your  
configuration file there.


You can find out where the var directory is by using the ServerInfo  
gbean.


You should be able to get the system info gbean by declaring a gbean- 
ref in your geronimo plan and looking it up in jndi.  However this  
isn't tested a lot and I can't guarantee it will work.  I think it's  
only available in geronimo 1.2 and 2.0: it might be in 1.1.1 also.


The gbean ref should look something like

gbean-ref
ref-namesystem-info/ref-name
ref-typeorg.apache.geronimo.system.serverinfo.ServerInfo/ref- 
type

pattern
nameServerInfo/name
/pattern
/gbean-ref

and you'd look it up something like:

ServerInfo serverInfo = (ServerInfo) new InitialContext().lookup 
(java:comp/env/ServerInfo);


File myConfig = serverInfo.resolveServer(var/myappconfig/ 
myConfig.properties);


Note I'm using resolveServer which will still work even if you've  
relocated the var directory, perhaps if you're running multiple  
servers off the same repository.


Hope this helps
david jencks






--
View this message in context: http://www.nabble.com/How-to-read-and- 
write-a-bundle-properties-in-a-war--tf4028664s134.html#a11443595
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: annoying embedded Derby exception

2007-07-06 Thread David Jencks


On Jul 6, 2007, at 5:09 AM, Johnny Kewl wrote:


Hi Xh
I afraid I dont know anything about Geronimo, currently just  
thinking about using it ;)

But I do know Derby
When I look at this which seems to be some kind of JNDI  
datapool...

I cant see the dB driver anywhere in derby there are 2
One for a shared network ie like a conventional server and the  
other one is this.

org.apache.derby.jdbc.EmbeddedDriver   for embedded dB's

Then there also has to be a connection URI, something like this
jdbc:derby:dataweaver

I'm surprized it actually connects to anything without that info...
... anyway what do I know anyway ;)



Johnny,

We're using one of the derby datasources which don't need a URI like  
that, instead the different properties are presented separately.   
It's wrapped in a J2CA connector implementation.


Xh,

What is supposed to create the database?  Have you tried

config-property-setting  
name=CreateDatabasetrue/config-property-setting

?

thanks
david jencks



- Original Message -
From: Xh
To: User Geronimo
Sent: Friday, July 06, 2007 1:21 PM
Subject: annoying embedded Derby exception

Hi All!

I have very annoying embedded Derby exception that occurs once in a  
while:


SQL Exception: Failed to start database 'dataweaver', see the next  
exception for details.


Usually restart helps and every thing works fine, but this  
situation is really annoying...


I use Geronimo 1.1, and it's embedded Derby 10, the configuration  
was simply created with Web wizard - http://127.0.0.1:8080/console/ 
portal/services/services_jdbc


I attach the generated connector below

best regards
Lukasz

?xml version=1.0 encoding=UTF-8?


dep:moduleId
dep:groupIdconsole.dbpool/dep:groupId
dep:artifactIdDataWeaverWARDerby/dep:artifactId
dep:version1.0/dep:version
dep:typerar/dep:type
/dep:moduleId
dep:dependencies
dep:dependency
dep:groupIdorg.apache.derby/dep:groupId
dep:artifactIdderby/dep:artifactId
dep:version10.1.3-2/dep:version
dep:typejar/dep:type
/dep:dependency
/dep:dependencies
/dep:environment
resourceadapter
outbound-resourceadapter
connection-definition
connectionfactory-interfacejavax.sql.DataSource/ 
connectionfactory-interface

connectiondefinition-instance
nameDataWeaverWARDerby/name
config-property-setting name=Password/
config-property-setting name=LoginTimeout/
config-property-setting  
name=DatabaseNamedataweaver/config-property-setting

config-property-setting name=UserName/
connectionmanager
local-transaction/
single-pool
max-size10/max-size
min-size0/min-size
match-one/
/single-pool
/connectionmanager
/connectiondefinition-instance
/connection-definition
/outbound-resourceadapter
/resourceadapter
/connector



Yahoo! Mail is the world's favourite email. Don't settle for less,  
sign up for your free account today.






Re: Unable to resolve dependency

2007-07-09 Thread David Jencks
I am not familiar with  the sample app you are working from let  
me check that I've guessed a couple things correctly...

- you are using geronimo 2.0-M6
- you are deploying an ear that contains a war and a rar
- the rar is providing the jms stuff the war needs

In this case you should remove
dep:dependency
   dep:groupIdorg.apache.geronimo.samples/dep:groupId
   dep:artifactIdjms-resources/dep:artifactId
   dep:version1.2/dep:version
   dep:typerar/dep:type
/dep:dependency
from geroniimo-web.xml since it is trying to refer to the rar that is  
packed in the same ear already.


You can also remove
dep:dependency
   dep:groupIdorg.apache.geronimo.configs/dep:groupId
   dep:artifactIdactivemq-broker/dep:artifactId
   dep:typecar/dep:type
/dep:dependency
from geronimo-web.xml since that is already a dependency of the rar  
deployment.


It is certainly not required, but I find it simpler to manage a  
single plan than many plans, one in each javaee module, so I would  
put the geronimo-web.xml into the geronimo-application.xml


Hope this is relevant :-)

david jencks

On Jul 9, 2007, at 3:27 AM, Xiao-fei Song wrote:



Hi,

I just made an application by referencing the sample app at
http://cwiki.apache.org/GMOxDOC20/jms-and-mdb-sample- 
application.html. After

I deploy the ear I got:

Error: Unable to distribute TennisLeague.ear: Unable to create
configuration for deployment

load of
org.apache.geronimo.samples/TennisLeague_TennisLeague-war.war/ 
2.0-M6/car

failed

Error starting configuration gbean
org.apache.geronimo.samples/TennisLeague_TennisLeague-war.war/ 
2.0-M6/car


Unable to resolve dependency
org.apache.geronimo.samples/jms-resources/1.2/rar

And my geronimo-web.xml looks as below:

web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;
xmlns:naming=http://geronimo.apache.org/xml/ns/naming-1.1;
  dep:environment
xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.1;
dep:moduleId
  dep:groupIdorg.apache.geronimo.samples.order/dep:groupId
  dep:artifactIdTennisLeagueWeb/dep:artifactId
  dep:version1.2/dep:version
  dep:typecar/dep:type
/dep:moduleId
dep:dependencies
dep:dependency
   dep:groupIdorg.apache.geronimo.configs/dep:groupId
   dep:artifactIdactivemq-broker/dep:artifactId
   dep:typecar/dep:type
/dep:dependency
dep:dependency
   dep:groupIdorg.apache.geronimo.samples/dep:groupId
   dep:artifactIdjms-resources/dep:artifactId
   dep:version1.2/dep:version
   dep:typerar/dep:type
/dep:dependency
/dep:dependencies
dep:hidden-classes/
dep:non-overridable-classes/
  /dep:environment
/web-app

And my geronimo-application.xml is:

application xmlns=http://geronimo.apache.org/xml/ns/j2ee/ 
application-1.1

  dep:environment
xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.1;
dep:moduleId
  dep:groupIdorg.apache.geronimo.samples/dep:groupId
  dep:artifactIdTennisLeague/dep:artifactId
  dep:version2.0-M6/dep:version
  dep:typeear/dep:type
/dep:moduleId
dep:dependencies/
dep:hidden-classes/
dep:non-overridable-classes/
  /dep:environment
 module
   connectorgeronimo-activemq-ra-2.0-M6.rar/connector
connector
xmlns=http://geronimo.apache.org/xml/ns/j2ee/connector-1.2;
dep:environment
xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2;
dep:moduleId
dep:groupIdorg.apache.geronimo.samples/ 
dep:groupId

dep:artifactIdjms-resources/dep:artifactId
dep:version1.2/dep:version
dep:typerar/dep:type
/dep:moduleId
dep:dependencies
dep:dependency

dep:groupIdorg.apache.geronimo.configs/dep:groupId
dep:artifactIdactivemq-broker/ 
dep:artifactId

dep:typecar/dep:type
/dep:dependency
/dep:dependencies
/dep:environment
resourceadapter
resourceadapter-instance

resourceadapter-namejms-resources/resourceadapter-name
nam:workmanager
xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.2;
nam:gbean-linkDefaultWorkManager/ 
nam:gbean-link

/nam:workmanager
/resourceadapter-instance
outbound-resourceadapter
connection-definition

connectionfactory-interfacejavax.jms.ConnectionFactory/ 
connectionfactory-interface

connectiondefinition-instance
nameCommonConnectionFactory/name

implemented-interfacejavax.jms.QueueConnectionFactory/ 
implemented-interface


implemented-interfacejavax.jms.TopicConnectionFactory/ 
implemented-interface

connectionmanager

Re: ClassCastException when using a self written TypeConverter

2007-07-09 Thread David Jencks


On Jul 9, 2007, at 5:41 AM, MoleSon wrote:



I just saw, that I made an mistake when deploying the app: I forgot  
to update
the deployment plan so that the typeconverter was not listed. This  
means:

deploying doesn't work at all.


I'm not quite sure exactly what you mean :-)

I'd guess that the class cast exception you got was due to the tranql  
TypeConverter being loaded in 2 classloaders.  Offhand I can't see  
how this is happening.  To investigate I would put a breakpoint where  
the class cast exception is happening and use inspection and  
evaluation capabilities of your IDE to investigate:

- which classloader A is loading your type converter
- which classloader B is loading TypeConverter
- the relationship between these classloaders
- what you get from
ClassLoader C = A.loadClass(TypeConverter.class.getName 
()).getClassLoader()
I think that if B == C then you should not get a CCE and if B != C  
you will get a CCE.  Knowing what all these classloaders are and how  
they are related should help figure out what is going on.




@Gianny: there is no MultiParentClassLoader, but there is a  
variable called

cl which is a JarFileClassLoader and the id of this one is:
default/myAppName/1.0/car


That's the multiparent classloader :-)


I also tried out geronimo 2.0 but when I deploy my app, i get a
NullPointerException without any serious information why it is  
thrown. I
also was not able to make eclipse debug geronimo 2.0 so I'll stay  
with to

1.1 version for now and need to get my problems fixed there.

I think we'd appreciate more information about what went wrong with  
2.0.  Was there a stack trace?  Maybe in the geronimo.log?  If you  
can share a sample app showing the problem that would be excellent.


What went wrong when you tried to debug geronimo 2.0 in eclipse?  I  
haven't had any problems using Intellij IDEA.


thanks
david jencks



MoleSon wrote:


I managed to deploy my application now by adding the tranql jar to  
my ear
file, but this threw up a bunch of new errors now, so i'll follow  
your

suggestion to update to the new geronimo version ;)

Manu George wrote:


I remember facing a similar issue and I think that there is a bug  
with
the TypeConverter stuff in OpenEJB. I would second Gianny's  
advice to
use Geronimo 2.0 and OEJB 3.0 and get back if there are issues  
there.


Regards
Manu

On 7/5/07, Gianny Damour [EMAIL PROTECTED] wrote:

On 05/07/2007, at 10:34 PM, MoleSon wrote:


Could not deploy module
org.apache.geronimo.common.DeploymentException: Could not deploy
module
  ...
Caused by: org.apache.geronimo.common.DeploymentException: Cannot
create
type converter mypackage.MyTypeConverter
  at
org.openejb.deployment.SchemataBuilder.processEnterpriseBeans
(SchemataBuilder.java:436)
  ... 32 more
Caused by: java.lang.ClassCastException: mypackage.MyTypeConverter
  at
org.openejb.deployment.SchemataBuilder.processEnterpriseBeans
(SchemataBuilder.java:434)
  ... 33 more

I had a look at the geronimo source code and notices that the
Exception is
thrown at these lines in the ScemataBuilder:
try
{
  Class typeConverterClass = cl.loadClass 
(mapping.getTypeConverter

().trim());
  typeConverter = (TypeConverter) 
typeConverterClass.newInstance();

}
catch(Exception e)
{
  throw new DeploymentException(Cannot create type  
converter  +

mapping.getTypeConverter(), e);
}


It is hard to diagnostic. Could you please put a breakpoint after
cl.loadClass and tell us what the value of  
MultiParentClassLoader.id

is? Also, I strongly recommend you to migrate to the latest version
of Geronimo/OpenEJB, which uses OpenJPA as the underlying  
persistence

framework for CMPs. This migration should be effortless as you do
not need to change your OpenEJB deployment descriptors.  
Furthermore,
you will also be able to leverage the simplified programming  
model of

EJB3.

Thanks,
Gianny











--
View this message in context: http://www.nabble.com/ 
ClassCastException-when-using-a-self-written-TypeConverter- 
tf4029440s134.html#a11498758
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: allocating Connection using ConnectionRequestInfo: failure testing

2007-07-09 Thread David Jencks


On Jul 9, 2007, at 11:13 AM, Francisco Borges wrote:


Hello,

I have some code that uses ConnectionRequestInfo objects to get
connections, and also some tests for it. They all work on JBoss,  
but on

Geronimo1.2, things don't *fail* as I expect.

Namely, I expected that when asking for a connection using an invalid
ConnectionRequestInfo, to get an  
javax.resource.spi.SecurityException

thrown, or at least an javax.resource.ResourceException:

http://geronimo.apache.org/api/org/apache/geronimo/connector/ 
outbound/AbstractConnectionManager.html


Is this expectation wrong? If so, how should I check for a failed  
request?


Geronimo has no way to determine if a CRI is valid or not, so I  
presume that either your connection factory or  
ManagedConnectionFactory should be throwing the exception you expect.


I imagine problems with your connection factory would be easy for you  
and impossible for us to figure out, so I'll assume the problem is  
after that.


Can you do some debugging or logging and check that your CRI is  
getting to the MCF


javax.resource.spi.ManagedConnection createManagedConnection 
(javax.security.auth.Subject subject,  
javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)  
throws javax.resource.ResourceException;


javax.resource.spi.ManagedConnection matchManagedConnections 
(java.util.Set set, javax.security.auth.Subject subject,  
javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)  
throws javax.resource.ResourceException;


methods as expected and that your MCF is throwing an exception?  This  
would help a lot in investigating what is going on.


BTW I think you want match-all if you want to use one pool, unless  
the match method can change the CRI info in an existing connection.   
The idea behind multiple pools is that you can divide the connections  
up by the match criteria so that matches will always succeed and you  
only need to supply one MC to match.  Otherwise match is likely to  
fail with distinct CRIs and the pool will start killing connections  
for you.


Thanks!
david jencks




I've tried deploying the connection both with match-one/ and
match-all/:

==
   outbound-resourceadapter
 connection-definition
[.]
   connectionmanager
  xa-transaction
 transaction-caching/
  /xa-transaction
  single-pool
 min-size0/min-size
 match-one/
  /single-pool
   /connectionmanager
[]
   /outbound-resourceadapter
==

But on both cases, I get no exceptions.

Comments  hints are heartily welcome,
Cheers,
--
Francisco Borges




Re: Missing JAR when depolying EAR

2007-07-12 Thread David Jencks

I think you have this situation, based on the stack trace:

war with manfest classpath containing foo.jar
foo.jar has jcifs.jar in its manifest classpath.

There are a couple of things we could change here, I'd be interested  
in some opinions...


-- if we run into this error print more information about how we got  
there, such as all the jars examined for manifest classpath so far:  
foo.jar will be on the list fairly near the end.
-- allow people to have bad manifest classpaths, and just warn loudly  
about them rather than refusing to deploy.


I'm a little worried about (2) because its so easy to miss warnings  
no matter how large the type size they are presented in :-).  On the  
other hand if you include 3rd party jars in your ear they may have  
bizarre and incomprehensibly wrong manifest classpaths that you don't  
want to fix :-)


thanks
david jencks

On Jul 12, 2007, at 10:01 AM, dharbige wrote:




donh wrote:


David,
A couple of things come to mind, maybe you using a JAAS module that
requires it, are you using a NTLM security realm.

Not really  sure just reaching. Do you have more stack  
information? Is it

possible that the deployer is adding these entries to the manifest?




Donh,

I'm not intentionally using a JAAS module or an NTLM security  
realm, but

I've only just started playing with Geronimo so I can't say for sure.
It's installed on a Windows XP laptop that is part of a domain, but  
there is

no security stuff built into the EAR I am trying to deploy.

The whole stack trace is below.  The deployer (by which I guess you  
mean the
Geronimo deployer) could be adding things to the manifest, but if  
it were
doing this why would it then complain when the JAR isn't present?   
I've

tried modifying the logger settings for the deployer, but no file is
produced - I'm guessing the deployment fails on a pre-deployment  
check,

and doesn't get as far as using the Deployer.

13:29:03,911 DEBUG [Deployer] Deployment failed: plan=null,
module=C:\geronimo-jetty6-jee5-2.0-M6\var\temp\***.ear
org.apache.geronimo.common.DeploymentException: Manifest class path  
entries

must be a valid jar file (JAVAEE 5 Section 8.2):
jarFile=C:\geronimo-jetty6-jee5-2.0-M6\repository\default 
\Application_ID\1184243324313\Application_ID-1184243324313.car 
\jcifs.jar,

path=jcifs.jar
at
org.apache.geronimo.deployment.DeploymentContext.getCompleteManifestCl 
assPath(DeploymentContext.java:313)

at
org.apache.geronimo.deployment.DeploymentContext.getCompleteManifestCl 
assPath(DeploymentContext.java:316)

at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicIni 
tContext(AbstractWebModuleBuilder.java:328)

at
org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.initContext 
(JettyModuleBuilder.java:324)

at
org.apache.geronimo.jetty6.deployment.JettyModuleBuilder$ 
$FastClassByCGLIB$$1a00be84.invoke(generated)

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)

at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:127)

at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:828)
	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.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$ 
$4bcb740c.initContext(generated)

at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext 
(SwitchingModuleBuilder.java:159)

at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$ 
$FastClassByCGLIB$$d0c31844.invoke(generated)

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
(FastMethodInvoker.java:38)

at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
(GBeanOperation.java:127)

at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
(GBeanInstance.java:828)
	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.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$ 
$4bcb740c.initContext(generated)

at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguratio 
n(EARConfigBuilder.java:564)

at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
$FastClassByCGLIB$$38e56ec6.invoke(generated)

at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53

Re: Derby DB in Geronimo

2007-07-12 Thread David Jencks


On Jul 12, 2007, at 11:44 AM, gmazza wrote:



Hello,

I am thinking of using the DerbyDB embedded in Geronimo for a web
application.  I have a couple of questions about the Derby that is in
Geronimo:


A couple of comments.

I think you are going to need an ear file or a geronimo synthetic  
ear or at least 2 artifacts -- a rar for the database pool and your  
web app.  I think you may find an ear with external modules for the  
db pool is the simplest: you can include the geronimo plan inside the  
ear and have only one deployable.  The daytrader app shows how to do  
this in e.g the plans/daytrader-g-2.0.xml plan  (I might not quite  
have the name right) although that plan is not included in the ear.


1.)  Does Geronimo's Derby run in embedded mode or network server  
mode?  If
the former (which I believe but would like to confirm), does that  
mean I
would need a separate instance of Derby if I want to run in Network  
server

mode?


You can access derby from geronimo using either embedded or network,  
depending on which tranql resource adapter you use.  AFAIK embedded  
is likely to be a bit faster.





2.)  Is it possible (or practical) to embed Derby within a web  
application
WAR file, preconfigure it with sample tables and rows, etc., and  
have the
webapp access *that* embedded Derby instance, and not the one that  
comes

with Geronimo (or any network server version possibly running on the
machine)?  I am asking this because it would be nice for a sample web
application if I could configure it such that no database  
configuration
would be necessary for a user; they would just need to deploy the  
WAR and it

will work out-of-the-box.


I don't think its practical or a good idea to run the database  
actually in the war file.  For one thing it really ought to be read  
only if you did that :-)
What I recommend is to construct your starting database, wrap it up  
in a jar file, include the jar in the ear or war file, and include a  
gbean in the geronimo plan to unpack the jar file into the var/derby  
directory.  Our intent is that all program modifiable data files such  
as embedded databases should go somewhere in var.


We have an example of doing almost exactly this in geronimo, in the  
uddi app.

applications/geronimo-uddi-db constructs the db and packs it in a jar
applications/geronimo-uddi-server constructs the war file
configs/uddi-jetty6 (and uddi-tomcat) predeploy uddi into the jetty  
or tomcat server, constructing what is basically a geronimo plugin.


Unless you want separate jetty and tomcat plugins or only want to  
support one web server I recommend you have an ear file with the db  
jar and war and the plan in the jar.


Hope this helps ask more questions if it's not clear how to proceed.

thanks
david jencks




Thanks,
Glen

--
View this message in context: http://www.nabble.com/Derby-DB-in- 
Geronimo-tf4068958s134.html#a11562877
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: general questions about geronimo application server capabilities?

2007-07-12 Thread David Jencks


On Jul 12, 2007, at 2:51 PM, legolas wrote:



Hi
thank you for reading my post.
I have some general question about Geronimo application server
configuration:

-Does it support clustering and load balancing?


There are several clustering features in geronimo.  AFAIK you have to  
use an external load balancer.
- geronimo-jetty-jee5 2.0 has WADI web clustering (jetty only).  I  
think this is in geronimo 1.2 also.
- geronimo-tomcat most versions (since 1.1??) support natve tomcat  
clustering.  I don't know if this has been  tested in 2.0.
- Jeff Genender has been working on stateful seesion clustering in  
openejb3 but I don't know the status of this work
- terracotta have been working on clustering but I don't know the  
status of this work.


I don't know how production ready any of these are.

-Does it provide support for CertDB for digital certification  
manipulation?


I have been unable to figure out what certDB is from some googling.   
If it's a file based pkcs-11 based certificate store I think we  
support it only to the extent that the jvm you are using supports  
pkcs-11.


thanks
david jencks





Thanks.


--
View this message in context: http://www.nabble.com/general- 
questions-about-geronimo-application-server-capabilities-- 
tf4070126s134.html#a11566478
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






<    1   2   3   4   5   6   7   8   9   10   >