Tag Archives: error

NoClassDefFoundError: io/ebean/bean/ EntityBean [How to Solve]

Error stack frame, as follows:

java.lang.NoClassDefFoundError: io/ebean/bean/EntityBean

	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:108)
	at java.lang.Class.getGenericInterfaces(Class.java:913)
	at org.springframework.core.ResolvableType.getInterfaces(ResolvableType.java:471)
	at org.springframework.core.GenericTypeResolver.buildTypeVariableMap(GenericTypeResolver.java:265)
	at org.springframework.core.GenericTypeResolver.getTypeVariableMap(GenericTypeResolver.java:242)
	at org.springframework.data.util.ClassTypeInformation.getTypeVariableMap(ClassTypeInformation.java:114)
	at org.springframework.data.util.ClassTypeInformation.getTypeVariableMap(ClassTypeInformation.java:103)
	at org.springframework.data.util.ClassTypeInformation.<init>(ClassTypeInformation.java:92)
	at org.springframework.data.util.ClassTypeInformation.lambda$from$1(ClassTypeInformation.java:70)
	at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
	at org.springframework.data.util.ClassTypeInformation.from(ClassTypeInformation.java:70)
	at org.springframework.data.repository.core.support.AbstractRepositoryMetadata.<init>(AbstractRepositoryMetadata.java:58)
	at org.springframework.data.repository.core.support.DefaultRepositoryMetadata.<init>(DefaultRepositoryMetadata.java:52)
	at org.springframework.data.repository.core.support.AbstractRepositoryMetadata.getMetadata(AbstractRepositoryMetadata.java:73)
	at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:98)
	at org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:121)
	at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport.registerBeanDefinitions(AbstractRepositoryConfigurationSourceSupport.java:60)
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:358)
	at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:357)
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:145)
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328)
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
	at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:139)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117)
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108)
	at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
	at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.lang.ClassNotFoundException: io.ebean.bean.EntityBean
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 78 more



The solution is to replace the idea entitybean enhancement plug-in. My computer is replaced with entitybean 10. X enhancement

Kubernetes Error: Error in configuration: unable to read client-cert* unable to read client-key*

System environment:

Ubuntu 20.04 LTSDocker 20.10.8Kubernetes 1.22.1Node: node

Execute command:

$ kubectl version

Errors are reported as follows:

Error in configuration: 
* unable to read client-cert /var/lib/kubelet/pki/kubelet-client-current.pem for default-auth due to open /var/lib/kubelet/pki/kubelet-client-current.pem: no such file or directory
* unable to read client-key /var/lib/kubelet/pki/kubelet-client-current.pem for default-auth due to open /var/lib/kubelet/pki/kubelet-client-current.pem: no such file or directory

Error reporting Description:

The token on the node has expired.

Solution:

$ kubeadm token create --print-join-command

kubeadm join 192.168.50.51:6443 --token rt43m1.b9py8ba6uxbfv7sr --discovery-token-ca-cert-hash sha256:f57a09633cf0e18cd905d41159a790704502410fd841acd63cffc8e493ad3cb2 

Regenerate the token on the Master node.

$ kubeadm join 192.168.50.51:6443 --token rt43m1.b9py8ba6uxbfv7sr --discovery-token-ca-cert-hash sha256:f57a09633cf0e18cd905d41159a790704502410fd841acd63cffc8e493ad3cb2 
$ kubectl version

Re execute on the node node.

Error: no mail configuration found…

An error was reported when running the code today…

error: no postcss config found...
probably means that this configuration is not found in my file
solution: add a file named postcss. Config. JS in the root directory, and add the code in the file:

module.exports = { 
}

Then use the NPM run serve instruction to run the project successfully.

[Solved] Error: Failed to download metadata for repo ‘docker-ce-stable‘: Cannot download repomd.xml:

When installing docker, an error message appears (on alicloud server):

Error: Failed to download metadata for repo ‘docker-ce-stable’: Cannot
download repomd.xml: Cannot download repodata/repomd.xml: All mirrors
were triedError: Failed to download metadata for repo
‘docker-ce-stable’: Cannot download repomd.xml: Cannot download
repodata/repomd.xml: All mirrors were tried

Solution:

Here, my work is done on the alicloud server. There are some small problems. According to the alicloud official website, you need to make some minor modifications to your docker-ce.repo

Change the $releasever variable to 7

[Solved] Android DataBinding Error: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 fragment Changes to Fragm

Android databinding error: Java. Lang. ArrayIndexOutOfBoundsException: length = 2; Index = 2 replace fragment with fragmentcontainerview

Preface bug replacing fragmentcontainerview

preface

When fixing the bug today, I upgraded the library associated with the project. After upgrading, an error appears in the databinding. Unexpectedly, it is still java.lang.arrayindexoutofboundsexception: length = 2; Index = 2, it’s still a list position error,???Full of question marks

BUG

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.xxx, PID: 27182
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx/com.xxx.activity.main.MainActivity}: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3898)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4081)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2462)
        at android.os.Handler.dispatchMessage(Handler.java:110)
        at android.os.Looper.loop(Looper.java:219)
        at android.app.ActivityThread.main(ActivityThread.java:8393)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
     Caused by: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2
        at androidx.databinding.ViewDataBinding.mapBindings(ViewDataBinding.java:1211)
        at androidx.databinding.ViewDataBinding.mapBindings(ViewDataBinding.java:1268)
        at androidx.databinding.ViewDataBinding.mapBindings(ViewDataBinding.java:1268)
        at androidx.databinding.ViewDataBinding.mapBindings(ViewDataBinding.java:1268)
        at androidx.databinding.ViewDataBinding.mapBindings(ViewDataBinding.java:1268)
        at androidx.databinding.ViewDataBinding.mapBindings(ViewDataBinding.java:719)
        at com.xxx.databinding.ActivityMainBindingImpl.<init>(ActivityMainBindingImpl.java:28)
        at com.xxx.DataBinderMapperImpl.internalGetViewDataBinding0(DataBinderMapperImpl.java:378)
        at com.xxx.DataBinderMapperImpl.getDataBinder(DataBinderMapperImpl.java:663)
        at androidx.databinding.MergedDataBinderMapper.getDataBinder(MergedDataBinderMapper.java:74)
        at androidx.databinding.DataBindingUtil.bind(DataBindingUtil.java:199)
        at androidx.databinding.DataBindingUtil.bindToAddedViews(DataBindingUtil.java:327)
        at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:306)
        at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:284)
        at com.xxx.activity.main.MainActivity.onCreate(MainActivity.kt:72)
        at android.app.Activity.performCreate(Activity.java:8121)
        at android.app.Activity.performCreate(Activity.java:8109)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3871)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4081) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2462) 
        at android.os.Handler.dispatchMessage(Handler.java:110) 
        at android.os.Looper.loop(Looper.java:219) 
        at android.app.ActivityThread.main(ActivityThread.java:8393) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055) 

After troubleshooting, I suspect that the fragment is used in the page, because the problem will not occur when starting other pages without this data binding;

Click the page layout XML to see the prompt:

replace the & lt; fragment > tag with FragmentContainerView.

Replace fragmentcontainerview

Replace the fragment with fragmentcontainerview according to the prompt, run it again, and no longer report “Java. Lang. ArrayIndexOutOfBoundsException: length = 2; “Index = 2” is wrong, but a new error is reported:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.xxx, PID: 27863
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx/com.xxx.activity.main.MainActivity}: java.lang.IllegalStateException: Activity com.xxx.activity.main.MainActivity@1f5b1e does not have a NavController set on 2131296506
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3898)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4081)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2462)
        at android.os.Handler.dispatchMessage(Handler.java:110)
        at android.os.Looper.loop(Looper.java:219)
        at android.app.ActivityThread.main(ActivityThread.java:8393)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
     Caused by: java.lang.IllegalStateException: Activity com.xxx.activity.main.MainActivity@1f5b1e does not have a NavController set on 2131296506
        at androidx.navigation.Navigation.findNavController(Navigation.java:61)
        at com.xxx.activity.main.MainActivity.onCreate(MainActivity.kt:75)
        at android.app.Activity.performCreate(Activity.java:8121)
        at android.app.Activity.performCreate(Activity.java:8109)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3871)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4081) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2462) 
        at android.os.Handler.dispatchMessage(Handler.java:110) 
        at android.os.Looper.loop(Looper.java:219) 
        at android.app.ActivityThread.main(ActivityThread.java:8393) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055) 

This problem is reported in obtaining the navcontroller. After searching the StackOverflow, we found the new method of fragmentcontainerview to obtain the navcontroller

reference resources: https://stackoverflow.com/questions/64170603/replace-the-fragment-tag-with-fragmentcontainerview


// FragmentContainerView
val navHostFragment = supportFragmentManager.findFragmentById(R.id.fragment) as NavHostFragment
navController = navHostFragment.navController
// Fragment
//navController = Navigation.findNavController(this, R.id.fragment)

// Set the tab bar to bind to the fragment
NavigationUI.setupWithNavController(binding.bottomNavigationView, navController)

confusion

-keepnames class androidx.navigation.fragment.NavHostFragment
-keepnames class com.google.android.gms.maps.SupportMapFragment

Finish

Re-run and solve the problem.

[Solved] Jupyter Kernel error: kernel Cannot Connect—-import win32api; ImportError: DLL load failed…

The kernel is not connected

Error original

Traceback (most recent call last):
  File "D:\Anaconda\envs\tf2\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "D:\Anaconda\envs\tf2\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel_launcher.py", line 16, in <module>
    app.launch_new_instance()
  File "D:\Anaconda\envs\tf2\lib\site-packages\traitlets\config\application.py", line 844, in launch_instance
    app.initialize(argv)
  File "D:\Anaconda\envs\tf2\lib\site-packages\traitlets\config\application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel\kernelapp.py", line 625, in initialize
    self.write_connection_file()
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel\kernelapp.py", line 236, in write_connection_file
    iopub_port=self.iopub_port, control_port=self.control_port)
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_client\connect.py", line 136, in write_connection_file
    with secure_write(fname) as f:
  File "D:\Anaconda\envs\tf2\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_core\paths.py", line 461, in secure_write
    win32_restrict_file_to_user(fname)
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
    import win32api
ImportError: DLL load failed: 找不到指定的程序。
[I 16:31:42.557 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\YJF\\AppData\\Roaming\\jupyter\\runtime\\kernel-edcd3c8f-6a6b-4512-a376-4a71c0a0b1d5.json'
Traceback (most recent call last):
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel\kernelapp.py", line 261, in init_connection_file
    self.load_connection_file()
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
    info = json.load(f)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[I 16:31:45.568 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\YJF\\AppData\\Roaming\\jupyter\\runtime\\kernel-edcd3c8f-6a6b-4512-a376-4a71c0a0b1d5.json'
Traceback (most recent call last):
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel\kernelapp.py", line 261, in init_connection_file
    self.load_connection_file()
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
    info = json.load(f)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[I 16:31:48.584 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\YJF\\AppData\\Roaming\\jupyter\\runtime\\kernel-edcd3c8f-6a6b-4512-a376-4a71c0a0b1d5.json'
Traceback (most recent call last):
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel\kernelapp.py", line 261, in init_connection_file
    self.load_connection_file()
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
    info = json.load(f)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[I 16:31:51.595 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\YJF\\AppData\\Roaming\\jupyter\\runtime\\kernel-edcd3c8f-6a6b-4512-a376-4a71c0a0b1d5.json'
Traceback (most recent call last):
  File "D:\Anaconda\envs\tf2\lib\site-packages\ipykernel\kernelapp.py", line 261, in init_connection_file
    self.load_connection_file()
  File "D:\Anaconda\envs\tf2\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
    info = json.load(f)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "D:\Anaconda\envs\tf2\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\Anaconda\envs\tf2\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[W 16:31:54.603 NotebookApp] KernelRestarter: restart failed
[W 16:31:54.603 NotebookApp] Kernel edcd3c8f-6a6b-4512-a376-4a71c0a0b1d5 died, removing from map.
[W 16:32:22.967 NotebookApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:22.977 NotebookApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.024 NotebookApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.031 NotebookApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.052 NotebookApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.062 NotebookApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.088 NotebookApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.098 NotebookApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.151 NotebookApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.157 NotebookApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.380 NotebookApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.388 NotebookApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.515 NotebookApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.523 NotebookApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.570 NotebookApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.577 NotebookApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.598 NotebookApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.609 NotebookApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.633 NotebookApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.643 NotebookApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.694 NotebookApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.700 NotebookApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.921 NotebookApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 16:32:23.928 NotebookApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?

Error reporting reason

    import win32api
ImportError: DLL load failed: The specified program could not be found.

This is caused by the incompatibility between the python version and the pywin32 version.

Solution:

Reinstall the latest version of pywin32 = = 301 in the TF2 environment with CONDA error. Solution: CONDA install pywin32 = = 301

[Solved] ERROR_POLICY: attempt to perform an operation not allowed by the security policy `PDF‘ @ error/const

Error Message:
ERROR_POLICY: attempt to perform an operation not allowed by the security policy 'PDF' @ error/constitute.c/IsCoderAuthorized/421
Solution:
Modifysudo nano /etc/ImageMagick-6/policy.xml

.....
  <!-- not needed due to the need to use explicitly by mvg: -->
  <!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
  <!-- use curl -->
  <policy domain="delegate" rights="none" pattern="URL" />
  <policy domain="delegate" rights="none" pattern="HTTPS" />
  <policy domain="delegate" rights="none" pattern="HTTP" />
  <!-- in order to avoid to get image with password text -->
  <policy domain="path" rights="none" pattern="@*"/>
  <!-- disable ghostscript format types -->
  <!--<policy domain="coder" rights="none" pattern="PS" />
  <policy domain="coder" rights="none" pattern="PS2" />
  <policy domain="coder" rights="none" pattern="PS3" />
  <policy domain="coder" rights="none" pattern="EPS" />
  <policy domain="coder" rights="none" pattern="PDF" />
  <policy domain="coder" rights="none" pattern="XPS" />-->
  <policy domain="coder" rights="read|write" pattern="PDF" />
</policymap>

Comment coder, add the last line

Error:java: Compilation failed: internal java compiler error

Compilation error

Error:java: Compilation failed: internal java compiler error

Solution (two cases):

    setting–> Build,Execution,Deployment–> The build process heap size (Mbytes): 700 is changed to 2000, or 5000 (it is possible that the company’s project needs a lot, so try to make it larger). The JDK version does not correspond. It needs to be in file — & gt; Project structure–> Project check whether the JDK version corresponds to

PyTorch Error: RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemm()

Complete error reporting information

RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when 
calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, 
lda, b, ldb, &beta, c, ldc)`

Error causes and solutions

Usually linear layer

n

n

.

L

i

n

e

a

r

\rm nn.Linear

NN. When defining linear, the data dimension parameter does not match the actual data dimension, so it needs to be checked and modified.

[Solved] Android Error: java.lang.IllegalStateException: Not allowed to start service Intent

Android error: java.lang.illegalstateexception: not allowed to start service intent

Error resolution 12

Today’s test threw me a crash message:

Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=xxx }: app is in background uid UidRecord{xxx u0a136 CEM idle procs:1 seq(0,0,0)}

Can it be hard for me
once you see it, you can see that it’s a background service startup error. Just put the service in the foreground, easy

In fact, Google took a look
https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten
The problem is that Android 8.0 does not allow the creation of background services.

Solution:

Method 1:

The simplest way is to directly open the front desk service
set the service to the front desk in oncreate of your service class

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
       startForeground(1, new Notification()); 
}

Of course, this method will show what is running on the status bar of Android 5.0 and 6.0 phones please refer to the following method

Method 2:

The method from here

first modify the service configuration in your manifest file

<service android:name=".YourService"
         android:permission="android.permission.BIND_JOB_SERVICE"/>

Then change the modification inheritance of your service class to extensions jobintentservice
and add the following code

    public static final int JOB_ID = 1;

    public static void enqueueWork(Context context, Intent work) {
        enqueueWork(context, YourService.class, JOB_ID, work);
    }

    @Override
    protected void onHandleWork(@NonNull Intent intent) {
        // your code
    }

The startup service is modified as follows.

YourService.enqueueWork(context, new Intent());

However, I tested that the content in onstartcommand() does not execute. No reason has been found
I hope you can help me with the analysis.

It’s over