Decode MCE (Machine Check Exception) in Ubuntu 18.04

I have a system running Ubuntu 18.04, which is randomly freezing. In the boot log entries like

mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 4: e600000000020408 

appear. In older Ubuntu versions, mcelog could be used to decode these entries. mcelog has since been removed. How do I decode the log entries to figure out where the fault comes from in Ubuntu 18.04?

I’m writing an application that needs to log error/ exception messages but should still continue execution if it not a fatal error

I’m writing an application that needs to log error/ exception messages but should still continue execution if the error is not a fatal error. I was thinking of making a method that returns a Task but calling this method as a fire and forget and not wait for response from the method. What is the recommendation, is this a good approach?

Magento 2.2.6 Exception message: A wrong PayPal Express Checkout Token is specified

I am getting this issue for few customers in production site. while trying place order in one step checkout with paypal express checkout, its redirecting to the cart page with exception “A wrong PayPal Express Checkout Token is specified.”

I am not getting this issue for all customers, also i am unable to replicate this issue.

Has any one have solution for this issue.

Exception in thread “main” java.awt.IllegalComponentStateException: The frame is decorated

galera voltei, comecei a estudar AWT fiz um programinha simples que apenas abria uma janela com um fundo verde, mas eu tento criar um evento pra janela do programa fechar e fica dando o erro do título

nome completo do erro:
Exception in thread “main” java.awt.IllegalComponentStateException: The frame is decorated at java.desktop/java.awt.Frame.setOpacity(Frame.java:963) at Ventana.main(Ventana.java:19)

codigo que estou usando:

import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.Color; import java.awt.event.WindowEvent; import java.awt.event.WindowAdapter;  public class Ventana {      public static void exitForm(WindowEvent evt){         System.exit(0);      }      public static void main(String[] args){         Frame frame = new Frame("Novo video!");         frame.setUndecorated(false);         frame.setSize(600,600);         frame.setLocation(520,250);         frame.setOpacity((float)0.50);         frame.setBackground(new Color(161, 203, 70));         frame.addWindowListener(new WindowAdapter() {             public void windowClosing(WindowEvent evt){                 exitForm(evt);             }          });         frame.show();       }  } 

sou bem novato, desculpa se estou fazendo um erro bem “noob”, mas já agradeço pela atenção <3

Exception in thread “main” java.lang.ClassCastException

Alguém poderia me ajudar com esse error no meu DAO Generico hibernate?

meu dao generico:

import org.hibernate.Session; import org.hibernate.criterion.MatchMode;  import util.HibernateUtil;  public abstract class AbstractDAO<T> {     private Class classe;     private Session session;      public AbstractDAO(){         this.classe = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];     }      protected Session getSession(){         if(this.session == null || !this.session.isOpen()){             this.session = HibernateUtil.getSessionFactory().openSession();         }         return this.session;     }      public void save(T t){         getSession().beginTransaction();         getSession().save(t);         getSession().close();     }      public void delete(T t){         getSession().beginTransaction();         getSession().delete(t);         getSession().close();     }      public void alter(T t){         getSession().beginTransaction();         getSession().update(t);         getSession().close();     }      public List<T> findAll(T t){         return getSession().createCriteria(this.classe).list();     }           /**      * Metodo responsavel por recuperar todos os objetos de uma tabela da base de dados de acordo      * com o exemplo passado.      *      * @param filtro      * @param matchMode      * @param ignoreCase      * @return lista      */     public List<T> findByExample(T filtro, MatchMode matchMode, boolean ignoreCase){         org.hibernate.criterion.Example example = org.hibernate.criterion.Example.create(filtro);          if(matchMode != null){             example = example.enableLike(matchMode);         }          if(ignoreCase){             example = example.ignoreCase();         }          return getSession().createCriteria(this.classe).add(example).list();     } 

meu hibarnate util

public class HibernateUtil {

private static final SessionFactory sessionFactory;    static {       try {           // Create the SessionFactory from hibernate.cfg.xml           sessionFactory = new Configuration().configure().buildSessionFactory();       } catch (Throwable ex) {           // Make sure you log the exception, as it might be swallowed           System.err.println("Initial SessionFactory creation failed." + ex);           throw new ExceptionInInitializerError(ex);       }   }    public static SessionFactory getSessionFactory() {       return sessionFactory;   }   

}
meu main:

public static void main(String[] args) {     Departamento depart = new Departamento();     AbstractDAO<Departamento> padrao = new DepartamentoDAO();     padrao.findAll(depart);     System.out.println(padrao); } 

meu error:

Exception in thread "main" java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType at dao.AbstractDAO.(AbstractDAO.java:16) at dao.DepartamentoDAO.(DepartamentoDAO.java:17) at view.eeee.main(eeee.java:12) 

Exception calling “ExecuteQuery” with “0” argument(s): “The operation has timed out.”

I am trying to delete list items, about 130K, from a large list on SharePoint Online using powershell CSOM, i am getting this error

“Exception calling “ExecuteQuery” with “0” argument(s): “The operation has timed out.””

this is my code

    for ($  i=$  allItems.Count-1; $  i-ge0; $  i--)       {           $  allItems[$  i].DeleteObject()         #$  clientContext.ExecuteQuery()        }        $  clientContext.ExecuteQuery()  

When i use the ExecuteQuery() outside the loop, i am getting this error. but it still deletes around 1K items each time i run the script.

But When i use the ExecuteQuery() inside the loop, it doesn’t throw the error and the script completes execution, BUT it takes about 20 times the time taken to delete items when ExecuteQuery() used outside the loop

i also used RequestTimeout property

$ clientContext.RequestTimeout = [System.Threading.Timeout]::Infinite ( or any value)

it doesn’t seem to honor this property.

Could anyone please help me suggest a better way to delete such a large list ( the list is still being used, i can’t delete the list)?

Thanks so much Maria Francis

Erro: Exception in thread “main” java.lang.NullPointerException ao selecionar coluna específica

Estou a tentar ler o arquivo .txt, selecionar a coluna “costumerid” e contar quantos tipos diferentes existem, porém o programa apresenta-me este erro: ” Exception in thread “main” java.lang.NullPointerException at com.nayana.exercicio1.methods.Methods.customerId(Methods.java:95) at com.nayana.exercicio1.Exercicio1.main(Exercicio1.java:18) ” Alguém consegue me ajudar?

Código Methods:

package com.nayana.exercicio1.methods;  import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Date; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashSet;   public class Methods {      private BufferedReader file;     private HashSet<String> customer;     private int lines;     private String[] columns;     public String line;     private String string;        //INPUT PARA O ARQUIVOO A SER LIDO      public BufferedReader getFile() {         return file;     }       public void setFile(BufferedReader file) throws FileNotFoundException {         this.file = file;     }      //CONTAR NÚMERO DE LINHAS EXISTENTES     public int getLines() {         return lines;     }      public String getLine() {         return line;     }     public void setLines(int lines) throws IOException {         this.lines = lines;         }      public String[] getColumns() {         return columns;     }      public void setColumns(String[] columns) {         this.columns = columns;         columns = ((String)line).split(";");     }     public void setLine(String line) throws IOException {         this.line = file.readLine();     }       public void contarLinhas() throws Exception {         while((line = file.readLine()) !=null) {             setColumns(columns);             lines++;}     }      //CONTAR QUANTOS COSTUMERID DIFERENTES EXISTEM      public HashSet<String> getCustomer() {         return customer;     }      public void setCustomer(HashSet<String> customer) throws IOException {         this.customer = customer;         customer = new HashSet<String>();        }        public void customerId() throws Exception {          while((line = file.readLine()) !=null) {             setColumns(columns);             HashSet<String> customer = new HashSet<String>();             customer.add(columns[4]);             customer.size();              }     }        //MOSTRAR NA TELA       public void status(){     System.out.println("\nO número total de linhas é: " + getLines());     System.out.println("\nO número total de CustomerId é: " + getCustomer());     }  }   

Código Main:

package com.nayana.exercicio1;   import java.io.BufferedReader; import java.io.FileReader; import com.nayana.exercicio1.methods.Methods;    public class Exercicio1 {      public static void main(String[] args) throws Exception {          Methods exercicio = new Methods();          exercicio.setFile(new BufferedReader(new FileReader("C:\Users\nayan\Downloads\orders_04_20_07.txt")));         //exercicio.contarLinhas();         exercicio.customerId();         exercicio.status();     }  }  

SharePoint Online – PowerShell – CSOM ExecuteQuery Exception is Root Element is Missing

I am used to working with SharePoint on-premises environments, but I am now trying to come up to speed with SharePoint Online. I can connect to my tenant using Connect-SPOService and use the standard SharePoint Online cmdlets, so my credentials are working and that route of access seems to be in good order for me.

However, I will need to use the greater utility of CSOM for work that I need to do. Initially, I have just tried to set up a simple PowerShell procedure to start walking through some of the basics using CSOM with SharePoint Online. But I continue to have a problem with ClientContext.ExecuteQuery. It always fails with the “root element is missing” error. I’m not sure if this is due to the query not retrieving any data or something else relating to my environment.

I currently have my own SharePoint tenant with some initial sites and lists. I am the only user and administrator. Everything is still very simple. I have installed and imported (using PSGallery) the following modules to set my PS environment (and sessions). I think that I have identified everything that I need, but it’s certainly possible that I am missing something important.

   ModuleType Version    Name                                 ---------- -------    ----                                    Binary     16.0.90... Microsoft.Online.SharePoint.PowerShell    Manifest   3.1.0.0    Microsoft.PowerShell.Management       Manifest   3.0.0.0    Microsoft.PowerShell.Security        Manifest   3.1.0.0    Microsoft.PowerShell.Utility           Script     1.2        PSReadline                             Script     1.0.0      SharePointOnline.CSOM                 Binary     3.11.19... SharePointPnPPowerShellOnline        Script     2.1.6      SharePointSDK  

I am working in Windows 10 with PowerShell 5.1 (running as Administrator). Everything is still very simple, but I can’t get past the query execution to load the web context so I can start trying to do additional things.

I have found many online examples of PowerShell/CSOM to connect to sites and set context. I’ve tried them all (at least it seems like I have), but nothing has worked so far. I can’t find anything else to try or additional diagnostic steps to take. So I would welcome any suggestions at this point.

Here is a PS Session Log of one of my test runs with the error message at the end …

PS C:>$  LibPath = "C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0" PS C:>[System.Reflection.Assembly]::LoadFile("$  LibPath\Microsoft.SharePoint.Client.dll") GAC    Version        Location ---    -------        -------- False  v4.0.30319     C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0\Microsoft.SharePoint.Cl...  PS C:>[System.Reflection.Assembly]::LoadFile("$  LibPath\Microsoft.SharePoint.Client.Runtime.dll") GAC    Version        Location ---    -------        -------- False  v4.0.30319     C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0\Microsoft.SharePoint.Cl...  PS C:>[System.Reflection.Assembly]::LoadFile("$  LibPath\Microsoft.SharePoint.Client.UserProfiles.dll") GAC    Version        Location ---    -------        -------- False  v4.0.30319     C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0\Microsoft.SharePoint.Cl...  PS C:> PS C:># try simple connection test PS C:>Write-Host "Start connection test ..." Start connection test ...  PS C:> PS C:>$  UserName = "xxxxxxx@xxxxxx.onmicrosoft.com" PS C:>$  SiteUrl = "https://xxxxxx.sharepoint.com/sites/Testing" PS C:>$  ctx = New-Object Microsoft.SharePoint.Client.ClientContext($  SiteUrl) PS C:> PS C:>$  pwd = Read-Host -Prompt "Enter password" -AsSecureString Enter password: ********** PS C:>$  securePwd = ConvertTo-SecureString $  pwd -AsPlainText -Force PS C:> PS C:>$  Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($  UserName, $  securePwd) PS C:> PS C:>$  ctx.credentials = $  Cred PS C:>if (!$  ctx.ServerOjectIsNull.Value) {     Write-Host "Connected to $  SiteUrl" -ForegroundColor Green } Connected to https://xxxxxx.sharepoint.com/sites/Testing  PS C:> PS C:>$  web = $  ctx.Web PS C:>Write-Host "Context is $  ctx" Context is Microsoft.SharePoint.Client.ClientContext  PS C:>Write-Host "Web is $  web" Web is Microsoft.SharePoint.Client.Web  PS C:>$  ctx.Load($  web) PS C:>$  ctx.ExecuteQuery()  **Exception calling "ExecuteQuery" with "0" argument(s): "Root element is missing." At line:1 char:1 + $  ctx.ExecuteQuery() + ~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException     + FullyQualifiedErrorId : XmlException** 

Unhadled exception in c++ program for doubly linked list

I wrote a program for doubly linked list in visual studio 2013, and it threw unhandled exception error at the line marked with comment: –

#pragma once #include<iostream>  template <typename T> struct Node {     T data;     Node *next, *prev; };  template <typename T> class doubleLinkedList { private:     Node<T> *top; public:     doubleLinkedList()     {         top = nullptr;     }      void add(T data)     {         Node<T> *temp = new Node<T>;          temp->prev = nullptr;         temp->next = top;         top->prev = temp;     //unhandled exception here         top = temp;     }      void display()     {         Node<T> *temp;         temp = top;         std::cout<<"nullptr<--->\n";         while(temp)         {             std::cout<<temp->data<<"<--->";             temp = temp->next;         }         std::cout<<"nullptr\n";     } }; 

The error is: –

Unhandled exception at 0x011C4B79 in dataStructures2.exe: 0xC0000005: Access violation writing location 0x00000008. 

I have never written a doubly linked list before. I am not sure if there any logical error in the program. Any kind of help would be appreciated.

Finding Source of Exception: Attribute is Not Allowed

After updating to a new version of Magento, our store is giving us the following exception:

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'meta', attribute 'property': The attribute 'property' is not allowed. Line: 993   Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'meta', attribute 'property': The attribute 'property' is not allowed. Line: 993  <pre>#1 Magento\Framework\Config\Dom->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111] #2 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66] #3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56] #4 Magento\Framework\ObjectManager\ObjectManager->create() called at [vendor/magento/framework/Config/DomFactory.php:42] #5 Magento\Framework\Config\DomFactory->createDom() called at [vendor/magento/framework/View/Model/Layout/Update/Validator.php:141] #6 Magento\Framework\View\Model\Layout\Update\Validator->isValid() called at [vendor/magento/framework/View/Model/Layout/Merge.php:479] #7 Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout() called at [vendor/magento/framework/View/Model/Layout/Merge.php:455] #8 Magento\Framework\View\Model\Layout\Merge->load() called at [generated/code/Magento/Framework/View/Model/Layout/Merge/Interceptor.php:193] #9 Magento\Framework\View\Model\Layout\Merge\Interceptor->load() called at [vendor/magento/framework/View/Layout/Builder.php:86] #10 Magento\Framework\View\Layout\Builder->loadLayoutUpdates() called at [vendor/magento/framework/View/Layout/Builder.php:63] #11 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:253] #12 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:875] #13 Magento\Framework\View\Layout->getBlock() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:414] #14 Magento\Framework\View\Layout\Interceptor->getBlock() called at [vendor/magento/module-cms/Helper/Page.php:171] #15 Magento\Cms\Helper\Page->prepareResultPage() called at [vendor/magento/module-cms/Controller/Index/Index.php:68] #16 Magento\Cms\Controller\Index\Index->execute() called at [generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php:24] #17 Magento\Cms\Controller\Index\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:107] #18 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #19 Magento\Cms\Controller\Index\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #20 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/Anowave/Ec/Plugin/App/Action/Context.php:148] #21 Anowave\Ec\Plugin\App\Action\Context->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #22 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #23 Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php:39] #24 Magento\Cms\Controller\Index\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:55] #25 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #26 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #27 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94] #28 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #29 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69] #30 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #31 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #32 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26] #33 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:136] #34 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24] #35 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:257] #36 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:37] </pre> 

I understand that I should be looking for a meta tag with a property attribute, but I’ve been unable to locate it in the codebase. Is there a way for me to hone in on the source of this exception?