You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by contactreji <co...@gmail.com> on 2013/08/27 17:18:51 UTC

JAAS auth + Jetty - Exception

Hi friends

I was just trying to implement BASIC JAAS authentication referring the
online guide at
https://access.redhat.com/site/documentation/en-US/JBoss_Fuse/6.0/html/Security_Guide/files/CamelJetty-BasicAuth.html

I have followed the exact steps illustrated in the guide. But while
deployment I get the error as follows and deployment fails.

Could you  help me with this stuff pleasee!

*18:12:49,709 | WARN  | qtp618140013-986 | /                               
| 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | %bundles.pluginTitle:
Cannot start
org.osgi.framework.BundleException: Unresolved constraint in bundle
com.outotec.mes-bw-copper_recovery_perc_ssl [450]: Unable to resolve 450.1:
missing requirement [450.1] osgi.wiring.package;
(&(osgi.wiring.package=org.eclipse.jetty.http.security)(version>=7.5.0)(!(version>=8.0.0)))
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4054)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1959)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)
	at
org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:312)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
	at
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:520)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:445)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.KarafOsgiManager.doService(KarafOsgiManager.java:74)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.KarafOsgiManager$1.run(KarafOsgiManager.java:54)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_45]
	at
org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:67)[43:org.apache.karaf.jaas.modules:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.KarafOsgiManager.service(KarafOsgiManager.java:52)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)[:1.6.0_45]
	at java.lang.reflect.Method.invoke(Unknown Source)[:1.6.0_45]
	at
org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
	at org.ops4j.pax.web.service.internal.$Proxy27.service(Unknown
Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
	at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
	at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:534)[82:org.eclipse.jetty.security:7.6.7.v20120910]
	at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
	at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
	at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
	at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.Server.handle(Server.java:363)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)[79:org.eclipse.jetty.http:7.6.7.v20120910]
	at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[79:org.eclipse.jetty.http:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[81:org.eclipse.jetty.io:7.6.7.v20120910]
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[81:org.eclipse.jetty.io:7.6.7.v20120910]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[90:org.eclipse.jetty.util:7.6.7.v20120910]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[90:org.eclipse.jetty.util:7.6.7.v20120910]
	at java.lang.Thread.run(Unknown Source)[:1.6.0_45]*



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
This is my latest POM

*<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>



	<version>1.0.0</version>
	<groupId>com.outotec</groupId>
	<artifactId>mes-bw-copper_recovery_perc_ssl</artifactId>
	<name>project-name</name>
	<description>Creates a web service using the WSDL contract
first</description>
	<packaging>bundle</packaging>


	<repositories>
		<repository>
			<id>fusesource</id>
			<name>FuseSource Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/public/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
		<repository>
			<id>fusesource.ea</id>
			<name>FuseSource Community Early Access Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
		<repository>
			<id>jboss-public-repository-group</id>
			<name>JBoss Public Repository Group</name>
			<url>http://repository.jboss.org/nexus/content/groups/public/</url>
			<layout>default</layout>
			<releases>
				<enabled>true</enabled>
				<updatePolicy>never</updatePolicy>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>daily</updatePolicy>
			</snapshots>
		</repository>


		








	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>fusesource</id>
			<name>FuseSource Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/public/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</pluginRepository>
		<pluginRepository>
			<id>fusesource.ea</id>
			<name>FuseSource Community Early Access Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</pluginRepository>
	</pluginRepositories>


	<dependencies>

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-core</artifactId>
			<version>2.10.0.fuse-71-047</version>
		</dependency>

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-cxf</artifactId>
			<version>2.10.0.fuse-71-047</version>
		</dependency>

		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>

		
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.1</version>
		</dependency>

		
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>2.6.0.fuse-71-047</version>
		</dependency>

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-test-spring</artifactId>
			<version>2.10.0.fuse-71-047</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.google.code.maven-play-plugin.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>1.8.1.2</version>
		</dependency>




		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-security</artifactId>
			<version>9.0.0.RC2</version>
		</dependency>


            


		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-http</artifactId>
			<version>8.0.0.M3</version>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.3.4</version>
				<extensions>true</extensions>
				<configuration>
				<jettyXml>jetty.xml,jetty-ssl.xml,jetty-https.xml</jettyXml>
					
					<instructions>
						<Import-Package> javax.security.auth,
							javax.security.auth.callback,
							javax.security.auth.login,
							javax.security.auth.spi,
							org.apache.karaf.jaas.modules,
							org.eclipse.jetty.plus.jaas;version=${jetty-version},
							org.eclipse.jetty.security;version={7.0.0,8.0.0},
							*
						</Import-Package>
					</instructions>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-codegen-plugin</artifactId>
				<version>2.6.0.fuse-71-047</version>
				<executions>
					<execution>
						<id>generate-sources</id>
						<phase>generate-sources</phase>
						<configuration>
							<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
							<wsdlOptions>
								<wsdlOption>
								
<wsdl>${basedir}/src/main/resources/wsdl/SI_ID56_CopperRecovery_async_outService.wsdl</wsdl>
									<extraargs>
										<extraarg>-impl</extraarg>
									</extraargs>
								</wsdlOption>
							</wsdlOptions>
						</configuration>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
			</plugin>

			
			<plugin>
				<groupId>org.apache.camel</groupId>
				<artifactId>camel-maven-plugin</artifactId>
				<version>2.10.0.fuse-71-047</version>
			</plugin>
		</plugins>
	</build>
	<properties>

		<jetty-version>7.2.2.v20101205</jetty-version>
	</properties>
</project>*




--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738106.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Claus Ibsen <cl...@gmail.com>.
You need to use the same version of Jetty, eg the 7.x version. So
change your pom.xml file to use the same version.

And then make sure the version ranges for OSGi is in the 7 -> 8 range
only as well.

On Wed, Aug 28, 2013 at 8:46 AM, contactreji <co...@gmail.com> wrote:
> Hi Claus
>
> I incorporated the chances you mentioned. Still the error seems to be same
> again
>
> its like..
>
> *
> 09:44:51,405 | WARN  | 625610171115.tmp | /                                |
> 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | Cannot install or update
> bundle from
> C:\Windows\system32\config\systemprofile\AppData\Local\Temp\install8171016625610171115.tmp
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> com.outotec.mes-bw-copper_recovery_perc_ssl [481]: Unable to resolve 481.0:
> missing requirement [481.0] osgi.wiring.package;
> (&(osgi.wiring.package=org.eclipse.jetty.http.security)(version>=8.0.0)(!(version>=9.0.0)))
>         at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4054)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
>         at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1959)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
>         at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
>         at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
>         at
> org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:67)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at
> org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at
> org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at java.lang.Thread.run(Unknown Source)[:1.6.0_45]*
>
>
>
>
> Could ther ebe any other possibility in dependency corerctions?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738117.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi

I tried another approach

I dropped a copy of dependency jar file straight into the DEPLOY folder of
karaf.. Now I got rid of the old error. 

But the project bundle doesnt get started and active now. Following is shown
in the fuse Log

Started bundle:
file:/D:/Program%20Files/fuse-esb-full-7.1.0.fuse-047/fuse-esb-7.1.0.fuse-047/deploy/mes-bw-copper_recovery_perc_ssl_JAAS-1.0.0.jar
08:52:48,372 | INFO  | .fuse-047/deploy | fileinstall                      |
7 - org.apache.felix.fileinstall - 3.3.11.fuse-71-047 | Started bundle:
file:/D:/Program%20Files/fuse-esb-full-7.1.0.fuse-047/fuse-esb-7.1.0.fuse-047/deploy/mes-bw-copper_recovery_perc_ssl_JAAS-1.0.0.jar
08:52:49,388 | INFO  | .fuse-047/deploy | fileinstall                      |
7 - org.apache.felix.fileinstall - 3.3.11.fuse-71-047 | Uninstalled
D:\Program
Files\fuse-esb-full-7.1.0.fuse-047\fuse-esb-7.1.0.fuse-047\deploy\mes-bw-copper_recovery_perc_ssl_JAAS-1.0.0.jar

Its starting but will stop again.. No errors as such though!

Can you help?

Reji




--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738254.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
I Did that Baharath.. Following error occurs.. :-( Meanwhil i have pasted my
configurations above. Please have a look at it too 

	
11:50:52,475 | WARN  | 427745825547.tmp | /                                |
90 - org.eclipse.jetty.util - 7.6.7.v20120910 | Cannot install or update
bundle from
C:\Windows\system32\config\systemprofile\AppData\Local\Temp\install7347384427745825547.tmp
org.osgi.framework.BundleException: Unresolved constraint in bundle
com.outotec.mes-bw-copper_recovery_perc_ssl [482]: Unable to resolve 482.0:
missing requirement [482.0] osgi.wiring.package;
(&(osgi.wiring.package=org.eclipse.jetty.http.security)(version>=8.0.0)(!(version>=9.0.0)))
	at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4054)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.Felix.startBundle(Felix.java:1959)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:67)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at java.lang.Thread.run(Unknown Source)[:1.6.0_45]




--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738135.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi Bharat.

I am still not able to get rid of that dependency issue.. Can you suggest
what too do now? The dendendency artifact ID and all that corresponds toa 
valid path on the repositories.. Still the same issue..



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738210.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Bharath <bh...@gmail.com>.
Hi regi,

        I meant in your dependency

Cheers!!!
Bharath.R



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738134.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Barath... you mean in the dependency or the import packages?



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738132.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Bharath <bh...@gmail.com>.
Hi regi,

     change your jetty-security version to 7.6.7.v20120910 in your pom.xml
and try

Cheers!!!
Bharath.R



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738126.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hey Bharath I got 
82 org.eclipse.jetty.security; version=7.6.7                                                                        
    82 org.eclipse.jetty.security.authentication; version=7.6.7  
So this one I am suppsoed to put as security version in imports as
org.eclipse.jetty.security;version="7.6.7",.. right?

*
10:50:12,483 | WARN  | tp2063336136-510 | /                                |
90 - org.eclipse.jetty.util - 7.6.7.v20120910 | %bundles.pluginTitle: Cannot
start
org.osgi.framework.BundleException: Unresolved constraint in bundle
com.outotec.mes-bw-copper_recovery_perc_ssl [481]: Unable to resolve 481.1:
missing requirement [481.1] osgi.wiring.package;
(&(osgi.wiring.package=org.eclipse.jetty.http.security)(version>=8.0.0)(!(version>=9.0.0)))
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4054)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1959)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)
	at
org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:312)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
	at
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:520)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:445)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.KarafOsgiManager.doService(KarafOsgiManager.java:74)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.KarafOsgiManager$1.run(KarafOsgiManager.java:54)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_45]
	at
org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:67)[43:org.apache.karaf.jaas.modules:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.KarafOsgiManager.service(KarafOsgiManager.java:52)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)[:1.6.0_45]
	at java.lang.reflect.Method.invoke(Unknown Source)[:1.6.0_45]
	at
org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
	at org.ops4j.pax.web.service.internal.$Proxy27.service(Unknown
Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
	at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
	at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:534)[82:org.eclipse.jetty.security:7.6.7.v20120910]
	at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
	at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
	at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
	at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.Server.handle(Server.java:363)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)[79:org.eclipse.jetty.http:7.6.7.v20120910]
	at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[79:org.eclipse.jetty.http:7.6.7.v20120910]
	at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[84:org.eclipse.jetty.server:7.6.7.v20120910]
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[81:org.eclipse.jetty.io:7.6.7.v20120910]
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[81:org.eclipse.jetty.io:7.6.7.v20120910]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[90:org.eclipse.jetty.util:7.6.7.v20120910]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[90:org.eclipse.jetty.util:7.6.7.v20120910]
	at java.lang.Thread.run(Unknown Source)[:1.6.0_45]
*

ERRORAGAIN :-(



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738125.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Bharath <bh...@gmail.com>.
Hi regi,

       Can you check your security version using this command in your karaf
console

 exports | grep org.eclipse.jetty.security
 
you will get the version along with the bundle id .So make sure you use the
version which your container uses in your pom.xml

Cheers!!!
Bharath.R



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738123.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi Bharath
I am new to Fuse 
Can you tell me how to check the container? I am deploying in Fuse ESB. So i
assume the container is OSGI..


Please have a look at my code posted. 

My requirement is that I just need to create a basic authentication on my
cxf endpoint. I dont really need the ssl even..



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738122.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Bharath <bh...@gmail.com>.
Hi regi,

         This is completely a version conflict.Can you check the
org.eclipse.jetty.http.security version which your container uses??what
container do you use??

Cheers!!!
Bharath.R



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738118.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
For your reference I am pasting the contents of jetty-spring.xml here
*
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:camel="http://camel.apache.org/schema/spring" 
	xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:sec="http://cxf.apache.org/configuration/security"
	xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
        http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
         http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
    	 http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
       ">
       

	
	<bean id="loginService"
class="org.eclipse.jetty.plus.jaas.JAASLoginService">
		<property name="name" value="karaf" />
		<property name="loginModuleName" value="karaf" />
		<property name="roleClassNames">
			<list>
				<value>org.apache.karaf.jaas.modules.RolePrincipal</value>
			</list>
		</property>
	</bean>

	<bean id="identityService"
class="org.eclipse.jetty.security.DefaultIdentityService" />

	<bean id="constraint" class="org.eclipse.jetty.http.security.Constraint">
		<property name="name" value="BASIC" />
		<property name="roles" value="admin" />
		<property name="authenticate" value="true" />
	</bean>

	<bean id="constraintMapping"
class="org.eclipse.jetty.security.ConstraintMapping">
		<property name="constraint" ref="constraint" />
		<property name="pathSpec" value="/*" />
	</bean>

	<bean id="securityHandler"
class="org.eclipse.jetty.security.ConstraintSecurityHandler">
		<property name="authenticator">
			<bean
class="org.eclipse.jetty.security.authentication.BasicAuthenticator" />
		</property>
		<property name="constraintMappings">
			<list>
				<ref bean="constraintMapping" />
			</list>
		</property>
		<property name="loginService" ref="loginService" />
		<property name="strict" value="false" />
		<property name="identityService" ref="identityService" />
	</bean>



</beans>
*



The CXF config file is asfollows


*


<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
	xmlns:http="http://cxf.apache.org/transports/http/configuration"
	xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:sec="http://cxf.apache.org/configuration/security"
	xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
	xsi:schemaLocation="
	http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd
         http://www.springframework.org/schema/beans 
         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://camel.apache.org/schema/cxf 
         http://camel.apache.org/schema/cxf/camel-cxf.xsd
          http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
		 http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd 
		  http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
         http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
    	 http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
		 ">


	
	<cxf:cxfEndpoint id="MESEndpoint"
	
address="jetty:https://server:8181/mes/bw/TESTINGJAAS?handlers=securityHandler&amp;matchOnUriPrefix=true"
	
serviceClass="company.pi.mes.id56.copperrecovery.SIID56CopperRecoveryAsyncOut"
		wsdlURL="wsdl/SI_ID56_CopperRecovery_async_outService.wsdl"
		serviceName="p1:SI_ID56_CopperRecovery_async_outService"
endpointName="p1:HTTPS_Port"
		xmlns:p1="urn:company:pi:mes:id56:CopperRecovery"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
		
		
	<bean id="jetty"
class="org.apache.camel.component.jetty.JettyHttpComponent">
		<property name="sslSocketConnectorProperties">
			<map>
				<entry key="password" value="password" />
				<entry key="keyPassword" value="password" />
				<entry key="keystore" value="certs/keystore.jks" />
				<entry key="truststore" value="certs/keystore.jks" />
				<entry key="trustPassword" value="password" />
				<entry key="needClientAuth" value="password" />
			</map>
		</property>
	</bean>
*



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738120.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi Claus

I incorporated the chances you mentioned. Still the error seems to be same
again

its like..

*
09:44:51,405 | WARN  | 625610171115.tmp | /                                |
90 - org.eclipse.jetty.util - 7.6.7.v20120910 | Cannot install or update
bundle from
C:\Windows\system32\config\systemprofile\AppData\Local\Temp\install8171016625610171115.tmp
org.osgi.framework.BundleException: Unresolved constraint in bundle
com.outotec.mes-bw-copper_recovery_perc_ssl [481]: Unable to resolve 481.0:
missing requirement [481.0] osgi.wiring.package;
(&(osgi.wiring.package=org.eclipse.jetty.http.security)(version>=8.0.0)(!(version>=9.0.0)))
	at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4054)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.Felix.startBundle(Felix.java:1959)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:67)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at java.lang.Thread.run(Unknown Source)[:1.6.0_45]*




Could ther ebe any other possibility in dependency corerctions?



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738117.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Claus Ibsen <cl...@gmail.com>.
There is an extra dot in the version which should be removed, as its
an invalid version range.

So this
version="[7.0.0.,8.0.0)"

Should be
version="[7.0.0,8.0.0)"

Also the extra .0 is implied so you just do
version="[7.0,8.0)"

And again the .0 is implied so just do
version="[7,8)"

On Wed, Aug 28, 2013 at 7:36 AM, Bharath <bh...@gmail.com> wrote:
> Hi regi,
>
>    It should be like this *version="[7.0.0.,8.0.0)"* and not
> version={7.0.0,8.0.0}.Please see the brackets what i have used and try
>
> Cheers!!!
> Bharath.R
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738107.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
I also get this maven error while building the project

[WARNING] Exception while updating local OBR: invalid format
java.lang.IllegalArgumentException: invalid format
	at org.osgi.framework.Version.<init>(Version.java:150)
	at org.osgi.framework.Version.parseVersion(Version.java:209)
	at
org.apache.felix.utils.version.VersionTable.getVersion(VersionTable.java:55)
	at
org.apache.felix.utils.version.VersionRange.<init>(VersionRange.java:145)
	at org.apache.felix.utils.version.VersionRange.<init>(VersionRange.java:99)
	at org.apache.felix.utils.version.VersionRange.<init>(VersionRange.java:94)
	at
org.apache.felix.utils.version.VersionRange.parseVersionRange(VersionRange.java:157)
	at
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.getVersionRange(DataModelHelperImpl.java:857)
	at
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.createImportFilter(DataModelHelperImpl.java:752)
	at
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.doImports(DataModelHelperImpl.java:737)
	at
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.populate(DataModelHelperImpl.java:556)
	at
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.createResource(DataModelHelperImpl.java:513)
	at
org.apache.felix.bundlerepository.impl.DataModelHelperImpl.createResource(DataModelHelperImpl.java:404)
	at
org.apache.felix.obrplugin.ObrUpdate.updateRepository(ObrUpdate.java:170)
	at
org.apache.felix.obrplugin.ObrInstall.updateLocalBundleMetadata(ObrInstall.java:183)
	at org.apache.felix.obrplugin.ObrInstall.execute(ObrInstall.java:142)
	at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738115.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi Bharath

Things got slightly better. But its giving some sort of
IllegalArgumentException.. Have you seen this error before?


*	09:26:45,080 | WARN  | 376171846726.tmp | /                               
| 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | Cannot install or update
bundle from
C:\Windows\system32\config\systemprofile\AppData\Local\Temp\install4557347376171846726.tmp
org.osgi.framework.BundleException: Could not create bundle object.
	at
org.apache.felix.framework.Felix.installBundle(Felix.java:3032)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:54)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at java.lang.Thread.run(Unknown Source)[:1.6.0_45]
Caused by: java.lang.IllegalArgumentException: invalid version "7.0.0.":
invalid format
	at
org.osgi.framework.Version.<init>(Version.java:147)[karaf.jar:2.3.0.fuse-71-047]
	at
org.apache.felix.framework.util.VersionRange.parse(VersionRange.java:92)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:299)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:163)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:119)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1191)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:95)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.Felix.installBundle(Felix.java:2979)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	... 5 more
Caused by: java.util.NoSuchElementException
	at java.util.StringTokenizer.nextToken(Unknown Source)[:1.6.0_45]
	at java.util.StringTokenizer.nextToken(Unknown Source)[:1.6.0_45]
	at
org.osgi.framework.Version.<init>(Version.java:138)[karaf.jar:2.3.0.fuse-71-047]
	... 12 more*




--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738114.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Bharath <bh...@gmail.com>.
Hi regi,

   It should be like this *version="[7.0.0.,8.0.0)"* and not
version={7.0.0,8.0.0}.Please see the brackets what i have used and try

Cheers!!!
Bharath.R



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738107.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi Bharat

You mean to say I should put it this way 




<instructions>
						<Import-Package> javax.security.auth,
							javax.security.auth.callback,
							javax.security.auth.login,
							javax.security.auth.spi,
							org.apache.karaf.jaas.modules,
							org.eclipse.jetty.plus.jaas;version=${jetty-version},
							org.eclipse.jetty.security;version="8.0.0",
							*
						</Import-Package>
					</instructions>


I am getting following exception with that..


*
	08:22:42,684 | WARN  | y_perc_ssl (469) | /                               
| 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | Cannot install or update
bundle from
C:\Windows\system32\config\systemprofile\AppData\Local\Temp\install9134341085839189724.tmp
org.osgi.framework.BundleException: Update of bundle
com.outotec.mes-bw-copper_recovery_perc_ssl [469] failed.
	at
org.apache.felix.framework.Felix.updateBundle(Felix.java:2492)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.update(BundleImpl.java:965)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:60)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:70)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at
org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
	at java.lang.Thread.run(Unknown Source)[:1.6.0_45]
Caused by: java.lang.IllegalArgumentException: invalid version "{7.0.0":
non-numeric "{7"
	at
org.osgi.framework.Version.parseInt(Version.java:170)[karaf.jar:2.3.0.fuse-71-047]
	at
org.osgi.framework.Version.<init>(Version.java:126)[karaf.jar:2.3.0.fuse-71-047]
	at
org.apache.felix.framework.util.VersionRange.parse(VersionRange.java:98)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:299)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:163)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:119)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1191)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1133)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	at
org.apache.felix.framework.Felix.updateBundle(Felix.java:2354)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
	... 6 more
Caused by: java.lang.NumberFormatException: For input string: "{7"
	at java.lang.NumberFormatException.forInputString(Unknown
Source)[:1.6.0_45]
	at java.lang.Integer.parseInt(Unknown Source)[:1.6.0_45]
	at java.lang.Integer.parseInt(Unknown Source)[:1.6.0_45]
	at
org.osgi.framework.Version.parseInt(Version.java:168)[karaf.jar:2.3.0.fuse-71-047]
	... 14 more*


Is there any other way I should write it there? 



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738105.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Bharath <bh...@gmail.com>.
Hi regi,

    Replace org.eclipse.jetty.security;version=${jetty-version} with
org.eclipse.jetty.security;version="[7.0.0.,8.0.0)" in your import package
of maven bundle plugin and try to deploy


Cheers!!!
Bharath.R



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738101.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by contactreji <co...@gmail.com>.
Hi Claus

I added the dependency. Please find my POM below
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>



	<version>1.0.0</version>
	<groupId>com.outotec</groupId>
	<artifactId>mes-bw-copper_recovery_perc_ssl</artifactId>
	<name>Copper_Recovery_Percentage_Ssl</name>
	<description>Creates a web service using the WSDL contract
first</description>
	<packaging>bundle</packaging>


	<repositories>
		<repository>
			<id>fusesource</id>
			<name>FuseSource Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/public/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
		<repository>
			<id>fusesource.ea</id>
			<name>FuseSource Community Early Access Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
		<repository>
			<id>jboss-public-repository-group</id>
			<name>JBoss Public Repository Group</name>
			<url>http://repository.jboss.org/nexus/content/groups/public/</url>
			<layout>default</layout>
			<releases>
				<enabled>true</enabled>
				<updatePolicy>never</updatePolicy>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>daily</updatePolicy>
			</snapshots>
		</repository>


		








	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>fusesource</id>
			<name>FuseSource Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/public/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</pluginRepository>
		<pluginRepository>
			<id>fusesource.ea</id>
			<name>FuseSource Community Early Access Release Repository</name>
			<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</pluginRepository>
	</pluginRepositories>


	<dependencies>

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-core</artifactId>
			<version>2.10.0.fuse-71-047</version>
		</dependency>

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-cxf</artifactId>
			<version>2.10.0.fuse-71-047</version>
		</dependency>

		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>

		
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.1</version>
		</dependency>

		
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>2.6.0.fuse-71-047</version>
		</dependency>

		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-test-spring</artifactId>
			<version>2.10.0.fuse-71-047</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.google.code.maven-play-plugin.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>1.8.1.2</version>
		</dependency>




		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-security</artifactId>
			<version>9.0.0.RC2</version>
		</dependency>


            


		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-http</artifactId>
			<version>8.0.0.M3</version>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.3.4</version>
				<extensions>true</extensions>
				<configuration>
				<jettyXml>jetty.xml,jetty-ssl.xml,jetty-https.xml</jettyXml>
					
					<instructions>
						<Import-Package> javax.security.auth,
							javax.security.auth.callback,
							javax.security.auth.login,
							javax.security.auth.spi,
							org.apache.karaf.jaas.modules,
							org.eclipse.jetty.plus.jaas;version=${jetty-version},
							org.eclipse.jetty.security;version=${jetty-version},
							*
						</Import-Package>
					</instructions>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-codegen-plugin</artifactId>
				<version>2.6.0.fuse-71-047</version>
				<executions>
					<execution>
						<id>generate-sources</id>
						<phase>generate-sources</phase>
						<configuration>
							s<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
							<wsdlOptions>
								<wsdlOption>
								
<wsdl>${basedir}/src/main/resources/wsdl/SI_ID56_CopperRecovery_async_outService.wsdl</wsdl>
									<extraargs>
										<extraarg>-impl</extraarg>
									</extraargs>
								</wsdlOption>
							</wsdlOptions>
						</configuration>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
			</plugin>

			
			<plugin>
				<groupId>org.apache.camel</groupId>
				<artifactId>camel-maven-plugin</artifactId>
				<version>2.10.0.fuse-71-047</version>
			</plugin>
		</plugins>
	</build>
	<properties>

		<jetty-version>7.2.2.v20101205</jetty-version>
	</properties>
</project>



The same issue still persist! Can you suggest anything ?

Reji



--
View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065p5738069.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAAS auth + Jetty - Exception

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

This is the wrong mailing list / forum to ask this kind of question.

You are using Fuse ESB so you can use their forum
http://fusesource.com/forums/index.jspa

Or your question is much more related to ServiceMix / Karaf.


And your problem seems related to your bundle not importing this
package: org.eclipse.jetty.http.security

You would need to add that to your bundle.

On Tue, Aug 27, 2013 at 5:18 PM, contactreji <co...@gmail.com> wrote:
> Hi friends
>
> I was just trying to implement BASIC JAAS authentication referring the
> online guide at
> https://access.redhat.com/site/documentation/en-US/JBoss_Fuse/6.0/html/Security_Guide/files/CamelJetty-BasicAuth.html
>
> I have followed the exact steps illustrated in the guide. But while
> deployment I get the error as follows and deployment fails.
>
> Could you  help me with this stuff pleasee!
>
> *18:12:49,709 | WARN  | qtp618140013-986 | /
> | 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | %bundles.pluginTitle:
> Cannot start
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> com.outotec.mes-bw-copper_recovery_perc_ssl [450]: Unable to resolve 450.1:
> missing requirement [450.1] osgi.wiring.package;
> (&(osgi.wiring.package=org.eclipse.jetty.http.security)(version>=7.5.0)(!(version>=8.0.0)))
>         at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4054)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1959)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)
>         at
> org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:312)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
>         at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:520)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:445)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at
> org.apache.felix.webconsole.internal.KarafOsgiManager.doService(KarafOsgiManager.java:74)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at
> org.apache.felix.webconsole.internal.KarafOsgiManager$1.run(KarafOsgiManager.java:54)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_45]
>         at
> org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:67)[43:org.apache.karaf.jaas.modules:2.3.0.fuse-71-047]
>         at
> org.apache.felix.webconsole.internal.KarafOsgiManager.service(KarafOsgiManager.java:52)[294:org.apache.karaf.webconsole.console:2.3.0.fuse-71-047]
>         at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)[:1.6.0_45]
>         at java.lang.reflect.Method.invoke(Unknown Source)[:1.6.0_45]
>         at
> org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
>         at org.ops4j.pax.web.service.internal.$Proxy27.service(Unknown
> Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
>         at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:534)[82:org.eclipse.jetty.security:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.Server.handle(Server.java:363)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)[79:org.eclipse.jetty.http:7.6.7.v20120910]
>         at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[79:org.eclipse.jetty.http:7.6.7.v20120910]
>         at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[84:org.eclipse.jetty.server:7.6.7.v20120910]
>         at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[81:org.eclipse.jetty.io:7.6.7.v20120910]
>         at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[81:org.eclipse.jetty.io:7.6.7.v20120910]
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[90:org.eclipse.jetty.util:7.6.7.v20120910]
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[90:org.eclipse.jetty.util:7.6.7.v20120910]
>         at java.lang.Thread.run(Unknown Source)[:1.6.0_45]*
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAAS-auth-Jetty-Exception-tp5738065.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen