Category Archives: Error

VTK GetScalarPointer() and GetScalarComponentAsFloat() not work

I am using VTK 5.10.1 with VS 2010, and the following example does not work on my machine:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/IterateImageData

The error said:

vtkImageData [009B92A8]: Bad component index 1302176011

I am not sure why this happened, and it should work since it is from the official document. However, the reality is that it does not work on my machine, neither GetScalarComponentAsFloat() or GetScalarComponentAsDouble() will work.

So if we want to get the pixel data from vtkImageData, we need to find another way to do it. And we can get the data by accessing vtkDataArray, please see the following example code:

#include <vtkVersion.h>
#include <vtkSmartPointer.h>
#include <vtkImageData.h>
#include <vtkPointData.h>
#include "vtkBMPReader.h"

int main(int, char *[])
{
    char * filename = "img.bmp";
    if( !filename  || strlen(filename) == 0 )
    {
        return -1;
    }

    vtkBMPReader * reader = vtkBMPReader::New();
    reader->SetFileName(filename);
    reader->Update();

    vtkSmartPointer<vtkImageData> image_data = reader->GetOutput();

    int* dims = image_data->GetDimensions();
    std::cout << "Dims: " << " x: " << dims[0] << " y: " << dims[1] << " z: " << dims[2] << std::endl;
    std::cout << "Number of points: " << image_data->GetNumberOfPoints() << std::endl;
    std::cout << "Number of cells: " << image_data->GetNumberOfCells() << std::endl;
    std::cout << "Number of scalar components: " << image_data->GetNumberOfScalarComponents() << std::endl;

    vtkDataArray *arr = image_data->GetPointData()->GetArray(0);

    // Retrieve the entries from the image data and print them to the screen
    for (int z = 0; z < dims[2]; z++)
    {
        for (int y = 0; y < dims[1]; y++)
        {
            for (int x = 0; x < dims[0]; x++)
            {
                /* Change this
                double* pixel = static_cast<double*>(imageData->GetScalarPointer(x,y,z));
                // do something with v
                std::cout << pixel[0] << " ";
                */
                double d[3];
                arr->GetTuple(y * dims[0] + x, d);
                std::cout << d[0] << " ";
            }
            std::cout << std::endl;
        }
        std::cout << std::endl;
    }

    return EXIT_SUCCESS;
}

Solve error LNK2001 about pcl::io::vtkPolyDataToPointCloud

When use function ‘pcl::io::vtkPolyDataToPointCloud’ in PCL 1.6.0, one may have error as follows:

 

1>demo.obj : error LNK2001: unresolved external symbol "void __cdecl pcl::io::vtkPolyDataToPointCloud<struct pcl::PointXYZRGB>(class vtkPolyData * const,class pcl::PointCloud<struct pcl::PointXYZRGB> &)" (??$vtkPolyDataToPointCloud@UPointXYZRGB@pcl@@@io@pcl@@YAXQAVvtkPolyData@@AAV?$PointCloud@UPointXYZRGB@pcl@@@1@@Z)
1>G:\projects\demo\demo.exe : fatal error LNK1120: 1 unresolved externals

 

This happens because function ‘pcl::io::vtkPolyDataToPointCloud’ has not been integrated in ‘pcl_io_release.lib’ library, instead it is implemented in the file ‘vtk_lib_io.hpp’, so we need to include both the header file and the hpp file:

 

#include <pcl/io/vtk_io.h>
#include <pcl/io/vtk_lib_io.h>
#include <pcl/io/vtk_lib_io.hpp>

Error running ‘PigSellCabinetApplication’: Command line is too long. Shorten command line for PigSellCabinetApplication or also for Spring Boot default configuration

Error running’PigSellCabinetApplication’: Command line is too long. Shorten command line for PigSellCabinetApplication or also for Spring Boot default configuration

 

When the project is started in Idea, sometimes an error is reported as Error running’Application’: Command line is too long. Shorten command line for Application or aalso for Spring Boot default configuration, the error message is as follows

 

 How to solve it, first find the idea/workspace.xml file in the project, and then find the <component name="PropertiesComponent"></component >tag, the tag is as follows

 

 Then add a line to the component tag  <property name="dynamic.classpath" value="true" />, it becomes the following

 

 

In this way, when starting the project, no error will be reported

ArchLinux starts error after modifying MariaDB database path Can’t create test file /xxxxx/xxxxx-test

Install MariaDB first, there is nothing special about this step.

>$ sudo pacman- Sy
 >$ sudo pacman -S extra/mariadb

After the installation is complete, pay attention to the prompts, which will ask us to initialize MariaDB.

sudo mariadb- install -db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Among them –datadir is the path where the database is located, I modified it to the path /home/mariadb.

 

Next, modify the configuration file and add the new database path.

>$ sudo vim /etc/my.cnf.d/ server.cnf
[mysqld]
datadir =/home/mariadb

 

Edit the /usr/share/mysql/policy/apparmor/usr.sbin.mysqld file and add the new path, otherwise the database service cannot be started.

Search for the default path of the database /var/lib/mysql in this file, and configure our new path in the same way.

 

The last step is to modify the service startup script, otherwise the service still cannot be started.

>$ sudo vim /lib/systemd/system/ mariadb.service
ProtectHome = false

Change ProtectHome=true to ProtectHome=false.

 

Now you can start the database.

>$ sudo systemctl daemon- reload
 >$ sudo systemctl start mariadb
# If you need to boot automatically, execute the following command
>$ sudo systemctl enable mariadb

Zchunk error: Unable to find multipart download range error in dnf update

Baidu did not search for the relevant problem, and finally found a temporary solution outside the wall.

It’s probably a bug of Zchunk, just disable Zchunk in the dnf configuration file.

>$ sudo vim /etc/dnf/ dnf.conf
 # Add the following at the end of the file 
zchunk = False
 # :wq save and exit

# Restart packagekit service
 >$ sudo systemctl restart packagekit.service

# Re-update the cache
>$ sudo pkcon refresh force

Error husky > pre-commit (node ​​v10.16.3) is reported when git commit is submitted

1. Error prompt:

husky> npm run -s precommit (node ​​v8.11.3)

Running tasks for *.{js,
jsx } [started] eslint –fix [started]
eslint –fix [failed]

Running tasks for *.{js, jsx } [failed]

× “eslint –fix” found some errors. Please fix them and try committing again.

Two, the solution

git commit -m "remarks information" --no-verify

Analysis of npm error ENOTFOUND npm ERR! network request to https://npm.***.com/*** failed and the role of the .npmrc file

1. npm reports an error:

  Looking at a project today, an error was reported when executing npm install to install dependencies:

84 error code ENOTFOUND
85 error errno ENOTFOUND
86 error network request to https://npm.***.com/@umijs%2fpreset-react failed, reason: getaddrinfo ENOTFOUND npm.***.com npm.***.com:443
87 error network This is a problem related to network connectivity.
87 error network In most cases you are behind a proxy or have bad network settings.
87 error network
87 error network If you are behind a proxy, please make sure that the
87 error network 'proxy' config is set properly.  See: 'npm help config'

ENOTFOUND   npm ERR! network request to https://npm.zhonganonline.com/@umijs%2fpreset-react failed

  It means that the registration address of this mirror cannot be found.

  Why is there such a situation? Aren’t all npm installation mirror addresses downloaded from npm? So look at the project structure and found the .npmrc file

2. The role of the .npmrc file

  There may be a .npmrc file in the root directory of some projects. When you click to open it, there is only one sentence: registry= http://registry.npm.xxxx.com

  Is the npm warehouse mirror address

  In npm i, if there is this file in the project root directory, node_modules will be automatically installed from this mirror address, and there is no need to manually set the mirror address.

  So the problem is that there is a problem with the mirror address in the .npmrc file, just delete this file.

3. npm configuration and .npmrc file

(1) npm cli provides the npm config command for npm related configuration, through npm config ls -l you can view all the configurations of npm, including the default configuration.

(2) npm config set to modify the configuration items, after using the command configuration, all the comments in the configuration file will be deleted

(3) Some common configurations:

  proxy, https-proxy: Specify npm to use a proxy

  registry specifies the source of the npm download and installation package. Default: https://registry.npmjs.org/

npm config set prefix $dir

(4) npmrc file: In addition to using the npm config command of cli to display and modify the npm configuration, you can also directly modify the configuration through the .npmrc file.

Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container…

About k8s deployment error resolution

  • Error message
Warning  FailedCreatePodSandBox  89s               kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "1c97ad2710e2939c0591477f9d6dde8e0d7d31b3fbc138a7fa38aaa657566a9a" network for pod "coredns-7f89b7bc75-qg924": networkPlugin cni failed to set up pod "coredns-7f89b7bc75-qg924_kube-system" network: error getting ClusterInformation: Get "https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes"), failed to clean up sandbox container "1c97ad2710e2939c0591477f9d6dde8e0d7d31b3fbc138a7fa38aaa657566a9a" network for pod "coredns-7f89b7bc75-qg924": networkPlugin cni failed to teardown pod "coredns-7f89b7bc75-qg924_kube-system" network: error getting ClusterInformation: Get "https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
  • Performance status
[root@linux03 ~]# kubectl get pods -n kube-system
NAME                              READY   STATUS              RESTARTS   AGE
coredns-7f89b7bc75-jzs26          0/1     ContainerCreating   0          63s
coredns-7f89b7bc75-qg924          0/1     ContainerCreating   0          63s

# coredns cannot run
  • Change calico.yaml

# Cluster type to identify the deployment type
  - name: CLUSTER_TYPE
  value: "k8s,bgp"
# New below
  - name: IP_AUTODETECTION_METHOD
    value: "interface=ens192"
    # ens192 is the local NIC name
  • kubectl apply -f calico.yaml
  • Check that it is running
[root@linux03 ~]# kubectl get pods -n kube-system
NAME                                       READY   STATUS    RESTARTS   AGE
calico-kube-controllers-69496d8b75-2nm5k   1/1     Running   0          23m
calico-node-8wfk9                          1/1     Running   0          23m
calico-node-9vn4v                          1/1     Running   0          23m
calico-node-qm8s2                          1/1     Running   0          23m
coredns-7f89b7bc75-jzs26                   1/1     Running   0          26m
coredns-7f89b7bc75-qg924                   1/1     Running   0          26m
etcd-linux03                               1/1     Running   0          26m
kube-apiserver-linux03                     1/1     Running   0          26m
kube-controller-manager-linux03            1/1     Running   0          26m
kube-proxy-29lcf                           1/1     Running   0          25m
kube-proxy-c29wz                           1/1     Running   0          26m
kube-proxy-lpgrr                           1/1     Running   0          25m
kube-scheduler-linux03                     1/1     Running   0          26m

[Exception] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed

1. Abnormal information

22 : 20 : 12.637 [main] ERROR com.talkilla.talkillalexile.common.utils.HttpUtils- sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed,{}
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
    at sun.security.ssl.Alerts.getSSLException(Alerts.java: 192 )
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java: 1946 )
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java: 316 )
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java: 310 )
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java: 1640 )
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java: 223 )
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java: 1037 )
    at sun.security.ssl.Handshaker.process_record(Handshaker.java: 965 )
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java: 1064 )
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java: 1367 )
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 1395 )
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 1379 )
    at okhttp3. internal .connection.RealConnection.connectTls(RealConnection.java: 241 )
    at okhttp3. internal .connection.RealConnection.establishProtocol(RealConnection.java: 198 )
    at okhttp3. internal .connection.RealConnection.buildConnection(RealConnection.java: 174 )
    at okhttp3. internal .connection.RealConnection.connect(RealConnection.java: 114 )
    at okhttp3. internal .connection.StreamAllocation.findConnection(StreamAllocation.java: 193 )
    at okhttp3. internal .connection.StreamAllocation.findHealthyConnection(StreamAllocation.java: 129 )
    at okhttp3. internal .connection.StreamAllocation.newStream(StreamAllocation.java: 98 )
    at okhttp3. internal .connection.ConnectInterceptor.intercept (ConnectInterceptor.java: 42 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 67 )
    at okhttp3. internal .cache.CacheInterceptor.intercept(CacheInterceptor.java: 109 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 67 )
    at okhttp3. internal .http.BridgeInterceptor.intercept(BridgeInterceptor.java: 93 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java: 124 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 67 )
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java: 170 )
    at okhttp3.RealCall.execute(RealCall.java: 60 )
    at com.talkilla.talkillalexile.common.utils.HttpUtils.handleSimpleResponse(HttpUtils.java: 410 )
    at com.talkilla.talkillalexile.common.utils.HttpUtils. get (HttpUtils.java: 66 )
    at com.talkilla.talkillalexile.DemoTest.main(DemoTest.java: 20 )
Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
    at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java: 362 )
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java: 270 )
    at sun.security.validator.Validator.validate(Validator.java: 262 )
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java: 330 )
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java: 237 )
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java: 132 )
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java: 1622 )
    ... 30 common frames omitted
Caused by: java.security.cert.CertPathValidatorException: validity check failed
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java: 135 )
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java: 238 )
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java: 146 )
    at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java: 85 )
    at java.security.cert.CertPathValidator.validate(CertPathValidator.java: 292 )
    at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java: 357 )
    ... 36 common frames omitted
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Fri Mar 27  13 : 09 : 06 CST 2020 
    at sun.security.x509.CertificateValidity.valid(CertificateValidity.java: 274 )
    at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java: 629 )
    at sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java: 190 )
    at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java: 144 )
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java: 125 )
    ... 41 common frames omitted
Exception in thread " main " java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
    at com.talkilla.talkillalexile.common.utils.HttpUtils.handleSimpleResponse(HttpUtils.java: 416 )
    at com.talkilla.talkillalexile.common.utils.HttpUtils. get (HttpUtils.java: 66 )
    at com.talkilla.talkillalexile.DemoTest.main(DemoTest.java: 20 )
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
    at sun.security.ssl.Alerts.getSSLException(Alerts.java: 192 )
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java: 1946 )
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java: 316 )
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java: 310 )
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java: 1640 )
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java: 223 )
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java: 1037 )
    at sun.security.ssl.Handshaker.process_record(Handshaker.java: 965 )
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java: 1064 )
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java: 1367 )
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 1395 )
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 1379 )
    at okhttp3. internal .connection.RealConnection.connectTls(RealConnection.java: 241 )
    at okhttp3. internal .connection.RealConnection.establishProtocol(RealConnection.java: 198 )
    at okhttp3. internal .connection.RealConnection.buildConnection(RealConnection.java: 174 )
    at okhttp3. internal .connection.RealConnection.connect(RealConnection.java: 114 )
    at okhttp3. internal .connection.StreamAllocation.findConnection(StreamAllocation.java: 193 )
    at okhttp3. internal .connection.StreamAllocation.findHealthyConnection(StreamAllocation.java: 129 )
    at okhttp3. internal .connection.StreamAllocation.newStream(StreamAllocation.java: 98 )
    at okhttp3. internal .connection.ConnectInterceptor.intercept (ConnectInterceptor.java: 42 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 67 )
    at okhttp3. internal .cache.CacheInterceptor.intercept(CacheInterceptor.java: 109 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 67 )
    at okhttp3. internal .http.BridgeInterceptor.intercept(BridgeInterceptor.java: 93 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java: 124 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 92 )
    at okhttp3. internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java: 67 )
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java: 170 )
    at okhttp3.RealCall.execute(RealCall.java: 60 )
    at com.talkilla.talkillalexile.common.utils.HttpUtils.handleSimpleResponse(HttpUtils.java: 410 )
    ... 2 more
Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
    at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java: 362 )
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java: 270 )
    at sun.security.validator.Validator.validate(Validator.java: 262 )
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java: 330 )
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java: 237 )
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java: 132 )
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java: 1622 )
    ... 30 more
Caused by: java.security.cert.CertPathValidatorException: validity check failed
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java: 135 )
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java: 238 )
    at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java: 146 )
    at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java: 85 )
    at java.security.cert.CertPathValidator.validate(CertPathValidator.java: 292 )
    at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java: 357 )
    ... 36 more
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Fri Mar 27  13 : 09 : 06 CST 2020 
    at sun.security.x509.CertificateValidity.valid(CertificateValidity.java: 274 )
    at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java: 629 )
    at sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java: 190 )
    at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java: 144 )
    at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java: 125 )
    ... 41 more

2. Abnormal causes and solutions

The https certificate has expired, just update the certificate

[Maven Error] Exception in thread “main” java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0

1. Abnormal information

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

 

The solution(Two Methods):

1. Check whether your JAVA_HOME environment variable is configured correctly, and verify by echo $JAVA_HOME (this is the situation I encountered)

2. Check whether the jdk version your maven depends on is compatible with your locally installed jdk version

[Solved] Unexpected error while saving file: xxx.ipynb database or disk is full

https://stackoverflow.com/questions/49175406/jupyter-notebook-operationalerrordisk-io-error

ipython profile create
#But an error is reported ImportError: No module named IPython

Try to install ipython, but:

pip install ipython

#But an error:
ERROR: Could not install packages due to an EnvironmentError: [Errno 28 ] There is no space on the device:

because the tmp folder is too big, check the folder size:

du -lh --max-depth= 1

After trying to delete some files in the root directory, after deleting 20G, the problem is solved.

[Samtools] Run error: error while loading shared libraries: libcrypto.so.1.0.0 or libncurses.so.5 or libtinfow.so.5

After samtools is installed with conda, there is always an error that the shared library is missing. Even if you can use samtools when you just installed it, but installing other related software in the same environment later, there may be conflicts, resulting in library replacement, and thus an error.

To avoid this situation, it may be best to give samtools a separate environment. But I don’t like this. My habit is to build an environment only after doing one thing. Otherwise, there are too many environments and I have forgotten it myself.

Many online answers analyzed the reasons and said: The version of samtools is above 1.9, but the version of samtools installed by conda is still 1.7. So it is recommended to install version 1.9 mandatory:conda install -c bioconda samtools=1.9 --force-reinstall

This answer may work for some people. But in fact, conda is already over 1.9:conda search samtools
image.png

The version I installed is 1.10 by default, and this library is still missing. In short, there is still a mismatch in the version of the dependent library.

This issue has many issues on github, such as libtinfow.so.5

The developer recommends soft linking from elsewhere (downgrade).

For example, my samtools lacks libcrypto.so.1.0.0, libncurses.so.5, libtinfow.so.5.
First find the same dependent libraries of other software, and the soft link can be the above name.

find ./ -name "libtinfow*"
ln -s ../../predict/lib/libtinfow.so.6 libtinfow.so.5

image.png

Other missing libraries are similar, if they fail, you can try a few more. There is not much difference between adjacent versions.

ln -s libcrypto.so.1.1 libcrypto.so.1.0.0
ln -s /lib64/libbz2.so.1 /usr/lib64/libbz2.so.1.0