I've been stuck with this issues for past three years (since WildFly 16.x ~).
tabView: event.getTab() null in Mojarra 2.3 #3800
https://github.com/primefaces/primefaces/issues/3800
My own code:
<p:tabView switchType="ajax" id="tabViewHome" headerPosition="top" headerLocation="center" style="width:100%">
<p:ajax process="#parent" event="tabChange" listener="#{tabsChangesController.onTabChange}" update=":formNOTiFY:msgs"/>
<p:ajax process="#parent" event="tabClose" listener="#{tabsChangesController.onTabClose}" update=":formNOTiFY:msgs"/>
<p:tab title="Motorcycles" id="motorcycles">
<ui:include src="SelectMotorcycles.xhtml"/>
</p:tab>
<p:tab title="Display Selected Motorcycle" id="selectedMotorcycles" closable="true">
<ui:include src="DisplaySelectedMotorcycle.xhtml"/>
</p:tab>
</p:tabView>
Calls:
public void onTabChange(TabChangeEvent event) {
LOGGER.info(">>>>> TabChangeEvent event = {}", event);
}
Results in 'null':
SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (default task-1) javax.el.PropertyNotFoundException: /index.xhtml #38,136 listener="#{tabsChangesController.onTabChange}": Target Unreachable, identifier 'tabsChangesController' resolved to null
PrimeFace Showcase 10.0.0 & 11.0.0-RC1 'TabView' works on Mojarra 2.3 & MyFaces with Jetty:
mvn clean jetty:run -Pnon-ee,mojarra-2.3
https://github.com/primefaces/primefaces/tree/master/primefaces-showcase
Is Mojarra & WildFly likely to be fixed? Or how easy is it to switch to Jetty or similar on WildFly 25.0.0.Final?
I use:
PrimeFace (Elite) 10.0.7/11.0.0-RC1
Mojarra JSF 2.3.14.SP04 & OmniFaces 3.11.2
WildFly 25.0.0.Final (EE 8/9), Weld 4.0.2 (Final) & CDI 3.0
Java OpenJDK 17, Kotlin 1.5.31, Gradle 7.2, MongoDB 5.0.3
IntelliJ IDEA 2021.2.3, macOS Big Sur 11.6
Related
We have a setup where we use SonarQube with Ant and connect to SonarCloud (https://sonarcloud.io). This setup was always working from local developer machine and also from bitbucket pipelines. Since two days, we have been getting below error on local and bitbucket pipelines. Below is the stacktrace:
Project.sonar:
[sonar:sonar] Apache Ant(TM) version 1.10.5 compiled on July 10 2018
[sonar:sonar] SonarQube Ant Task version: 2.5
[sonar:sonar] Loaded from: file:<redacted_path>/sonarqube-ant-task-2.5.jar
[sonar:sonar] User cache: /Users/<user>/.sonar/cache
BUILD FAILED
<redacted_path>/build-sonar.xml:120: java.lang.IllegalStateException: not started
at org.sonarsource.scanner.api.EmbeddedScanner.checkLauncherExists(EmbeddedScanner.java:244)
at org.sonarsource.scanner.api.EmbeddedScanner.stop(EmbeddedScanner.java:164)
at org.sonarsource.scanner.ant.SonarQubeTask.launchAnalysis(SonarQubeTask.java:101)
at org.sonarsource.scanner.ant.SonarQubeTask.execute(SonarQubeTask.java:81)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:834)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Below is the command that we use for running sonar:
ant compile Project.sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=<org_name> -Dsonar.login=<token_which_has_all_privs>
We have tried changing the sonar.login token with a new one (thinking that old might have expired) but it didn't work with new one also.
I am not able to find any help anywhere else regarding this error since it does not say much. I see other errors like "WebApp did not start" but that seems to be related to the use case where SonarQube is running on local. But in our case we are connecting to https://sonarcloud.io host. We have also tried with sonar.login and sonar.password and it still fails.
Any help would be appreciated.
Update 1 for mc1arke question Is this sufficient? I can create a new basic build-sonar.xml and provide it but it will only have below content and some properties/variables specific for our environment.
Extract from build-sonar.xml looks as below:
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath>
<pathelement location="${lib.dir}/sonarqube-ant-task-2.5.jar"/>
</classpath>
</taskdef>
<target name="Project.sonar">
<property name="sonar.projectKey" value="ProjectKey" />
<property name="sonar.projectName" value="ProjectName" />
<property name="sonar.projectVersion" value="1.0" />
<property name="sonar.sources" value="${src.dir}" />
<property name="sonar.binaries" value="${build.dir}" />
<property name="sonar.java.binaries" value="${build.dir}" />
<property name="sonar.java.libraries" value="${lib.dir}/*.jar"/>
<property name="sonar.java.test.libraries" value="${lib.dir}/*.jar"/>
<property name="sonar.java.source" value="1.8" />
<property name="sonar.exclusions" value="<some modules>"/>
<property name="sonar.jacoco.reportPath" value="${junit.reports}/coverage/jacoco.exec"/>
<property name="sonar.junit.reportsPath" value="${junit.reports}" />
<property name="sonar.jacoco.itReportPath" value="${junit.reports}/coverage/jacoco-it.exec"/>
<property name="sonar.coverage.exclusions" value="<some modules>"/>
<sonar:sonar/>
</target>
Update 2: I looked at the sonar code in EmbeddedScanner.java, IsolatedLauncherFactory.java, and IsolatedLauncherProxy.java which actually should be throwing the error. I also ran the ant command in -v mode and below is the output of it:
Project.sonar:
[antlib:org.sonar.ant] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
[sonar:sonar] Apache Ant(TM) version 1.10.5 compiled on July 10 2018
[sonar:sonar] SonarQube Ant Task version: 2.5
[sonar:sonar] Loaded from: file:<redacted_path>/sonarqube-ant-task-2.5.jar
[sonar:sonar] keyStore is :
[sonar:sonar] keyStore type is : jks
[sonar:sonar] keyStore provider is :
[sonar:sonar] init keystore
[sonar:sonar] init keymanager of type SunX509
[sonar:sonar] User cache: /Users/<user.name>/.sonar/cache
[sonar:sonar] Extract sonar-scanner-api-batch in temp...
[sonar:sonar] Get bootstrap index...
[sonar:sonar] Download: https://sonarcloud.io/batch_bootstrap/index
[sonar:sonar] Get bootstrap completed
So looking at the code and its output I think below is the code flow:
EmbeddedScanner.checkLauncherExists() --> IsolatedLauncherFactory.createLauncher() --> JarDownloader.download() --> JarDownloader.getScannerEngineFiles() --> BootstrapIndexDownloader.getIndex()
From the log, it seems that the index was returned successfully. But either the JarDownloader.getScannerEngineFiles() or JarDownloader.download() failed because the log statement logger.debug("Create isolated classloader..."); right after List<File> jarFiles = jarDownloader.download() in IsolatedLauncherFactory.createLauncher() is not printed.
Reference: Sonar source code available here
Your issue is that sonar-ant-plugin does not seem to support SonarCloud. The plugin depends on an old version of sonar-scanner-api which attempts to retrieve a list of Jars to download by retrieving /batch_bootstrap/index from the remote SonarQube server. SonarCloud doesn't provide such a URL, but does have /bootstrap/index which newer versions of sonar-scanner-api do use.
Update: version 2.6.0.1426 of the scanner for Ant has been released to fix the issue.
I deploy a ear with spring4, tiles 3.0.7, java 8 and in wildfly 11 but i get the following error:
:45:18,865 INFO [org.jboss.as] (Controller Boot Thread)
WFLYSRV0060: Http management interface listening on
http://127.0.0.1:9990/management
00:45:18,865 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
00:45:18,865 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
started in 15761ms - Started 915 of 1144 services (356 services are
lazy, passive or on-demand)
00:45:19,773 ERROR Digester:789 - Digester.getParser:
java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
at javax.xml.parsers.SAXParserFactory.setSchema(SAXParserFactory.java:394)
at __redirected.__SAXParserFactory.setSchema(__SAXParserFactory.java:158)
at org.apache.commons.digester.Digester.getFactory(Digester.java:536)
at org.apache.commons.digester.Digester.getParser(Digester.java:786)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:325)
at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromResource(BaseLocaleUrlDefinitionDAO.java:150)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:234)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:225)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:225)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:203)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:192)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitions(ResolvingLocaleUrlDefinitionDAO.java:68)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:174)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:131)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:105)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:49)
at org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:89)
at org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:286)
at org.apache.tiles.impl.BasicTilesContainer.isValidDefinition(BasicTilesContainer.java:273)
at org.apache.tiles.renderer.DefinitionRenderer.isRenderable(DefinitionRenderer.java:64)
at org.springframework.web.servlet.view.tiles3.TilesView.checkResource(TilesView.java:116)
at org.springframework.web.servlet.view.UrlBasedViewResolver.loadView(UrlBasedViewResolver.java:483)
at org.springframework.web.servlet.view.AbstractCachingViewResolver.createView(AbstractCachingViewResolver.java:244)
at
I tried a lot of solutions but they dont works.
I use tiles version 3.0.7
Any idea?
I just had the same issue as you while trying to upgrade from tiles 1 to 3.
Anyway my fix was to upgrade the xercesimpl version to 2.11.0
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
It appears there is still an issue with Spring Boot and libuibase 3.3.x.
2015-02-16 11:07:34.117 WARN 7576 --- [ main] liquibase : Error initializing SpringLiquibase
java.io.FileNotFoundException: ServletContext resource [/] cannot be resolved to URL because it does not exist
at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156) ...
The same problem was noted already here on stackoverflow and the answer was that new version of Spring Boot 1.2.1 contains a patch for this issue but it seems still to be a problem with SB 1.2.1 and liquibase 3.3.0 (this is the version number of liquibase that SB 1.2.1 provides by default).
I'm just wondering if others who are using SB 1.2.1 and liquibase observe the same issue and maybe there is a solution to it.
Yes, I observe the same, my solution was to use a previous liquibase version, as it seems SB 1.2.1 still has problems with 3.3.1.
This version did the trick:
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.2.1</version>
</dependency>
I'm attempting to use the event:inbound-channel-adapter as an ApplicationEventListener to capture the ContextRefreshedEvent so I can dynamically start a file:inbound-channel-adapter like:
<file:inbound-channel-adapter id="filesIn" auto-startup="false"
directory="${input.location}" channel="fileInChannel">
<integration:poller ref="filesInPoller" />
</file:inbound-channel-adapter>
<event:inbound-channel-adapter id='appStarter' channel="nullChannel"
error-channel="errorChannel"
event-types="org.springframework.context.event.ContextRefreshedEvent"
payload-expression="#filesIn.start()"/>
But I get the following error indicating the sPel payload-expression cannot find the filesIn bean:
Exception in thread "main" org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'filesIn'
at org.springframework.expression.spel.ast.BeanReference.getValueInternal(BeanReference.java:45)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:49)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:82)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:72)
at org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer.sendEventAsMessage(ApplicationEventListeningMessageProducer.java:113)
at org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer.onApplicationEvent(ApplicationEventListeningMessageProducer.java:91)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
Am I correct in believing that the file:inbound-channel-adapter is able to be started in this way?
Thanks
What version of Spring Integration are you using? The ability to reference a bean #filesIn was added to this adapter in 3.0.
If you are using 2.2 or below, upgrade to the current release (or at least 3.0.4).
In any case, you can't just send that command to nullChannel, it will evaluate to null and you can't have a null payload; you'll have to send '#filesIn.start()' to a <control-bus/>.
EDIT:
Or, "#filesIn.start() == null ? 'foo' : 'bar'" will send foo to the nullChannel.
I get the following exception when deploying a JSR 286 portlet into Oracle WebLogic Server 11g (to deploy it later in Oracle WebCenter 11g):
<19-ene-2010 13H32' CET> <Error> <oracle.portlet.server.containerimpl.PortletApplicationImpl> <BEA-000000> <Error al procesar el archivo "/WEB-INF/portlet.xml" en la lÝnea 6 columna 68.
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'portlet-app'
The error message is in spanish. It means:
"Error processing the file "/WEB-INF/portlet.xml at line 6 column 68"
The portlet.xml of my portlet seems to be correct and I've deployed it in other portal servers. So I don't understand the error message.
This is the portlet.xml of my portlet (eclipse XML validator said it was a valid XML)
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app version="2.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:dnd="http://www.denodo.com/widget/portlet/portletjsr286">
<portlet>
<description>Test Inter Portlet Communication (JSR286)</description>
<portlet-name>Test IPC</portlet-name>
<display-name>Test IPC</display-name>
<portlet-class>com.denodo.ipc.TestIPCPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>PortletMessages</resource-bundle>
<portlet-info>
<title>Test IPC</title>
<short-title>Test IPC</short-title>
<keywords>Test IPC,Denodo</keywords>
</portlet-info>
</portlet>
</portlet-app>
How do I deploy my portlet
I convert my portlet into to a WSRP portlet by executing
java -jar wsrp-predeploy.jar source EAR target EAR
as explained in http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e12405/wcadm_portlet_prod.htm#CHDECJHI)
I try to deploy it into WebLogic with the WebLogic Console and I get this exception.
My Environment
WebCenter Suite (11.1.1.2.0) + WebLogic Server (10.3.2) downloaded from the oracle.com. Default configuration
S.O: Windows XP SP3
Thanks in advance for your time.
Have you tried using the openPortal portlet-container? The doc says it will install onto weblogic: https://portlet-container.dev.java.net/public/Download.html
Update: I just installed the portlet-container into the weblogic container and successfully deployed one of the sample portlets from this page: \http://portlet-container.dev.java.net/public/Samples.html