cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business One 10.0 PL02 Mail Sending Problem

mehmet_gunes
Explorer
0 Kudos
2,215

Dear Experts,

The mail does not go when we send e-mails from SAP business one.

Mail is waiting in outbox. This is the log file on the server.

Do you have a suggestion?

var/log/SAPBusinessOne/ServerTools/Mailer.Log

2020-09-18 14:58:37 ERROR [Job Service - schedule job pool 2] com.sap.sbo.mailer.util.DbUtils - Connect to COZUM failed, user name: SAPB1_DB_USER_COZUM. com.sap.db.jdbc.exceptions.jdbc40.SQLInvalidAuthorizationSpecException: [10]: authentication failed at com.sap.db.jdbc.exceptions.jdbc40.SQLInvalidAuthorizationSpecException.createException(SQLInvalidAuthorizationSpecException.java:40) at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:301) at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185) at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:101) at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1031) at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:820) at com.sap.db.util.security.AbstractAuthenticationManager.connect(AbstractAuthenticationManager.java:43) at com.sap.db.jdbc.ConnectionSapDB.openSession(ConnectionSapDB.java:568) at com.sap.db.jdbc.ConnectionSapDB.doConnect(ConnectionSapDB.java:421) at com.sap.db.jdbc.ConnectionSapDB.<init>(ConnectionSapDB.java:173) at com.sap.db.jdbc.ConnectionSapDBFinalize.<init>(ConnectionSapDBFinalize.java:13) at com.sap.db.jdbc.Driver.connect(Driver.java:303) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.sap.sbo.mailer.util.DBConnectionCreator4HANA.createConnection(DBConnectionCreator4HANA.java:97) at com.sap.sbo.mailer.util.DBConnectionFactory.createConnection(DBConnectionFactory.java:34) at com.sap.sbo.mailer.util.DbUtils.createDbConnection(DbUtils.java:154) at com.sap.sbo.schedulejob.service.TaskScheduler.getCompanyConn(TaskScheduler.java:536) at com.sap.sbo.schedulejob.service.TaskScheduler.getAvaliableJobs(TaskScheduler.java:185) at com.sap.sbo.schedulejob.service.TaskScheduler.pickTasks(TaskScheduler.java:498) at com.sap.sbo.schedulejob.service.ScheduleJobWorker.run(ScheduleJobWorker.java:258) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:836) 2020-09-18 14:58:37 ERROR [Job Service - mail pool 5] com.sap.sbo.mailer.util.DbUtils - Connect to COZUM failed, user name: SAPB1_DB_USER_COZUM. com.sap.db.jdbc.exceptions.jdbc40.SQLInvalidAuthorizationSpecException: [10]: authentication failed at com.sap.db.jdbc.exceptions.jdbc40.SQLInvalidAuthorizationSpecException.createException(SQLInvalidAuthorizationSpecException.java:40) at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:301) at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185) at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:101) at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1031) at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:820) at com.sap.db.util.security.AbstractAuthenticationManager.connect(AbstractAuthenticationManager.java:43) at com.sap.db.jdbc.ConnectionSapDB.openSession(ConnectionSapDB.java:568) at com.sap.db.jdbc.ConnectionSapDB.doConnect(ConnectionSapDB.java:421) at com.sap.db.jdbc.ConnectionSapDB.<init>(ConnectionSapDB.java:173) at com.sap.db.jdbc.ConnectionSapDBFinalize.<init>(ConnectionSapDBFinalize.java:13) at com.sap.db.jdbc.Driver.connect(Driver.java:303) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.sap.sbo.mailer.util.DBConnectionCreator4HANA.createConnection(DBConnectionCreator4HANA.java:97) at com.sap.sbo.mailer.util.DBConnectionFactory.createConnection(DBConnectionFactory.java:34) at com.sap.sbo.mailer.util.DbUtils.createDbConnection(DbUtils.java:154) at com.sap.sbo.mailer.mail.CompanyTask.getMessageCode(CompanyTask.java:116) at com.sap.sbo.mailer.mail.CompanyTask.handleMail(CompanyTask.java:87) at com.sap.sbo.mailer.mail.CompanyTask.run(CompanyTask.java:55) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:836) 2020-09-18 14:58:37 ERROR [Job Service - mail pool 5] com.sap.sbo.mailer.mail.CompanyTask - getMessageCode failed for connecting company DB failed

/var/log/SAPBusinessOne/ServerTools/schedulejob.Log

020-09-18 14:58:37 ERROR [Job Service - schedule job pool 2] com.sap.sbo.schedulejob.service.TaskScheduler - TaskScheduler(COZUM) : get avaliable jobs Failed java.lang.NullPointerException: while trying to invoke the method java.sql.Connection.prepareStatement(java.lang.String) of a null object returned from com.sap.sbo.schedulejob.service.TaskScheduler.getCompanyConn() at com.sap.sbo.schedulejob.service.TaskScheduler.getAvaliableJobs(TaskScheduler.java:185) at com.sap.sbo.schedulejob.service.TaskScheduler.pickTasks(TaskScheduler.java:498) at com.sap.sbo.schedulejob.service.ScheduleJobWorker.run(ScheduleJobWorker.java:258) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:836) 2020-09-18 14:58:38 ERROR [Job Service - schedule job pool 1] com.sap.sbo.schedulejob.service.TaskScheduler - TaskScheduler(HAZIRLIK) : company connection is invalid 2020-09-18 14:58:38 ERROR [Job Service - schedule job pool 1] com.sap.sbo.schedulejob.service.TaskScheduler - TaskScheduler(HAZIRLIK) : GetCurrentTime Failed java.lang.NullPointerException: while trying to invoke the method java.sql.Connection.createStatement() of a null object returned from com.sap.sbo.schedulejob.service.TaskScheduler.getCompanyConn() at com.sap.sbo.schedulejob.service.TaskScheduler.getCurrentTime(TaskScheduler.java:389) at com.sap.sbo.schedulejob.service.ScheduleJobWorker.run(ScheduleJobWorker.java:257) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:836) 2020-09-18 14:58:38 ERROR [Job Service - schedule job pool 1] com.sap.sbo.schedulejob.service.TaskScheduler - TaskScheduler(HAZIRLIK) : company connection is invalid 2020-09-18 14:58:38 ERROR [Job Service - schedule job pool 1] com.sap.sbo.schedulejob.service.TaskScheduler - TaskScheduler(HAZIRLIK) : get avaliable jobs Failed java.lang.NullPointerException: while trying to invoke the method java.sql.Connection.prepareStatement(java.lang.String) of a null object returned from com.sap.sbo.schedulejob.service.TaskScheduler.getCompanyConn() at com.sap.sbo.schedulejob.service.TaskScheduler.getAvaliableJobs(TaskScheduler.java:185) at com.sap.sbo.schedulejob.service.TaskScheduler.pickTasks(TaskScheduler.java:498) at com.sap.sbo.schedulejob.service.ScheduleJobWorker.run(ScheduleJobWorker.java:258) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:836)

Accepted Solutions (0)

Answers (5)

Answers (5)

lucca_mello
Product and Topic Expert
Product and Topic Expert

Dear Ahmet,

It seems that the issue you are facing could be related to the SAP Note below:

And due to that, you are also facing issues to send mails - because of the authentication with the database.

Please use the workaround in the SAP Note mentioned above, and in case the issue persists for a long time log a ticket under the SBO-BC component.

Have a great weekend ahead!

BR,

Lucca Mello

mehmet_gunes
Explorer
0 Kudos

Dear Lucca,

I tried the suggestions but the problem is not solved. I do not recived this message

Br,

AhmetC

mehmet_gunes
Explorer
0 Kudos

Dear Experts,

We have updated from SAP B1 HANA PL02 to PL03 FP2008.

The problem has been fixed.

Br,

AhmetC

fabiobilicki
Active Contributor
0 Kudos

Hi,

I solved all my problems using an email proxy smtp relay, it can be Windows SMTP or through Linux Postfix, you create this server to accept connection on port 25 without authentication, only from the internal IP of the SAP servers (and others if necessary), and forwards to your company SMTP.

Example SMTP relay Windows

Example SMTP Postfix Linux

Rgs,

Fabio

SAP 9.1 PL 11 SQL / SAP 10.0 PL02 SQL and HANA (test)

JesperB1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello!

Which version and patch are you using?

You might check SAP Note 2944096 - Cannot Send E-Mail

Let us know,

Jesper


mehmet_gunes
Explorer
0 Kudos

Dear Jesper,

HANA 2.0 sp04 / SAP B1 FOR 10.0 HANA PL 02

I read this note (SAP Note 2944096). But there is no problem.

Br,

AhmetC

PierreBrothier
Contributor
0 Kudos

Hi,

it looks like you have an sql authentication problem with you user SAPB1_DB_USER_COZUM.

mehmet_gunes
Explorer
0 Kudos
Dear Pierre,I did not create this user. ( SAPB1_DB_USER_COZUM )When opening a new company, SAP B1 is created from the company name.