loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.addELResolver(Ljavax/el/ELResolver;)V" - jsf-2

I got this error while deploying the WAR in Tomcat 7. I have carried out the development using JDeveloper 11.
"java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.addELResolver(Ljavax/el/ELResolver;)V" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type p.JspApplicationContext.addELResolver(Ljavax/el/ELResolver;)V used in the signature"
I have googled for the answers and have found answers, but nothing seems to work for my problem. I understand that it is something to do with the JARs that I have in my /WEB-INF/lib, but I don't know which causes the error.
These are the JARs I have in /WEB-INF/lib:
adf-controller-api.jar
adf-controller-rt-common.jar
adf-controller-security.jar
adf-controller.jar
adf-dt-at-rt.jar
adf-richclient-api-11.jar
adf-richclient-impl-11.jar
adf-share-base.jar
adf-share-ca.jar
adf-share-security.jar
adf-share-support.jar
adf-transactions-dt.jar
adfdt_common.jar
adflibfilter.jar
adflogginghandler.jar
adfm.jar
adfmweb.jar
adfsharembean.jar
cache.jar
commons-el.jar
db-ca.jar
dvt-databindings.jar
dvt-faces.jar
dvt-facesbindings.jar
dvt-jclient.jar
dvt-trinidad.jar
dvt-utils.jar
glassfish.el_2.2.0.jar
glassfish.jsf_1.2.9.0.jar
glassfish.jstl_1.2.0.1.jar
groovy-all-1.6.3.jar
identitystore.jar
inspect4.jar
javatools-nodeps.jar
javax.activation_1.1.0.0_1-1.jar
javax.ejb_3.0.1.jar
javax.jsf_1.0.0.0_1-2.jar
javax.jsp_1.1.0.0_2-1.jar
javax.servlet_1.0.0.0_2-5.jar
jdev-cm.jar
jewt4.jar
jsp-el-api.jar
ojdbc14.jar
ojmisc.jar
oracle-el.jar
oracle-page-templates.jar
share.jar
trinidad-api.jar
trinidad-impl.jar
wls.jsf.di.jar
xmlparserv2.jar
How can I solve it?

You should not have servletcontainer-specific libraries in your /WEB-INF/lib. At least the following ones are supposed to be already provided by Tomcat itself:
glassfish.el_2.2.0.jar
javax.jsp_1.1.0.0_2-1.jar
javax.servlet_1.0.0.0_2-5.jar
jsp-el-api.jar
Remove them. The particular exception is caused by the javax.jsp_1.1.0.0_2-1.jar one, which is different from Tomcat's own one.
See also:
How do I import the javax.servlet API in my Eclipse project? (not related to JDeveloper, but it should give you the right picture as to how to manage libraries in any IDE).

I had the same error when migrating a project from WAS6 to WAS 7. Here is the fix:
Update web.xml:
a. Open Project_name\src\main\webapp\WEB-INF\web.xml
b. Add the following listener:
Com.sun.faces.config.ConfigureListener
c. Build the project and deploy it to Websphere
Change loader order:
a. Open Websphere application server Console
b. Go to: Applications >> Application Types >> WebSphere enterprise applications
c. Click at the project
d. Click “Class loading and update detection”
e. Choose “Classes loaded with parent loader first”
f. Click Apply
Disable JSP class reloading
a. Go to: Applications >> Application Types >> WebSphere enterprise applications
b. Click at the project
c. Click at JSP and JSF options
d. Uncheck “JSP enable class reloading”
e. Click OK
Change JSF Implementation
a. Go to: Applications >> Application Types >> WebSphere enterprise applications
b. Click at the project
c. Click at JSP and JSF options
d. Choose “MyFaces 1.2” under JSF Implementation
Start the Project

Related

SAP Fiori Default Values App: "no editor metadata" / "no configured plugin"

My customer set up a new S/4HANA system and installed some Fiori apps. When I go into my user settings in the Fiori LaunchPad and navigate into the Default Values tab, I:
don't get a value help,
entered values, e.g. Controlling Area, are not propagated into the backend's user parameter's (SU01).
Per Chrome Developer Tools I get the following error messages. I suspect that something is misconfigured causing the above 2 observations?
The following parameter names have no editor metadata and thus likely no configured plugin:
"AssetDepreciationArea",
"CompanyCode",
"ControllingArea",
"CostCenter",
"ExchangeRateType",
"FinancialStatementVariant",
"FiscalYear",
"FunctionalArea",
"GLAccount",
"GLAccountHierarchy",
"InternalOrder",
"Ledger",
"LedgerFiscalYear",
"Material",
"MaterialGroup",
"MaterialType",
"Plant",
"ProfitCenter",
"Segment",
"StatisticalKeyFigure",
"StorageLocation".
This has been resolved. The issue was a misconfiguration. The customer has added the correct navigation targets in the respective catalogues. This solves problems (1) and (2).

How to create a new demo in automotive?

I'm trying to separate out some code from drake/automotive/automotive_demo.cc. As a first step, I'm trying to copy automotive_demo.cc and automotive_demo.py into differently named files (test.cc and test.py) and then running bazel run automotive:test -- --num_simple_cars=1. I modified automotive/BUILD.bazel and test.py to take into account the new dependencies.
The problem is that after I bazel run, the simulator window opens but no car gets rendered. Eventually it just crashes with the following errors:
[lcm-spy] ClassDiscoverer: java.lang.NoClassDefFoundError: apple/laf/AquaPopupMenuUI
[lcm-spy] jar: ../com_jidesoft_jide_oss/jide-oss-2.9.7.jar
[lcm-spy] class: com/jidesoft/plaf/aqua/AquaJidePopupMenuUI.class
...
[drake_visualizer] Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
...
[lcm-spy] LCM: Disabling IPV6 support
[lcm-spy] LCM: TTL set to zero, traffic will not leave localhost.
[lcm-spy] java.net.SocketException: Can't assign requested address
Here is an (unresolved) Github issue that points to the problem being that test is a "custom plug-in". But if automotive_demo can work, surely there's a way to reproduce that behavior for test? I also tried grepping for QGuiApplication and only found a series of binary files, so I didn't know how to follow the error message's suggestion.
when trying out your steps on Mac I unfortunately cannot reproduce your specific errors. I do not think that having test as a target name should cause problems (at least I did not experience issues).
Could you please make sure:
You're able to run bazel run automotive:demo -- --num_simple_car=1?
After having renamed automotive_demo.* to test.*, in your BAZEL.build, test.py files the following are mapped correctly: demo -> test and automotive_demo -> test_cc (or whatever unique name you choose)?

How do I install an ASP.NET MVC 3 application on IIS 6 using WIX?

Here's some considerations when installing onto IIS-6:
Needs to register ASP.NET 4 (likely using aspnet_regiis.exe)
Needs to allow for both ASP.NET v2 and v4
Needs to register aspnet_isapi.dll with support for wildcard mapping
And here's what I have so far:
<iis:WebDirProperties Id='WebDirProperties' Script='yes' Read='yes
Execute='no' WindowsAuthentication='yes' AnonymousAccess='no'
AuthenticationProviders='NTLM,Negotiate' />
<!-- SO has some good posts on selecting the website from a dropdown -->
<iis:WebSite Id='SelectedWebSite' Directory='WWWROOT' SiteId='[WEBSITE_ID]' Description='[WEBSITE_DESCRIPTION]'>
<iis:WebAddress Id='AllUnassigned' Port='80' IP='*'/>
</iis:WebSite>
<Component Id="ProjWebApp" Guid="{B4BE9223-7109-4943-AE4E-8F72FA350D02}"
Win64="$(var.IsWin64)" NeverOverwrite="yes" Transitive="yes">
<CreateFolder/>
<iis:WebAppPool Id="ProjAppPool" Name="[APPPOOLNAME]" Identity="networkService"
ManagedRuntimeVersion="v4.0" ManagedPipelineMode="integrated" />
<iis:WebVirtualDir Id="ProjVDir" DirProperties="WebDirProperties"
Alias="[WEBAPPNAME]" Directory="WEBFILESDIR" WebSite="SelectedWebSite">
<iis:WebApplication Id="ProjApp" Name="[WEBAPPNAME]" WebAppPool="ProjAppPool">
<iis:WebApplicationExtension
CheckPath="no"
Script="yes"
Executable="[ASPNETISAPIDLL]"
Verbs="GET,HEAD,POST"
/>
</iis:WebApplication>
</iis:WebVirtualDir>
</Component>
<!-- other apps may start using it once installed so it must be permanent -->
<Component Id="EnableASPNet4Extension" Permanent="yes" Guid="{C8CDAB96-5DDC-4B4C-AD7E-CD09B59F7813}">
<iis:WebServiceExtension Id="ASPNet4Extension" Group="ASP.NET v4.0.30319"
Allow="yes" File="[ASPNETISAPIDLL]" Description="ASP.NET v4.0.30319"
UIDeletable="no"
/>
</Component>
And I have a custom action to register ASP.NET with IIS:
<?if $(var.Platform) = x64 ?>
<CustomAction Id="SetProperty_AspNetRegIIS_InstallNet40Cmd"
Property="AspNetRegIIS_InstallNet40Cmd"
Value=""[NETFRAMEWORK40FULLINSTALLROOTDIR64]aspnet_regiis.exe" -ir"/>
<?else?>
<CustomAction Id="SetProperty_AspNetRegIIS_InstallNet40Cmd"
Property="AspNetRegIIS_InstallNet40Cmd"
Value=""[NETFRAMEWORK40FULLINSTALLROOTDIR]aspnet_regiis.exe" -ir"/>
<?endif?>
The Problem
This almost works. There are two problems at this point:
The IIS extension doesn't respect the managed runtime version on IIS-6, so the application doesn't have an ASP.NET version set.
If I use aspnet_regiis.exe -s APP_PATH to register it once it's created, it overwrites the wildcard mapping (and I don't know a commandline that I can run to restore it).
Given the above shortcomings, how can I use WIX to install an ASP.NET MVC 3 application onto IIS-6 with a proper wildcard mapping when it already has ASP.NET 2 installed?
It turns out this was a dumb error on my part. The above is sufficient to make ASP.NET v4 applications work when the pieces that I didn't include (custom actions and property definitions) are correct.
In my case, I had accidentally quoted the path to the aspnet_isapi.dll, so it wasn't actually being picked up correctly.
The IIS extension doesn't respect the managed runtime version on IIS-6, so the application doesn't have an ASP.NET version set.
That's partially true. Although it doesn't use the managed runtime version when setting the App Pool, IIS actually picks up the ASP.NET version as soon as something is correctly mapped to the aspnet_isapi.dll. As soon as I fixed the path, everything worked correctly.
If I use aspnet_regiis.exe -s APP_PATH to register it once it's created, it overwrites the wildcard mapping (and I don't know a commandline that I can run to restore it).
You can use adsutil.vbs in order to manage this if need be:
C:\Inetpub\AdminScripts>adsutil.vbs enum w3svc/998577302/root/AppName
KeyType : (STRING) "IIsWebVirtualDir"
...
ScriptMaps : (LIST) (1 Items)
"*,C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD
,POST"
By using the set command in adsutil.vbs you can set the ScriptMaps property as needed.

Erlang: add libraries to application

I use erlIDE (based on Eclipse) to work on Erlang projects. Till today everything was fine, but today I have to use external library (couchbeam) in my application. I found out, what is hell, btw.)
The problem is simple – I cannot include external library to compiler path. I've used rebar to get couchbeam's dependencies and it also downloaded ibrowse, mochiweb and ejson.
How can I include those libraries to compiler path without modifing ERL_LIBS to work on project in erlIDE?
I do not want modify ERL_LIBS, because I can change projects's path, start new one (then I should modify ERL_LIBS again) and so on.
I've tried compiler options in erlIDE:
{pa, {pa, 'site_stater/deps/couchbeam/'}}
or
{pa, {pa, '../deps/couchbeam/'}}
where 'site_stater' – is project's name
I wonder how professional erlang programmers organaze their projects workflow (where they write erlang progs, how debuggin it, deal with external libraries and so on).
Many thanks for your attension.
UPDATE
I wrote simple function to load libraries, but I think it is still wrong way to deal with this problem:
load_libraries() ->
ProjectRoot = filename:join([filename:absname("./"), "site_stater"]),
{ok, DepsList} = file:list_dir(ProjectRoot ++ "/deps/"),
lists:foreach(fun (Folder) ->
RealFolder = ProjectRoot ++ "/deps/" ++ Folder,
case filelib:is_dir(RealFolder) of
true ->
code:add_patha(filename:join([RealFolder, "/ebin"]));
false -> ok
end
end,
DepsList),
ok.
I can't verify it right now, but you should be able to use {pa, '../deps/couchbeam/'} in the compiler options. If that doesn't work, please try using an absolute path.
The compiler settings are not finished yet, we plan to have some simpler way to refer to external libraries but we're not there yet. Every such query from users increases the importance of fixing it!
regards,
Vlad

SmartGWT throws JavaScriptException: (null): null

When using GWT 2.0.x and SmartGWT 2.2
Code as simple as:
public class SmartGwtTest implements EntryPoint {
public void onModuleLoad() {
IButton button = new IButton("say hello");
}
}
will generate the exception.
com.google.gwt.core.client.JavaScriptException: (null):
This only happens in hosted (devmode)
ant hosted
I also suspect that maybe the GWT Development Plugin might have something to do with it.
Have you found a similar problem? How did you solve it?
Not an answer but a workaround was to use compile the app.
And use it that way.
ant build
Although compilation takes a long time because it generates several permutations of the code. ie different versions for different browser to make compilation faster you can set your target browser while testing.
to do that in your ModuleName.gwt.xml file add the following line:
<set-property name="user.agent" value="gecko"/>
<!-- to test with firefox -->
That will make compilation faster.
Hope this helps someone.
OK, so I was getting this in Firefox in hosted mode and it turned out that a widget was set to have width100 but there was not enough room on the screen to render the widget (my browser was not maximized).
I think this resulted in a negative width being set and this ambiguous Javascript exception was thrown as a result. Maximizing the browser alleviated the issue, you might want to try setting a width to begin with and using resize handlers to render your widget properly.

Resources