Failed startup of context o.e.j.w.WebAppContext error after upgrade jetty version to 9.4.44 - jetty

Current jetty version is 9.4.6, I tried to upgrade 9.4.44, I got the error. Could you please help me?
WebAppContext:554 -Failed startup of context o.e.j.w.WebAppContext#163f1cd{passwd-change,/passwd-change,file:///run/opt/corp/gsec/7.0.0/java-service/gsec-jetty-base/temp/jetty-gsec-2443-passwd-change.war-_passwd-change-any-6326268666909012254.dir/webapp/,UNAVAILABLE}{/passwd-change.war}
Caused by: java.lang.IllegalAccessError: tried to access method org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createInstance(Ljava/lang/Class;)Ljava/lang/Object; from class jetty.webapp.StandardDescriptorProcessor
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.newListenerInstance(StandardDescriptorProcessor.java:1945) ~[apacheds-service-2.0.0-M24.jar:2.0.0-M24]
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1900) ~[apacheds-service-2.0.0-M24.jar:2.0.0-M24]

The jetty files in your apacheds-service-2.0.0-M24.jar needs to be upgraded as well.
List the contents of the apacheds-service-2.0.0-M24.jar file and you'll see classes in the org.eclipse.jetty. namespace.
Those are conflicting with your efforts to upgrade Jetty via the jetty-distribution zip.

I had a different setup that triggered a similar stacktrace: using cargo-maven2-plugin 16.1 in a spring 5 project, mvn cargo:run would fail because of a conflict with javafx.base-11.0.0-SNAPSHOT.jar files.
Upgrading to cargo-maven3-plugin 1.9.9 fixed the matter.
I'd encourage who ever uses cargo-maven2-plugin to migrate to cargo-maven3-plugin as the doc states:
Please be aware that the Maven 2 / Maven 3 plugin of Codehaus Cargo has been retired with our version 1.9.0 and has been superseded by a Maven 3 only plugin.

Related

Getting error while building project "com.bea.util.jam.internal.javadoc.JavadocClassloadingException:"

I am getting error while trying to build a java project in TeamCity. The same project builds and excecutes well on my local. I recently pushed changes to this project on GitLab. This is my first time working with GitLab and TeamCity together. Other projects have no issues during build. I am unable to understand what is causing this error:
[15:58:54][Step 1/1] compile.earCommons (4s)
[15:58:54][compile.earCommons] echo
[15:58:54][compile.earCommons] echo
[15:58:54][compile.earCommons] wlcompile (4s)
[15:58:59][wlcompile]
com.bea.util.jam.internal.javadoc.JavadocClassloadingException: An error
has occurred while invoking javadoc to inspect your source
files. This may be due to the fact that $JAVA_HOME/lib/tools.jar does
not seem to be in your system classloader. One common case in which
this happens is when using the 'ant' tool, which uses a special
context classloader to load classes from tools.jar.
This situation elicits what is believed to a javadoc bug in the initial
release of JDK 1.6. Javadoc attempts to use its own context classloader
tools.jar but ignores one that may have already been set, which leads
to some classes being loaded into two different classloaders. The
telltale sign of this problem is a javadoc error message saying that
'languageVersion() must return LanguageVersion - you might see this
message in your process' output.
This will hopefully be fixed in a later release of JDK 1.6; if a new
version of 1.6 has become available, you might be able to solve this
by simply upgrading to the latest JDK.
Alternatively, you can work around it by simply including
$JAVA_HOME/lib/tools.jar in the java -classpath
parameter. If you are running ant, you will need to modify the standard
ant script to include tools.jar in the -classpath.
[15:58:59][Step 1/1] Process exited with code 1
[15:58:59][Step 1/1] Ant output
[15:59:10][Step 1/1] Process exited with code 1 (Step: Ant)
[15:58:59][Step 1/1] Step Ant failed
****Update****
Build Step: Ant
Step 1:
Runner type: Ant (Runner for Ant build.xml files)
Execute: If all previous steps finished successfully
build.xml file: \ant\build.xml
Working directory: same as checkout directory
Targets: none specified
Ant home path: C:\apache-ant-1.7.0
Additional Ant command line parameters: -lib c:\WebLogic\12.1.2\wlserver\server\lib\javaee.jar;c:\WebLogic\12.1.2\wlserver\server\lib\weblogic.jar;c:\WebLogic\12.1.2\wlserver\server\lib\webservices.jar
JDK home path: c:\Program Files\Java\jdk1.7.0_80
JVM command line parameters: not specified
Reduce test failure feedback time: OFF
Java code coverage: disabled
Docker Settings
Docker Image: unset
I'll appreciate any help in this regard.
I found there was character encoding issue with one of the files that prevented compiler from loading the java classes. Once that was fixed, the build worked fine.

Pabot - Unable to run parallel robotframework tests

So, I'm working on a robotframework test project, and the goal is to run several test suites in parallel. For this purpose, pabot was chosen as the solution. I am trying to implement it, but with little success.
My issue is: after installing Pabot (which, I might say, I did by cloning the project and running "setup.py install", instead of using pip, since the corporate proxy I'm behind has proven an obstacle I can't overcome), I created a new directory in the project tree, moved some suites there, and ran:
pabot --processes 2 --outputdir pabot_results Login*.robot
Doing so results in the following error message:
2018-10-10 10:27:30.449000 [PID:9676] [0] EXECUTING Suites.LoginAdmin
2018-10-10 10:27:30.449000 PID:400 EXECUTING Suites.LoginUser
2018-10-10 10:27:30.777000 PID:400 FAILED Suites.LoginUser
2018-10-10 10:27:30.777000 [PID:9676] [0] FAILED Suites.LoginAdmin
WARN: No output files in "pabot_results\pabot_results"
Output:
[ ERROR ] Reading XML source '' failed: invalid mode ('rb') or filename
Try --help for usage information.
Elapsed time: 0 minutes 0.578 seconds
Upon inspecting the stderr file that was generated, I have this message:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\robotframework-3.1a2.dev1-py2.7.egg\robot\running\runner.py", line 22, in
from .context import EXECUTION_CONTEXTS
ValueError: Attempted relative import in non-package
Apparently, this has to do with something from the runner.py script, which, if I'm not mistaken, came with the installation of robotframework. Since manually modifying that script does not seem to me the optimal solution, my question is, what am I missing here? Did I forget to do anything while setting this up? Or is this an issue of compatibility between versions?
This project is using Maven as the tool to manage dependencies. The version I am running is 3.5.4. I am using a Windows 10, 64bit system; I have Python 2.7.14, and Robot Framework 3.1a2.dev1. The Pabot version is 0.44. Obviously, I added C:\Python27 and C:\Python27\Scripts to the PATH environment variable.
Edit: I am also using robotframework-maven-plugin version 1.4.0.8, if that happens to be relevant.
Edit 2: added the error messages in text format.
I believe I've come across an issue similar when setting up parallel execution on my machine. Firstly I would confirm that pabot is installed using pip show robotframework-pabot.
Then you should define the directory your results are going to using -d.
I then modified the name of the -o to Output.xml to make it easy to identify.
This is a copy of the code I use. Runs optimally with 8 processes
pabot --processes 8 -d results -o Output.xml Tests
Seems that you stumbled on a bug in the prerelease version of robot framework (3.1a2.dev1).
Please install a release version of robot framework. For example 3.0.4.
Just in case anyone happens to stumble upon this issue in the future:
Since I can't use pip, and I tried a good deal of workarounds that eventually made things more unstable, I ended up saving my project and removing everything Python-related from my system, so as to allow me to install everything from scratch. In a Windows 10, 64bit system, I used:
Python 2.7.14
wxPython 2.8.12.1, win64, unicode, for py27
setuptools 40.2.0 (to allow me to use the easy_install command)
Robot Framework 3.0.4
robotremoteserver 1.1
Selenium2Library 3.0.0
and Pabot version 0.45.
I might add that, when installing the Selenium2Library the way I described above, it eventually tries to download some things from the pip repositories - which, if you have a proxy, will cause you trouble. I solved this problem by browsing https://pypi.org/simple/selenium/, manually downloading the 2.53.6 .tar.gz file, then extracting it and running setup.py install on the command line.
PS: Ideally, though, anyone should be able to use proxy settings from the command line (--proxy http://user:password#server:port) to get pip and then use it; however, for some reason, probably related to network security configurations that I didn't want to lose time with, this didn't work in my case.

Angular build error in core/src/render3/interfaces

While building an Angular 6 app i get a compile error in #angular/core/src/render3/interfaces on line 35. The line is:
[ACTIVE_INDEX]: number | null;
and the error is:
error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
I an using #angular/core#6.1.6. Am I doing something wrong or is this an Angular bug?
Verify that Visual Studio is targeting the correct version of Typescript (as seen in your package.json), then try deleting your node_modules folder, and rerunning npm install.
I believe that this is caused by running Angular 6 with an earlier, incompatible version of typescript (<2.7), because it looks like the ability used by the container.d.ts file (referenced in your error) to use Constant-Named Properties was added in Typescript 2.7. Of course, if it were that simple then ng serve would tell you about the Typescript incompatibility, so I assume that I'm either wrong, or that your environment is playing tricks on you.
See here for a related question.

Unable to install Anaconda environment containing anaconda 4.0.0 np110py27_0

In Anaconda I am trying to create an environment using an environment.yml file which begins with the lines:
name: mytest
dependencies:
- anaconda=4.0.0=np110py27_0
However when trying to create the environment, I get the error:
Fetching package metadata .........
Solving package specifications: ....
Error: The following specifications were found to be in conflict:
- anaconda 4.0.0 np110py27_0
Use "conda info <package>" to see the dependencies for each package.
I encountered no problems when I did this seven days ago, but when I tried this yesterday I got the error.
I am running on Windows 7 64-bit as administrator, Anaconda 2.2.0 (Python 2.7 version). The "conda list" output includes conda 4.1.11 and conda-env 2.5.2.
To try to isolate the error, I installed Miniconda2 on a different 64-bit Windows 7 computer (as administrator) that had never had any Anaconda/Miniconda installed before. This is the most recent 64-bit Python 2.7 series (Miniconda2-4.1.11-Windows-x86_64.exe).
But trying to install anaconda=4.0.0=np110py27_0, either to a new environment or to the root environment, both produce the same error I received before:
C:\>conda install anaconda=4.0.0=np110py27_0
Fetching package metadata .........
.Solving package specifications: ....
The following specifications were found to be in conflict:
- anaconda 4.0.0 np110py27_0
Use "conda info <package>" to see the dependencies for each package.
C:\>conda create --name test400 anaconda=4.0.0=np110py27_0
Fetching package metadata .........
.Solving package specifications: ....
The following specifications were found to be in conflict:
- anaconda 4.0.0 np110py27_0
Use "conda info <package>" to see the dependencies for each package.
How can I determine what is causing the conflict, and how could I resolve it, given that conda is not naming a second package in its error message? I have seen responses to other "specifications in conflict" questions in which the answer is often "Install the problematic package to a separate python environment", but in this case the new environment could not be created with the package. Starting from a clean Miniconda install did not work either. I suspect something has changed in the Anaconda repository (which would be consistent with the original environment.yml working in the past but not now), but how would I determine if this is the underlying issue?
Thanks.
The underlying issue was a temporary error in the https://repo.continuum.io/pkgs/free/win-64/repodata.json file, which has since been fixed.
For reference for anyone investigating Anaconda dependency conflicts, here are the details of the investigation, and the workaround for this case:
The cause:
The repodata.json file (linked above) is essentially a 'master list' of the dependencies of the various libraries in https://repo.continuum.io/pkgs/free/win-64/. The "conda" command uses this repodata.json file.
While the problem was occurring, the repodata.json file incorrectly listed "_nb_ext_conf" as a dependency for each version of ipywidgets. (The /info/index.json file inside "ipywidgets-4.1.1-py27_0.tar.bz2" did not list "_nb_ext_conf" as a dependency, however I think newer versions of ipywidgets require it.)
The "_nb_ext_conf-0.2.0-py27_0.tar.bz2" and "_nb_ext_conf-0.3.0-py27_0.tar.bz2" files list "notebook >=4.2.0" as a dependency in their info/index.json files.
The info/index.json file in anaconda-4.0.0-np110py27_0.tar.bz2 file (which is used when you specify "anaconda=4.0.0=np110py27_0" in an environment.yml) lists "ipywidgets 4.1.1 py27_0" as a dependency.
Due to the temporary problem in repodata.json, this "ipywidgets 4.1.1 py27_0" caused conda to think "_nb_ext_conf" needed to be installed, thus causing conda to think "notebook >=4.2.0" also needed to be installed.
But the info/index.json file in anaconda-4.0.0-np110py27_0.tar.bz2 file also specifies that the specific version "notebook 4.1.0 py27_2" must be installed.
The conflicting requirements for "notebook" versions (4.1.0 and >=4.2.0) caused the "specifications were found to be in conflict" error.
The workaround:
First, remove the line "- anaconda=4.0.0=np110py27_0" from the environment.yml file.
Next, replace that line in environment.yml with every library listed in the "depends" section of the info/index.json file from anaconda-4.0.0-np110py27_0.tar.bz2. (Remove the quotation marks, replace the spaces with equals signs, etc. to convert the .json syntax to the environment.yml syntax.)
Finally, remove the "- notebook=4.1.0=py27_2" line from this list.
This new environment.yml file will now list every library which would have been installed by "anaconda=4.0.0=np110py27_0", with the exception of "notebook", but "notebook" will get installed anyway due to the "notebook >=4.2.0" requirement in "_nb_ext_conf" due to "ipywidgets", and/or the "notebook" requirement in "ipywidgets" itself.
Investigative tools:
The command "conda info anaconda=4.0.0=np110py27_0" gives the list of libraries required by the specified package, according to repodata.json. I put this list of libraries into a temporary_environment.yml file. Attempting to create an environment from that temporary_environment.yml file caused conda to specify that "notebook" was involved in the conflict, which gave the hint to try omitting "notebook".
Running "conda info" lists all the libraries currently installed in the active environment. The output for the environment created by temporary_environment.yml was compared to the output from an environment from a computer where "anaconda=4.0.0=np110py27_0" had previously installed successfully. This highlighted "_nb_ext_conf" as one difference.
I created a batch file which ran "conda info" for every library listed in anaconda=4.0.0=np110py27_0, and I looked for instances of "notebook" and "_nb_ext_conf" in the output. This pointed to "ipywidgets" as a suspect.

JBoss EAP 6.4: NoClassDefFound in windows but not on Linux

I have same EAR deployed in JBoss EAP 6.4 in windows and linux env. I am getting below exception in windows but not in linux.
Caused by: java.lang.NoClassDefFoundError: com/bp/gp/addfilters/CMnAddQueryConverter
at com.bp.dw.sales.datacache.CMnDataCacheHelper.getDataSourceCriterion(CMnDataCacheHelper.java:649)
com.bp.dw.sales.datacache.CMnDataCacheHelper.applyFiltersToDataCache(CMnDataCacheHelper.java:429)
com.bp.dw.sales.datacache.CMnDataCacheHelper.applyFiltersToDataCache(CMnDataCacheHelper.java:407)
com.bp.dw.sales.datacache.CMnBaseDataCacheMgr.initiateDataCachePopulate(CMnBaseDataCacheMgr.java:211)
com.bp.dw.sales.datacache.CMnPopulateDataCacheCommand.execute(CMnPopulateDataCacheCommand.java:199)
at com.bp.gp.wb.CMnWorkbookPriceCommand.executeUnit(CMnWorkbookPriceCommand.java:76)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.spawnCache(CMnDataCachePoolMgr.java:628)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.processCache(CMnDataCachePoolMgr.java:571)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.processCache(CMnDataCachePoolMgr.java:537)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.initiateIncrementalCache(CMnDataCachePoolMgr.java:466)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.initiateIncrementalCache(CMnDataCachePoolMgr.java:461)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.initiateIncrementalCache(CMnDataCachePoolMgr.java:456)
com.bp.dw.sales.datacache.pool.CMnDataCachePoolMgr.initiateIncrementalCache(CMnDataCachePoolMgr.java:451)
com.ac.gp.wb.CMnWorkbookWizardComp.actionFinishHook(CMnWorkbookWizardComp.java:367)
com.ui.wizard.CMnWizardComp$4.actionPerformed(CMnWizardComp.java:500)
com.ui.fw.CMnBaseWidgetComp.fireActionListeners(CMnBaseWidgetComp.java:699)
com.ui.fw.CMnBaseRequestComp.fireActionListeners(CMnBaseRequestComp.java:422)
com.ui.fw.CMnBaseWidgetComp$1.clientEvent(CMnBaseWidgetComp.java:92)
com.ui.fw.client.CMnFormClientEventDispatcher.dispatch(CMnFormClientEventDispatcher.java:97)
... 22 more
Caused by: java.lang.ClassNotFoundException: com.bp.gp.addfilters.CMnAddQueryConverter from [Module "deployment.pharma.ear.pharma.war:main" from Service Module Loader]
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
... 41 more
I have jaxb-api.jar, jaxb-impl.jar and jaxb-xjc.jar getting loaded from code but not from JBoss default modules as they are getting used in my code.
Any pointer for the possible cause of this exception?
Regards,
I had two folder with same name in different case and hence the issue.
My EAR had folder structure like:
com.bp.gp.addfilters and com.bp.gp.addFilters.
Looks like, JBoss uses underlying OS's search method to look for folder.
Linux search is case sensitive by default, hence it never gave this error.
Since windows search is case insensitive by default, it was always trying to search inside com.bp.gp.addFilters package whereas the class was present in com.bp.gp.addfilters package.