Category Archives: Error

[Solved] Maven Error: The packaging for this project did not assign a file to the build artifact

Problem Description
	When using the maven function provided by idea to install a project, the console reports an error
	The packaging for this project did not assign a file to the build artifact
Problem Analysis
	This is to say that the package for the plugin could not be found, in fact, it is not that the package for the plugin could not be found, but that the project did not load the package from the maven repository into the project
Problem solving
	The use of their own is the install under plugins caused by
	should use the Lifecycle install normal operation

[Solved] ERROR: for jms_koko Cannot start service koko: driver failed programming

ERROR: for jms_koko Cannot start service koko: driver failed programming
error:

jms_mysql is up-to-date
jms_redis is up-to-date
Creating jms_core ... done
Creating jms_guacamole ... 
Creating jms_celery    ... 
Creating jms_koko      ... 
Creating jms_koko      ... error
Creating jms_luna      ... 
WARNING: Host is already in use by another container

ERROR: for jms_koko  Cannot start service koko: driver failed programming externCreating jms_guacamole ... done
Creating jms_celery    ... done
tcp -d 0/0 --dport 2222 -j DNAT --to-destination 192.168.250.5:2222 ! -i br-c11eCreating jms_lina      ... done
Creating jms_luna      ... done

ERROR: for koko  Cannot start service koko: driver failed programming external connectivity on endpoint jms_koko (741a5fd6b1e317171d1ed6ac21bbf5b97d7035ca33b1bc9bc721e4e864843942):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 2222 -j DNAT --to-destination 192.168.250.5:2222 ! -i br-c11e31f24830: iptables: No chain/target/match by that name.
 (exit status 1))
ERROR: Encountered errors while bringing up the project.

The custom chain docker defined when docker service is started is cleared due to centos7 firewall
solution

#systemctl restart docker// restart docker server

Then run jump server

ERROR: for nginx Container “xxx” is unhealthy.

Error information

ERROR: for nginx Container "5b4004998a86" is unhealthy. 

resolvent

#docker logs -f jms_core --tail 200 

[Solved] But was actually of type ‘com. Sun. Proxy. $proxy**‘

error:Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named '****' is expected to be of type '****' but was actually of type 'com.sun.proxy.$Proxy**'The solution to the problem.
The code inside my controller is.

@Autowired
private UserServiceImpl userServiceImpl;

The solution is to change the userserviceimpl implementation class to the userservice interface, and that’s it.

After solving the problem, the code is as follows:

@Autowired
private UserService userServiceImpl;

The specific reason is that the interface should be used to receive the proxy object, so as to obtain the proxy object.

Error when manipulating files: zipfile.BadZipFile: File is not a zip file

When writing code, the recorder pursues decoupling, and wants the program to see if the path file exists. The OS module is usually used to operate the file or path. If it does not exist, the file is created under the current path for subsequent operations. As far as I know, the OS module does not give a method to create a file, which requires us to complete the “road safety first” through another way. At that time, we used the general with open to create a file. OK, no problem. The creation was successful. The next problem is the error of zipfile.badzipfile: file is not a zip file during data storage, It’s said that the file that is not zip is rushing to work. Suddenly, it’s a flash of inspiration. When the pandas module is used, it’s just that the file can be operated. In the end, the overall code has not changed. The only change is to attach the code at the step of creating the file

def isfile(self, file):
        print(file)
        if not os.path.isfile(file):
            df = pd.DataFrame(columns=['name', 'shake number', 'weibo', 'profile', 'estimated sales']) # Create a table object, without creating the content first
            df.to_excel(self.filr, index=False) # Save the object as an .xlsx file
        return file

Call the function to execute retuan and return the path URL for subsequent operation

[Solved] This application has no explicit mapping for /error, so you are seeing this as a fallback

This application has no explicit mapping for /error, so you are seeing this as a fallback

Today, we use spring boot to build a background weather project. The database we use is weather and the table name is city. Adding annotations in the control layer writes getmapping as restmapping, which leads to errors. Fill in the address bar with localhost: port number/database table name/list. Only in this way can it be displayed normally

Solve chrome running error unknown error: cannot get automation extension

phenomenon

Today, I changed the default browser to chrome. As a result, an error was reported as soon as the script was run. The specific error message is as follows.

FAILED CONFIGURATION: @BeforeClass beforeClass
org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
  (Session info: chrome=59.0.3071.115)
  (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.12 seconds
Build info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
System info: host: 'admin2-PC', ip: '10.2.16.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_17'
Session ID: a2cffef46bdbde6af4e7ec75998d2bd9
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\MyTemp\scoped_dir6928_24278, chromedriverVersion=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9)}, networkConnectionEnabled=false, unexpectedAlertBehaviour=, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=59.0.3071.115, pageLoadStrategy=normal, takesHeapSnapshot=true, databaseEnabled=false, cssSelectorsEnabled=true, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, hasTouchScreen=false, applicationCacheEnabled=false, takesScreenshot=true}]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:825)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
    at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166)
    at org.testng.internal.TestMethodWorker.run (TestMethodWorker.java: 105 )
    at org.testng.TestRunner.privateRun (TestRunner.java: 744 )
    at org.testng.TestRunner.run (TestRunner.java: 602 )
    at org.testng.SuiteRunner.runTest (SuiteRunner.java: 380 )
    at org.testng.SuiteRunner.runSequentially (SuiteRunner.java: 375 )
    at org.testng.SuiteRunner.privateRun (SuiteRunner.java: 340 )
    at org.testng.SuiteRunner.run (SuiteRunner.java: 289 )
    at org.testng.SuiteRunnerWorker.runSuite (SuiteRunnerWorker.java: 52 )
    at org.testng.SuiteRunnerWorker.run (SuiteRunnerWorker.java: 86 )
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
    at org.testng.TestNG.runSuites(TestNG.java:1144)
    at org.testng.TestNG.run(TestNG.java:1115)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

 

After searching for a long time, I found out that my version of chromedriver.exe was too old, and it was fine after upgrading to the latest version. There is a small problem here. The version rule of Selenium is the major version number + the minor version number, so:

  • 2.1 is much earlier than 2.10
  • 2.9 is earlier than 2.10

The chronological order of each version, from newest to oldest, is:

  • 2.19>2.10>2.9>2.1
    http://selenium-release.storage.googleapis.com/index.html
  • Chrome Driver:
    http://chromedriver.storage.googleapis.com/index.html
  • PhantomJS Driver:
    http://phantomjs.org/download.html

[Maven] Pom.xml error: Cannot detect Web Project version.

The newly created maven project reports the following error:

1 Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war plugin. Eg: <plugin> <artifactId>maven-
 2   war-plugin</artifactId> <configuration> <version> 3.0 </ version> </configuration> </plugin>

Just add the following code in the pom.xml file:

1   < build > 
2        < plugins > 
3            < plugin > 
4                < artifactId > maven-war-plugin </ artifactId > 
5                < configuration > 
6                    < version > 3.0 </ version > 
7                </ configuration > 
8            </ plugin > 
9        < / plugins > 
10    </ build >

The following situations may also occur:

After adding the following code to the pom.xml file, the error is not eliminated, and the corresponding place in the .setting folder has been set, then

Copy the pom.xml file in a good maven project and use it to replace the pom.xml file.

For example: the complete pom.xml file:

< project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http:/ /maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > 
  < modelVersion > 4.0.0 </ modelVersion > 
  < groupId > com.agen. per </ groupId > 
  < artifactId > performance </ artifactId > 
  < version > 0.0.1-SNAPSHOT </ version >
  < packaging> war </ packaging > 
  < build > 
      < plugins > 
          < plugin > 
              < artifactId > maven-war-plugin </ artifactId > 
              < configuration > 
                  < version > 3.0 </ version > 
              </ configuration > 
          </ plugin > 
      </ plugins > 
  </ build >
  
      < properties > 
        < project .build.sourceEncoding > UTF-8 </ project.build.sourceEncoding > 
        < spring .version > 4.1.4.RELEASE </ spring.version > 
        < hibernate .version > 4.3.8.Final </ hibernate .version > 
    </ properties >
    
  < dependencies > 
      <!-- https://mvnrepository.com/artifact/javax.persistence/persistence-api --> 
    < dependency > 
        < groupId > javax.persistence </ groupId > 
        < artifactId > persistence-api </ artifactId > 
        < version > 1.0 </ version > 
    </ dependency > 
      <!-- Encryption operation --> 
        < dependency > 
            < groupId > commons-codec </ groupId> 
            < artifactId > commons-codec </ artifactId > 
            < version > 1.10 </ version > 
        </ dependency >
          
          <!-- https://mvnrepository.com/artifact/dom4j/dom4j --> 
        < dependency > 
            < groupId > dom4j </ groupId > 
            < artifactId > dom4j </ artifactId > 
            < version > 1.6.1 </ version > 
        < / dependency >

          
      <!-- WeChat Development Kit -->
        
        <!-- https://mvnrepository.com/artifact/com.github.binarywang/weixin-java-common --> 
        < dependency > 
            < groupId > com.github.binarywang </ groupId > 
            < artifactId > weixin-java- common </ artifactId > 
            < version > 2.2.0 </ version > 
        </ dependency > 
        <!-- https://mvnrepository.com/artifact/com.github.binarywang/weixin-java-mp --> 
        < dependency > 
            < groupId > com.github.binarywang</ groupId > 
            < artifactId > weixin-java-mp </ artifactId > 
            < version > 2.2.0 </ version > 
        </ dependency >
        
        <!-- https://mvnrepository.com/artifact/com.github.abj351r7/wechat-java-sdk --> 
        < dependency > 
            < groupId > com.github.abj351r7 </ groupId > 
            < artifactId > wechat-java- sdk </ artifactId > 
            < version > 1.0.1 </ version > 
        </ dependency >
        
        <!-- junit --> 
        < dependency > 
            < groupId > junit </ groupId > 
            < artifactId > junit </ artifactId > 
            < version > 4.12 </ version > 
            < scope > test </ scope > 
        </ dependency >

        <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper --> 
        < dependency > 
            < groupId > com.github.pagehelper </ groupId > 
            < artifactId > pagehelper </ artifactId > 
            < version > 4.1.4 </ version > 
        </ dependency >
        
        <!-- spring --> 
        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-core </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency >

        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-beans </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency >

        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-context </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency >

        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-tx </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency >

        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-web </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency >

        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-test </ artifactId > 
            < version > ${spring.version} </ version > 
            < scope > test </ scope > 
        </ dependency >

        <!-- Use SpringMVC to configure --> 
        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-webmvc </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency > 
        <!-- spring cglib proxy --> 
        < dependency > 
            < groupId > cglib </ groupId > 
            < artifactId >cglib</ artifactId > 
            < version > 2.2.2 </ version > 
        </ dependency > 
        <!--When relational database integration requires configuration such as hibernate jpa, etc .--> 
        < dependency > 
            < groupId > org.springframework </ groupId > 
            < artifactId > spring-orm </ artifactId > 
            < version > ${spring.version} </ version > 
        </ dependency >

        <!-- hibernate --> 
        < dependency > 
            < groupId > org.hibernate </ groupId > 
            < artifactId > hibernate-core </ artifactId > 
            < version > ${hibernate.version} </ version > 
        </ dependency >

        < dependency > 
            < groupId > org.hibernate </ groupId > 
            < artifactId > hibernate-ehcache </ artifactId > 
            < version > ${hibernate.version} </ version > 
        </ dependency >

        <!-- Secondary cache ehcache --> 
        < dependency > 
            < groupId > net.sf.ehcache </ groupId > 
            < artifactId > ehcache </ artifactId > 
            < version > 2.9.0 </ version > 
        </ dependency >

        <!-- log4j --> 
        < dependency > 
            < groupId > log4j </ groupId > 
            < artifactId > log4j </ artifactId > 
            < version > 1.2.17 </ version > 
        </ dependency >

        <!-- mysql connection --> 
        < dependency > 
            < groupId > mysql </ groupId > 
            < artifactId > mysql-connector-java </ artifactId > 
            < version > 5.1.34 </ version > 
        </ dependency >

        <!-- c3p0 data source --> 
        < dependency > 
            < groupId > com.mchange </ groupId > 
            < artifactId > c3p0 </ artifactId > 
            < version > 0.9.5-pre10 </ version > 
        </ dependency >

        <!-- json -->

        <!-- No. 1 --> 
        < dependency > 
            < groupId > com.fasterxml.jackson.core </ groupId > 
            < artifactId > jackson-core </ artifactId > 
            < version > 2.8.1 </ version > 
        </ dependency > 
        <!-- No. 2 --> 
        < dependency > 
            < groupId > com.fasterxml.jackson.core </ groupId > 
            < artifactId >jackson-annotations</ artifactId > 
            < version > 2.8.1 </ version > 
        </ dependency >

        <!-- No. 3 --> 
        < dependency > 
            < groupId > com.fasterxml.jackson.core </ groupId > 
            < artifactId > jackson-databind </ artifactId > 
            < version > 2.8.1 </ version > 
            < exclusions > 
                < exclusion > 
                    < artifactId > jackson-core </ artifactId > 
                    < groupId > com.fasterxml.jackson.core </ groupId >
                </ exclusion > 
                < exclusion > 
                    < artifactId > jackson-annotations </ artifactId > 
                    < groupId > com.fasterxml.jackson.core </ groupId > 
                </ exclusion > 
            </ exclusions > 
        </ dependency >

        <!-- No. 4 --> 
        < dependency > 
            < groupId > com.google.code.gson </ groupId > 
            < artifactId > gson </ artifactId > 
            < version > 2.7 </ version > 
        </ dependency > 
        <!-- No. 5 --> 
        < dependency > 
            < groupId > net.sf.json-lib </ groupId > 
            < artifactId > json-lib </ artifactId> 
            < version > 2.4 </ version > 
            < classifier > jdk15 </ classifier > 
        </ dependency > 
        <!-- No. 5 json-lib also needs the following dependency packages --> 
        < dependency > 
            < groupId > commons-lang </ groupId > 
            < artifactId > commons-lang </ artifactId > 
            < version > 2.5 </ version > 
        </ dependency >
        <dependency > 
            < groupId > commons-beanutils </ groupId > 
            < artifactId > commons-beanutils </ artifactId > 
            < version > 1.9.2 </ version > 
        </ dependency > 
        < dependency > 
            < groupId > commons-collections </ groupId > 
            < artifactId > commons-collections </ artifactId > 
            < version >3.2.1 </version > 
        </ dependency > 
        < dependency > 
            < groupId > commons-logging </ groupId > 
            < artifactId > commons-logging </ artifactId > 
            < version > 1.2 </ version > 
        </ dependency >
        
        <!-- aop --> 
        < dependency > 
            < groupId > org.aspectj </ groupId > 
            < artifactId > aspectjweaver </ artifactId > 
            < version > 1.8.4 </ version > 
        </ dependency >

        <!-- servlet --> 
        < dependency > 
            < groupId > javax.servlet </ groupId > 
            < artifactId > servlet-api </ artifactId > 
            < version > 3.0-alpha-1 </ version > 
            < scope > provided </ scope > 
        </ dependency >

        < dependency > 
            < groupId > javax.servlet </ groupId > 
            < artifactId > jstl </ artifactId > 
            < version > 1.2 </ version > 
        </ dependency > 
        <!-- Merge operation of guava collection -->         
        < dependency > 
            < groupId > com.google.guava </ groupId > 
            < artifactId > guava </ artifactId > 
            <version> 19.0 </ version > 
        </ dependency > 
        < dependency > 
            < groupId > com.google.guava </ groupId > 
            < artifactId > guava-collections </ artifactId > 
            < version > r03 </ version > 
        </ dependency >
        
        <!-- File upload --> 
        < dependency > 
            < groupId > commons-fileupload </ groupId > 
            < artifactId > commons-fileupload </ artifactId > 
            < version > 1.3.1 </ version > 
        </ dependency >

  </ dependencies > 
</ project >