Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Bad repsonse. org.springframework.beans.factory.BeanCreationException:

(0) ShareShare
ReportReport
Posted on by 35

Hi,

AX 2012 R3

getting following error when posting vendor invoice 

Bad repsonse. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditInvoiceReversalFromDatabaseGenerator': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute batch.

Steps

Open PO

Go to the ‘invoice’ tab and ‘Generate Invoice’…

On the invoice form, enter an ‘invoice #’, ‘description’ and ‘date’, then try to “Post”...

I debug the code and reach the point where it is calling service.  Ii am not sure how to debug further .. or fix this issue. please help.

like 

\Classes\SysOperationServiceController\runOperationWithRunAs

private void runOperationWithRunAs()
{
           container returnValue;

// running on the server interpreter or in BC.NET. Try to marshall to an
// IL session


       returnValue = SysOperationRPCFrameworkService::runServiceOperation(classIdGet(this), this.pack());

      // Unpack return value and call after operation. After operation is called in the caller's session
         this.unPackServiceReturnValue(returnValue);
}

>>>

\Classes\SysOperationRPCFrameworkService\runServiceOperation

public static container runServiceOperation(ClassId controllerClassId, container packedController)
{
     // Use the runas API to transition to a CLR session
       new XppILExecutePermission().assert();
       return SysDictClass::invokeStaticMethodIL(classStr(SysOperationServiceController), staticMethodStr(SysOperationServiceController, runServiceOperation),[controllerClassId, packedController]);
}

2438.Untitled.png

  • Suggested answer
    Fayyaz786 Profile Picture
    35 on at
    RE: Bad repsonse. org.springframework.beans.factory.BeanCreationException:

    we found that.. there was special character hidden in Text field in Purchase Order Lines > Line details > Text box (multiline text box).. when we clean it save and post. DAX it posted the invoice.. Thank you every one for your time and help.  

    0385.Untitled5.png

  • Martin Dráb Profile Picture
    231,801 Most Valuable Professional on at
    RE: Bad repsonse. org.springframework.beans.factory.BeanCreationException:

    As I said, you must use the right debugger. MorphX can be used to debug X++ code, but code executed through invokeStaticMethodIL() will run in CIL and you need to use a different debugger: Visual Studio. You can find a bit more details in documentation: Debugging in Microsoft Dynamics AX 2012.

  • Fayyaz786 Profile Picture
    35 on at
    RE: Bad repsonse. org.springframework.beans.factory.BeanCreationException:

    i used MorphX put the break point and debug the code.. from this point "SysDictClass::invokeStaticMethodIL" ax debugger doesn't get into  method.  i think this is last point.  this method returns container,  which has above error.

  • Martin Dráb Profile Picture
    231,801 Most Valuable Professional on at
    RE: Bad repsonse. org.springframework.beans.factory.BeanCreationException:

    I'm not aware of any standard feature using a web service written in Java, therefore it's likely caused either by an ISV solution or a customization.

    What you've debugged is just infrastructure code before any real works gets done. I would start the debugging in PurchInvoiceJournalPost class. Also, don't foget to use the right debugger, depending on whether it's executed as X++ or CIL.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,961 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,801 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans