Tag Archives: eclipse

Eclipse: Troubleshooting of error reports packaged with Maven

1. When packaging with maven in a springboot project, the following error is reported.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project aipp: Fatal error compiling: Invalid marks: -parameters -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

The reason is that I have two jdk’s, one 1.7 and one 1.8, my previous project was using 1.7 and now this springboot project is using 1.8, although the project’s Java build path libraries use 1.8 jre, but but

In Windows–>Java–>Installed JREs inside or check the 1.7 jdk, resulting in the above error when packaging, remember to change to check the 1.8

 

Solve the error reported by eclipse project: unbound classpath container

Eclipse reports the following two errors:

The project cannot be built until build path errors are resolved HelloWord Unknown Java Problem

Unbound classpath container: 'JRE System Library [JavaSE-1.7]' in project 'java project name' java project name Build path Build Path Problem

it seems that MyEclipse can't find the classpath of Java 1.7, so I checked the Java environment variable settings, but found no problem. Then I had to go to Google to see if I could find a solution, and finally in stack overflow   I found this post on. The main idea of the solution is as follows:

1. Check whether JDK is installed correctly

2. After correct installation, open MyEclipse/eclipse window - > Preferences -> Java –> Configured with installed jres

the specific configuration method is very simple:

is to click "add" on the right side of the window, then add a "standard VM" (which should mean standard virtual machine), and then click "next"

in the "JRE home" line, click "directory..." on the right to find your Java installation path, such as "C: \ program files \ Java \ jdk1.7.0"_09”

How does eclipse ignore JS files with errors

The first step is to locate the error, select window – show view – other in the menu, and select problems

 

Step 2: click the item with Red Cross. In the problems view, you can see what the error is and the JS error in which folder

 

Step 3: after locating the error, right-click the item with the Red Cross, select properties, and the Properties box pops up

Step 4: in the pop-up menu, select include path under JavaScript directory, select excluded under source on the right, and then click Add Folder

 

Step 5: in the pop-up box, under exclusion patterns, click the Add button on the right to add the path to be ignored

 

Step 6: click add, select browse in the pop-up box, and select the file to be ignored under the project

 

 

 

Step 6: click OK and return to the project directory. You will see that the projects that reported the red cross just now have returned to normal

Welcome to my personal blog – Fu Bohan’s personal blog   vast waves

 

Error in reading Chinese path of pydev in eclipse

Originally, I was thinking of organizing the cluttered code, sorting different functions into different py files and calling them in the main function, but as a result, Chinese characters appeared in the input path of the main function, and an error was reported.

SyntaxError: Non-UTF-8 code starting with ‘\xba’ in file D:\Python Projects\RidgeMorphology\src\ridgemorph.py on line 19, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

After debugging, the content seen is:

warning: Debugger speedups using cython not found. Run ‘”C:\Users\users\AppData\Local\Programs\Python\Python37\python.exe” “C:\Users\Jia\.p2\pool\plugins\org.python.pydev.core_6.4.3.201807050139\pysrc\setup_cython.py” build_ext –inplace’ to build.
pydev debugger: starting (pid: 6688)
Traceback (most recent call last):
File “C:\Users\users\.p2\pool\plugins\org.python.pydev.core_6.4.3.201807050139\pysrc\pydevd.py”, line 1715, in <module>
main()
File “C:\Users\users\.p2\pool\plugins\org.python.pydev.core_6.4.3.201807050139\pysrc\pydevd.py”, line 1709, in main
globals = debugger.run(setup[‘file’], None, None, is_module)
File “C:\Users\users\.p2\pool\plugins\org.python.pydev.core_6.4.3.201807050139\pysrc\pydevd.py”, line 1062, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
File “C:\Users\users\.p2\pool\plugins\org.python.pydev.core_6.4.3.201807050139\pysrc\pydevd.py”, line 1069, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File “C:\Users\users\.p2\pool\plugins\org.python.pydev.core_6.4.3.201807050139\pysrc\_pydev_imps\_pydev_execfile.py”, line 20, in execfile
contents = stream.read()
File “C:\Users\users\AppData\Local\Programs\Python\Python37\lib\codecs.py”, line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xba in position 515: invalid start byte

 

But I clearly defined the encoding when I defined the file: # -*- coding: utf-8 -*-

I did a lot of searching on the Internet, but I couldn’t find a solution, and then I had a sudden thought that it was a compiler problem

So I set the encoding format in the compiler to utf-8

Problem solving!

As a python rookie, I always look for problems at the code level when I encounter them, and errors caused by the compiler should not be ignored.

An error is reported after eclipse changes the JDK version

In the actual development process, we may need to change the JDK version due to the needs of the project. However, an error will be reported after replacement, as follows:

Java compiler level does not match the version of the installed Java project facet.

Solution:

Step 1: set the eclipse JDK version

Windows—-> Preferences—-> Java—-> Installed JREs

 

Step 2: set the JDK compiled version

Windows—-> Preferences—-> Java—-> Compiler

 

Step 3: right click the project and set the JDK version of the project to the above unified version

Right click the item – > Properties—-> Java Compiler

 

  Note: the above versions should be unified

 

An error is reported when eclipse uses gradle to build the system

After starting eclipse today, the gradle project running normally yesterday reported an error and could not be compiled. The error information is as follows:

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.

According to the literal meaning, it seems that there is not enough memory. All gradle memory needs to be configured. The steps are as follows

1. Navigate to the directory C: \ users \ & lt; username>\. gradle  

2. Create the file gradle. Properties; Content: org. Gradle. Jvmargs = – xmx512m  

3. After saving, restart eclipse to compile normally

Eclipse Off-line Install activiti Plug-in error: “An error occurred while collecting items to be installed session conte…

when the activity plug-in is installed offline in eclipse, the error “an error occurred while collecting items to be installed session context was: (…” is reported

According to the article: Eclipse installs the activiti designer plug-in offline, downloads the two offline installation files of the plug-in, and after installing according to the steps, reports an error all the time after next, as follows:

An error occurred while collecting items to be installed
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.apache.commons.io,2.2.0.v201405211200
No repository found containing: osgi.bundle,org.apache.commons.lang,2.6.0.v201404270220
No repository found containing: osgi.bundle,org.apache.xerces,2.9.0.v201101211617
No repository found containing: osgi.bundle,org.apache.xml.resolver,1.2.0.v201005080400
No repository found containing: osgi.bundle,org.apache.xml.serializer,2.7.1.v201005080400
No repository found containing: osgi.bundle,org.eclipse.draw2d,3.10.0.201506010206
No repository found containing: osgi.bundle,org.eclipse.emf,2.6.0.v20150601-0402
No repository found containing: osgi.bundle,org.eclipse.emf.common.ui,2.10.0.v20150601-0402
No repository found containing: osgi.bundle,org.eclipse.emf.edit,2.11.0.v20150601-0402
No repository found containing: osgi.bundle,org.eclipse.emf.edit.ui,2.11.0.v20150601-0402
No repository found containing: osgi.bundle,org.eclipse.emf.transaction,1.9.0.201506010221
No repository found containing: osgi.bundle,org.eclipse.emf.validation,1.8.0.201505312255
No repository found containing: osgi.bundle,org.eclipse.gef,3.10.0.201506010206
No repository found containing: osgi.bundle,org.eclipse.wst.common.core,1.2.0.v200908251833
No repository found containing: osgi.bundle,org.eclipse.wst.common.environment,1.0.400.v200912181831
No repository found containing: osgi.bundle,org.eclipse.wst.common.frameworks,1.2.200.v201304241450
No repository found containing: osgi.bundle,org.eclipse.wst.common.frameworks.ui,1.2.400.v201504292002
No repository found containing: osgi.bundle,org.eclipse.wst.common.project.facet.core,1.4.300.v201111030423
No repository found containing: osgi.bundle,org.eclipse.wst.common.ui,1.1.500.v200911182011
No repository found containing: osgi.bundle,org.eclipse.wst.common.uriresolver,1.2.200.v201505132009
No repository found containing: osgi.bundle,org.eclipse.wst.sse.core,1.1.900.v201401092025
No repository found containing: osgi.bundle,org.eclipse.wst.sse.ui,1.3.400.v201505141512
No repository found containing: osgi.bundle,org.eclipse.wst.validation,1.2.600.v201501211647
No repository found containing: osgi.bundle,org.eclipse.wst.validation.ui,1.2.500.v201310231452
No repository found containing: osgi.bundle,org.eclipse.wst.xml.core,1.1.902.v201501211904
No repository found containing: osgi.bundle,org.eclipse.wst.xml.ui,1.1.501.v201501212057

Search for articles on the Internet:

An error occurred while collecting items to be installed session context was:(profile=epp.package.je

the reason for the error is that there is an error in eclipse’s update management P2. P2 has a garbage collection mechanism. If the previously deleted jar package is reloaded before it is recycled, the system will not download it again, but it can’t find the jar package, so it reports an error

solutions:

In the run command line, switch to the installation root directory of eclipse, that is, the directory where eclipse.exe is located, and execute the command:

Eclipse application org. Eclipse. Equinox. P2. Garbage collector. Application profile * * (* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

I can’t understand the above command. It’s a bit confusing whether “* *”, which is to fill in this * * or fill in the new value according to the comments in brackets. I found the value of eclipse.p2.profile, but I’m not sure

Equal to which segment. Anyway, I tried and finally reported an error, but the installation was successful

My installation process is recorded as follows:

1. Enter the eclipse root directory:

2. Execute the above command line:

Among them, the first one starts eclipse directly without error, and the second and third ones report an error after starting eclipse, which means that eclipse is successfully started

I tried hard. Anyway, I didn’t report an error when I installed the plug-in package in eclipse. The installation was successful. I don’t know which of the three works. Record it, and then test it several times to see which one works

 

Solve the initialization Java tooling exception information when eclipse starts

Programmer algorithm practice must read, common Java API skills to share>>>

1. Start eclipse and report an internal error occurred during: “initializing Java tooling”. Java.lang.nullpointerexception

  

2. Solutions:

First, close eclipse and delete the files in the workspace D: Eclipse workspace. Metadata. Plugins. Org. Eclipse. Core. Resources. Projects

  

3. Restart eclipse with the following error message:

  

4. Close eclipse, delete the workspace D: Eclipse workspace. Metadata. Plugins. Org. Eclipse. Core. Resources. Projects file, and delete the file directly

  

5. Be careful not to delete “\. Org. Eclipse. JDT. Core. External. Folders \. Markers” to avoid the following error message when closing Eclipse:

  Problems occurred while trying to save the state of the workbench

  

6. Restart eclipse and solve the problem

  

7. Summary: practice by hand and share with those in need

[Solved] Eclipse Startup Error: Cannot load 64-bit SWT libraries on 32-

System environment: win7 – 64bit

Error log: the following error is reported:

!SESSION2015-06-1910:13:27.162-----------------------------------------------
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.8.0_45
java.vendor=OracleCorporation
BootLoaderconstants:OS=win32,ARCH=x86_64,WS=win32,NL=zh_CN
Frameworkarguments:-productorg.eclipse.epp.package.standard.product
Command-linearguments:-oswin32-wswin32-archx86_64-productorg.eclipse.epp.package.standard.product
!ENTRYorg.eclipse.osgi402015-06-1910:13:28.174
!MESSAGEApplicationerror
!STACK1
java.lang.UnsatisfiedLinkError:Cannotload64-bitSWTlibrarieson32-bitJVM
atorg.eclipse.swt.internal.Library.loadLibrary(Library.java:260)
atorg.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
atorg.eclipse.swt.internal.C.<clinit>(C.java:21)
atorg.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
atorg.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:675)
atorg.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
atorg.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
atorg.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
atorg.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
atorg.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
atorg.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
atorg.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
atorg.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)
atjava.lang.reflect.Method.invoke(UnknownSource)
atorg.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
atorg.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
atorg.eclipse.equinox.launcher.Main.run(Main.java:1450)
atorg.eclipse.equinox.launcher.Main.main(Main.java:1426)

Error analysis:
0

first of all, through the error report, it seems that the JVM is 32bit, which does not meet the requirements of 64bit program

View Directory: C:// programdata/Oracle/Java/javapath\

Here are three shortcuts: java.exe, javaw.exe, javaws.exe. Check the shortcuts of three programs with the same name under JRE/bin with the attribute of JDK1.8 32bit

Solution:

Install 32 bit JRE in the machine, create a shortcut for the three programs with the same name under JRE/bin/and copy the shortcut to C:// program data/Oracle/Java/javapath to replace the original one

Restart eclipse, success