I was the first guy in the world...

...to connect Sun ONE Application Server to PostgreSQL, so I'm expecting to be the first guy in the world who has tried to send email from an EJB deployed on Sun ONE Application Server.
I've gone through all the docs and tried dozens of different variations...I can look up the Session properly, but the problem is when I call Transport.send(). It happens on my application, and ALSO on the sample JavaMail application that ships with S1AS. I've set up the sessions properly via the admin interface.
All I have to go on is the following (completely useless) stack trace. Any ideas?
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:364)
at javax.rmi.CORBA.Util.wrapException(Util.java:277)
at com.ai.coaching.ejb.directorymanager._DirectoryManager_Stub.sendEmailToAccount(Unknown Source)
at com.ai.coaching.web.SendEmailAction.perform(SendEmailAction.java:142)
at org.apache.struts.action.Action.execute(Action.java:415)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
Caused by: java.rmi.RemoteException
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:451)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:545)
at com.ai.coaching.ejb.directorymanager.DirectoryManagerBean_EJBObjectImpl.sendEmailToAccount(DirectoryManagerBean_EJB
at com.ai.coaching.ejb.directorymanager._DirectoryManager_Stub.sendEmailToAccount(Unknown Source)
... 20 more

I too am having a similar problem.
I'm attempting to send an email from within a Struts Action class, deployed on the Sun App Server 7. I have followed several documented ways of sending a JavaMail email without success. When I call Transport.send... I receive the following error msg:
[28/Dec/2003:16:20:48] SEVERE ( 2812): StandardWrapperValve[StrutsController]: Servlet.service() for servlet StrutsController threw exception
javax.servlet.ServletException: Servlet execution threw an exception
     at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:742)
     at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
     at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
     at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
----- Root Cause -----
java.lang.ExceptionInInitializerError
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
     at javax.mail.Session.getService(Session.java:607)
     at javax.mail.Session.getTransport(Session.java:541)
     at javax.mail.Session.getTransport(Session.java:484)
     at javax.mail.Session.getTransport(Session.java:464)
     at com.americandatacorp.struts.action.MailAction.execute(MailAction.java:60)
     at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
     at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
     at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
     at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
     at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:549)
     at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:337)
     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:394)
     at com.sun.mail.smtp.SMTPTransport.<clinit>(SMTPTransport.java:44)
     ... 27 more
Caused by: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
     at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:542)
     ... 30 more
When I take the same approach and run the process from a main method in a standalone program it sends a mail successfully. Any idea why this is breaking with in the App Server or what this error message means?
The following is a summary of my code to send the email...
Properties props = new Properties();
props.put( "mail.smtp.host", host );
props.put("mail.smtp.auth", "true");
Authenticator auth = new ADCAuthenticator(); //implemented within this source file...
Session session = Session.getInstance( props, auth );
try {
MimeMessage msg = new MimeMessage( session );
msg.setFrom( new InternetAddress ( fromEmailAddress );
InternetAddress[] address = { new InternetAddress(  toEmailAddress ) };
msg.setRecipients( Message.RecipientType.TO, address );
msg.setSubject( "JavaMail APIs Multipart Test" );
msg.setSentDate( new Date() );
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setText( msgText1 );
MimeBodyPart mbp2 = new MimeBodyPart();
mbp2.setText( msgText2, "us-ascii" );
Multipart mp = new MimeMultipart();
mp.addBodyPart( mbp1 );
mp.addBodyPart( mbp2 );
msg.setContent( mp );
Transport.send( msg ); //the exception is thrown here.
} catch ( MessagingException mex ) {
mex.printStackTrace();
Exception ex = null;
if ( ( ex = mex.getNextException() ) != null ) {
ex.printStackTrace();
Is this a problem within my code or a bug in the application server? The root cause:
Caused by: java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
concerns me since I'm not making any calls to the application server logging system.
Thanks for your assistance to anyone who can shed any light on this issue.
Regards,
Josh Holtzman

Similar Messages

  • I was making a movie on iMovie, and was trying to use the green screen to make a split screen. I pressed on the green screen button, but the second clip didn't play next to the first, and only the audio played.

    I was making a movie on iMovie, and was trying to use the green screen to make a split screen. I pressed on the green screen button, but the second clip didn't play next to the first, and only the audio played. I tried again with some different clips and some worked and some didn't. This hasn't happened before. What should I do? (I am using iMovie '09)

    No guarantess but try smc and pram resets,

  • I have lost the remote that was paired. I bought another remote, but the procedure to pair the new one does not work. I suspect the the AT will work with only one remote at-a-time and i have to unpaid the first before pairing the second. How do I unpair?

    I have lost the remote that was paired. I bought another remote, but the procedure to pair the new one does not work. I suspect the the AT will work with only one remote at-a-time and i have to unpair the first before pairing the second. If this is true, how do I unpair? If not, what can I do?

    I was premature in posting the question. I found the answer in andother posting, and it was successful.
    Thanks, and sorry for the false alarm.

  • I payed by a mistake, a new suscription to Adobe PDF convert, and after I payed my original suscription that was canceled in this moment. So, I payed twice, the first 24€ and the second 19€. I need you get me back my money.  Thanks.

    I payed by a mistake, a news suscription of my Adobe PDF converter, 24€, and after that I payed again for my old suscription that was canceles few days before, 19€.  So, I payed twice for the same suscription.  I ask you, please, get back my money.
    Fernando José Hernández Nodarse

    Thanks, Sara, for your atention.
    Fernando
    2014-12-10 2:58 GMT+01:00 Sara.Forsberg <[email protected]>:
        I payed by a mistake, a new suscription to Adobe PDF convert, and
    after I payed my original suscription that was canceled in this moment. So,
    I payed twice, the first 24€ and the second 19€. I need you get me back my
    money.  Thanks.  created by Sara.Forsberg
    <https://forums.adobe.com/people/Sara.Forsberg> in *Adobe Acrobat.com
    Services* - View the full discussion
    <https://forums.adobe.com/message/7001009#7001009>

  • I've tried to update my i-Tunes version after the site suggested I should following my i-Pad being plugged into it for the first time. The update seemed successful but the program would not open at all despite switching off the PC and re-starting several

    I’ve tried to update my i-Tunes version after the site suggested I should following my i-Pad Air being plugged into it for the first time. The update seemed successful but the program would not open at all despite switching off the PC and re-starting several times. I then tried wiping the original software from the computer and re-downloading from scratch. Each time I tried the download failed with a message saying “Service “Apple Mobile Device” failed to start. Verify that you have sufficient privileges to start system services” At this stage, the only way forward was to “abort” the download. This I have done now four times and the same thing happens. When I did finally manage to get an i-Tunes shortcut on my desktop, the program wouldn’t open saying: “i-Tunes was not installed correctly. Please re-install i-Tunes. Error 7 (Windows error 193)” Any ideas to resolve this?

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account an

    How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently
    it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account and in the past syncing was no problem.  What setting has changed?

    The phone number format as well as the date language and format and the time format are controlled by the Region Format setting. Go to Settings > General >International > Region Format.  When you change a region format, you can go back one page (to International) and see an example of the date/time/phone number format that your selected region format will produce.

  • United Kingdom Regional Format sets Monday as the first day of the week.

    With the Region Settings (Settings -> General -> International -> Region Format) set to United Kingdom, Calendar displays Monday as the first day of the week. I have seen other posts whereby it was suggested to change to US Internationalization but this will also change the date and telephone number formats to US settings, far more frustrating.
    Have I been sheltered from properly formatted calendars all my life or is this a mistake and it should start the week on Sunday. It is consistent in both the Week and Month view.
    Am I crazy or does anyone else agree with is?

    Same here. One of the first things I do in this sort of application is switch week start to Mondays.
    Terry, East Grinstead, UK
    Message was edited by: Terry P

  • Can I change the first day of the week on my ipod touch

    I have a new Ipod touch, which i recently upgraded to OS 3.0. I was wondering if it is possible to set the first day of the week in Ical to Sunday instead of Saturday?
    Thanks

    The International Region Format controls the start day of your calendar display. UK region format sets the display to start on Monday. US region format will start the calendar on Sunday. However, that setting also controls your date, time and phone number formats, so using it would only cause you more problems.
    Tell Apple you want the option to set the calendar week start independent of the international region format using the feedback page. http://www.apple.com/feedback/ipodtouch.html

  • How do I change the first day of the week in calendar?

    I recently updated to ios 5.
    unfortunately, this made sunday day one of the week in calendar, not Monday which is my preference (and the convention in Australia).
    I was able to change it to Monday by changing international settings to UK, but this changed other settings such as uk version of google as default search engine, which I would prefer to avoid.
    Is there a way to make Monday the first day of the week in calendar AND keep my other international settings as Australia?
    Many thanks for suggestions.
    Chris.

    I don't think you can. Your best bet is to send Apple feedback and ask for that functionality.

  • Sunday as the first day of the week in month view on the iTouch

    Does anyone know how to change Sunday to the first day of the wek in the month view of the calendar on itouch?
    BTW, I have selected Sunday as the first day of the week in ical on my imac which syncs the ipod itouch. Am I forgetting something or is there a hidden preferences page?
    Tom

    TLGreen58 wrote:
    Does anyone know how to change Sunday to the first day of the wek in the month view of the calendar on itouch?
    BTW, I have selected Sunday as the first day of the week in ical on my imac which syncs the ipod itouch. Am I forgetting something or is there a hidden preferences page?
    Tom
    Hi,
    OMG! How bizzarre, another quirk of the "Region Fortmats" setting.
    *Settings > General > International > Region Format*
    If I set mine to U.K. (where I happen to live), Monday is apparently the first day of the week on the calendar and I have no 12/24 hour clock option.
    If set to U.S., Sunday is the first day and the 12/24 hour clock option is available.
    I guess changing the Region is your answer.
    How odd! Not to say irritating.
    Dud.
    Message was edited by: Duddo

  • I am trying to copy and paste a story from a blog.  I can only view the first page on the Pages app.  How do I see the rest of the pages?

    I am trying to copy and paste a story from a blog.  I can only view the first page on the Pages app.  How do I see the rest of the pages?

    Thank you.  That helped in the first step.  I was able to copy text onto multiple pages.
    Now I can't get the pictures to copy.  How do I get my pictures to copy?
    Also once the blog page is on pages, how do i make changes to it?
    This my story and the page I am trying to copy.
    http://www.city-data.com/forum/tennessee/359683-going-off-grid-east-tennessee.ht ml
    Thanks so much
    Lisa(writing) and Mike trying to get it right.

  • When I right click and select open link in new tab, it leaves the page I am on and takes me to the first tab to the right

    I usually have many tabs open when I read the news, and it is nice to select open links in new tabs while scrolling through a news' home page. Lately, however, Mozilla has been opening the new tab, but switches the page I am viewing to the first tab to the right of the home page. For example, I had ESPN.com open, and then a few Facebook tabs after that to the right. Whenever I would select open link in new tab, the tab I was viewing would switch from ESPN.com to the first Facebook tab to the right, and the new tab would open a little further down the line. Any chance anyone knows how to fix this?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • The detailRegion is always forced to populate the first record from the Master region

    Hi fellow Spry enthusiasts,
    My question is in regards the undesirable data population of
    the regiondetail on initial load. I have 2 sections, one which is
    my master region (which goes out and retrieves a bunch of records),
    and a related detailregion which reacts based on the master.
    However, every time I initiate a query of the master region to
    retrieve records, the detail region also responds and automatically
    grabs the FIRST record of the master region (which is undesirable
    in my case because I do not want the detail region to react UNTIL I
    select a record in the master region). Let me know if this makes
    sense.
    Psuedo Code:
    var moveRequestor = new
    Spry.Data.XMLDataSet("cfc/QueryThatReturnsABunchOfEmployeeRecords")>
    <span spry:region="moveRequestor">
    {EM_ID}
    {NAME}
    <span spry:detailregion="moveRequestor">
    {EM_ID}
    {NAME}
    {PHONE}

    This question was posted a while ago, and was one of the
    search results that came up when I was looking for my own answer. I
    had a nearly identical question and answered it here:
    Disabling
    default linked region and detailregiondisply until click
    Hopefully it will help others too!

  • How to map only the first occurance to the op in graphical mapping

    Hi,
    i have a record whose occurance is ' * '.But to the output i need to only map the value of the field which comes in the first occurance of the record.Can anyone help me in this.its very urgent.
    For ex :
    my input is
    <header>
    <inp1>123</inp1>
    <inp2>hello</inp1>
    </header>
    <header>
    <inp1>456</inp1>
    <inp2>hello</inp1>
    </header>
    To the output field <op1> i have to Map ' inp1 ' field but it has to take the value of the first inp1 i.e "123" only always.Any help on how to do this.
    Thanks in advance,
    Bhargav
    Message was edited by:
            bhargav gundabolu

    Hi Raj,
    My inp structure is:
    <header>
    <inp1>123</inp1>
    <inp2>hello</inp1>
    </header>
    <header>
    <inp1>456</inp1>
    <inp2>hello</inp1>
    </header>
    This has to me mapped to the output structure
    <result>
    </op1>
    </result>
    After Mapping inp1 to op1 my structure should appear as
    <result>
    <op1>123</op1>
    </result>
    <result>
    <op1>123</op1>
    </result>
    where <Header> node is mapped to </result>.As <result> has to appear as many times as Header appears.But the <op1> value has to be same as that of the <inp1> of the first <Header>

  • My itunes is separating the first song from the rest of the album

    Can anyone help, my itunes separates the first song from the rest of the album so they apear as two separate things in itunes, very very annoying as it has only done it one some albums not all!!

    I was having this problem if I changed the name of an artist for an entire album from in grid view. This ended up changing the name successfully, but left me with the first track as a separate item in the grid. The solution suggested by bkpr worked for me; I entered the artist name into the album artist field, and saving this change merged the album back together. I could then remove the album artist entry without the album separating again. Thanks for the suggestio bkpr

Maybe you are looking for

  • Using a FireFX Class

    I found this class today which is really cool: http://www.gskinner.com/blog/archives/2007/11/fire_effect_com.html However, I've never used a public class before.  I've been reading up on them all morning.  I'll provide the code for it here as well. 

  • Automatic output of method parameters

    Hi, Sometimes I find myself System.out'ing all parameters of a method. Is there a one-step way to do this? A one-liner that will output all method parameters (using reflection I guess) of the method the code is running in. for e.g public Car makeCar(

  • How to Rollback Flash Player ActiveX

    Hi, I need to rollback my Flash Player ActiveX from 9.0.115.0 to 9.0.45.0. I have downloaded and used the Uninstall Flash exe (latest one) to remove Flash ActiveX. I had closed out of all programs then rebooted my computer. I tried to install Flash P

  • KEPM planning method "customer enhancement"

    Dear all, I want to use the planning method "customer enhancement" in transaction KEPM. The planning level has been defined as well as the corresponding planning package. I also activitated the user exit COPA0006 which is behind this enhancement. Whe

  • Delta load error in quantity of sales overview cube 0sd_c03

    Hi All, The quantity(0quant_b) is fetching properly for full upload.But when delta load is done 0quant_b is not fetching correctly. For example, quantity was changed from 100 to 120 for an order. When delta is run, only 100 is uploaded instead of 120