Tag Archives: technology

CARLA Report an Error: rpc server [How to Solve]

CARLA reports error rpc server
Trying to do some research on autopilot with carla,When running the example,error:
RuntimeError: trying to create rpc server for traffic manager; but the system failed to create because of bind error.
Possible reasons for this issue: The last time the PythonAPI was run was not properly terminated,causing some resources or ports Occupied.

Solution:
1)Restart carla;
2)If the error is still reported after restarting carla, Then restart the computer.

[Solved] Package Install Error: npm ERR code ERR_SOCKET_TIMEOUT npm ERR

Error reporting solution


npm ERR! code ERR_SOCKET_TIMEOUT 
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/node-releases: Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rain\AppData\Local\npm-cache\_logs\2022-02-28T07_09_06_205Z-debug-0.log 

Today, when installing the webpack package, I found the following problems:

First step operation

npm install webpack webpack-cli --global

Perform step 2 after reporting an error

npm install rxjs

Perform the third step

npm install webpack webpack-cli --global

npm run dev successfully: %s

How to Solve zuul Forwarding error (No Retrayable)

Text

Service A restarts, zuul without adding a retry mechanism, and A service error exception will be reported

Solution: Modify gateway profile

hystrix:
    command:
        default:
            execution:
                isolation:
                    thread:
                        timeout-in-milliseconds: 20000
zuul:
  host:
    connect-timeout-millis: 20000
    socket-timeout-millis: 20000
  routes:
    #userMicroservices
    userService:
      #All requests with /user as the header are forwarded to user
      path: /user/**
      serviceId: user
      #url: http://localhost:8091
    pickupService:
      #All requests with /pickup as the header are forwarded to pickup
      path: /pickup/**
      serviceId: pickup
    orderService:
      #All requests with /order as the header are forwarded to order
      path: /order/**
      serviceId: order
  #Whether retryable is enabled
  retryable: true
ribbon:
  #resolve the timeout problem caused by zuul forwarding requests
  ReadTimeout: 60000 
  SocketTimeout: 60000
  # of retries for the current service
  MaxAutoRetries: 2
  # of times to switch the same Server
  MaxAutoRetriesNextServer: 0

Command failed: NPM install — loglevel error

When creating a project, vuecli4 always fails to report an error. Command failed: NPM install — loglevel error
installing the Taobao image is also an error.
the way to find it on the Internet
NPM install chromedriver — chromedriver_ cdnurl= http://cdn.npm.taobao.org/dist/chromedriver
After completing the operation, re create the project Vue create****

My installed version is as follows:
node – V
v14.16.1

npm -v
6.14.2

vue -V
@vue/cli 4.5.12

npm install chromedriver –chromedriver_ cdnurl= http://cdn.npm.taobao.org/dist/chromedriver

vue create

So it worked

Eclipse run main method error: a JNI error has occurred, please check your installation and try again

The magic question

It’s the first time I’ve encountered this kind of error. When creating a new Java project, the test package is named java.test.tt , write the main method to run, and the error will be reported as follows:

First pop up window:

Second pop up window:

Detailed error information:

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.test.tt
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:662)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

solve:

Do not use Java as the beginning of the package name, for example, error demonstration: java.test.tt

Why?

When loading a Java class, you are restricted to throwing an exception if the package name starts with Java. This should also be to ensure the security of classes in JDK when loading classes.

[Jackson exception] com.fasterxml.jackson . databind.JsonMappingException Exception handling method

In the project, the parent layer is Car.java [Vehicle Entity] and the child layer is CarCommonParam.java [Vehicle Basic Entity], which is the basic information of a vehicle to multiple vehicles
But at the time of query library collection is a entity error: 【 com. Fasterxml. Jackson. Databind. JsonMappingException 】

com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: cn.skyable.zulin.common.bean.CarCommonParam_$$_jvst95e_39["handler"])
X-Zc-Ack-->null
	at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:59)
	at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:26)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:541)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:644)
	at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114)
	at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:1837)
	at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:261)
	at com.ablecloud.cloudservice.ACObjectMarshaller.marshalArray(ACObjectMarshaller.java:53)
	at com.ablecloud.cloudservice.ACObjectMarshaller.marshalObject(ACObjectMarshaller.java:37)
	at com.ablecloud.cloudservice.ACObjectMarshaller.marshal(ACObjectMarshaller.java:22)
	at com.ablecloud.common.ACObject.toString(ACObject.java:415)
	at java.lang.String.valueOf(String.java:2994)
	at java.lang.StringBuilder.append(StringBuilder.java:131)
	at cn.skyable.zulin.BaseTest.dealResp(BaseTest.java:88)
	at cn.skyable.zulin.logistics.TestLogistics.TestlistCarsByLogId(TestLogistics.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:539)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)

Error description: A truncation is made in the entity where the child layer can look up information about the parent layer, but the parent layer cannot look up information about the child layer due to circular reference problem.
Solution:
Add to the parent car.java
Instead of

Just !!!!

SQLServerException: The server failed to resume the transaction. Desc:ab00000002

public void runSp(List<String> params, DataSource dataSource, String spName) throws SQLException {
  StringBuffer sb = new StringBuffer("{call " + spName + " (");
  for (int i = 0; i < params.size() - 1; i++) {
    sb.append("?,");
  }
  sb.append("?)}");
  String callString = sb.toString();
  LOGGER.info("[runSp] Running statement: " + callString);
  Connection conn = getConnection(dataSource);
  conn.setAutoCommit(false);
  CallableStatement cs = conn.prepareCall(callString);
  for (int i = 0; i < params.size(); i++) {
    cs.setString(i + 1, params.get(i));
  }
  try {
    cs.execute();
    conn.commit();
    LOGGER.info("sp completed successfully");
  } catch (Exception e) {
    LOGGER.info("sp failed", e);
    conn.rollback();
  } finally {
    cs.close();
    conn.close();
  }
}

This exception is thrown when the method is called while the program is running. The program needs to call SQL Server’s stored procedure during the run, but there is already a commit of the item in the store.
I also added Java code to Java code to throw out this one. After I tried to remove control from the Java code, there were no errors. The specific reasons are still in the learning process, I hope you can give me some advice.