Liferay 7.0 Portlets Don't Deploy Properly After Restart - portlet

I have a number of portlets that work fine after a hot deploy, but do not work after restarting Liferay (auto-deploy). The only way I can get them to work again is by rebuilding and doing another hot deploy.
I have 3 different spring-mvc portlets (org.springframework.web.portlet.DispatcherPortlet). The simplest of the 3 has no issues on restart, while the other 2 do not work. All three created from the base project generated using Eclipse-LiferayIDE -> new spring-mvc-portlet liferay module.
Their web.xml, portlet.xml, liferay-portlet.xml, liferay-plugin-package.properties, portlet-application-context.xml and spring/application-context.xml, PortletViewController.java, files are all identical, aside from name changes.
My best guess is that it's some sort of class loading issue.
I've compared the dependencies of all 3.
Working Fail1 Fail2
Dependency Version Scope Exclusions Version Scope Exclusions Version Scope Exclusions
org.springframework.spring-webmvc-portlet 4.1.9.RELEASE compile -- 4.1.9.RELEASE compile -- 4.1.9.RELEASE compile --
com.liferay.portal.com.liferay.portal.kernel 2.46.1 provided -- 2.46.1 provided -- 2.46.1 provided --
javax.portlet.portlet-api 3.0.0 provided -- 3.0.0 provided -- 3.0.0 provided --
javax.servlet.javax.servlet-api 3.1.0 provided -- 3.1.0 provided -- 3.1.0 provided --
org.osgi.org.osgi.service.component.annotations 1.3.0 provided -- 1.3.0 provided -- 1.3.0 provided --
org.slf4j.slf4j-log4j12 1.7.22 provided -- 1.7.22 provided -- 1.7.22 provided --
commons-lang.commons-lang -- -- -- 2.6 compile -- -- -- --
com.liferay.portal.com.liferay.util.taglib -- -- -- 2.8.0 compile -- 2.8.0 compile --
javax.servlet.javax.servlet.jsp-api -- -- -- 2.3.1 provided -- 2.3.1 provided --
oracle.ojdbc6 -- -- -- 11.2.0.3 provided -- 11.2.0.3 provided --
org.glassfish.web.jstl-impl -- -- -- 1.2 provided jsp-api,servlet-api 1.2 provided jsp-api,servlet-api
org.hibernate.hibernate-core -- -- -- 4.1.3.Final compile -- -- -- --
org.codehaus.jackson.jackson-mapper-asl -- -- -- -- 1.9.13 compile --
I suspect the problem to be with one of the overlapping dependencies between the 2 failing portlets.
com.liferay.portal.com.liferay.util.taglib
javax.servlet.javax.servlet.jsp-api
oracle.ojdbc6
org.glassfish.web.jstl-impl
Any idea if these dependencies would be causing an issue?
Here's the stack trace for the error generated. There are no errors during the initial auto-deploy, only after I navigate to a page where the portlet is used.
15:15:29,583 ERROR [ajp-nio-8009-exec-6][DispatcherPortlet:573] Could not complete request
org.springframework.web.portlet.NoHandlerFoundException: No handler found for portlet request: mode 'view', phase 'RENDER_PHASE', parameters map[[empty]]
at org.springframework.web.portlet.DispatcherPortlet.noHandlerFound(DispatcherPortlet.java:1031)
at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:730)
at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:536)
at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:483)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletExceptionAdapter.service(ServletExceptionAdapter.java:76)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:99)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.FilterExceptionAdapter.doFilter(FilterExceptionAdapter.java:46)
at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:531)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:606)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:392)
at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:265)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1584)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at sun.reflect.GeneratedMethodAccessor671.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:286)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:283)
at java.security.AccessController.doPrivileged(Native Method)
.....
I've cut the trace short to fit the character limit.
Liferay Installation: Liferay 7 Tomcat Bundle (liferay-ce-portal-7.0-ga5)

In this instance, the issue seems to have been resolved by completely removing these dependencies:
com.liferay.portal.com.liferay.util.taglib
org.glassfish.web.jstl-impl
I have been porting these portlets from Liferay 6.0.6, starting with no additional dependencies and adding them one by one as needed, so at some point something lead me to believe I needed them. Hopefully I don't.

Related

NPE during invocation of maven-war-plugin

During a multimodule build, an error is surfaced in eclipse as follows:
Execution default of goal org.apache.maven.plugins:maven-war-plugin:3.3.1:exploded failed. (org.apache.maven.plugins:maven-war-plugin:3.3.1:exploded:default:process-resources)
The stack trace for this error is
org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-war-plugin:3.3.1:exploded failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:332)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.lambda$8(MavenImpl.java:1380)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1379)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:54)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:135)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:169)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$1(MavenBuilder.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:101)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:88)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:197)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:832)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:515)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:405)
at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException
at org.apache.maven.plugins.war.AbstractWarMojo$DefaultWarPackagingContext$1.visitFile(AbstractWarMojo.java:661)
at org.apache.maven.plugins.war.AbstractWarMojo$DefaultWarPackagingContext$1.visitFile(AbstractWarMojo.java:656)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2804)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2876)
at org.apache.maven.plugins.war.AbstractWarMojo$DefaultWarPackagingContext.<init>(AbstractWarMojo.java:655)
at org.apache.maven.plugins.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:520)
at org.apache.maven.plugins.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:453)
at org.apache.maven.plugins.war.WarExplodedMojo.execute(WarExplodedMojo.java:43)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
... 31 more
pom.xml /my-legacy-app line 1753 Maven Build Problem
I've debugged into AbstractWarMojo.visitFile, and there session.getStartTime() is null, so the call to getTime() throws an NPE.
Attempting to track down why the start time is null led me to MavenImpl, at which point I've gotten a bit stuck trying to
further track down the issue. I think it was pointing to something in MavenExecutionContext, but I'm not entirely sure.
How do I go about solving this problem?
Eclipse Version: 20200910-1200
m2e Version: 1.16.1.20200710-1008
This was due to code introduced in version 3.3.1 of the maven-war-plugin, using 3.3.0 solves the problem.

Unable to resolve bundle because of dependency conflict for jackson.annotation in Karaf

Some time while starting a bundle (basecomponent) I am getting the below error. It seems it is because of the two different versions of fasterxml.jackson.annotations . basecomponent bundle is using fasterxml.jackson.annotations 2.7.4 . basecomponent bundle is also using camel-aws which may be using fasterxml.jackson.annotation 2.5.0.
smx#root>bundle:start 277
Error executing command: Error executing command on bundles:
Unable to execute command on bundle 277: Uses constraint violation. Unable to resolve bundle revision basecomponent [277.0] because it is exposed to package 'com.fasterxml.jackson.annotation' from bundle revisions com.fasterxml.jackson.core.jackson-annotations [284.0] and com.fasterxml.jackson.core.jackson-annotations [125.0] via two dependency chains.
Chain 1:
basecomponent [277.0]
import: (&(osgi.wiring.package=com.fasterxml.jackson.annotation)(version>=2.7.0)(!(version>=3.0.0)))
|
export: osgi.wiring.package=com.fasterxml.jackson.annotation
com.fasterxml.jackson.core.jackson-annotations [284.0]
Chain 2:
basecomponent [277.0]
import: (osgi.wiring.package=com.amazonaws)
|
export: osgi.wiring.package=com.amazonaws; uses:=com.fasterxml.jackson.annotation
org.apache.servicemix.bundles.aws-java-sdk [254.0]
import: (&(osgi.wiring.package=com.fasterxml.jackson.annotation)(version>=2.5.0)(!(version>=3.0.0)))
|
export: osgi.wiring.package=com.fasterxml.jackson.annotation
com.fasterxml.jackson.core.jackson-annotations [125.0]
Can some one let me know how can I get around this dependency conflict? I am using Karaf 3.0.5 running under Servicemix 6.1.0.
As suggested in Karaf Mailing List. Moving to Karaf 4.0.5 (under Servicemix 7.0.0.M2 ) and setting dependency=true in feature.xml I am not observing the issue now.

karaf blueprint "Failure" while extending console

I am using Karaf 2.3.1. I was following Apache Karaf Manual exercise "Extending the console" page no. 105. I followed all the instruction ditto, with a few deviations. I am able to load the bundle HelloShellCommand into Karaf. It threw me a bundle Id. But the command "test.hello" is not working.
karaf#root> osgi:classes is showing org/apache/karaf.shell/samplesHelloShellCommand.class
karaf#root> test.hello is showing command not found
karaf#root> osgi:list is showing Blueprint "Failure" for the given bundle.
I did deviate from the given instruction in "Compiling the JAR" section in following steps:
Let's try to build the jar: I did build the jar from Eclipse. File-Export-Java-Jar File.
Then run "mvn install": This is where I did not understand how Maven will use the .jar file. It is looking for pom.xml. So, I went into root directory and ran "mvn install". It went through successfully.
osgi:install .., also went through successfully. But I suspect Blueprint.xml did not go through.
I need help in:
How to resolve this?
How to know in Karaf what commands are installed with each bundle?
.jar file created in step-1 is different from "mvn install" which uses pom.xml. Is there something I am missing? How to make mvn use the .jar?
And why blueprint.xml did not load?
Thanks in advance
Further, we have this stackoverflow:
2013-07-27 19:44:30,733 | ERROR | rint Extender: 2
| BlueprintContainerImpl
| container.BlueprintContainerImpl 393
| 7 - org.apache.aries.blueprint.core - 1.1.0
| Unable to start blueprint container for bundle null
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:570)[:1.7.0-ea]
at java.util.ArrayList.get(ArrayList.java:348)[:1.7.0-ea]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.readDirectives
(BlueprintContainerImpl.java:211)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun
(BlueprintContainerImpl.java:283)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run
(BlueprintContainerImpl.java:261)[7:org.apache.aries.blueprint.core:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call
(Executors.java:471)[:1.7.0-ea]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0-ea]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0-ea]
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run
(ExecutorServiceWrapper.java:106)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run
(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call
(Executors.java:471)[:1.7.0-ea]
at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:334)[:1.7.0-ea]
at java.util.concurrent.FutureTask.run (FutureTask.java:166)[:1.7.0-ea]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201
(ScheduledThreadPoolExecutor.java:178)[:1.7.0-ea]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run
(ScheduledThreadPoolExecutor.java:292)[:1.7.0-ea]
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1110)[:1.7.0-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:603)[:1.7.0-ea]
at java.lang.Thread.run(Thread.java:717)[:1.7.0-ea]
Regarding 1)
Is the bundle started? Did you use osgi:install -s with starting? If not you should start the bundle with start [bundleId]
Regarding 2)
Issue help at command line, it'll list all available commands. Using command -h will give you a overview of the command itself.
Regarding 3)
forget about creating a jar file from eclipse that won't work. Only with the maven pom you'll have a bundle that contains a valid Manifest unless you added this yourself (which I didn't see in your description)
Regarding 4)
Most likely your bundle either isn't started or it doesn't contain a valid manifest which in turn doesn't start the blueprint extender.
Besides that all those questions are usually best asked at the karaf users mailinglist
EDIT:
For finding the reason why a bundle did fail do a bundle:info on the bundle with the given ID
it should also show you why a blueprint failed.

Perl QtCore4 won't install

I can't build the QtCore4 package, I get an error regarding "SMOKE_QWT_LIBRARY" not being set during make. I'm running perlbrew Perl 5.14.2 on Ubuntu 12.04. I've tried manually building the module as well as through CPAN, and also installing on system Perl (also 5.14.2) and perl 5.16.1. I've looked in the files in the directory referenced in the error message. The file CMakeLists.txt contains the reference to "SMOKE_QWT_LIBRARY" but there is no directory reference or obvious way to re-configure the file (and I'm not sure what to reconfigure it to!).
Can anyone help with this please?
This is the make output:
Running install for module 'QtCore4'
Running make for C/CB/CBUREL/Qt4-0.99.0.tar.bz2
Checksum for /home/sillymoose/.cpan/sources/authors/id/C/CB/CBUREL/Qt4-
0.99.0.tar.bz2 ok
CPAN.pm: Building C/CB/CBUREL/Qt4-0.99.0.tar.bz2
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Perl: /home/sillymoose/perl5/perlbrew/perls/perl-
5.14.2/bin/perl
-- Found PerlLibs: /home/sillymoose/perl5/perlbrew/perls/perl-
5.14.2/lib/5.14.2/x86_64-linux/CORE/libperl.a (found version "5.14.2")
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found version "4.8.1")
-- Found QScintilla2: /usr/lib/libqscintilla2.so
-- Found QImageBlitz: /usr/include/qimageblitz
-- Phonon Version: 4.6.0
-- Found Phonon: /usr/lib/x86_64-linux-gnu/libphonon.so
-- Found Phonon Includes: /usr/include/qt4/KDE;/usr/include/qt4
-- Found Qwt: /usr/lib/libqwt-qt4.so
-- Perl headers found: /home/sillymoose/perl5/perlbrew/perls/perl-
5.14.2/lib/5.14.2/x86_64-linux/CORE
-- Perl headers found: /home/sillymoose/perl5/perlbrew/perls/perl-
5.14.2/lib/5.14.2/x86_64-linux/CORE
-- Build PerlQt bindings:
Phonon;QImageBlitz;QScintilla;Qt3Support;QtDBus;QtDeclarative;QtGui;QtHe
lp;QtNetwork;QtOpenGL;QtScript;QtSql;QtSvg;QtTest;QtUiTools;QtWebKit;QtX
ml;QtXmlPatterns;Qwt
-- Skip PerlQt bindings: QtMultimedia
------------------------------------------------------------------------
-----
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these
packages.
------------------------------------------------------------------------
-----
* QScintilla2 - QScintilla2 libraries
* QImageBlitz - QImageBlitz library
* Phonon - Phonon multimedia framework
* Qwt5 for Qt4 - Qwt5 libraries for Qt4
------------------------------------------------------------------------
-----
-- Congratulations! All external packages have been found.
------------------------------------------------------------------------
-----
CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the
CMake files:
SMOKE_QWT_LIBRARY (ADVANCED)
linked by target "perl_qwt" in directory
/home/sillymoose/.cpan/build/Qt4-0.99.0-5Qxy7L/qwt/src
-- Configuring incomplete, errors occurred!
No 'Makefile' created CBUREL/Qt4-0.99.0.tar.bz2
/home/sillymoose/perl5/perlbrew/perls/perl-5.14.2/bin/perl Makefile.PL
-- NOT OK
And this is the contents of ~/.cpan/build/Qt4-0.99.0-5Qxy7L/qwt/src/CMakeLists.txt
include_directories(
${CMAKE_SOURCE_DIR}/qtcore/src
${PERL_INCLUDE_PATH}
${QT_INCLUDES} )
# Run doxsubpp.pl to run xsubpp on Qwt.xs
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Qwt.c
COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_SOURCE_DIR}/qtcore/src/doxsubpp.pl ${PERL_EXECUTABLE} Qwt.xs ${CMAKE_CURRENT_BINARY_DIR}/Qwt.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Qwt.xs
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
# Make sure we build Qwt.c as c++ code
set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/Qwt.c
PROPERTIES LANGUAGE CXX
)
set( CMAKE_CXX_FLAGS ${PERL_CXX_FLAGS} )
set(qwt_LIBRARY_SRC
${CMAKE_CURRENT_BINARY_DIR}/Qwt.c
qwthandlers.cpp
)
if(WIN32)
set(libraryName PerlQwt)
else()
set(libraryName Qwt)
endif(WIN32)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/blib/arch/auto/${libraryName})
add_library(perl_qwt SHARED ${qwt_LIBRARY_SRC})
target_link_libraries(perl_qwt
${SMOKE_QWT_LIBRARY}
perlqtcore4)
set_target_properties(perl_qwt PROPERTIES OUTPUT_NAME ${libraryName})
set_target_properties(perl_qwt PROPERTIES PREFIX "")
install(TARGETS perl_qwt DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
This problem was resolved on a thread on Perlmonks. See thread for details. However it involves:
Installing the correct source libraries.
Re-compiling Perl with the correct C flag.
Compiling the module from source.
NB. Could only get this to run on Perl v5.10.1.

How to include predefined set of netbeans platform modules in maven project?

I am working on maven netbeans platform project consisting of several modules. I need to depend on some modules (say java.source module), but when I try to run the application, it reports, that required modules are not installed. And event despite I have dependency on java.source declared in my pom.xml
I think, that I have to tell maven somehow, to install (and turn on) these modules in the final assembled application before my module is loaded.
How could I do something like this?
UPDATE:
When I try to create complete netbeans application project from maven artifact and add Java Source API as a dependency into pom.xml... when I run the application, window with following message appears:
Warning - could not install some modules: Editor Library 2 - None of the modules providing the capability org.netbeans.modules.editor.actions could be installed. Editor Indentation for Projects - The module named org.netbeans.modules.editor.settings.storage/1 was needed and not found. Editor Indentation for Projects - The module named org.netbeans.modules.options.editor/1 was needed and not found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.ActionsFactory could be found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.OpenProjectsTrampoline could be found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.ProjectChooserFactory could be found. Editor Error Stripe Impl - The module named org.netbeans.modules.editor.errorstripe.api/1 was needed and not found. Java Source - The module named org.netbeans.libs.javacimpl/1 was needed and not found. Java Source - The module named org.netbeans.modules.editor.indent.project/0-1 was needed and not found. Java Source - The module named org.netbeans.modules.java.preprocessorbridge was needed and not found. Java Source - The module named org.netbeans.modules.options.editor/1 was needed and not found. Java Source - The module named org.netbeans.modules.parsing.api/1 was needed and not found. Editor Settings - No module providing the capability org.netbeans.api.editor.settings.implementation could be found. Diff - The module named org.netbeans.modules.options.editor/1 was needed and not found. 11 further modules could not be installed due to the above problems.
The error-message "Module dependency has friend dependency [...] but is not listed as friend" means that you need to specify an implementation version of org.netbeans.modules.options.editor.
You can achieve this by editing src/main/nbm/module.xml to contain the following entry (I didn't use the actually needed values here. Make sure to find out which values to enter for id and explicitValue to satisfy the dependencies (You can find explanations / instructions in the article linked below):
<dependencies>
<dependency>
<id>org.netbeans.modules:org-netbeans-modules-editor</id>
<type>impl</type>
<explicitValue>org.netbeans.modules.editor/1 = 201107282000</explicitValue>
</dependency>
</dependencies>
I'm pretty sure that the following article will explain some issues and help you find out the needed values for id and explicitValue (language is english, author is me):
http://blog.macrominds.de/2011/08/open-favorites-per-default-in-netbeans-rich-client-platform-maven-standalone-application/
I'm currently having related problems with my application, so I might come back with a more concrete solution in a while.
the easiest way is to grab a class that its complaining about, say "org.netbeans.modules.editor.actions" and go to the Add Dependencies and plug it into the Query field.
From there you should be able to tell which module you will need to include