Re: debugging WS deployed in Geronimo-2

2007-02-27 Thread Kanchana Welagedara
Hi Lin

On Mon, 2007-02-26 at 10:09 -0500, Lin Sun wrote:
 Hi there,
 
 IIUC about what you are trying to do, you 'll need the WTP server 
 adapter for geronimo 2.0 to do that.  But I don't think the adapter 
 (also called devtools) is ready yet for 2.0.
Yes.Exactly.But there should be a way around to do remotely debug a WS
in Geronim using eclipse remote debugging isn't it?

If I say what was trying to do exactly was..Tracing the flow of WS
deployment through the geronimo code base and understand what method
calls next and understand the code base.
 
 I have only tried adding breakpoint on the server code and step through, 
 instead of the client code.
I think this is where I have made the mistake. I tried putting the break
point  in client code first(now I know it should be server code) as well
as in the server code later(The sample WS service server side along with
geronimo code base).
Then I tried to put the break point in geronimo code base in
org.apache.geronimo.jaxws.builder.JaxwsServiceBuilder in parseWSDL,and
it  complained Unable to install breal points due to missing line
number attributes.Also eclipse debugger doesn't launch or prompt to the
debug mode to step on/over the flow.
Hope I'm more specific now in details.
Really appreciate if anybody can help out

Regards
Kanchana

 HTH, Lin
 
 Kanchana Welagedara wrote:
  Hi 
  
  I'm trying to debug a web service which deployed in the geronimo-2(with
  almost newest code built).
  
  Geronimo has started in the debugger mode(localhost port 8000) and the
  WS application has imported as an eclipse project on to eclipse along
  with the geronimo code base.
  
  When I put the break point on the client method and try to debug the
  flow of WS invocation,the eclipse debugger doesn't launch or prompt to
  the debug mode to step on/over the flow.
  
  am I missing any steps in process of debugging a WS deployed in geronimo
  using eclipse?
  Can anybody please help me on this
  
  Thanks and regards
  Kanchana
  
  
  
  
  
 



Re: Geronimo v2.0 Documentation update

2007-02-27 Thread Jack


Hernan Cunico [EMAIL PROTECTED] wrote: Hi All,
Administration docs are half way through. Would like to hear new ideas for 
topics to cover, see

http://cwiki.apache.org/GMOxDOC20/documentation.html

Just added Virtual Host configuration example for both Jetty and Tomcat.

Cheers!
Hernan
hi,
i have read and try the multiple instance subject, but it doesn't work until i 
add the env variable GERONIMO_BASE=directory_of_second_instance.
either, there's no tool to automatically increment/decrement port number in 
config.xml to start correctly a second instance. i have used a small java app 
using
jdom.jar.
regards,


 
-
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food  Drink QA.

Accessing the local interface of an Session EJB from a WAR

2007-02-27 Thread Norbert Rieger
Hello,

I try to connect from my web application to an existing Session EJB
(MfcSession) thru it's local interface.
Both, the WAR and the EJB, are running within the same geronimo
installation. When installing the web app I get the following message:

Deployer operation failed: Could not find an EJB for reference MfcSession to
a local session bean that has the home interface
de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the local interface
de.lplusr.module.mfc.ejb.MfcSessionLocal
org.apache.geronimo.common.UnresolvedEJBRefException: Could not find an EJB
for reference MfcSession to a local session bean that has the home interface
de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the local interface
de.lplusr.module.mfc.ejb.MfcSessionLocal

How do I connect to an EJB thru it's local interface, what's wrong with my
configuration ?

Any help or advice is appreciated, thanks a lot in advance.

Norbert


This is my configuration:

Geronimo 1.1.1
JDK 1.5.0_10
Windows XP Prof


web.xml:

 ejb-local-ref
ejb-ref-nameMfcSession/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
local-homede.lplusr.module.mfc.ejb.MfcSessionLocalHome/local-home

localde.lplusr.module.mfc.ejb.MfcSessionLocal/local
ejb-linkMfcSession/ejb-link
 /ejb-local-ref

geronimo-web.xml:

?xml version=1.0 encoding=UTF-8?

web-app
xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;
xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.1;
xmlns:naming=http://geronimo.apache.org/xml/ns/naming-1.1;
xmlns:security=http://geronimo.apache.org/xml/ns/security-1.1;
environment xmlns=http://geronimo.apache.org/xml/ns/deployment-1.1;
moduleId
groupIdlplusr/groupId
artifactIdsys/artifactId
version1.0/version
/moduleId
dependencies
dependency
groupIdejb/groupId
  artifactIdmfc-ejb/artifactId
  version1.0/version
  typejar/type
/dependency
/dependencies
/environment
context-root/sys/context-root
ejb-local-ref
ref-nameMfcSession/ref-name
ejb-linkMfcSession/ejb-link
/ejb-local-ref
/web-app


The EJB descriptor is:

?xml version=1.0 encoding=UTF-8?

!DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN http://java.sun.com/dtd/ejb-jar_2_0.dtd;

ejb-jar id=ejb-jar_1

   description![CDATA[mfc-ejb-1.0 generated by eclipse wtp xdoclet
extension.]]/description
   display-namemfc-ejb-1.0/display-name

   enterprise-beans

  !-- Session Beans --
  session id=Session_MfcSession
 description![CDATA[An EJB for remote access of
MFC]]/description
 display-nameMfcSession/display-name

 ejb-nameMfcSession/ejb-name

 homede.lplusr.module.mfc.ejb.MfcSessionHome/home
 remotede.lplusr.module.mfc.ejb.MfcSession/remote
 local-homede.lplusr.module.mfc.ejb.MfcSessionLocalHome/local-hom
e
 localde.lplusr.module.mfc.ejb.MfcSessionLocal/local
 ejb-classde.lplusr.module.mfc.ejb.MfcSessionSession/ejb-class
 session-typeStateful/session-type
 transaction-typeContainer/transaction-type

  /session

/ejb-jar



Re: javax.mail.NoSuchProviderException when Trying to send mail usingGeronimo 1.1.1 - Reg

2007-02-27 Thread Rick McGuire

Kamalanathan Raman wrote:

Hi Aman,

The geronimo-java-mail-transport jar should be present inside the
repository/Geronimo folder just check for that and add to your classpath
  
The geronimo-javamail-transport jar doesn't exist any more in the 1.2 
release.  It has been replaced by the geroinimo-javamail_1.3.1_provider 
jar file.  Unfortunately, in the Geronimo 1.2 beta, that dependency 
somehow got removed from the javamail config dependency, resulting in 
the jar file not getting included in the final assembly.  I'll take care 
of getting this fixed for the final Geronimo 1.2 release.


Rick



Thanks and Regards,
Kamal

-Original Message-
From: Aman Nanner/MxI Technologies [mailto:[EMAIL PROTECTED]

Sent: Tuesday, February 27, 2007 4:42 AM
To: user@geronimo.apache.org
Subject: Re: javax.mail.NoSuchProviderException when Trying to send mail
usingGeronimo 1.1.1 - Reg

I tried deploying with this configuration, but the deployment failed as
this does not exist in the repository anywhere.  Is the
geronimo-javamail_1.3.1_provider supposed to exist as a module or
configuration in the repository?  Is it a separate plugin?

Rick McGuire [EMAIL PROTECTED] wrote on 02-26-2007 05:29:41 PM:

  

Aman Nanner/MxI Technologies wrote:


Hi,

I'm also getting a NoSuchProviderException, but in Geronimo 1.2.  It
  

seems
  

that the geronimo-javamail-transport module has been moved, or no
  

longer
  

exists, so what dependency should I use in its place?

  

In 1.2, the javamail providers are in

geronimo-javamail_1.3.1_provider, which is in the
org.apache.geronimo.javamail groupId.  For providers, we now have


POP3,
  

NNTP, and NNTP-POST in addtion to SMTP.

Rick




Thanks,
Aman




In order to send mail, there are two jar files you need in your
dependencies. The first jar file,
  

geronimo-javamail_1.3.1_spec-1.1.jar
is
  

in the base configuration and contains the javax.mail.* classes. You
  

have
  

that one, otherwise you wouldn't get as far as you have. The second
  

jar
  

file, geronimo-javamail-transport-1.1.1.jar contains the Geronimo
  

SMTP
  

transport implementation. That's the jar file you're missing in your
application dependencies.

Rick


Kamalanathan Raman wrote:


Hi ,


Iam using Geronimo 1.1.1 .Can any one help me in resolving the
  

following
  

issue, iam trying to configure a mail session and send notification
  

mail.
  

But when I try to run my application it throws this particular
  

error.
Iam
  

not able to figure out what it suggests, Your valuable suggestion is
invited.Thanks in advance for your reply.


2007-02-19 18:32:54,601 ERROR com.symcor.common.util.SendMail
-sendNotification(...):_MessagingException_


_javax.mail.NoSuchProviderException_: Unable to locate provider for
protocol: smtp

  at javax.mail.Session.getProvider(_Session.java:227_)

  at javax.mail.Session.getTransport(_Session.java:336_)

  at javax.mail.Session.getTransport(_Session.java:366_)

  at javax.mail.Transport.send(_Transport.java:65_)

  at javax.mail.Transport.send(_Transport.java:46_)


at
  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
  

at
  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
  

at
  

com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
  

  at
  

com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
  

2007-02-19 18:32:54,617 INFO com.symcor.common.util.SendMail
-sendNotification(...):exit


2007-02-19 18:32:54,617 ERROR root -main[]:Unable to locate provider
  

for
  

protocol: smtp


_javax.mail.NoSuchProviderException_: Unable to locate provider for
protocol: smtp

  at javax.mail.Session.getProvider(_Session.java:227_)

  at javax.mail.Session.getTransport(_Session.java:336_)

  at javax.mail.Session.getTransport(_Session.java:366_)

  at javax.mail.Transport.send(_Transport.java:65_)

  at javax.mail.Transport.send(_Transport.java:46_)


at
  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
  

at
  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
  

at
  

com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
  

  at
  

com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
  

Thanks and Regards,

kamal


  


__

  

* 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 

Re: debugging WS deployed in Geronimo-2

2007-02-27 Thread Sachin Patel

-sachin


On Feb 27, 2007, at 4:15 AM, Kanchana Welagedara wrote:


Hi Lin

On Mon, 2007-02-26 at 10:09 -0500, Lin Sun wrote:

Hi there,

IIUC about what you are trying to do, you 'll need the WTP server
adapter for geronimo 2.0 to do that.  But I don't think the adapter
(also called devtools) is ready yet for 2.0.

Yes.Exactly.But there should be a way around to do remotely debug a WS
in Geronim using eclipse remote debugging isn't it?


Not that I know off.  You have to put hooks into the debugger to  
allow a debug session to locate source in a WTP project.  This is why  
you need the server adapter.




If I say what was trying to do exactly was..Tracing the flow of WS
deployment through the geronimo code base and understand what method
calls next and understand the code base.


I have only tried adding breakpoint on the server code and step  
through,

instead of the client code.
I think this is where I have made the mistake. I tried putting the  
break
point  in client code first(now I know it should be server code) as  
well
as in the server code later(The sample WS service server side along  
with

geronimo code base).
Then I tried to put the break point in geronimo code base in
org.apache.geronimo.jaxws.builder.JaxwsServiceBuilder in parseWSDL,and
it  complained Unable to install breal points due to missing line
number attributes.Also eclipse debugger doesn't launch or prompt to  
the

debug mode to step on/over the flow.
Hope I'm more specific now in details.
Really appreciate if anybody can help out

Regards
Kanchana


HTH, Lin

Kanchana Welagedara wrote:

Hi

I'm trying to debug a web service which deployed in the geronimo-2 
(with

almost newest code built).

Geronimo has started in the debugger mode(localhost port 8000)  
and the
WS application has imported as an eclipse project on to eclipse  
along

with the geronimo code base.

When I put the break point on the client method and try to debug the
flow of WS invocation,the eclipse debugger doesn't launch or  
prompt to

the debug mode to step on/over the flow.

am I missing any steps in process of debugging a WS deployed in  
geronimo

using eclipse?
Can anybody please help me on this

Thanks and regards
Kanchana













Re: Error when deploying a SQL Server DBpool with jtds 1.2 driver

2007-02-27 Thread Peter Petersson
That line should be perfectly right, I am not sure but I think that you 
may have missed editing the line below it

dep:artifactIdMSSqlDB_Name/dep:artifactId
MSSqlDB_Name == should be what ever name you use in your 
geronimo-web.xml sys:resource-link
Also the connectiondefinition-instance data have to match your naming 
pw user and so on.

/Peter

grimba e skrev:
you must create a file xml and to do deploy manual, wizard this bad 
one, you must arnar them you yourself…. I send an example to you
 
*/dep:groupIdconsole.dbpool/dep:groupId/*

line bad
 
 
Rodrigo Baeza.
 
2007/2/25, Peter Petersson [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:


If I remember right the is (has been) some problem creating/deploying
mysql database plans from the Geronimo ( 1.1/1.1.1) console.
Deploying using the command line tools should solve your problem, see
example below for command and plan template:

Command (on a Unix/linux system):
cd GERONIMO_HOME
java -jar bin/deployer.jar deploy /path_to/mssqldb_pool_plan.xml
repository/tranql/tranql-connector/1.2/tranql-connector-1.2.rar

Using the following plan (mssqldb_pool_plan.xml edit where
appropriate):

?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:artifactIdMSSqlDB_Name/dep:artifactId
   dep:version1.0/dep:version
   dep:typerar/dep:type
   /dep:moduleId
   dep:dependencies
   dep:dependency
   dep:groupIdjtds/dep:groupId
   dep:artifactIdjtds/dep:artifactId
   dep:version1.2/dep:version
   dep:typejar/dep:type
   /dep:dependency
   /dep:dependencies
   /dep:environment
   resourceadapter
   outbound-resourceadapter
   connection-definition

connectionfactory-interface
javax.sql.DataSource/connectionfactory-interface
   connectiondefinition-instance
   nameMSSqlDB_Tois/name
   config-property-setting
name=Passwordthe_pw/config-property-setting
   config-property-setting
name=Drivernet.sourceforge.jtds.jdbc.Driver/config-property-setting
   config-property-setting
name=UserNamethe_user/config-property-setting
   config-property-setting

name=ConnectionURLjdbc:jtds:sqlserver://db_server:1433/db_name/config-property-setting

   connectionmanager
   local-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

Thats it I hope it helps.
/Peter

Rajiv M skrev:
 Hello,

 While creating a SQL Server database pool with the below settings:
 Driver: net.sourceforge.jtds.jdbc.Driver
 JAR: jtds/jtds/1.2/jar
 Database: database name
 Host: server name
 Connect String: jdbc:jtds:sqlserver://server
 name;DatabaseName=database name

 Test connection was successful. But deploy or show plan ended in
 the below error:

 21:30:27,044 DEBUG [ApplicationDispatcher] servletPath=/DBWizard,
 pathInfo=/*, queryString=null, name=null
 21:30:27,044 DEBUG [ApplicationDispatcher]  Path Based Include
 21:30:27,064 ERROR [DatabasePoolPortlet] Unable to save
connection pool
 java.lang.NullPointerException
 at
 org.apache.geronimo.kernel.repository.Artifact.create
(Artifact.java:47)
 at


org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet.getRAR(DatabasePoolPortlet.java:1059)

 at

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

 at


org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet.processAction(DatabasePoolPortlet.java:344)

 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:615)
 at javax.servlet.http.HttpServlet.service (HttpServlet.java:688)
 at


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

2007-02-27 Thread Jack

--- Norbert Rieger [EMAIL PROTECTED] wrote:

 Hello,
 
 I try to connect from my web application to an
 existing Session EJB
 (MfcSession) thru it's local interface.
 Both, the WAR and the EJB, are running within the
 same geronimo
 installation. When installing the web app I get the
 following message:
 
 Deployer operation failed: Could not find an EJB for
 reference MfcSession to
 a local session bean that has the home interface
 de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
 local interface
 de.lplusr.module.mfc.ejb.MfcSessionLocal

org.apache.geronimo.common.UnresolvedEJBRefException:
 Could not find an EJB
 for reference MfcSession to a local session bean
 that has the home interface
 de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
 local interface
 de.lplusr.module.mfc.ejb.MfcSessionLocal
 
 How do I connect to an EJB thru it's local
 interface, what's wrong with my
 configuration ?
 
 Any help or advice is appreciated, thanks a lot in
 advance.
 
 Norbert
 
 
 This is my configuration:
 
 Geronimo 1.1.1
 JDK 1.5.0_10
 Windows XP Prof
 
 
 web.xml:
 
  ejb-local-ref
 ejb-ref-nameMfcSession/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type


local-homede.lplusr.module.mfc.ejb.MfcSessionLocalHome/local-home
 


localde.lplusr.module.mfc.ejb.MfcSessionLocal/local
 ejb-linkMfcSession/ejb-link
  /ejb-local-ref
 
 geronimo-web.xml:
 
 ?xml version=1.0 encoding=UTF-8?
 
 web-app
 

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

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

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

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

xmlns=http://geronimo.apache.org/xml/ns/deployment-1.1;
   moduleId
   groupIdlplusr/groupId
   artifactIdsys/artifactId
   version1.0/version
   /moduleId
   dependencies
   dependency
   groupIdejb/groupId
 artifactIdmfc-ejb/artifactId
 version1.0/version
 typejar/type
   /dependency
   /dependencies
   /environment
   context-root/sys/context-root
   ejb-local-ref
   ref-nameMfcSession/ref-name
   ejb-linkMfcSession/ejb-link
   /ejb-local-ref
 /web-app
 
 
 The EJB descriptor is:
 
 ?xml version=1.0 encoding=UTF-8?
 
 !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems,
 Inc.//DTD Enterprise
 JavaBeans 2.0//EN
 http://java.sun.com/dtd/ejb-jar_2_0.dtd;
 
 ejb-jar id=ejb-jar_1
 
description![CDATA[mfc-ejb-1.0 generated by
 eclipse wtp xdoclet
 extension.]]/description
display-namemfc-ejb-1.0/display-name
 
enterprise-beans
 
   !-- Session Beans --
   session id=Session_MfcSession
  description![CDATA[An EJB for remote
 access of
 MFC]]/description
  display-nameMfcSession/display-name
 
  ejb-nameMfcSession/ejb-name
 
 
 homede.lplusr.module.mfc.ejb.MfcSessionHome/home
 
 remotede.lplusr.module.mfc.ejb.MfcSession/remote
 

local-homede.lplusr.module.mfc.ejb.MfcSessionLocalHome/local-hom
 e
 

localde.lplusr.module.mfc.ejb.MfcSessionLocal/local
 

ejb-classde.lplusr.module.mfc.ejb.MfcSessionSession/ejb-class
  session-typeStateful/session-type
 
 transaction-typeContainer/transaction-type
 
   /session
 
 /ejb-jar
 
 

hi,
try ejb-ref-nameejb/MfcSession/ejb-ref-name
in web.xml.
regards,



 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php


Re: debugging WS deployed in Geronimo-2

2007-02-27 Thread Lin Sun
Hi Kanchana, if you want to debug server side code and see the flow on 
the server side, you could follow this link about how to do remote 
debugging with jboss or weblogic: 
http://eclipsezone.com/eclipse/forums/t53459.html.   I was able to 
follow that for geronimo 2.0 and add breakpoints on the server side to 
step through the code.


HTH,

Lin
Kanchana Welagedara wrote:

Hi Lin

On Mon, 2007-02-26 at 10:09 -0500, Lin Sun wrote:

Hi there,

IIUC about what you are trying to do, you 'll need the WTP server 
adapter for geronimo 2.0 to do that.  But I don't think the adapter 
(also called devtools) is ready yet for 2.0.

Yes.Exactly.But there should be a way around to do remotely debug a WS
in Geronim using eclipse remote debugging isn't it?

If I say what was trying to do exactly was..Tracing the flow of WS
deployment through the geronimo code base and understand what method
calls next and understand the code base.
I have only tried adding breakpoint on the server code and step through, 
instead of the client code.

I think this is where I have made the mistake. I tried putting the break
point  in client code first(now I know it should be server code) as well
as in the server code later(The sample WS service server side along with
geronimo code base).
Then I tried to put the break point in geronimo code base in
org.apache.geronimo.jaxws.builder.JaxwsServiceBuilder in parseWSDL,and
it  complained Unable to install breal points due to missing line
number attributes.Also eclipse debugger doesn't launch or prompt to the
debug mode to step on/over the flow.
Hope I'm more specific now in details.
Really appreciate if anybody can help out

Regards
Kanchana


HTH, Lin

Kanchana Welagedara wrote:
Hi 


I'm trying to debug a web service which deployed in the geronimo-2(with
almost newest code built).

Geronimo has started in the debugger mode(localhost port 8000) and the
WS application has imported as an eclipse project on to eclipse along
with the geronimo code base.

When I put the break point on the client method and try to debug the
flow of WS invocation,the eclipse debugger doesn't launch or prompt to
the debug mode to step on/over the flow.

am I missing any steps in process of debugging a WS deployed in geronimo
using eclipse?
Can anybody please help me on this

Thanks and regards
Kanchana












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

2007-02-27 Thread Mark Aufdencamp

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
 remotegltd.domain.app.interfaces.MfcSessionEJB/remote
/ejb-ref...


Servlet/JSP code snippet:

Context ctx = new InitialContext();
MfcSessionEJBHome mfcSessionHome = (MfcSessionEJBHome) ctx.lookup("java:comp/env/ejb/MfcSessionEJB");
MfcSessionEJB mfcSession = mfcSessionHome.create();


2. geronimo-web.xml - This deployment descriptor needs two components. It needs an ejb-ref thatmatches the web.xml ejb-ref-name and defines the deployed EJB module as a pattern(module group/artifact/version/type). This serves as the linkage between the web.xml and the container for name service purposes. Second it needs to define the EJB module as a dependency for the webapp with a dependenciesdependency in the environment section. This allows access for the webapp Classloader to the EJB module.

...
environment
 moduleId
 ...
 /moduleId
 dependencies
 dependency
 groupIddefault/groupId
 artifactIdMfcSessionEJB/artifactId
 version1.0/version
 typecar/type
 /dependency
 /dependencies
/environment
ejb-ref

 !-- geronimo-web.xml.ref-name ==
web.xml.ejb-ref-name --
 ref-nameejb/MfcSessionEJB/ref-name
 pattern

 groupIddefault/groupId
 artifactIdMfcSessionEJB/artifactId
 version1.0/version
 typecar/type /pattern
/ejb-ref

3. ejb-jar.xml - Needs a enterprise-beansession
entry which can be generated by XDoclet. The ejb-name here needs to match the ejb-name defined in the openejb-jar.xml. The webapp appaerntly also uses the home and remote values here to validate the EJB signature at webapp deployment time.

...
enterprise-beans
 session
 descriptionMy MFC Session EJB/description
 display-nameMFC Session EJB/display-name
  ejb-nameMfcSessionEJB/ejb-name
 homegltd.domain.app.interfaces.MfcSessionEJBHome/home
 remotegltd.domain.app.interfaces.MfcSessionEJB/remote
 ejb-classgtld.domain.app.ejb.MfcSessionEJB/ejb-class
 session-typeStateless/session-type
 transaction-typeContainer/transaction-type /session

/enterprise-beans
...


4. openejb-jar.xml - This needs a enterprise-beanssession component. The ejb-name needs to match the ej-jar.xml ejb-name as previously stated. The jndi-name does not appear to be used for referenc within the container but would be required for a stand alone app call to the EJB.


...
enterprise-beans
 session
 ejb-nameMfcSessionEJB/ejb-name 
 jndi-nameejb/MfcSessionEJB/jndi-name
 /session

/enterprise-beans
...



5. No additional libraries needed to bedeployedwith the WAR
to make the EJB lookup and method invocations.



Hope this helps. I spent a week and a half figuring this out on my
own. If you'ld like to try calling the EJB from a app client, I can help with that as well.

Mark Aufdencamp
[EMAIL PROTECTED]



 Original Message 
Subject: Accessing the local interface of an Session EJB from a
WARFrom: "Norbert Rieger" [EMAIL PROTECTED]Date: Tue, February 27, 2007 4:08 amTo: user@geronimo.apache.orgHello,
I try to connect from my web application to an existing Session
EJB(MfcSession) thru it's local interface.Both, the WAR and the EJB, are running within the same geronimo
installation. When installing the web app I get the following
message:
Deployer operation failed: Could not find an EJB for reference
MfcSession toa local session bean that has the home interfacede.lplusr.module.mfc.ejb.MfcSessionLocalHome and the local interfacede.lplusr.module.mfc.ejb.MfcSessionLocal
org.apache.geronimo.common.UnresolvedEJBRefException: Could not find an
EJB
for reference MfcSession to a local session bean that has the home
interfacede.lplusr.module.mfc.ejb.MfcSessionLocalHome and the local interfacede.lplusr.module.mfc.ejb.MfcSessionLocal
How do I connect to an EJB thru it's local interface, what's wrong with
myconfiguration ?Any help or advice is appreciated, thanks a lot in advance.NorbertThis is my configuration:Geronimo 1.1.1JDK 1.5.0_10Windows XP Profweb.xml:ejb-local-ref   

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

2007-02-27 Thread Norbert Rieger
Hello,

thanx a lot for your answer.

try ejb-ref-nameejb/MfcSession/ejb-ref-name
in web.xml.

I tried this already, got the same exception.

-Ursprüngliche Nachricht-
Von: Jack [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 27. Februar 2007 15:35
An: user@geronimo.apache.org
Betreff: Re: Accessing the local interface of an Session EJB from a WAR



--- Norbert Rieger [EMAIL PROTECTED] wrote:

 Hello,

 I try to connect from my web application to an
 existing Session EJB
 (MfcSession) thru it's local interface.
 Both, the WAR and the EJB, are running within the
 same geronimo
 installation. When installing the web app I get the
 following message:

 Deployer operation failed: Could not find an EJB for
 reference MfcSession to
 a local session bean that has the home interface
 de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
 local interface
 de.lplusr.module.mfc.ejb.MfcSessionLocal

org.apache.geronimo.common.UnresolvedEJBRefException:
 Could not find an EJB
 for reference MfcSession to a local session bean
 that has the home interface
 de.lplusr.module.mfc.ejb.MfcSessionLocalHome and the
 local interface
 de.lplusr.module.mfc.ejb.MfcSessionLocal

 How do I connect to an EJB thru it's local
 interface, what's wrong with my
 configuration ?

 Any help or advice is appreciated, thanks a lot in
 advance.

 Norbert


 This is my configuration:

 Geronimo 1.1.1
 JDK 1.5.0_10
 Windows XP Prof


 web.xml:

  ejb-local-ref
 ejb-ref-nameMfcSession/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type


local-homede.lplusr.module.mfc.ejb.MfcSessionLocalHome/local-home
 


localde.lplusr.module.mfc.ejb.MfcSessionLocal/local
 ejb-linkMfcSession/ejb-link
  /ejb-local-ref

 geronimo-web.xml:

 ?xml version=1.0 encoding=UTF-8?

 web-app


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


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


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


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

xmlns=http://geronimo.apache.org/xml/ns/deployment-1.1;
   moduleId
   groupIdlplusr/groupId
   artifactIdsys/artifactId
   version1.0/version
   /moduleId
   dependencies
   dependency
   groupIdejb/groupId
 artifactIdmfc-ejb/artifactId
 version1.0/version
 typejar/type
   /dependency
   /dependencies
   /environment
   context-root/sys/context-root
   ejb-local-ref
   ref-nameMfcSession/ref-name
   ejb-linkMfcSession/ejb-link
   /ejb-local-ref
 /web-app


 The EJB descriptor is:

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems,
 Inc.//DTD Enterprise
 JavaBeans 2.0//EN
 http://java.sun.com/dtd/ejb-jar_2_0.dtd;

 ejb-jar id=ejb-jar_1

description![CDATA[mfc-ejb-1.0 generated by
 eclipse wtp xdoclet
 extension.]]/description
display-namemfc-ejb-1.0/display-name

enterprise-beans

   !-- Session Beans --
   session id=Session_MfcSession
  description![CDATA[An EJB for remote
 access of
 MFC]]/description
  display-nameMfcSession/display-name

  ejb-nameMfcSession/ejb-name


 homede.lplusr.module.mfc.ejb.MfcSessionHome/home

 remotede.lplusr.module.mfc.ejb.MfcSession/remote


local-homede.lplusr.module.mfc.ejb.MfcSessionLocalHome/local-hom
 e


localde.lplusr.module.mfc.ejb.MfcSessionLocal/local


ejb-classde.lplusr.module.mfc.ejb.MfcSessionSession/ejb-class
  session-typeStateful/session-type

 transaction-typeContainer/transaction-type

   /session

 /ejb-jar



hi,
try ejb-ref-nameejb/MfcSession/ejb-ref-name
in web.xml.
regards,






The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php



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

2007-02-27 Thread Mark Aufdencamp

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, buthaven'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
WARFrom: "Norbert Rieger" [EMAIL PROTECTED]Date: Tue, February 27, 2007 8:23 amTo: 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

-Ursprngliche Nachricht-Von: Mark Aufdencamp [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 27. Februar 2007 16:01An: user@geronimo.apache.orgBetreff: 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
 remotegltd.domain.app.interfaces.MfcSessionEJB/remote
/ejb-ref...


Servlet/JSP code snippet:

Context ctx = new InitialContext();
MfcSessionEJBHome mfcSessionHome = (MfcSessionEJBHome) ctx.lookup("java:comp/env/ejb/MfcSessionEJB");
MfcSessionEJB mfcSession = mfcSessionHome.create();


2. geronimo-web.xml - This deployment descriptor needs two components. It needs an ejb-ref thatmatches the web.xml ejb-ref-name and defines the deployed EJB module as a pattern(module group/artifact/version/type). This serves as the linkage between the web.xml and the container for name service purposes. Second it needs to define the EJB module as a dependency for the webapp with a dependenciesdependency in the environment section. This allows access for the webapp Classloader to the EJB module.

...
environment
 moduleId
 ...
 /moduleId
 dependencies
 dependency
 groupIddefault/groupId
 artifactIdMfcSessionEJB/artifactId
 version1.0/version
 typecar/type
 /dependency
 /dependencies
/environment
ejb-ref

 !-- geronimo-web.xml.ref-name ==
web.xml.ejb-ref-name --
 ref-nameejb/MfcSessionEJB/ref-name
 pattern

 groupIddefault/groupId
 artifactIdMfcSessionEJB/artifactId
 version1.0/version
 typecar/type /pattern
/ejb-ref

3. ejb-jar.xml - Needs a enterprise-beansession
entry which can be generated by XDoclet. The ejb-name here needs to match the ejb-name defined in the openejb-jar.xml. The webapp appaerntly also uses the home and remote values here to validate the EJB signature at webapp deployment time.

...
enterprise-beans
 session
 descriptionMy MFC Session EJB/description
 display-nameMFC Session EJB/display-name
  ejb-nameMfcSessionEJB/ejb-name 
 homegltd.domain.app.interfaces.MfcSessionEJBHome/home
 remotegltd.domain.app.interfaces.MfcSessionEJB/remote
 ejb-classgtld.domain.app.ejb.MfcSessionEJB/ejb-class
 session-typeStateless/session-type
 

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

2007-02-27 Thread Mark Aufdencamp


Just reading back over and realized you were asking about adding the
ejb-jar and openejb-jar to the webapp. They are in the EJB module, not the webapp. The point is that the container has an abstraction to be fulfilled at deployment time. The EJB uses ejb-jar.xml for generic descriptor metadata, and the openejb-jar.xml fulfills vendor specific container metadata. The right linkage must exist between the two. If you have an EJB deployed, then your probably ok here.


Likewise, the web.xml and the geronimo-web.xml have the same function
within the webapp. Then the geronimo-web.xml, and the openejb-jar.xml have a linkage that allows the container to provide for thier connectivity.


All of these stars must be aligned for your Servlet/JSP running in
Tomcat/Jetty to access the EJB running in OpenEJB. Failure to align these stars will most likely result in either an exception at deployment or a naming exception at run time.
 Original Message 
Subject: RE: AW: Accessing the local interface of an Session EJB from
aWARFrom: Mark Aufdencamp [EMAIL PROTECTED]Date: Tue, February 27, 2007 8:33 amTo: user@geronimo.apache.org

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, buthaven'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
WARFrom: "Norbert Rieger" [EMAIL PROTECTED]Date: Tue, February 27, 2007 8:23 amTo: 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

-Ursprngliche Nachricht-Von: Mark Aufdencamp [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 27. Februar 2007 16:01An: user@geronimo.apache.orgBetreff: 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
 remotegltd.domain.app.interfaces.MfcSessionEJB/remote
/ejb-ref...


Servlet/JSP code snippet:

Context ctx = new InitialContext();
MfcSessionEJBHome mfcSessionHome = (MfcSessionEJBHome) ctx.lookup("java:comp/env/ejb/MfcSessionEJB");
MfcSessionEJB mfcSession = mfcSessionHome.create();


2. geronimo-web.xml - This deployment descriptor needs two components. It needs an ejb-ref thatmatches the web.xml ejb-ref-name and defines the deployed EJB module as a pattern(module group/artifact/version/type). This serves as the linkage between the web.xml and the container for name service purposes. Second it needs to define the EJB module as a dependency for the webapp with a dependenciesdependency in the environment section. This allows access for the 

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

2007-02-27 Thread Norbert Rieger
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).

Regards,

Norbert
  -Ursprungliche 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
  -Ursprungliche 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
   remotegltd.domain.app.interfaces.MfcSessionEJB/remote
  /ejb-ref
  ...


  Servlet/JSP code snippet:

  Context ctx = new InitialContext();
  MfcSessionEJBHome mfcSessionHome = (MfcSessionEJBHome)
ctx.lookup(java:comp/env/ejb/MfcSessionEJB);
  MfcSessionEJB mfcSession = mfcSessionHome.create();


  2. geronimo-web.xml - This deployment descriptor needs two components.
It needs an ejb-ref that matches the web.xml ejb-ref-name  and defines
the deployed EJB module as a pattern(module group/artifact/version/type).
This serves as the linkage between the web.xml and the container for name
service purposes.  Second it needs to define the EJB module as a dependency
for the webapp with a dependenciesdependency in the environment
section.  This allows access for the webapp Classloader to the EJB module.

  ...
  environment
   moduleId
   ...
   /moduleId
   dependencies
dependency
 groupIddefault/groupId
   

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

2007-02-27 Thread Mark Aufdencamp

Sounds like your one step ahead of me in working on the local
interface. Maybe someone else will chime in and show us the appropriate ejb-local-ref in both the ejb-jar and openejb-jar, along with appropriate invocation code?


I'd be more than willing to document these three scenarios for the Wiki
(remote client, remote local container, local)if a more experienced contributor would offer some guidance.

 Original Message 
Subject: AW: AW: Accessing the local interface of an Session EJB from
aWARFrom: "Norbert Rieger" [EMAIL PROTECTED]Date: Tue, February 27, 2007 8:59 amTo: user@geronimo.apache.org
Hi Mark,


maybe my question was not exactly enough (my EJB learning curve is
stillin 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).

Regards,

Norbert

-Ursprngliche Nachricht-Von: Mark Aufdencamp [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 27. Februar 2007 16:34An: user@geronimo.apache.orgBetreff:
 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, buthaven'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
WARFrom: "Norbert Rieger" [EMAIL PROTECTED]Date: Tue, February 27, 2007 8:23 amTo: 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

-Ursprngliche Nachricht-Von: Mark Aufdencamp [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 27. Februar 2007 16:01An: user@geronimo.apache.orgBetreff: 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
 remotegltd.domain.app.interfaces.MfcSessionEJB/remote
/ejb-ref...


Servlet/JSP code snippet:

Context ctx = new InitialContext();
MfcSessionEJBHome mfcSessionHome = (MfcSessionEJBHome) ctx.lookup("java:comp/env/ejb/MfcSessionEJB");
MfcSessionEJB mfcSession = mfcSessionHome.create();


2. geronimo-web.xml - This deployment descriptor needs two components. It needs an ejb-ref thatmatches the web.xml ejb-ref-name and defines the deployed EJB module as a pattern(module group/artifact/version/type). This serves as the linkage between the web.xml and the container for name service 

Re: JPA in geronimo

2007-02-27 Thread Dain Sundstrom

On Feb 24, 2007, at 2:52 PM, Dario Andrade wrote:


How do I assemble a project in order to use geronimo's jpa support?

Does anyone recommend toplink jar lib or openjpa to be added to my  
class path?


I highly recommend OpenJPA over toplink.  I find toplink much more  
picky and hard to understand then OpenJPA.  Also, I find it easier to  
get help and fixes from OpenJPA.


-dain



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: JPA in geronimo

2007-02-27 Thread Dain Sundstrom

On Feb 25, 2007, at 2:11 AM, David Jencks wrote:


On Feb 24, 2007, at 8:47 PM, Lasantha Ranaweera wrote:


Hi David,

I have been going on this same jpa sample given on testsuite and  
having a
problem too (may be I am missing some basic thing in JSR). Anyway  
thought
to give a try on this same thread it looks iron is hot here and it  
will

give some insight on G to our users too. ;)

In my debugging enviroment shows that above sample application  
creates 3
PersistenceUnitGBeans. The one I dont understand it named 'cmp'.  
Where
does it comes from ? Either 'persistence.xml' or 'openejb-jar.xml'  
doesn't

have that information know. Do you have any idea what is I am missing
here?


That one is created by some magic code dain wrote to map cmp 2.1  
entity beans to jpa.  Apparently it shows up even if you have no  
entity beans.


It should only be created if your application has CMP entities.  If  
notice this code creating a persistence unit for applications without  
CMP entities, it is a bug.


-dain


Re: Adding Tomcat Valve specific web apps

2007-02-27 Thread Aman Nanner/MxI Technologies
Is the valve-chain element supposed to refer to a GBean valve name?  I've
tried this but I'm getting deployment errors.

I have defined the following valve chain in my config.xml


gbean name=FirstValve
  attribute
name=classNameorg.apache.catalina.valves.AccessLogValve/attribute
  attribute name=initParamsprefix=0.0.0.0_access_log.
  suffix=.txt
  pattern=common/attribute
  reference name=NextValve
pattern
  nameSecondValve/name
/pattern
  /reference
/gbean
gbean
name=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=GBean,name=SecondValve
 gbeanInfo=org.apache.geronimo.tomcat.ValveGBean
  attribute
name=classNameorg.apache.catalina.authenticator.SingleSignOn/attribute
/gbean
gbean
name=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=GBean,name=BasicAuthValve
 gbeanInfo=org.apache.geronimo.tomcat.ValveGBean
  attribute
name=classNameorg.apache.catalina.authenticator.BasicAuthenticator/attribute
  attribute
name=initParamsdisableProxyCaching=false/attribute
  reference name=NextValve
pattern
  nameFirstValve/name
/pattern
  /reference
/gbean



The config.xml defines a default valve chain consisting of FirstValve and
SecondValve.  Now, in certain specific web apps, I want to define the
valve-chain element in the geronimo.web.xml so that I can extend this
valve chain with another valve, but just for the specific web app.  In the
geronimo-web.xml, I will add the following element:


valve-chainBasicAuthValve/valve-chain


I'm hoping that this pre-appends the BasicAuthValve valve to the valve
chain, since the BasicAuthValve has the FirstValve as a GBean reference.

As I stated before, I'm getting a deployment error when this occurs:


 [java]   The service
 [java]
J2EEApplication=Mxi/Maintenix/1/ear,j2eeType=WebModule,name=induction.war
 [java] did not start because
 [java]
Mxi/Maintenix/1/ear?J2EEApplication=Mxi/Maintenix/1/ear,WebModule=induction.war,j2eeType=TomcatValve,name=BasicAuthValve
 [java] did not start.


It seems that the deployer is trying look for the BasicAuthValve GBean in
the web app itself.  Anybody have any ideas on how I can get this working?

Thanks,
Aman

Aman Nanner/MxI Technologies [EMAIL PROTECTED] wrote on 02-21-2007
04:58:27 PM:


 Hello,

 I'm deploying an application EAR file on Geronimo 1.2-beta.  This EAR
 contains several web applications.  When we deploy this application in
 JBoss, we have a META-INF/context.xml file in each web app that lets us
 specify Tomcat valves that only apply to that web app in particular.  We
 would like to do the same thing with Tomcat in Geronimo.

 Upon examining the geronimo-tomcat-1.1.xsd descriptor (which is the
schema
 we are using for the geronimo-web.xml), I noticed that there is a
 tomcat:valve-chain element.  This would appear to be the element that
 would offer the functionality that we are looking for.  However, it is
only
 defined as a string type, and I'm not sure how I'm supposed to specify
 the valve(s) in here.  Also, do these valves get used in addition to the
 valves that are specified in config.xml?  If anybody has any knowledge in
 this area, please let me know.

 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. *


__
* 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: javax.mail.NoSuchProviderException when Trying to send mail usingGeronimo 1.1.1 - Reg

2007-02-27 Thread Aman Nanner/MxI Technologies
I'd like to rebuild the Geronimo 1.2 branch with javamail config dependency
enabled properly.  Do I need to add some kind of dependency to the plan.xml
for javamail config?

Rick McGuire [EMAIL PROTECTED] wrote on 02-27-2007 07:20:01 AM:

 Kamalanathan Raman wrote:
  Hi Aman,
 
  The geronimo-java-mail-transport jar should be present inside the
  repository/Geronimo folder just check for that and add to your
classpath
 
 The geronimo-javamail-transport jar doesn't exist any more in the 1.2
 release.  It has been replaced by the geroinimo-javamail_1.3.1_provider
 jar file.  Unfortunately, in the Geronimo 1.2 beta, that dependency
 somehow got removed from the javamail config dependency, resulting in
 the jar file not getting included in the final assembly.  I'll take care
 of getting this fixed for the final Geronimo 1.2 release.

 Rick


  Thanks and Regards,
  Kamal
 
  -Original Message-
  From: Aman Nanner/MxI Technologies [mailto:[EMAIL PROTECTED]
 
  Sent: Tuesday, February 27, 2007 4:42 AM
  To: user@geronimo.apache.org
  Subject: Re: javax.mail.NoSuchProviderException when Trying to send
mail
  usingGeronimo 1.1.1 - Reg
 
  I tried deploying with this configuration, but the deployment failed as
  this does not exist in the repository anywhere.  Is the
  geronimo-javamail_1.3.1_provider supposed to exist as a module or
  configuration in the repository?  Is it a separate plugin?
 
  Rick McGuire [EMAIL PROTECTED] wrote on 02-26-2007 05:29:41 PM:
 
 
  Aman Nanner/MxI Technologies wrote:
 
  Hi,
 
  I'm also getting a NoSuchProviderException, but in Geronimo 1.2.  It
 
  seems
 
  that the geronimo-javamail-transport module has been moved, or no
 
  longer
 
  exists, so what dependency should I use in its place?
 
 
  In 1.2, the javamail providers are in
 
  geronimo-javamail_1.3.1_provider, which is in the
  org.apache.geronimo.javamail groupId.  For providers, we now have
 
  POP3,
 
  NNTP, and NNTP-POST in addtion to SMTP.
 
  Rick
 
 
 
  Thanks,
  Aman
 
 
 
  
  In order to send mail, there are two jar files you need in your
  dependencies. The first jar file,
 
  geronimo-javamail_1.3.1_spec-1.1.jar
  is
 
  in the base configuration and contains the javax.mail.* classes. You
 
  have
 
  that one, otherwise you wouldn't get as far as you have. The second
 
  jar
 
  file, geronimo-javamail-transport-1.1.1.jar contains the Geronimo
 
  SMTP
 
  transport implementation. That's the jar file you're missing in your
  application dependencies.
 
  Rick
 
 
  Kamalanathan Raman wrote:
 
 
  Hi ,
 
 
  Iam using Geronimo 1.1.1 .Can any one help me in resolving the
 
  following
 
  issue, iam trying to configure a mail session and send notification
 
  mail.
 
  But when I try to run my application it throws this particular
 
  error.
  Iam
 
  not able to figure out what it suggests, Your valuable suggestion is
  invited.Thanks in advance for your reply.
 
 
  2007-02-19 18:32:54,601 ERROR com.symcor.common.util.SendMail
  -sendNotification(...):_MessagingException_
 
 
  _javax.mail.NoSuchProviderException_: Unable to locate provider for
  protocol: smtp
 
at javax.mail.Session.getProvider(_Session.java:227_)
 
at javax.mail.Session.getTransport(_Session.java:336_)
 
at javax.mail.Session.getTransport(_Session.java:366_)
 
at javax.mail.Transport.send(_Transport.java:65_)
 
at javax.mail.Transport.send(_Transport.java:46_)
 
 
  at
 
  com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
 
  at
 
  com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
 
  at
 
  com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
 
at
 
  com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
 
  2007-02-19 18:32:54,617 INFO com.symcor.common.util.SendMail
  -sendNotification(...):exit
 
 
  2007-02-19 18:32:54,617 ERROR root -main[]:Unable to locate provider
 
  for
 
  protocol: smtp
 
 
  _javax.mail.NoSuchProviderException_: Unable to locate provider for
  protocol: smtp
 
at javax.mail.Session.getProvider(_Session.java:227_)
 
at javax.mail.Session.getTransport(_Session.java:336_)
 
at javax.mail.Session.getTransport(_Session.java:366_)
 
at javax.mail.Transport.send(_Transport.java:65_)
 
at javax.mail.Transport.send(_Transport.java:46_)
 
 
  at
 
  com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
 
  at
 
  com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
 
  at
 
  com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
 
at
 
  com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
 
  Thanks and Regards,
 
  kamal
 
 
 
 

  __
 
 
  * This message is intended only for the use of the individual or
 
  entity to which it is addressed, and may contain information that is
  

Re: javax.mail.NoSuchProviderException when Trying to send mail usingGeronimo 1.1.1 - Reg

2007-02-27 Thread Rick McGuire

Aman Nanner/MxI Technologies wrote:

I'd like to rebuild the Geronimo 1.2 branch with javamail config dependency
enabled properly.  Do I need to add some kind of dependency to the plan.xml
for javamail config?
  
If you're rebuilding from source, add the following lines to the 
dependencies section of configs/javamail/pom.xml:



   dependency
   groupIdorg.apache.geronimo.javamail/groupId
   artifactIdgeronimo-javamail_1.3.1_provider/artifactId
   /dependency


Rick



Rick McGuire [EMAIL PROTECTED] wrote on 02-27-2007 07:20:01 AM:

  

Kamalanathan Raman wrote:


Hi Aman,

The geronimo-java-mail-transport jar should be present inside the
repository/Geronimo folder just check for that and add to your
  

classpath
  

The geronimo-javamail-transport jar doesn't exist any more in the 1.2
release.  It has been replaced by the geroinimo-javamail_1.3.1_provider
jar file.  Unfortunately, in the Geronimo 1.2 beta, that dependency
somehow got removed from the javamail config dependency, resulting in
the jar file not getting included in the final assembly.  I'll take care
of getting this fixed for the final Geronimo 1.2 release.

Rick




Thanks and Regards,
Kamal

-Original Message-
From: Aman Nanner/MxI Technologies [mailto:[EMAIL PROTECTED]

Sent: Tuesday, February 27, 2007 4:42 AM
To: user@geronimo.apache.org
Subject: Re: javax.mail.NoSuchProviderException when Trying to send
  

mail
  

usingGeronimo 1.1.1 - Reg

I tried deploying with this configuration, but the deployment failed as
this does not exist in the repository anywhere.  Is the
geronimo-javamail_1.3.1_provider supposed to exist as a module or
configuration in the repository?  Is it a separate plugin?

Rick McGuire [EMAIL PROTECTED] wrote on 02-26-2007 05:29:41 PM:


  

Aman Nanner/MxI Technologies wrote:



Hi,

I'm also getting a NoSuchProviderException, but in Geronimo 1.2.  It

  

seems

  

that the geronimo-javamail-transport module has been moved, or no

  

longer

  

exists, so what dependency should I use in its place?


  

In 1.2, the javamail providers are in

geronimo-javamail_1.3.1_provider, which is in the
org.apache.geronimo.javamail groupId.  For providers, we now have



POP3,

  

NNTP, and NNTP-POST in addtion to SMTP.

Rick





Thanks,
Aman




In order to send mail, there are two jar files you need in your
dependencies. The first jar file,

  

geronimo-javamail_1.3.1_spec-1.1.jar
is

  

in the base configuration and contains the javax.mail.* classes. You

  

have

  

that one, otherwise you wouldn't get as far as you have. The second

  

jar

  

file, geronimo-javamail-transport-1.1.1.jar contains the Geronimo

  

SMTP

  

transport implementation. That's the jar file you're missing in your
application dependencies.

Rick


Kamalanathan Raman wrote:


Hi ,


Iam using Geronimo 1.1.1 .Can any one help me in resolving the

  

following

  

issue, iam trying to configure a mail session and send notification

  

mail.

  

But when I try to run my application it throws this particular

  

error.
Iam

  

not able to figure out what it suggests, Your valuable suggestion is
invited.Thanks in advance for your reply.


2007-02-19 18:32:54,601 ERROR com.symcor.common.util.SendMail
-sendNotification(...):_MessagingException_


_javax.mail.NoSuchProviderException_: Unable to locate provider for
protocol: smtp

  at javax.mail.Session.getProvider(_Session.java:227_)

  at javax.mail.Session.getTransport(_Session.java:336_)

  at javax.mail.Session.getTransport(_Session.java:366_)

  at javax.mail.Transport.send(_Transport.java:65_)

  at javax.mail.Transport.send(_Transport.java:46_)


at

  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)

  

at

  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)

  

at

  

com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)

  

  at

  

com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)

  

2007-02-19 18:32:54,617 INFO com.symcor.common.util.SendMail
-sendNotification(...):exit


2007-02-19 18:32:54,617 ERROR root -main[]:Unable to locate provider

  

for

  

protocol: smtp


_javax.mail.NoSuchProviderException_: Unable to locate provider for
protocol: smtp

  at javax.mail.Session.getProvider(_Session.java:227_)

  at javax.mail.Session.getTransport(_Session.java:336_)

  at javax.mail.Session.getTransport(_Session.java:366_)

  at javax.mail.Transport.send(_Transport.java:65_)

  at javax.mail.Transport.send(_Transport.java:46_)


at

  

com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)

  

at

  


Re: Geronimo v2.0 Documentation update

2007-02-27 Thread Hernan Cunico

Thanks for your feedback Jack.

If you are talking about the Multiple Repositories and Server Instances 
article, I'm taking a look at it now and will make the necessary updates.

As for automatic port assignment, you are absolutely right, there is no tool 
for that and it might be a good area to improve Geronimo's usability. Could you 
open a JIRA for this improvement

Cheers!
Hernan

Jack wrote:



*/Hernan Cunico [EMAIL PROTECTED]/* wrote:

Hi All,
Administration docs are half way through. Would like to hear new
ideas for topics to cover, see

http://cwiki.apache.org/GMOxDOC20/documentation.html

Just added Virtual Host configuration example for both Jetty and Tomcat.

Cheers!
Hernan

hi,
i have read and try the multiple instance subject, but it doesn't work 
until i add the env variable GERONIMO_BASE=directory_of_second_instance.
either, there's no tool to automatically increment/decrement port number 
in config.xml to start correctly a second instance. i have used a small 
java app using

jdom.jar.
regards,




Re: Runing Apache Roller 3.0 on Geronimo 1.1.1

2007-02-27 Thread Peter Petersson

Nice to know I am not the only one wanting to see this app. running on G.

Unfortunately I did not have any luck with Geronimo 1.2 beta ether this 
time i could not get Roller running at all due to the following:


21:30:13,854 INFO  [HbmBinder] Mapping collection: 
org.apache.roller.pojos.PlanetSubscriptionData.entries - rag_entry

21:30:13,862 FATAL [HibernateRollerImpl] Error initializing Hibernate
java.lang.ClassCastException: java.util.HashSet
   at 
org.hibernate.util.PropertiesHelper.resolvePlaceHolders(PropertiesHelper.java:88)


I am running out of ideas on how to tackle this on.
/Peter



David Jencks wrote:
Jeff Genender and I spent some time trying to get approximately this 
version of roller working on approximately  that version of geronimo 
and ran into a bunch of serious problems, I think including the one 
you found.I think the most serious problems are fixed in geronimo 
1.2 and 2.0 (neither released yet), but we haven't had time to try 
again.  In any case I recommend trying with one of these later 
geronimo versions.


It would be great to have a roller plugin.  Perhaps starting a JIRA 
and contributing the plans would provide a place to start and keep 
track of progress and problems?


thanks
david jencks

On Feb 25, 2007, at 11:24 AM, Peter Petersson wrote:


Hi

I am trying to run  Apache Roller 
http://cwiki.apache.org/confluence/display/ROLLER 3.0 on Geronimo 
1.1.1 but soon after startup (during the initial configuration steps) 
hibernate is starting to throw
org.hibernate.SessionException: Session is closed! exceptions (I am 
not sure this is the course of the problems).


Dose anyone have a tutorial or a working configuration to share with 
the public available ?
I have searched the web for it but have only come up with outdated 
information.

Any help in resolving the problems is greatly appreciated.

Roller configuration changes:
As I am using MySql 5.0.35 with (J/Connector 3.1.12) I have changed 
the hibernate dialect accordingly

hibernate.cfg.xml
 :
!-- For MySQL 5.X, use the MySQL5 dialect and J/Connector 3.1.X  --
property name=dialectorg.hibernate.dialect.MySQL5Dialect/property
 :

Geronimo/Roller configuration

Created the mysql roller database and deployed the db plan
Database plan:
?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
  /dep:dependencies
  /dep:environment
  resourceadapter
  outbound-resourceadapter
  connection-definition
  
connectionfactory-interfacejavax.sql.DataSource/connectionfactory-interface 


  connectiondefinition-instance
  nameMySqlDB_roller/name
  config-property-setting 
name=Passwordthepw/config-property-setting
  config-property-setting 
name=Drivercom.mysql.jdbc.Driver/config-property-setting
  config-property-setting 
name=UserNamethename/config-property-setting
  config-property-setting 
name=ConnectionURLjdbc:mysql://localhost:3306/roller/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


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:groupIdm4u/sys:groupId
sys:artifactIdroller/sys:artifactId
sys:typewar/sys:type
  /sys:moduleId
sys:dependencies
sys:dependency
   sys:groupIdconsole.dbpool/sys:groupId
   sys:artifactIdMySqlDB_roller/sys:artifactId
/sys:dependency  /sys:dependencies
!--hidden-classes
  filterantlr/filter
  filterorg.springframework/filter
  filterorg.apache.xerces/filter
  filterorg.apache.commons.digester/filter
  /hidden-classes
--  /sys:environment

context-root/roller/context-root
  sys:resource-ref
   

Re: javax.mail.NoSuchProviderException when Trying to send mail usingGeronimo 1.1.1 - Reg

2007-02-27 Thread Aman Nanner/MxI Technologies
Thanks, I rebuilt Geronimo with the dependency and it works now.

Aman


Rick McGuire [EMAIL PROTECTED] wrote on 02-27-2007 02:23:39 PM:

 Aman Nanner/MxI Technologies wrote:
  I'd like to rebuild the Geronimo 1.2 branch with javamail config
dependency
  enabled properly.  Do I need to add some kind of dependency to the
plan.xml
  for javamail config?
 
 If you're rebuilding from source, add the following lines to the
 dependencies section of configs/javamail/pom.xml:


 dependency
 groupIdorg.apache.geronimo.javamail/groupId
 artifactIdgeronimo-javamail_1.3.1_provider/artifactId
 /dependency


 Rick


  Rick McGuire [EMAIL PROTECTED] wrote on 02-27-2007 07:20:01 AM:
 
 
  Kamalanathan Raman wrote:
 
  Hi Aman,
 
  The geronimo-java-mail-transport jar should be present inside the
  repository/Geronimo folder just check for that and add to your
 
  classpath
 
  The geronimo-javamail-transport jar doesn't exist any more in the 1.2
  release.  It has been replaced by the geroinimo-javamail_1.3.1
_provider
  jar file.  Unfortunately, in the Geronimo 1.2 beta, that dependency
  somehow got removed from the javamail config dependency, resulting in
  the jar file not getting included in the final assembly.  I'll take
care
  of getting this fixed for the final Geronimo 1.2 release.
 
  Rick
 
 
 
  Thanks and Regards,
  Kamal
 
  -Original Message-
  From: Aman Nanner/MxI Technologies [mailto:[EMAIL PROTECTED]
 
  Sent: Tuesday, February 27, 2007 4:42 AM
  To: user@geronimo.apache.org
  Subject: Re: javax.mail.NoSuchProviderException when Trying to send
 
  mail
 
  usingGeronimo 1.1.1 - Reg
 
  I tried deploying with this configuration, but the deployment failed
as
  this does not exist in the repository anywhere.  Is the
  geronimo-javamail_1.3.1_provider supposed to exist as a module or
  configuration in the repository?  Is it a separate plugin?
 
  Rick McGuire [EMAIL PROTECTED] wrote on 02-26-2007 05:29:41 PM:
 
 
 
  Aman Nanner/MxI Technologies wrote:
 
 
  Hi,
 
  I'm also getting a NoSuchProviderException, but in Geronimo 1.2.
It
 
 
  seems
 
 
  that the geronimo-javamail-transport module has been moved, or no
 
 
  longer
 
 
  exists, so what dependency should I use in its place?
 
 
 
  In 1.2, the javamail providers are in
 
  geronimo-javamail_1.3.1_provider, which is in the
  org.apache.geronimo.javamail groupId.  For providers, we now have
 
 
  POP3,
 
 
  NNTP, and NNTP-POST in addtion to SMTP.
 
  Rick
 
 
 
 
  Thanks,
  Aman
 
 
 
  
  In order to send mail, there are two jar files you need in your
  dependencies. The first jar file,
 
 
  geronimo-javamail_1.3.1_spec-1.1.jar
  is
 
 
  in the base configuration and contains the javax.mail.* classes.
You
 
 
  have
 
 
  that one, otherwise you wouldn't get as far as you have. The second
 
 
  jar
 
 
  file, geronimo-javamail-transport-1.1.1.jar contains the Geronimo
 
 
  SMTP
 
 
  transport implementation. That's the jar file you're missing in
your
  application dependencies.
 
  Rick
 
 
  Kamalanathan Raman wrote:
 
 
  Hi ,
 
 
  Iam using Geronimo 1.1.1 .Can any one help me in resolving the
 
 
  following
 
 
  issue, iam trying to configure a mail session and send notification
 
 
  mail.
 
 
  But when I try to run my application it throws this particular
 
 
  error.
  Iam
 
 
  not able to figure out what it suggests, Your valuable suggestion
is
  invited.Thanks in advance for your reply.
 
 
  2007-02-19 18:32:54,601 ERROR com.symcor.common.util.SendMail
  -sendNotification(...):_MessagingException_
 
 
  _javax.mail.NoSuchProviderException_: Unable to locate provider for
  protocol: smtp
 
at javax.mail.Session.getProvider(_Session.java:227_)
 
at javax.mail.Session.getTransport(_Session.java:336_)
 
at javax.mail.Session.getTransport(_Session.java:366_)
 
at javax.mail.Transport.send(_Transport.java:65_)
 
at javax.mail.Transport.send(_Transport.java:46_)
 
 
  at
 
 
  com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
 
 
  at
 
 
  com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
 
 
  at
 
 
  com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
 
 
at
 
 
  com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
 
 
  2007-02-19 18:32:54,617 INFO com.symcor.common.util.SendMail
  -sendNotification(...):exit
 
 
  2007-02-19 18:32:54,617 ERROR root -main[]:Unable to locate
provider
 
 
  for
 
 
  protocol: smtp
 
 
  _javax.mail.NoSuchProviderException_: Unable to locate provider for
  protocol: smtp
 
at javax.mail.Session.getProvider(_Session.java:227_)
 
at javax.mail.Session.getTransport(_Session.java:336_)
 
at javax.mail.Session.getTransport(_Session.java:366_)
 
at javax.mail.Transport.send(_Transport.java:65_)
 
at javax.mail.Transport.send(_Transport.java:46_)
 
 
  at
 
 
  

Re: Runing Apache Roller 3.0 on Geronimo 1.1.1

2007-02-27 Thread Tim McConnell
Hi Peter, I was able to get Roller working on the Tomcat version of Geronimo 
1.1.1 in November of 2006, with the help of this article below:


http://www.savoirtech.com/roller/page/jgenender?entry=roller_on_apache_geronimo

I have a presentation that details all the version levels for the appropriate 
software if you are interested.


Thanks,
Tim McConnell


Peter Petersson wrote:

Hi

I am trying to run  Apache Roller 
http://cwiki.apache.org/confluence/display/ROLLER 3.0 on Geronimo 
1.1.1 but soon after startup (during the initial configuration steps) 
hibernate is starting to throw
org.hibernate.SessionException: Session is closed! exceptions (I am not 
sure this is the course of the problems).


Dose anyone have a tutorial or a working configuration to share with the 
public available ?
I have searched the web for it but have only come up with outdated 
information.

Any help in resolving the problems is greatly appreciated.

Roller configuration changes:
As I am using MySql 5.0.35 with (J/Connector 3.1.12) I have changed the 
hibernate dialect accordingly

hibernate.cfg.xml
 :
!-- For MySQL 5.X, use the MySQL5 dialect and J/Connector 3.1.X  --
property name=dialectorg.hibernate.dialect.MySQL5Dialect/property
 :

Geronimo/Roller configuration

Created the mysql roller database and deployed the db plan
Database plan:
?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
  /dep:dependencies
  /dep:environment
  resourceadapter
  outbound-resourceadapter
  connection-definition
  
connectionfactory-interfacejavax.sql.DataSource/connectionfactory-interface 


  connectiondefinition-instance
  nameMySqlDB_roller/name
  config-property-setting 
name=Passwordthepw/config-property-setting
  config-property-setting 
name=Drivercom.mysql.jdbc.Driver/config-property-setting
  config-property-setting 
name=UserNamethename/config-property-setting
  config-property-setting 
name=ConnectionURLjdbc:mysql://localhost:3306/roller/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


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:groupIdm4u/sys:groupId
sys:artifactIdroller/sys:artifactId
sys:typewar/sys:type
  /sys:moduleId
sys:dependencies
sys:dependency
   sys:groupIdconsole.dbpool/sys:groupId
   sys:artifactIdMySqlDB_roller/sys:artifactId
/sys:dependency  /sys:dependencies
!--hidden-classes
  filterantlr/filter
  filterorg.springframework/filter
  filterorg.apache.xerces/filter
  filterorg.apache.commons.digester/filter
  /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

setenv.sh:
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
JAVA_OPTS=-Djava.awt.headless=true -XX:MaxPermSize=128m -Xms128M 
-Xmx512M -server


What am I missing or doing wrong here ? (or is there any known issues 
running Roller on Geronimo)


/Peter




Re: Web App Servlet calling EJB

2007-02-27 Thread Lasantha Ranaweera

Hi Mark,

Sharing documentation would be fantastic. We highly appreciate since it 
is one of the critical parts in every open source project. If we can 
create an EJB sample application with Eclipse/Geronimo plug in with some 
screen prints would be ideal  :-) .


More documentation we get that would be more helpful for the new comers 
of the project since it would always open different perspective on user 
problems.


Use following link to register with Confluence.
http://cwiki.apache.org/confluence/signup.action

Hernan might be able to help you if I am missing something in 
documentation.


Thanks,
Lasantha Ranaweera



[EMAIL PROTECTED] wrote:

Got it on my own finally after four days of effort!  I needed the
appropriate geronimo-web.xml syntax and info for the ejb-ref.  I also
needed a dependency for the EJB module in the WAR environment.

I enjoy learning this and appreciate the amount of flexibility offered,
but this really needs defined a whole lot better for developers to
actually use the product.  It's taken me two weeks of learning curve to
deploy a simple stateless session EJB and manage to call it from a
remote a client and a JSP on the same server.  I'd hate to be
justifying that to a Project Manager.  Granted, the first time I did
this in WebSphere 4 and Visual Age for Java and an AS400, it took six
weeks and we had better documentation and support.  Most of this effort
involves deployment descriptor learning whose information appears rather
distibuted at this time.

I've documented my learning curve and am willing to share, along with
doing screen shots to guide others through the learning curve of basic
JEE Eclipse and Geronimo development.

Does someone monitoring this list work on project documentation and
willing to tutor me on putting together a tutorial on building apps in
Eclipse and deploying them on Geronimo for the documentation section?

I'm using MyEclipse right now, but plan on playing with the geronimo
eclipse plug-in and WTP/JST.


  

 Original Message 
Subject: Web App Servlet calling EJB
From: [EMAIL PROTECTED]
Date: Mon, February 26, 2007 10:16 am
To: user@geronimo.apache.org

Hello Everyone,

After a good peice of information last week, I was able to get my stand
alone application call to a remote HelloWorld Session EJB. Thanks to
Richard Carragher, Jr for defining the required client libraries.  I'm
documenting my learning experence, and that has definetly made it into
my outline.

I'm now attempting to make the same call from a JSP.  I have a few
questions that I would appreciate someone clarifying for me.

1. I presume that in the absence of an EAR definition, that a
Servlet/JSP call to the EJB is still considered to be Remote. I
should use the same JNDI context lookup and will require the same
library jars in the WAR that were needed for the stand alone client. 
Is this correct?  If not, then how should I accomplish it?


2.  Do I need to define the ejb-ref or ejb-local-ref in the web.xml to
acess the EJB in this manner?  I've attempted this and keep getting a
Could not find an EJB reference... error mesage with more info about
not finding my EJB classes from the deployer.  I've been over the EJB
deployments in the ejb.xml and the openejb-jar.xml, as well as the
web.xml and the geronimo-web.xml.  I just need to find what I'm missing
in tying the WAR deploment to the EJB, and the code to the WAR
deployment.


Thanks all,

Mark Aufdencamp
[EMAIL PROTECTED]