-
15. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
bosschaert Sep 3, 2012 7:46 AM (in response to crramirez)Hi Carlos,
The Pax/OPS4J jars are easiest downloaded from Maven Central. For example: http://search.maven.org/#search%7Cga%7C1%7Cpax-web-spi
The capabilities bundles are placed in the bundles directory in the root of the AS7 distro, see org.apache.felix.log or org.jboss.as.osgi.configadmin for an example.
-
16. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
crramirez Sep 3, 2012 1:24 PM (in response to bosschaert)Ok David thanks a lot for that.
My system is working now. It is very important to say to the users that the capabilities are maven coordinates and jboss needs internet conection to download them. Sure many questions in this forum are from this regards.
Regards,
Carlos
-
17. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
ledivin Mar 8, 2013 11:27 AM (in response to crramirez)I hate to resurrect a long-dead thread, but I cannot get this working even following all instructions posted. My TestWab (same as posted previously), is enabled and active, but I still get a 404.
Redact: Just noticed 3 warnings regarding the capabilities, but adding the jars to jboss/bundles does not fix the problem. As a test, I tried adding "org.apache.felix.webconsole-3.1.8.jar" to "bundles/org/apache/felix/webconsole/main" still to no avail. What am I doing wrong here, and does anyone have any suggestions as to how to fix it?
Below are the warnings received, regardless of whether or not the requested jars are in the bundles (or .../.../.../main) folder.
10:25:18,327 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-3) find providers for: AbstractRequirement[maven.identity,attributes={maven.identity=org.ops4j.pax.web:pax-web-jetty-bundle:jar:1.1.2}]
10:25:25,109 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-3) found matching caps: []
10:25:25,109 WARN [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011922: Cannot resolve capability: org.ops4j.pax.web:pax-web-jetty-bundle:1.1.2
10:25:25,109 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-3) find providers for: AbstractRequirement[maven.identity,attributes={maven.identity=org.ops4j.pax.web:pax-web-jsp:jar:1.1.2}]
10:25:25,109 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-3) found matching caps: []
10:25:25,109 WARN [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011922: Cannot resolve capability: org.ops4j.pax.web:pax-web-jsp:1.1.2
10:25:25,109 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-3) find providers for: AbstractRequirement[maven.identity,attributes={maven.identity=org.apache.felix:org.apache.felix.webconsole:jar:3.1.8}]
10:25:25,109 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-3) found matching caps: []
10:25:25,124 WARN [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011922: Cannot resolve capability: org.apache.felix:org.apache.felix.webconsole:3.1.8
Thanks in advance for any help,
Peter
-
18. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
crramirez Mar 8, 2013 11:37 AM (in response to ledivin)Hello,
Since Jboss haven't shipped a new version in about one year and this thread is regarding the last shipped version JBoss 7.1.1 this thread is not dead.
Just follow the instructions add the capabilities to standalone.xml:
I added below lines to my standalone.xml
<capability name=
"org.ops4j.pax.web:pax-web-jetty-bundle:1.1.2"
/>
<capability name=
"org.ops4j.pax.web:pax-web-jsp:1.1.2"
/>
<capability name=
"org.ops4j.pax.web:pax-web-extender-war:1.1.2"
/>
See my answers in the post but the most important part is (even if you vomit) CONNECT YOUR SERVER TO INTERNET
-
19. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
ledivin Mar 8, 2013 12:04 PM (in response to crramirez)Those are the capabilities that I have already added, with no resolution. I still receive the same error (and yes, I'm connected to the internet). Do I need a specific version of maven installed? I'm re-printing the error as follows:
10:40:12,524 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-4) find providers for: AbstractRequirement[maven.identity,attributes={maven.identity=org.ops4j.pax.web:pax-web-jetty-bundle:jar:1.1.2}]
10:40:19,305 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-4) found matching caps: []
10:40:19,321 WARN [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011922: Cannot resolve capability: org.ops4j.pax.web:pax-web-jetty-bundle:1.1.2
10:40:19,321 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-4) find providers for: AbstractRequirement[maven.identity,attributes={maven.identity=org.ops4j.pax.web:pax-web-jsp:jar:1.1.2}]
10:40:19,321 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-4) found matching caps: []
10:40:19,321 WARN [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011922: Cannot resolve capability: org.ops4j.pax.web:pax-web-jsp:1.1.2
10:40:19,321 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-4) find providers for: AbstractRequirement[maven.identity,attributes={maven.identity=org.ops4j.pax.web:pax-web-extender-war:jar:1.1.2}]
10:40:19,321 INFO [org.jboss.osgi.repository.core.RepositoryImpl] (MSC service thread 1-4) found matching caps: []
10:40:19,321 WARN [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011922: Cannot resolve capability: org.ops4j.pax.web:pax-web-extender-war:1.1.2
I have also tried adding these to the bundles directory as follows:
bundles/org/ops4j/pax/web/pax-web-extender-war-1.1.2.jar
bundles/org/ops4j/pax/web/pax-web-jetty-bundle-1.1.2.jar
bundles/org/ops4j/pax/web/pax-web-jsp-1.1.2.jar
EDIT: Is JBoss directly utilizing maven, or its own maven subsystem? I am behind a proxy, so if it is the latter, how do I go about setting up proxy settings?
-
20. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
crramirez Mar 8, 2013 12:11 PM (in response to ledivin)You don't need maven at all jboss do it itself. And yes your problem is the proxy server, you know because it takes a lot time before telling you that it couldn't find the dependency.
Add this to your standalone.conf: JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=3128 -Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=3128"
Reade this: https://community.jboss.org/message/757634#757634
-
21. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
ledivin Mar 12, 2013 8:54 AM (in response to crramirez)OK I got the maven repo working (more more accurately - worked outside the proxy), but am now getting interesting errors, in that they don't particularly seem like errors at all. See below:
08:26:02,421 ERROR [stderr] (CM Configuration Updater (ManagedService Update: pid=org.ops4j.pax.web)) 2013-03-11 08:26:02.421:INFO:oejs.Server:jetty-7.x.y-SNAPSHOT
08:26:02,500 INFO [org.ops4j.pax.web.service.jetty.internal.JettyServerImpl] (CM Configuration Updater (ManagedServiceUpdate: pid=org.ops4j.pax.web)) Pax Web available at [0.0.0.0]:[8090]
08:26:02,515 ERROR [stderr] (CM Configuration Updater (ManagedService Update: pid=org.ops4j.pax.web)) 2013-03-11 08:26:02.515:INFO:oejs.AbstractConnector:Started NIOSocketConnectorWrapper@0.0.0.0:8090 STARTING
08:26:02,593 INFO [org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl] (MSC service thread 1-1) Binding bundle:[org.apache.felix.webconsole:3.1.8] to http service
08:26:02,765 ERROR [stderr] (MSC service thread 1-1) 2013-03-11 08:26:02.765:INFO:oejsh.ContextHandler:started HttpServiceContext{httpContext=org.apache.felix.webconsole.internal.servlet.OsgiManagerHttpContext@1c935cc}
........
08:26:04,578 ERROR [stderr] (Executor: 1) 2013-03-11 08:26:04.578:INFO:oejsh.ContextHandler:started HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@1e037a}
As you can see, the errors themselves aren't particularly alarming, outside the fact that they are marked as such. The "0.0.0.0" addresses, however, have me a bit worried. Does this seem to be functioning as it should?
It's obvious that something isn't working right. When I attempt to access ANY "localhost:8090" address, I'm given the following 404 from Jetty:
HTTP ERROR: 404
Problem accessing <whatever address I'm using>. Reason:
Not Found
Powered by Jetty://
I suppose this is technically an improvement - at least I'm accessing Jetty through 8090 now.
Thanks for any help!
-
22. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
ledivin Mar 12, 2013 8:55 AM (in response to ledivin)I still have had no luck with proxy settings, as per Carlos's suggestion. Could anyone elaborate on the bundles directory, and how it should be laid out for the necessary packages (pax-web-jetty-bundle, pax-web-jsp, pax-web-extender, and felix webconsole)?
Unrelatedly, I am still facing the above issue as well. Any help is appreciated.
-
23. Re: Getting 404 when hitting OSGi WAB servlet deployed on JBoss AS7
vijaydaniel Sep 17, 2013 7:33 AM (in response to crramirez)Hi,
Thanks a lot for the information that you have posted. It helped me a lot to make the web application to work as expected.
But, I have some clarifications regarding the time taken to start JBOSS. After adding this configurations,
<capability name=
"org.ops4j.pax.web:pax-web-jetty-bundle:1.1.2"
/>
<capability name=
"org.ops4j.pax.web:pax-web-jsp:1.1.2"
/>
<capability name=
"org.ops4j.pax.web:pax-web-extender-war:1.1.2"
/>
time taken to start jboss has increased. Is there a better way to configure so that startup time could be reduced?
PS: Initially I couldn't make the sample web application to work[got 404 error], but then I found "osgi-http" port as 8090 in domail.xml and I used 8090 in my url to access the sample web application.
With Regards,Vijay Daniel