java - OSGi bundles with OSGi WAB -


i'm kinda new develop osgi bundles , osgi wab. i'm using jboss 7.1 server in should use both osgi bundles , wab together. few of dependencies wab osgi bundles, both bundles , wab inside 'deployments' folder of server. when deploy wab, looks dependencies inside 'web-inf/lib'. how include bundles dependencies outside wab file without adding bundles in 'web-inf/lib'?

thanks in advance.

edit:
followed steps provided in link:
http://www.rpgnextgen.com/wiki/doku.php?id=vaadin_7.4_osgi_web_application
successful in creating wab file. have necessary vaadin dependencies deployed osgi bundles in server under 'deployments' folder. when deploy wab file, vaadin dependencies under 'deployments' folder not included wab file looking vaadin dependencies inside 'web-inf/lib' path. below pom.xml i'm using.

<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.stpl.product.test</groupid> <artifactid>vaadinwab</artifactid> <version>1.0</version> <packaging>war</packaging>  <name>vaadinwab osgi bundle</name>  <properties>     <vaadin.version>7.5.7</vaadin.version>     <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties>  <dependencies>     <dependency>         <groupid>org.osgi</groupid>         <artifactid>org.osgi.core</artifactid>         <version>4.2.0</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>com.vaadin</groupid>         <artifactid>vaadin-push</artifactid>         <version>${vaadin.version}</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>com.vaadin</groupid>         <artifactid>vaadin-server</artifactid>         <version>${vaadin.version}</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>com.vaadin</groupid>         <artifactid>vaadin-client</artifactid>         <version>${vaadin.version}</version>                     <scope>provided</scope>         <type>jar</type>     </dependency>     <dependency>         <groupid>com.vaadin</groupid>         <artifactid>vaadin-themes</artifactid>         <version>${vaadin.version}</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>javax</groupid>         <artifactid>javaee-api</artifactid>         <version>6.0</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>org.osgi</groupid>         <artifactid>org.osgi.compendium</artifactid>         <version>4.2.0</version>         <scope>provided</scope>     </dependency> </dependencies>  <build>     <plugins>          <plugin>             <!-- need use plugin build war files -->             <artifactid>maven-war-plugin</artifactid>             <groupid>org.apache.maven.plugins</groupid>             <version>2.3</version>             <configuration>                 <archive>                     <!-- add bundle plugin generated manifest war -->                     <manifestfile>                         ${project.build.outputdirectory}/meta-inf/manifest.mf                     </manifestfile>                     <!-- adding bundle-classpath in maven-bundle-plugin confuses plugin                      , generates wrong import-package, etc. so, generate here. -->                     <manifestentries>                         <bundle-classpath>web-inf/classes/</bundle-classpath>                     </manifestentries>                 </archive>                 <!-- don't have web.xml -->                 <failonmissingwebxml>false</failonmissingwebxml>             </configuration>         </plugin>          <plugin>             <artifactid>maven-jar-plugin</artifactid>             <version>2.4</version>             <configuration>                 <archive>                     <!-- add bundle plugin generated manifest jar -->                     <manifestfile>${project.build.outputdirectory}/meta-inf/manifest.mf</manifestfile>                 </archive>             </configuration>         </plugin>           <plugin>             <groupid>org.apache.felix</groupid>             <artifactid>maven-bundle-plugin</artifactid>             <version>2.3.7</version>             <extensions>true</extensions>             <executions>                 <execution>                     <id>bundle-manifest</id>                     <phase>process-classes</phase>                     <goals>                         <goal>manifest</goal>                     </goals>                 </execution>                 <execution>                     <id>bundle-install</id>                     <phase>install</phase>                     <goals>                         <goal>install</goal>                     </goals>                 </execution>             </executions>             <configuration>                 <supportedprojecttypes>                     <supportedprojecttype>ejb</supportedprojecttype>                     <supportedprojecttype>war</supportedprojecttype>                     <supportedprojecttype>bundle</supportedprojecttype>                     <supportedprojecttype>jar</supportedprojecttype>                 </supportedprojecttypes>                 <instructions>                     <_include>osgi.properties</_include>                     <bundle-presentationname>${project.artifactid}</bundle-presentationname>                     <embed-dependency>*;scope=compile</embed-dependency>                     <embed-transitive>true</embed-transitive>                 </instructions>             </configuration>         </plugin>     </plugins> </build>  <profiles>     <profile>         <id>build-for-felix</id>         <dependencies>             <dependency>                 <groupid>org.apache.felix</groupid>                 <artifactid>org.apache.felix.main</artifactid>                 <version>4.0.3</version>                 <scope>provided</scope>             </dependency>         </dependencies>         <build>             <plugins>                 <plugin>                     <groupid>org.apache.maven.plugins</groupid>                     <artifactid>maven-antrun-plugin</artifactid>                     <version>1.7</version>                     <executions>                         <execution>                             <id>compile</id>                             <phase>package</phase>                             <goals>                                 <goal>run</goal>                             </goals>                             <configuration>                                 <target>                                     <pathconvert property="plugins.jars" pathsep="${path.separator}">                                         <path refid="maven.runtime.classpath"/>                                         <map from="${project.build.directory}${file.separator}classes" to=""/>                                     </pathconvert>                                     <pathconvert pathsep=" " property="bundles">                                         <path path="${plugins.jars}"/>                                         <mapper>                                             <chainedmapper>                                                 <flattenmapper/>                                                 <globmapper from="*" to="file:modules/*" casesensitive="no"/>                                             </chainedmapper>                                         </mapper>                                     </pathconvert>                                     <propertyfile file="${project.build.directory}/config.properties">                                         <entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalname}.jar"/>                                         <entry key="org.osgi.framework.bootdelegation" value="*"/>                                     </propertyfile>                                     <copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar"/>                                 </target>                             </configuration>                         </execution>                     </executions>                 </plugin>                 <plugin>                     <groupid>org.apache.maven.plugins</groupid>                     <artifactid>maven-assembly-plugin</artifactid>                     <version>2.3</version>                     <executions>                         <execution>                             <id>create-executable-jar</id>                             <phase>package</phase>                             <goals>                                 <goal>single</goal>                             </goals>                             <configuration>                                 <descriptors>                                     <descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>                                 </descriptors>                                 <finalname>${project.build.finalname}</finalname>                             </configuration>                         </execution>                     </executions>                 </plugin>             </plugins>         </build>     </profile>     <profile>         <id>run-on-felix</id>         <dependencies>             <dependency>                 <groupid>org.apache.felix</groupid>                 <artifactid>org.apache.felix.main</artifactid>                 <version>4.0.3</version>                 <scope>provided</scope>             </dependency>             <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless maven since stdin swallowed -->         </dependencies>         <build>             <plugins>                 <plugin>                     <groupid>org.apache.maven.plugins</groupid>                     <artifactid>maven-antrun-plugin</artifactid>                     <version>1.7</version>                     <configuration>                         <target>                             <property name="vm.args" value=""/>                             <pathconvert property="plugins.jars" pathsep="${path.separator}">                                 <path refid="maven.runtime.classpath"/>                                 <map from="${project.build.directory}${file.separator}classes" to=""/>                             </pathconvert>                             <makeurl property="urls" separator=" ">                                 <path path="${plugins.jars}"/>                                 <path location="${project.build.directory}/${project.build.finalname}.jar"/>                             </makeurl>                             <propertyfile file="${project.build.directory}/run.properties">                                 <entry key="felix.auto.start" value="${urls}"/>                                 <entry key="felix.auto.deploy.action" value="uninstall,install,update,start"/>                                 <entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache"/>                                 <entry key="org.osgi.framework.bootdelegation" value="*"/>                             </propertyfile>                             <makeurl property="run.properties.url" file="${project.build.directory}/run.properties"/>                             <java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">                                 <sysproperty key="felix.config.properties" value="${run.properties.url}"/>                                 <jvmarg line="${vm.args}"/>                             </java>                         </target>                     </configuration>                 </plugin>             </plugins>         </build>     </profile> </profiles> 

basically i'm trying create wab project uses other bundles dependencies instead of using 'web-inf/lib' inside .war file.
when deploy war file server, end getting below exception:

10:52:07,718 warn  [org.ops4j.pax.web.jsp.internal.jasperclassloader] (executor: 2) exception while calculating location of imported bundles: java.net.malformedurlexception: no protocol: vaadin-server-7.5.7.jar     @ java.net.url.<init>(url.java:585) [rt.jar:1.7.0_65]     @ java.net.url.<init>(url.java:482) [rt.jar:1.7.0_65]     @ java.net.url.<init>(url.java:431) [rt.jar:1.7.0_65]     @ org.ops4j.pax.web.jsp.internal.jasperclassloader.getlocationsofbundlesinclassspace(jasperclassloader.java:177)     @ org.ops4j.pax.web.jsp.internal.jasperclassloader.getclasspathjars(jasperclassloader.java:157)     @ org.ops4j.pax.web.jsp.internal.jasperclassloader.<init>(jasperclassloader.java:73)     @ org.ops4j.pax.web.jsp.jspservletwrapper.<init>(jspservletwrapper.java:59)     @ org.ops4j.pax.web.service.internal.httpservicestarted.registerjsps(httpservicestarted.java:490)     @ org.ops4j.pax.web.service.internal.httpserviceproxy.registerjsps(httpserviceproxy.java:194)     @ org.ops4j.pax.web.extender.war.internal.registerwebappvisitorwc.visit(registerwebappvisitorwc.java:169)     @ org.ops4j.pax.web.extender.war.internal.model.webapp.accept(webapp.java:590)     @ org.ops4j.pax.web.extender.war.internal.webapppublisher$httpservicelistener.register(webapppublisher.java:170)     @ org.ops4j.pax.web.extender.war.internal.webapppublisher$httpservicelistener.servicechanged(webapppublisher.java:155)     @ org.ops4j.pax.web.extender.war.internal.webapppublisher$httpservicelistener.servicechanged(webapppublisher.java:119)     @ org.ops4j.pax.swissbox.tracker.replaceableservice.setservice(replaceableservice.java:114)     @ org.ops4j.pax.swissbox.tracker.replaceableservice.access$100(replaceableservice.java:28)     @ org.ops4j.pax.swissbox.tracker.replaceableservice$collectionlistener.serviceadded(replaceableservice.java:183)     @ org.ops4j.pax.swissbox.tracker.servicecollection$tracker.addingservice(servicecollection.java:181)     @ org.osgi.util.tracker.servicetracker$tracked.customizeradding(servicetracker.java:896) [servicetracker$tracked.class:]     @ org.osgi.util.tracker.abstracttracked.trackadding(abstracttracked.java:261)     @ org.osgi.util.tracker.abstracttracked.trackinitial(abstracttracked.java:184)     @ org.osgi.util.tracker.servicetracker.open(servicetracker.java:339) [servicetracker.class:]     @ org.osgi.util.tracker.servicetracker.open(servicetracker.java:273) [servicetracker.class:]     @ org.ops4j.pax.swissbox.tracker.servicecollection.onstart(servicecollection.java:139)     @ org.ops4j.pax.swissbox.lifecycle.abstractlifecycle$stopped.start(abstractlifecycle.java:121)     @ org.ops4j.pax.swissbox.lifecycle.abstractlifecycle.start(abstractlifecycle.java:49)     @ org.ops4j.pax.swissbox.tracker.replaceableservice.onstart(replaceableservice.java:146)     @ org.ops4j.pax.swissbox.lifecycle.abstractlifecycle$stopped.start(abstractlifecycle.java:121)     @ org.ops4j.pax.swissbox.lifecycle.abstractlifecycle.start(abstractlifecycle.java:49)     @ org.ops4j.pax.web.extender.war.internal.webapppublisher.publish(webapppublisher.java:81)     @ org.ops4j.pax.web.extender.war.internal.webxmlobserver.deploy(webxmlobserver.java:200)     @ org.ops4j.pax.web.extender.war.internal.webxmlobserver.addingentries(webxmlobserver.java:159)     @ org.ops4j.pax.swissbox.extender.bundlewatcher$3.run(bundlewatcher.java:224)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) [rt.jar:1.7.0_65]     @ java.util.concurrent.futuretask.run(futuretask.java:262) [rt.jar:1.7.0_65]     @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.access$201(scheduledthreadpoolexecutor.java:178) [rt.jar:1.7.0_65]     @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.run(scheduledthreadpoolexecutor.java:292) [rt.jar:1.7.0_65]     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) [rt.jar:1.7.0_65]     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) [rt.jar:1.7.0_65]     @ java.lang.thread.run(thread.java:745) [rt.jar:1.7.0_65] 

ok, that's real old version of pax-web (current version 4).
reason behavior is, give explanation @neilbartlett, able hold of possible taglibs.
pax-web container traverses imported bundles , taglibs in bundle make them available jsp jaspercompiler.
1 of parts has been improved on time. way it's done in 1.x of pax-web bit "brute-force" requires container give valid "bundle" uris. looks jboss container compared std. felix , equinox works different.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -