You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by maho77 <m....@mvolution.de> on 2008/04/22 15:36:57 UTC

Substitute geronimo javamail with sun implementation

Hello,
When I use the geronimo-mail implementation to access pop3 folders in a
bean, I get exceptions for some of the messages. So i tried a sample main
application with the sun implementation without any errors. Now I wanted
Geronimo to use the sun implementation instead of geronimo-mail. 

My first step was to get the Geronimo implementation running. So I created
an GBean:

<?xml version="1.0" encoding="UTF-8"?>

<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
<environment>
<moduleId>
	<groupId>com.mvolution.mti.commons</groupId>
	<artifactId>POPMailGBean</artifactId>
	<version>1.0</version>
	<type>car</type>
</moduleId>
	<dependencies>
		<dependency>
			<groupId>org.apache.geronimo.modules</groupId>
			<artifactId>geronimo-mail</artifactId>
			<version>2.0.2</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>org.apache.geronimo.configs</groupId>
			<artifactId>javamail</artifactId>
			<version>2.0.2</version>
			<type>car</type>
		</dependency>
		<dependency>
			<groupId>org.apache.geronimo.modules</groupId>
			<artifactId>geronimo-management</artifactId>
			<version>2.0.2</version>
			<type>jar</type>
		</dependency>
	</dependencies>
</environment>

<gbean name="POP3" class="org.apache.geronimo.mail.POP3StoreGBean">
	<attribute name="host" type="java.lang.String">popserver</attribute>
	<attribute name="user" type="java.lang.String">username</attribute>
	<attribute name="port" type="java.lang.Integer">110</attribute>
</gbean>
<gbean name="mail/POPMailSession"
class="org.apache.geronimo.mail.MailGBean">
        <attribute name="transportProtocol">pop3</attribute>
        <attribute name="jndiName">ger:/POPMailSession</attribute>
        <reference name="Protocols"/>
</gbean>

This works very well in my Bean with the @Resource annotation.
I want this with the sun implemention.

So I installed the javamail.jar and activation.jar from sun on Geronimo. The
problem is the dependency org.apache.geronimo.configs/javamail/2.0.2/car in
the GBean. There is an geronimo.plugin.xml in
rg.apache.geronimo.configs/javamail/2.0.2/car which shows the dependency to
the org.apache.geronimo.javamail/geronimo-javamail_1.4_mail/1.2/jar.

How can I create such a configuration? Do I have to create it with a
deployment-plan? What schema do I have to use?

Thank you for your help.

Mark
-- 
View this message in context: http://www.nabble.com/Substitute-geronimo-javamail-with-sun-implementation-tp16824270s134p16824270.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Substitute geronimo javamail with sun implementation

Posted by maho77 <m....@mvolution.de>.
Hello,

the pop3 problems are solved on my 2.0.2 with the 1.5-SNAPSHOT of the
geronimo-mail svn-trunk build. I installed the new jar into the repository.
Now I followed your instructions and built config/javamail and
config/jee-specs because these booth configs have a dependency to
org.apache.geronimo.javamail/geronimo-javamail_1.4_mail/1.2. So i changed
the pom's to the new version of the
org.apache.geronimo.javamail/geronimo-javamail_1.4_mail/1.5-SNAPSHOT. I gave
them other names, so I got config/javamail2 and config/jee-specs2 with the
new dependency. I deployed both plans, changed the var/config/config.xml as
well as the var/config/client_artifact_aliases.properties:
org.apache.geronimo.configs/javamail//car=org.apache.geronimo.configs/javamail2/2.0.2/car
org.apache.geronimo.configs/jee-specs//car=org.apache.geronimo.configs/jee-specs2/2.0.2/car
Even after a server restart, geronimo took the old
geronimo-javamail_1.4_mail-1.2 implementation.:-(

The problem is the dependency to jee-specs. In the system module view the
old jee-spec still has its old children. My new  jee-specs2 has no child. So
I modified the pom's of config/javamail and config/jee-specs that I get the
same car like the installed ones with the only difference, the dependendy to
the 1.5-SNAPSHOT-jar. After the build I overwrote the files in the
repository with the versions from the build. I started the server and it
worked. I have to say that the plan I got are module plans you talked about
plugins, is this the same?

BUT you can reach the same result by renaming the 
original geronimo-javamail_1.4_mail-1.2.jar into
geronimo-javamail_1.4_mail-1.2_old.jar for instance and than copy your
geronimo-javamail_1.4_mail-1.5-SNAPSHOT.jar into the directory of the
1.2-jar and rename the new 1.5-SNAPSHOT version into
geronimo-javamail_1.4_mail-1.2.jar. Restart the server and it works.

I thought there is a possibility without server restart. If I modify the
client_artifact_aliases.properties, do I have to restart the server to make
my changes apply?

Mark


djencks wrote:
> 
> I guess we have one jar where sun has 2?  If so I think you need to  
> copy the javamail config project, rename it, and replace the  
> dependency on our jar with dependencies on the sun jars in the pom.   
> If you were using g 2.1 you could arrange it so that when your plugin  
> was installed it would replace ours, but this can't be automated in  
> 2.0.2.  In 2.0.2 I think you can map the plugins "by hand" by  
> including lines like this in var/config/artifact_aliases.properties:
> 
> org.apache.geronimo.configs/javamail/2.0.2/car=com.mark/sun-javamail/ 
> 1.0-SNAPSHOT/car
> org.apache.geronimo.configs/javamail//car=com.mark/sun-javamail/1.0- 
> SNAPSHOT/car
> 
> There's a good chance you'll only need one of these lines, but I'm  
> not sure which.
> 
> As Rick said, please let us know what pop3 problems you are seeing so  
> we can fix them.
> 
> thanks
> david jencks
> 

-- 
View this message in context: http://www.nabble.com/Substitute-geronimo-javamail-with-sun-implementation-tp16824270s134p16850768.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Locked keystore, forgive me I'm just a newbie

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
After you replaced the keystore, you have to undo the effect of deleting the
key-entry and locking the keystore which is persisted to config.xml.  This
is done by removing the gbean element under <module
name="org.apache.geronimo.framework/server-security-config/2.1/car"> which
resets the keystorePassword and keyPasswords attributes to their default
values.

++Vamsi


On Tue, Apr 22, 2008 at 11:30 PM, Ashwill, Steve (Facilities & Services) <
sashwill@uiuc.edu> wrote:

>  That did the trick.  Do you mind explaining what this did?
>
> Steven Ashwill
>
>
>  ------------------------------
> *From:* Vamsavardhana Reddy [mailto:c1vamsi1c@gmail.com]
> *Sent:* Tuesday, April 22, 2008 12:32 PM
> *To:* user@geronimo.apache.org
> *Subject:* Re: Locked keystore, forgive me I'm just a newbie
>
> After replacing the geronimo-default keystore, edit var/config/config.xml
> and locate the following xml fragment:
>
>     <module
> name="org.apache.geronimo.framework/server-security-config/2.1/car">
>         <gbean
> name="org.apache.geronimo.framework/server-security-config/2.1/car?ServiceModule=org.apache.geronimo.framework/server-security-config/2.1/car,j2eeType=Keystore,name=geronimo-default">
>             <attribute name="keyPasswords"/>
>             <attribute name="keystorePassword"/>
>         </gbean>
>     </module>
>
> Replace the above with:
>     <module
> name="org.apache.geronimo.framework/server-security-config/2.1/car"/>
>
> and start the server.
>
> Let us know if it helped.
>
> ++Vamsi
>
> On Tue, Apr 22, 2008 at 10:09 PM, Ashwill, Steve (Facilities & Services) <
> sashwill@uiuc.edu> wrote:
>
> >  I have managed to mess-up my keystore and now Geronimo(2.1) won't
> > start. I made the geronimo-default file editable and then I deleted the
> > entry within it.(Don't ask why, just for fun, I guess) Is there a way to
> > recover from this?  I added the file itself back to the
> > var/security/keystores folder but now it tells me that the keystore is
> > locked.  Am I hopeless or can I restore a few folders from the install
> > to get back to square one, but leave all the database pools intact or is
> > there an even better way to recover.
> >
> > Thanks,
> >
> > Steven Ashwill
> >
>
>

RE: Locked keystore, forgive me I'm just a newbie

Posted by "Ashwill, Steve (Facilities & Services)" <sa...@uiuc.edu>.
That did the trick.  Do you mind explaining what this did?
 
Steven Ashwill
 

________________________________

From: Vamsavardhana Reddy [mailto:c1vamsi1c@gmail.com] 
Sent: Tuesday, April 22, 2008 12:32 PM
To: user@geronimo.apache.org
Subject: Re: Locked keystore, forgive me I'm just a newbie


After replacing the geronimo-default keystore, edit
var/config/config.xml and locate the following xml fragment:

    <module
name="org.apache.geronimo.framework/server-security-config/2.1/car">
        <gbean
name="org.apache.geronimo.framework/server-security-config/2.1/car?Servi
ceModule=org.apache.geronimo.framework/server-security-config/2.1/car,j2
eeType=Keystore,name=geronimo-default">
            <attribute name="keyPasswords"/>
            <attribute name="keystorePassword"/>
        </gbean>
    </module>

Replace the above with:
    <module
name="org.apache.geronimo.framework/server-security-config/2.1/car"/>

and start the server.

Let us know if it helped.

++Vamsi


On Tue, Apr 22, 2008 at 10:09 PM, Ashwill, Steve (Facilities & Services)
<sa...@uiuc.edu> wrote:


	 I have managed to mess-up my keystore and now Geronimo(2.1)
won't
	start. I made the geronimo-default file editable and then I
deleted the
	entry within it.(Don't ask why, just for fun, I guess) Is there
a way to
	recover from this?  I added the file itself back to the
	var/security/keystores folder but now it tells me that the
keystore is
	locked.  Am I hopeless or can I restore a few folders from the
install
	to get back to square one, but leave all the database pools
intact or is
	there an even better way to recover.
	
	Thanks,
	
	Steven Ashwill
	



Re: Locked keystore, forgive me I'm just a newbie

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
After replacing the geronimo-default keystore, edit var/config/config.xml
and locate the following xml fragment:

    <module
name="org.apache.geronimo.framework/server-security-config/2.1/car">
        <gbean
name="org.apache.geronimo.framework/server-security-config/2.1/car?ServiceModule=org.apache.geronimo.framework/server-security-config/2.1/car,j2eeType=Keystore,name=geronimo-default">
            <attribute name="keyPasswords"/>
            <attribute name="keystorePassword"/>
        </gbean>
    </module>

Replace the above with:
    <module
name="org.apache.geronimo.framework/server-security-config/2.1/car"/>

and start the server.

Let us know if it helped.

++Vamsi

On Tue, Apr 22, 2008 at 10:09 PM, Ashwill, Steve (Facilities & Services) <
sashwill@uiuc.edu> wrote:

>  I have managed to mess-up my keystore and now Geronimo(2.1) won't
> start. I made the geronimo-default file editable and then I deleted the
> entry within it.(Don't ask why, just for fun, I guess) Is there a way to
> recover from this?  I added the file itself back to the
> var/security/keystores folder but now it tells me that the keystore is
> locked.  Am I hopeless or can I restore a few folders from the install
> to get back to square one, but leave all the database pools intact or is
> there an even better way to recover.
>
> Thanks,
>
> Steven Ashwill
>

Locked keystore, forgive me I'm just a newbie

Posted by "Ashwill, Steve (Facilities & Services)" <sa...@uiuc.edu>.
 I have managed to mess-up my keystore and now Geronimo(2.1) won't
start. I made the geronimo-default file editable and then I deleted the
entry within it.(Don't ask why, just for fun, I guess) Is there a way to
recover from this?  I added the file itself back to the
var/security/keystores folder but now it tells me that the keystore is
locked.  Am I hopeless or can I restore a few folders from the install
to get back to square one, but leave all the database pools intact or is
there an even better way to recover.  

Thanks,

Steven Ashwill

Re: Substitute geronimo javamail with sun implementation

Posted by David Jencks <da...@yahoo.com>.
I guess we have one jar where sun has 2?  If so I think you need to  
copy the javamail config project, rename it, and replace the  
dependency on our jar with dependencies on the sun jars in the pom.   
If you were using g 2.1 you could arrange it so that when your plugin  
was installed it would replace ours, but this can't be automated in  
2.0.2.  In 2.0.2 I think you can map the plugins "by hand" by  
including lines like this in var/config/artifact_aliases.properties:

org.apache.geronimo.configs/javamail/2.0.2/car=com.mark/sun-javamail/ 
1.0-SNAPSHOT/car
org.apache.geronimo.configs/javamail//car=com.mark/sun-javamail/1.0- 
SNAPSHOT/car

There's a good chance you'll only need one of these lines, but I'm  
not sure which.

As Rick said, please let us know what pop3 problems you are seeing so  
we can fix them.

thanks
david jencks

On Apr 22, 2008, at 6:36 AM, maho77 wrote:

>
> Hello,
> When I use the geronimo-mail implementation to access pop3 folders  
> in a
> bean, I get exceptions for some of the messages. So i tried a  
> sample main
> application with the sun implementation without any errors. Now I  
> wanted
> Geronimo to use the sun implementation instead of geronimo-mail.
>
> My first step was to get the Geronimo implementation running. So I  
> created
> an GBean:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
> <environment>
> <moduleId>
> 	<groupId>com.mvolution.mti.commons</groupId>
> 	<artifactId>POPMailGBean</artifactId>
> 	<version>1.0</version>
> 	<type>car</type>
> </moduleId>
> 	<dependencies>
> 		<dependency>
> 			<groupId>org.apache.geronimo.modules</groupId>
> 			<artifactId>geronimo-mail</artifactId>
> 			<version>2.0.2</version>
> 			<type>jar</type>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.geronimo.configs</groupId>
> 			<artifactId>javamail</artifactId>
> 			<version>2.0.2</version>
> 			<type>car</type>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.geronimo.modules</groupId>
> 			<artifactId>geronimo-management</artifactId>
> 			<version>2.0.2</version>
> 			<type>jar</type>
> 		</dependency>
> 	</dependencies>
> </environment>
>
> <gbean name="POP3" class="org.apache.geronimo.mail.POP3StoreGBean">
> 	<attribute name="host" type="java.lang.String">popserver</attribute>
> 	<attribute name="user" type="java.lang.String">username</attribute>
> 	<attribute name="port" type="java.lang.Integer">110</attribute>
> </gbean>
> <gbean name="mail/POPMailSession"
> class="org.apache.geronimo.mail.MailGBean">
>         <attribute name="transportProtocol">pop3</attribute>
>         <attribute name="jndiName">ger:/POPMailSession</attribute>
>         <reference name="Protocols"/>
> </gbean>
>
> This works very well in my Bean with the @Resource annotation.
> I want this with the sun implemention.
>
> So I installed the javamail.jar and activation.jar from sun on  
> Geronimo. The
> problem is the dependency org.apache.geronimo.configs/javamail/ 
> 2.0.2/car in
> the GBean. There is an geronimo.plugin.xml in
> rg.apache.geronimo.configs/javamail/2.0.2/car which shows the  
> dependency to
> the org.apache.geronimo.javamail/geronimo-javamail_1.4_mail/1.2/jar.
>
> How can I create such a configuration? Do I have to create it with a
> deployment-plan? What schema do I have to use?
>
> Thank you for your help.
>
> Mark
> -- 
> View this message in context: http://www.nabble.com/Substitute- 
> geronimo-javamail-with-sun-implementation-tp16824270s134p16824270.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: Substitute geronimo javamail with sun implementation

Posted by maho77 <m....@mvolution.de>.
Hello,

thank you, I have built the 1.5-SNAPSHOT version of
geronimo-javamail_1.4_mail. There are no exceptions anymore, so this
problems is fixed. 

replacing the jar in the repository is no solution because there are two
config-cars that contain dependencies to this jar config/javamail and
config/jee-specs. In my geronimo version they have dependency to
geronimo-javamail_1.4_mail_1.2,jar. So there are two solutions that I got to
work:
1. rename geronimo-javamail_1.4_mail_1.2,jar to
geronimo-javamail_1.4_mail_1.2_old,jar, copy
geronimo-javamail_1.4_mail_1.5-SNAPSHOT,jar to the 1.2 repository localtion
and rename it into geronimo-javamail_1.4_mail_1.2,jar. Restart the server.

2. Rebuild the two configs with modified pom's that link to the 1.5-SNAPSHOT
jar location and overwrite the configs-files in the repository. Restart the
server

I didn't found a solution without server restart until now. Even deploying
new configurations and using the client-artifact.properties didn't work. I'm
open for each help changing dependencies without a server restart.

Mark
-- 
View this message in context: http://www.nabble.com/Substitute-geronimo-javamail-with-sun-implementation-tp16824270s134p16895778.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Substitute geronimo javamail with sun implementation

Posted by Rick McGuire <ri...@gmail.com>.
maho77 wrote:
>
> Rick McGuire wrote:
>   
>> I think others will need to help you with the configuration, but please 
>> report the errors you're seeing with the Geronimo POP3 implementation.  
>> We'll see if we can get them fixed for you. 
>>
>> Rick
>>
>>     
>
> I think the problem I have has something to do with 
> http://issues.apache.org/jira/browse/GERONIMO-3539 GERONIMO-3539 . Further
> there is another solved bug regarding some exceptions in the Message
> implementation. Is it possible to build only the mail-module and mail-config
> from svn-trunk and install it on my geronimo 2.0.2 installation? Or do I
> have to build the whole Geronimo from scratch (Which doesn't work)? I have
> to say that I have no experiences with maven.
>   
That's not the correct thing to rebuild to pick up this fix.  The 
javamail implementation is a subproject of Geronimo, and is not in the 
main Geronimo source tree.  The 1.4 javamail release contains the Jira 
you reference, but I don't see how that would have an effect on a POP3 
operation.  This version also contains a fairly significant upgrade to 
the POP3 code, so it's possible this error might have been fixed. 

You can download the latest version from here:

http://repo1.maven.org/maven2/org/apache/geronimo/javamail/geronimo-javamail_1.4_mail/1.4/

Just replacing the equivalent jar in the repository should be sufficient.

I'd be able to give you more assistance if you'd provide some specifics 
about the errors you're receiving.  Also, the 1.4 version has improved 
debug support in the POP3 provider, so turning on the mail.debug 
property in the session should give a lot of useful information for 
diagnosing this.

Rick

> Mark
>   


Re: Substitute geronimo javamail with sun implementation

Posted by maho77 <m....@mvolution.de>.


Rick McGuire wrote:
> 
> I think others will need to help you with the configuration, but please 
> report the errors you're seeing with the Geronimo POP3 implementation.  
> We'll see if we can get them fixed for you. 
> 
> Rick
> 

I think the problem I have has something to do with 
http://issues.apache.org/jira/browse/GERONIMO-3539 GERONIMO-3539 . Further
there is another solved bug regarding some exceptions in the Message
implementation. Is it possible to build only the mail-module and mail-config
from svn-trunk and install it on my geronimo 2.0.2 installation? Or do I
have to build the whole Geronimo from scratch (Which doesn't work)? I have
to say that I have no experiences with maven.

Mark
-- 
View this message in context: http://www.nabble.com/Substitute-geronimo-javamail-with-sun-implementation-tp16824270s134p16834581.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Substitute geronimo javamail with sun implementation

Posted by Rick McGuire <ri...@gmail.com>.
maho77 wrote:
> Hello,
> When I use the geronimo-mail implementation to access pop3 folders in a
> bean, I get exceptions for some of the messages. So i tried a sample main
> application with the sun implementation without any errors. Now I wanted
> Geronimo to use the sun implementation instead of geronimo-mail. 
>   
I think others will need to help you with the configuration, but please 
report the errors you're seeing with the Geronimo POP3 implementation.  
We'll see if we can get them fixed for you. 

Rick


> My first step was to get the Geronimo implementation running. So I created
> an GBean:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
> <environment>
> <moduleId>
> 	<groupId>com.mvolution.mti.commons</groupId>
> 	<artifactId>POPMailGBean</artifactId>
> 	<version>1.0</version>
> 	<type>car</type>
> </moduleId>
> 	<dependencies>
> 		<dependency>
> 			<groupId>org.apache.geronimo.modules</groupId>
> 			<artifactId>geronimo-mail</artifactId>
> 			<version>2.0.2</version>
> 			<type>jar</type>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.geronimo.configs</groupId>
> 			<artifactId>javamail</artifactId>
> 			<version>2.0.2</version>
> 			<type>car</type>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.geronimo.modules</groupId>
> 			<artifactId>geronimo-management</artifactId>
> 			<version>2.0.2</version>
> 			<type>jar</type>
> 		</dependency>
> 	</dependencies>
> </environment>
>
> <gbean name="POP3" class="org.apache.geronimo.mail.POP3StoreGBean">
> 	<attribute name="host" type="java.lang.String">popserver</attribute>
> 	<attribute name="user" type="java.lang.String">username</attribute>
> 	<attribute name="port" type="java.lang.Integer">110</attribute>
> </gbean>
> <gbean name="mail/POPMailSession"
> class="org.apache.geronimo.mail.MailGBean">
>         <attribute name="transportProtocol">pop3</attribute>
>         <attribute name="jndiName">ger:/POPMailSession</attribute>
>         <reference name="Protocols"/>
> </gbean>
>
> This works very well in my Bean with the @Resource annotation.
> I want this with the sun implemention.
>
> So I installed the javamail.jar and activation.jar from sun on Geronimo. The
> problem is the dependency org.apache.geronimo.configs/javamail/2.0.2/car in
> the GBean. There is an geronimo.plugin.xml in
> rg.apache.geronimo.configs/javamail/2.0.2/car which shows the dependency to
> the org.apache.geronimo.javamail/geronimo-javamail_1.4_mail/1.2/jar.
>
> How can I create such a configuration? Do I have to create it with a
> deployment-plan? What schema do I have to use?
>
> Thank you for your help.
>
> Mark
>