NoClassDefFoundError

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

NoClassDefFoundError

Bill Burke
Weird, a user is getting NCDFE for javax/net/ssl/SSLSocketFactory, any
ideas why?

-------- Original Message --------
Subject: [Resteasy-developers] Resteasy client with https in Jboss 7
Date: Tue, 06 Dec 2011 11:23:55 -0300
From: Fabricio Lemos <[hidden email]>
To: [hidden email]

Is it possible to use resteasy client with https in Jboss 7?

This code works with a standalone Java application:

System.out.println(new ClientRequest(MyHttpsURL).get().getStatus());

but fails with Jboss 7.0.1 and 7.1.0.Beta1

My certification is imported with the args:
-Djavax.net.ssl.trustStoreType=jks
-Djavax.net.ssl.trustStore=D:\java\certificados\cacert
-Djavax.net.debug=ssl -Djavax.net.ssl.trustStorePassword=myPswd

I assume the certification is being imported correctly because
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection()
works with both standalone and a deployed client

The error with resteasy client in Jboss 7 is this:

10:47:54,410 BOM
[javax.enterprise.resource.webcontainer.jsf.application]
(http--127.0.0.1-8080-2) processAction(j_idt4)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) Java version: 1.6.0_25
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) Java vendor: Sun Microsystems Inc.
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) Java class path:
D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\jboss-modules.jar
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) Operating system name: Windows XP
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) Operating system architecture: x86
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) Operating system version: 5.1
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) jboss-sasl 1.0: JBoss SASL Provider 1.0.0.Beta6
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SUN 1.6: SUN (DSA key/parameter generation; DSA
signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS
keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection
CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunRsaSign 1.5: Sun RSA signature provider
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunJSSE 1.6: Sun JSSE provider(PKCS12, SunX509
key/trust factories, SSLv3, TLSv1)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunJCE 1.6: SunJCE Provider (implements RSA,
DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunJGSS 1.0: Sun (Kerberos v5, SPNEGO)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunSASL 1.5: Sun SASL provider(implements
client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5;
server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) XMLDSig 1.0: XMLDSig (DOM XMLSignatureFactory;
DOM KeyInfoFactory)
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunPCSC 1.6: Sun PC/SC provider
10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
(http--127.0.0.1-8080-2) SunMSCAPI 1.6: Sun's Microsoft Crypto API provider
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.useragent = Jakarta
Commons-HttpClient/3.1
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.protocol.version = HTTP/1.1
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.connection-manager.class =
class org.apache.commons.httpclient.SimpleHttpConnectionManager
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.protocol.cookie-policy = default
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.protocol.element-charset =
US-ASCII
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.protocol.content-charset =
ISO-8859-1
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.method.retry-handler =
org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1e8e6aa
10:47:54,676 DEBUG
[org.apache.commons.httpclient.params.DefaultHttpParams]
(http--127.0.0.1-8080-2) Set parameter http.dateparser.patterns = [EEE,
dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d
HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z,
EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy
HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd
MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z,
EEE, dd-MM-yyyy HH:mm:ss z]
10:47:55,129 INFO  [br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS]
(http--127.0.0.1-8080-2) URI de autenticação no Astra :
https://dese2.sefaz.ce.gov.br/sisseg-jee-ws/resource/autenticacao/?siglaSistema=testeplat&auth=208313741943058386f7b9bac1a357a10c8578088dfeb8d386f7b9bac1a3&key=070187211039071227070245078107199218194197049193157064020242196241001233243171101043040164120209
10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
(http--127.0.0.1-8080-2) Open connection to dese2.sefaz.ce.gov.br:443
10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
(http--127.0.0.1-8080-2) Releasing connection back to connection manager.
10:47:55,207 BOM
[javax.enterprise.resource.webcontainer.jsf.application]
(http--127.0.0.1-8080-2) java.lang.NoClassDefFoundError:
javax/net/ssl/SSLSocketFactory: javax.faces.el.EvaluationException:
java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
      at
org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:58)

[seam-faces-3.0.0.Final.jar:]
      at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
      at
org.jboss.seam.faces.component.UIViewAction.broadcast(UIViewAction.java:365)

[seam-faces-3.0.0.Final.jar:]
      at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
      at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
      at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
      at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

[jbossweb-7.0.3.Final.jar:]
      at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

[weld-core-1.1.4.Final.jar:]
      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

[jbossweb-7.0.3.Final.jar:]
      at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)

[jboss-as-web-7.1.0.Beta1.jar:]
      at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[jbossweb-7.0.3.Final.jar:]
      at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.3.Final.jar:]
      at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

[jbossweb-7.0.3.Final.jar:]
      at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.3.Final.jar:]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
      at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)

[commons-httpclient-3.1.jar:]
      at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)

[commons-httpclient-3.1.jar:]
      at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
[commons-httpclient-3.1.jar:]
      at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)

[commons-httpclient-3.1.jar:]
      at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

[commons-httpclient-3.1.jar:]
      at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
[commons-httpclient-3.1.jar:]
      at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
[commons-httpclient-3.1.jar:]
      at
org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor.execute(ApacheHttpClientExecutor.java:81)

[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)

[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)

[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)

[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:473)
[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:704)
[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:509)
[resteasy-jaxrs-2.2.3.GA.jar:]
      at
org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:537)
[resteasy-jaxrs-2.2.3.GA.jar:]
      at
br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS.autenticarUsuario(RestEasyAstraWS.java:30)

[jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
      at
br.gov.ce.sefaz.jee.intranet.AutenticadorAstra.authenticate(AutenticadorAstra.java:52)

[jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
      at
br.gov.ce.sefaz.jee.intranet.AutenticadorAstra$Proxy$_$$_WeldClientProxy.authenticate(AutenticadorAstra$Proxy$_$$_WeldClientProxy.java)

[jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
      at
org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:305)
[seam-security-3.0.0.Final.jar:]
      at
org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:229)
[seam-security-3.0.0.Final.jar:]
      at
org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java)

[seam-security-3.0.0.Final.jar:]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[:1.6.0_25]
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

[:1.6.0_25]
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

[:1.6.0_25]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_25]
      at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
[jbossweb-7.0.3.Final.jar:]
      at
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
[jbossweb-7.0.3.Final.jar:]
      at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)

[weld-core-1.1.4.Final.jar:]
      at
org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
[weld-core-1.1.4.Final.jar:]
      at
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

[jsf-impl-2.1.3-b02-jbossorg-2.jar:]
      at
org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:48)

[seam-faces-3.0.0.Final.jar:]
      ... 24 more
Caused by: java.lang.ClassNotFoundException:
javax.net.ssl.SSLSocketFactory from [Module
"org.apache.commons.httpclient:main" from local module loader @542529
(roots: D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\modules)]
      at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
      at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
      at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
      at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
      at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
      ... 55 more

thanks in advance,
Fabrício Lemos

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and
point of
discussion for anyone considering optimizing the pricing and packaging
model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Resteasy-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/resteasy-developers


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError

Ales Justin
He is probably missing dependency on javax.api module:

Skywalker:main alesj$ pwd
/Users/alesj/java_lib/jboss-as-7.1.0.Beta1/modules/javax/api/main
Skywalker:main alesj$ cat module.xml
<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2010, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->
<module xmlns="urn:jboss:module:1.1" name="javax.api">
    <dependencies>
        <system export="true">
            <paths>
                <path name="javax/accessibility"/>
                <path name="javax/activity"/>
                <path name="javax/crypto"/>
                <path name="javax/crypto/interfaces"/>
                <path name="javax/crypto/spec"/>
                <path name="javax/imageio"/>
                <path name="javax/imageio/event"/>
                <path name="javax/imageio/metadata"/>
                <path name="javax/imageio/plugins/bmp"/>
                <path name="javax/imageio/plugins/jpeg"/>
                <path name="javax/imageio/spi"/>
                <path name="javax/imageio/stream"/>
                <path name="javax/lang/model"/>
                <path name="javax/lang/model/element"/>
                <path name="javax/lang/model/type"/>
                <path name="javax/lang/model/util"/>
                <path name="javax/management"/>
                <path name="javax/management/loading"/>
                <path name="javax/management/modelmbean"/>
                <path name="javax/management/monitor"/>
                <path name="javax/management/openmbean"/>
                <path name="javax/management/relation"/>
                <path name="javax/management/remote"/>
                <path name="javax/management/remote/rmi"/>
                <path name="javax/management/timer"/>
                <path name="javax/naming"/>
                <path name="javax/naming/directory"/>
                <path name="javax/naming/event"/>
                <path name="javax/naming/ldap"/>
                <path name="javax/naming/spi"/>
                <path name="javax/net"/>
                <path name="javax/net/ssl"/>
                <path name="javax/print"/>
                <path name="javax/print/attribute"/>
                <path name="javax/print/attribute/standard"/>
                <path name="javax/print/event"/>
                <path name="javax/rmi/ssl"/>
                <path name="javax/script"/>
                <path name="javax/security/auth"/>
                <path name="javax/security/auth/callback"/>
                <path name="javax/security/auth/kerberos"/>
                <path name="javax/security/auth/login"/>
                <path name="javax/security/auth/spi"/>
                <path name="javax/security/auth/x500"/>
                <path name="javax/security/cert"/>
                <path name="javax/security/sasl"/>
                <path name="javax/sound/midi"/>
                <path name="javax/sound/midi/spi"/>
                <path name="javax/sound/sampled"/>
                <path name="javax/sound/sampled/spi"/>
                <path name="javax/sql"/>
                <path name="javax/sql/rowset"/>
                <path name="javax/sql/rowset/serial"/>
                <path name="javax/sql/rowset/spi"/>
                <path name="javax/swing"/>
                <path name="javax/swing/border"/>
                <path name="javax/swing/colorchooser"/>
                <path name="javax/swing/event"/>
                <path name="javax/swing/filechooser"/>
                <path name="javax/swing/plaf"/>
                <path name="javax/swing/plaf/basic"/>
                <path name="javax/swing/plaf/metal"/>
                <path name="javax/swing/plaf/multi"/>
                <path name="javax/swing/plaf/nimbus"/>
                <path name="javax/swing/plaf/synth"/>
                <path name="javax/swing/table"/>
                <path name="javax/swing/text"/>
                <path name="javax/swing/text/html"/>
                <path name="javax/swing/text/html/parser"/>
                <path name="javax/swing/text/rtf"/>
                <path name="javax/swing/tree"/>
                <path name="javax/swing/undo"/>
                <path name="javax/tools"/>
                <path name="javax/xml"/>
                <path name="javax/xml/datatype"/>
                <path name="javax/xml/namespace"/>
                <path name="javax/xml/parsers"/>
                <path name="javax/xml/stream"/>
                <path name="javax/xml/stream/events"/>
                <path name="javax/xml/stream/util"/>
                <path name="javax/xml/transform"/>
                <path name="javax/xml/transform/dom"/>
                <path name="javax/xml/transform/sax"/>
                <path name="javax/xml/transform/stax"/>
                <path name="javax/xml/transform/stream"/>
                <path name="javax/xml/validation"/>
                <path name="javax/xml/xpath"/>
                <path name="org/ietf/jgss"/>
                <path name="org/w3c/dom"/>
                <path name="org/w3c/dom/bootstrap"/>
                <path name="org/w3c/dom/css"/>
                <path name="org/w3c/dom/events"/>
                <path name="org/w3c/dom/html"/>
                <path name="org/w3c/dom/ranges"/>
                <path name="org/w3c/dom/stylesheets"/>
                <path name="org/w3c/dom/traversal"/>
                <path name="org/w3c/dom/ls"/>
                <path name="org/w3c/dom/xpath"/>
                <path name="org/xml/sax"/>
                <path name="org/xml/sax/ext"/>
                <path name="org/xml/sax/helpers"/>
            </paths>
        </system>
    </dependencies>
</module>
Skywalker:main alesj$


On Dec 7, 2011, at 2:31 PM, Bill Burke wrote:

> Weird, a user is getting NCDFE for javax/net/ssl/SSLSocketFactory, any
> ideas why?
>
> -------- Original Message --------
> Subject: [Resteasy-developers] Resteasy client with https in Jboss 7
> Date: Tue, 06 Dec 2011 11:23:55 -0300
> From: Fabricio Lemos <[hidden email]>
> To: [hidden email]
>
> Is it possible to use resteasy client with https in Jboss 7?
>
> This code works with a standalone Java application:
>
> System.out.println(new ClientRequest(MyHttpsURL).get().getStatus());
>
> but fails with Jboss 7.0.1 and 7.1.0.Beta1
>
> My certification is imported with the args:
> -Djavax.net.ssl.trustStoreType=jks
> -Djavax.net.ssl.trustStore=D:\java\certificados\cacert
> -Djavax.net.debug=ssl -Djavax.net.ssl.trustStorePassword=myPswd
>
> I assume the certification is being imported correctly because
> HttpsURLConnection conn = (HttpsURLConnection) url.openConnection()
> works with both standalone and a deployed client
>
> The error with resteasy client in Jboss 7 is this:
>
> 10:47:54,410 BOM
> [javax.enterprise.resource.webcontainer.jsf.application]
> (http--127.0.0.1-8080-2) processAction(j_idt4)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) Java version: 1.6.0_25
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) Java vendor: Sun Microsystems Inc.
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) Java class path:
> D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\jboss-modules.jar
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) Operating system name: Windows XP
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) Operating system architecture: x86
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) Operating system version: 5.1
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) jboss-sasl 1.0: JBoss SASL Provider 1.0.0.Beta6
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SUN 1.6: SUN (DSA key/parameter generation; DSA
> signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS
> keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection
> CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunRsaSign 1.5: Sun RSA signature provider
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunJSSE 1.6: Sun JSSE provider(PKCS12, SunX509
> key/trust factories, SSLv3, TLSv1)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunJCE 1.6: SunJCE Provider (implements RSA,
> DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunJGSS 1.0: Sun (Kerberos v5, SPNEGO)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunSASL 1.5: Sun SASL provider(implements
> client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5;
> server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) XMLDSig 1.0: XMLDSig (DOM XMLSignatureFactory;
> DOM KeyInfoFactory)
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunPCSC 1.6: Sun PC/SC provider
> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
> (http--127.0.0.1-8080-2) SunMSCAPI 1.6: Sun's Microsoft Crypto API provider
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.useragent = Jakarta
> Commons-HttpClient/3.1
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.protocol.version = HTTP/1.1
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.connection-manager.class =
> class org.apache.commons.httpclient.SimpleHttpConnectionManager
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.protocol.cookie-policy = default
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.protocol.element-charset =
> US-ASCII
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.protocol.content-charset =
> ISO-8859-1
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.method.retry-handler =
> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1e8e6aa
> 10:47:54,676 DEBUG
> [org.apache.commons.httpclient.params.DefaultHttpParams]
> (http--127.0.0.1-8080-2) Set parameter http.dateparser.patterns = [EEE,
> dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d
> HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z,
> EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy
> HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd
> MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z,
> EEE, dd-MM-yyyy HH:mm:ss z]
> 10:47:55,129 INFO  [br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS]
> (http--127.0.0.1-8080-2) URI de autenticação no Astra :
> https://dese2.sefaz.ce.gov.br/sisseg-jee-ws/resource/autenticacao/?siglaSistema=testeplat&auth=208313741943058386f7b9bac1a357a10c8578088dfeb8d386f7b9bac1a3&key=070187211039071227070245078107199218194197049193157064020242196241001233243171101043040164120209
> 10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
> (http--127.0.0.1-8080-2) Open connection to dese2.sefaz.ce.gov.br:443
> 10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
> (http--127.0.0.1-8080-2) Releasing connection back to connection manager.
> 10:47:55,207 BOM
> [javax.enterprise.resource.webcontainer.jsf.application]
> (http--127.0.0.1-8080-2) java.lang.NoClassDefFoundError:
> javax/net/ssl/SSLSocketFactory: javax.faces.el.EvaluationException:
> java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
>      at
> org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:58)
>
> [seam-faces-3.0.0.Final.jar:]
>      at
> com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
>
> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>      at
> org.jboss.seam.faces.component.UIViewAction.broadcast(UIViewAction.java:365)
>
> [seam-faces-3.0.0.Final.jar:]
>      at
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
> [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>      at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>      at
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
>
> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>      at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
> [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>      at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
>
> [weld-core-1.1.4.Final.jar:]
>      at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)
>
> [jboss-as-web-7.1.0.Beta1.jar:]
>      at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
>
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
> [jbossweb-7.0.3.Final.jar:]
>      at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
> Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
>      at
> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)
>
> [commons-httpclient-3.1.jar:]
>      at
> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)
>
> [commons-httpclient-3.1.jar:]
>      at
> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
> [commons-httpclient-3.1.jar:]
>      at
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
>
> [commons-httpclient-3.1.jar:]
>      at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>
> [commons-httpclient-3.1.jar:]
>      at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> [commons-httpclient-3.1.jar:]
>      at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
> [commons-httpclient-3.1.jar:]
>      at
> org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor.execute(ApacheHttpClientExecutor.java:81)
>
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
>
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
>
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
>
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:473)
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:704)
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:509)
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:537)
> [resteasy-jaxrs-2.2.3.GA.jar:]
>      at
> br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS.autenticarUsuario(RestEasyAstraWS.java:30)
>
> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>      at
> br.gov.ce.sefaz.jee.intranet.AutenticadorAstra.authenticate(AutenticadorAstra.java:52)
>
> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>      at
> br.gov.ce.sefaz.jee.intranet.AutenticadorAstra$Proxy$_$$_WeldClientProxy.authenticate(AutenticadorAstra$Proxy$_$$_WeldClientProxy.java)
>
> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>      at
> org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:305)
> [seam-security-3.0.0.Final.jar:]
>      at
> org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:229)
> [seam-security-3.0.0.Final.jar:]
>      at
> org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java)
>
> [seam-security-3.0.0.Final.jar:]
>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [:1.6.0_25]
>      at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> [:1.6.0_25]
>      at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> [:1.6.0_25]
>      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_25]
>      at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
> [jbossweb-7.0.3.Final.jar:]
>      at
> org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
>
> [weld-core-1.1.4.Final.jar:]
>      at
> org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
> [weld-core-1.1.4.Final.jar:]
>      at
> com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
>
> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>      at
> org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:48)
>
> [seam-faces-3.0.0.Final.jar:]
>      ... 24 more
> Caused by: java.lang.ClassNotFoundException:
> javax.net.ssl.SSLSocketFactory from [Module
> "org.apache.commons.httpclient:main" from local module loader @542529
> (roots: D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\modules)]
>      at
> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
>      at
> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
>      at
> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
>      at
> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
>      at
> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
>      ... 55 more
>
> thanks in advance,
> Fabrício Lemos
>
> ------------------------------------------------------------------------------
> Cloud Services Checklist: Pricing and Packaging Optimization
> This white paper is intended to serve as a reference, checklist and
> point of
> discussion for anyone considering optimizing the pricing and packaging
> model
> of a cloud services business. Read Now!
> http://www.accelacomm.com/jaw/sfnl/114/51491232/
> _______________________________________________
> Resteasy-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError

jtgreene
Administrator
He must have created a "org.apache.commons.httpclient:main" module.
That's the one missing the javax.api dependency.

On 12/7/11 7:42 AM, Ales Justin wrote:

> He is probably missing dependency on javax.api module:
>
> Skywalker:main alesj$ pwd
> /Users/alesj/java_lib/jboss-as-7.1.0.Beta1/modules/javax/api/main
> Skywalker:main alesj$ cat module.xml
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!--
>    ~ JBoss, Home of Professional Open Source.
>    ~ Copyright 2010, Red Hat, Inc., and individual contributors
>    ~ as indicated by the @author tags. See the copyright.txt file in the
>    ~ distribution for a full listing of individual contributors.
>    ~
>    ~ This is free software; you can redistribute it and/or modify it
>    ~ under the terms of the GNU Lesser General Public License as
>    ~ published by the Free Software Foundation; either version 2.1 of
>    ~ the License, or (at your option) any later version.
>    ~
>    ~ This software is distributed in the hope that it will be useful,
>    ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
>    ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>    ~ Lesser General Public License for more details.
>    ~
>    ~ You should have received a copy of the GNU Lesser General Public
>    ~ License along with this software; if not, write to the Free
>    ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
>    ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
>    -->
> <module xmlns="urn:jboss:module:1.1" name="javax.api">
>      <dependencies>
>          <system export="true">
>              <paths>
>                  <path name="javax/accessibility"/>
>                  <path name="javax/activity"/>
>                  <path name="javax/crypto"/>
>                  <path name="javax/crypto/interfaces"/>
>                  <path name="javax/crypto/spec"/>
>                  <path name="javax/imageio"/>
>                  <path name="javax/imageio/event"/>
>                  <path name="javax/imageio/metadata"/>
>                  <path name="javax/imageio/plugins/bmp"/>
>                  <path name="javax/imageio/plugins/jpeg"/>
>                  <path name="javax/imageio/spi"/>
>                  <path name="javax/imageio/stream"/>
>                  <path name="javax/lang/model"/>
>                  <path name="javax/lang/model/element"/>
>                  <path name="javax/lang/model/type"/>
>                  <path name="javax/lang/model/util"/>
>                  <path name="javax/management"/>
>                  <path name="javax/management/loading"/>
>                  <path name="javax/management/modelmbean"/>
>                  <path name="javax/management/monitor"/>
>                  <path name="javax/management/openmbean"/>
>                  <path name="javax/management/relation"/>
>                  <path name="javax/management/remote"/>
>                  <path name="javax/management/remote/rmi"/>
>                  <path name="javax/management/timer"/>
>                  <path name="javax/naming"/>
>                  <path name="javax/naming/directory"/>
>                  <path name="javax/naming/event"/>
>                  <path name="javax/naming/ldap"/>
>                  <path name="javax/naming/spi"/>
>                  <path name="javax/net"/>
>                  <path name="javax/net/ssl"/>
>                  <path name="javax/print"/>
>                  <path name="javax/print/attribute"/>
>                  <path name="javax/print/attribute/standard"/>
>                  <path name="javax/print/event"/>
>                  <path name="javax/rmi/ssl"/>
>                  <path name="javax/script"/>
>                  <path name="javax/security/auth"/>
>                  <path name="javax/security/auth/callback"/>
>                  <path name="javax/security/auth/kerberos"/>
>                  <path name="javax/security/auth/login"/>
>                  <path name="javax/security/auth/spi"/>
>                  <path name="javax/security/auth/x500"/>
>                  <path name="javax/security/cert"/>
>                  <path name="javax/security/sasl"/>
>                  <path name="javax/sound/midi"/>
>                  <path name="javax/sound/midi/spi"/>
>                  <path name="javax/sound/sampled"/>
>                  <path name="javax/sound/sampled/spi"/>
>                  <path name="javax/sql"/>
>                  <path name="javax/sql/rowset"/>
>                  <path name="javax/sql/rowset/serial"/>
>                  <path name="javax/sql/rowset/spi"/>
>                  <path name="javax/swing"/>
>                  <path name="javax/swing/border"/>
>                  <path name="javax/swing/colorchooser"/>
>                  <path name="javax/swing/event"/>
>                  <path name="javax/swing/filechooser"/>
>                  <path name="javax/swing/plaf"/>
>                  <path name="javax/swing/plaf/basic"/>
>                  <path name="javax/swing/plaf/metal"/>
>                  <path name="javax/swing/plaf/multi"/>
>                  <path name="javax/swing/plaf/nimbus"/>
>                  <path name="javax/swing/plaf/synth"/>
>                  <path name="javax/swing/table"/>
>                  <path name="javax/swing/text"/>
>                  <path name="javax/swing/text/html"/>
>                  <path name="javax/swing/text/html/parser"/>
>                  <path name="javax/swing/text/rtf"/>
>                  <path name="javax/swing/tree"/>
>                  <path name="javax/swing/undo"/>
>                  <path name="javax/tools"/>
>                  <path name="javax/xml"/>
>                  <path name="javax/xml/datatype"/>
>                  <path name="javax/xml/namespace"/>
>                  <path name="javax/xml/parsers"/>
>                  <path name="javax/xml/stream"/>
>                  <path name="javax/xml/stream/events"/>
>                  <path name="javax/xml/stream/util"/>
>                  <path name="javax/xml/transform"/>
>                  <path name="javax/xml/transform/dom"/>
>                  <path name="javax/xml/transform/sax"/>
>                  <path name="javax/xml/transform/stax"/>
>                  <path name="javax/xml/transform/stream"/>
>                  <path name="javax/xml/validation"/>
>                  <path name="javax/xml/xpath"/>
>                  <path name="org/ietf/jgss"/>
>                  <path name="org/w3c/dom"/>
>                  <path name="org/w3c/dom/bootstrap"/>
>                  <path name="org/w3c/dom/css"/>
>                  <path name="org/w3c/dom/events"/>
>                  <path name="org/w3c/dom/html"/>
>                  <path name="org/w3c/dom/ranges"/>
>                  <path name="org/w3c/dom/stylesheets"/>
>                  <path name="org/w3c/dom/traversal"/>
>                  <path name="org/w3c/dom/ls"/>
>                  <path name="org/w3c/dom/xpath"/>
>                  <path name="org/xml/sax"/>
>                  <path name="org/xml/sax/ext"/>
>                  <path name="org/xml/sax/helpers"/>
>              </paths>
>          </system>
>      </dependencies>
> </module>
> Skywalker:main alesj$
>
>
> On Dec 7, 2011, at 2:31 PM, Bill Burke wrote:
>
>> Weird, a user is getting NCDFE for javax/net/ssl/SSLSocketFactory, any
>> ideas why?
>>
>> -------- Original Message --------
>> Subject: [Resteasy-developers] Resteasy client with https in Jboss 7
>> Date: Tue, 06 Dec 2011 11:23:55 -0300
>> From: Fabricio Lemos<[hidden email]>
>> To: [hidden email]
>>
>> Is it possible to use resteasy client with https in Jboss 7?
>>
>> This code works with a standalone Java application:
>>
>> System.out.println(new ClientRequest(MyHttpsURL).get().getStatus());
>>
>> but fails with Jboss 7.0.1 and 7.1.0.Beta1
>>
>> My certification is imported with the args:
>> -Djavax.net.ssl.trustStoreType=jks
>> -Djavax.net.ssl.trustStore=D:\java\certificados\cacert
>> -Djavax.net.debug=ssl -Djavax.net.ssl.trustStorePassword=myPswd
>>
>> I assume the certification is being imported correctly because
>> HttpsURLConnection conn = (HttpsURLConnection) url.openConnection()
>> works with both standalone and a deployed client
>>
>> The error with resteasy client in Jboss 7 is this:
>>
>> 10:47:54,410 BOM
>> [javax.enterprise.resource.webcontainer.jsf.application]
>> (http--127.0.0.1-8080-2) processAction(j_idt4)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Java version: 1.6.0_25
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Java vendor: Sun Microsystems Inc.
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Java class path:
>> D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\jboss-modules.jar
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Operating system name: Windows XP
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Operating system architecture: x86
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Operating system version: 5.1
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) jboss-sasl 1.0: JBoss SASL Provider 1.0.0.Beta6
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SUN 1.6: SUN (DSA key/parameter generation; DSA
>> signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS
>> keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection
>> CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunRsaSign 1.5: Sun RSA signature provider
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunJSSE 1.6: Sun JSSE provider(PKCS12, SunX509
>> key/trust factories, SSLv3, TLSv1)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunJCE 1.6: SunJCE Provider (implements RSA,
>> DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunJGSS 1.0: Sun (Kerberos v5, SPNEGO)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunSASL 1.5: Sun SASL provider(implements
>> client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5;
>> server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) XMLDSig 1.0: XMLDSig (DOM XMLSignatureFactory;
>> DOM KeyInfoFactory)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunPCSC 1.6: Sun PC/SC provider
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunMSCAPI 1.6: Sun's Microsoft Crypto API provider
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.useragent = Jakarta
>> Commons-HttpClient/3.1
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.version = HTTP/1.1
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.connection-manager.class =
>> class org.apache.commons.httpclient.SimpleHttpConnectionManager
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.cookie-policy = default
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.element-charset =
>> US-ASCII
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.content-charset =
>> ISO-8859-1
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.method.retry-handler =
>> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1e8e6aa
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.dateparser.patterns = [EEE,
>> dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d
>> HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z,
>> EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy
>> HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd
>> MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z,
>> EEE, dd-MM-yyyy HH:mm:ss z]
>> 10:47:55,129 INFO  [br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS]
>> (http--127.0.0.1-8080-2) URI de autenticação no Astra :
>> https://dese2.sefaz.ce.gov.br/sisseg-jee-ws/resource/autenticacao/?siglaSistema=testeplat&auth=208313741943058386f7b9bac1a357a10c8578088dfeb8d386f7b9bac1a3&key=070187211039071227070245078107199218194197049193157064020242196241001233243171101043040164120209
>> 10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
>> (http--127.0.0.1-8080-2) Open connection to dese2.sefaz.ce.gov.br:443
>> 10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
>> (http--127.0.0.1-8080-2) Releasing connection back to connection manager.
>> 10:47:55,207 BOM
>> [javax.enterprise.resource.webcontainer.jsf.application]
>> (http--127.0.0.1-8080-2) java.lang.NoClassDefFoundError:
>> javax/net/ssl/SSLSocketFactory: javax.faces.el.EvaluationException:
>> java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
>>       at
>> org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:58)
>>
>> [seam-faces-3.0.0.Final.jar:]
>>       at
>> com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
>>
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at
>> org.jboss.seam.faces.component.UIViewAction.broadcast(UIViewAction.java:365)
>>
>> [seam-faces-3.0.0.Final.jar:]
>>       at
>> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
>> [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>>       at
>> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>>       at
>> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
>>
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at
>> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
>> [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
>>
>> [weld-core-1.1.4.Final.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)
>>
>> [jboss-as-web-7.1.0.Beta1.jar:]
>>       at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
>> [jbossweb-7.0.3.Final.jar:]
>>       at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
>> Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
>>       at
>> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor.execute(ApacheHttpClientExecutor.java:81)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:473)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:704)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:509)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:537)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS.autenticarUsuario(RestEasyAstraWS.java:30)
>>
>> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>>       at
>> br.gov.ce.sefaz.jee.intranet.AutenticadorAstra.authenticate(AutenticadorAstra.java:52)
>>
>> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>>       at
>> br.gov.ce.sefaz.jee.intranet.AutenticadorAstra$Proxy$_$$_WeldClientProxy.authenticate(AutenticadorAstra$Proxy$_$$_WeldClientProxy.java)
>>
>> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>>       at
>> org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:305)
>> [seam-security-3.0.0.Final.jar:]
>>       at
>> org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:229)
>> [seam-security-3.0.0.Final.jar:]
>>       at
>> org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java)
>>
>> [seam-security-3.0.0.Final.jar:]
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [:1.6.0_25]
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> [:1.6.0_25]
>>       at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> [:1.6.0_25]
>>       at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_25]
>>       at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
>>
>> [weld-core-1.1.4.Final.jar:]
>>       at
>> org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
>> [weld-core-1.1.4.Final.jar:]
>>       at
>> com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
>>
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at
>> org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:48)
>>
>> [seam-faces-3.0.0.Final.jar:]
>>       ... 24 more
>> Caused by: java.lang.ClassNotFoundException:
>> javax.net.ssl.SSLSocketFactory from [Module
>> "org.apache.commons.httpclient:main" from local module loader @542529
>> (roots: D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\modules)]
>>       at
>> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
>>       ... 55 more
>>
>> thanks in advance,
>> Fabrício Lemos
>>
>> ------------------------------------------------------------------------------
>> Cloud Services Checklist: Pricing and Packaging Optimization
>> This white paper is intended to serve as a reference, checklist and
>> point of
>> discussion for anyone considering optimizing the pricing and packaging
>> model
>> of a cloud services business. Read Now!
>> http://www.accelacomm.com/jaw/sfnl/114/51491232/
>> _______________________________________________
>> Resteasy-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError

Bill Burke
In reply to this post by Ales Justin
This is what I don't like about AS7.  While every other JBoss version
was include everything, AS7 is exclude everything by default and you
must be explicit.

Wouldn't the general case be to include everything, with exclude being
the minor case?

On 12/7/11 8:42 AM, Ales Justin wrote:

> He is probably missing dependency on javax.api module:
>
> Skywalker:main alesj$ pwd
> /Users/alesj/java_lib/jboss-as-7.1.0.Beta1/modules/javax/api/main
> Skywalker:main alesj$ cat module.xml
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!--
>    ~ JBoss, Home of Professional Open Source.
>    ~ Copyright 2010, Red Hat, Inc., and individual contributors
>    ~ as indicated by the @author tags. See the copyright.txt file in the
>    ~ distribution for a full listing of individual contributors.
>    ~
>    ~ This is free software; you can redistribute it and/or modify it
>    ~ under the terms of the GNU Lesser General Public License as
>    ~ published by the Free Software Foundation; either version 2.1 of
>    ~ the License, or (at your option) any later version.
>    ~
>    ~ This software is distributed in the hope that it will be useful,
>    ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
>    ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>    ~ Lesser General Public License for more details.
>    ~
>    ~ You should have received a copy of the GNU Lesser General Public
>    ~ License along with this software; if not, write to the Free
>    ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
>    ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
>    -->
> <module xmlns="urn:jboss:module:1.1" name="javax.api">
>      <dependencies>
>          <system export="true">
>              <paths>
>                  <path name="javax/accessibility"/>
>                  <path name="javax/activity"/>
>                  <path name="javax/crypto"/>
>                  <path name="javax/crypto/interfaces"/>
>                  <path name="javax/crypto/spec"/>
>                  <path name="javax/imageio"/>
>                  <path name="javax/imageio/event"/>
>                  <path name="javax/imageio/metadata"/>
>                  <path name="javax/imageio/plugins/bmp"/>
>                  <path name="javax/imageio/plugins/jpeg"/>
>                  <path name="javax/imageio/spi"/>
>                  <path name="javax/imageio/stream"/>
>                  <path name="javax/lang/model"/>
>                  <path name="javax/lang/model/element"/>
>                  <path name="javax/lang/model/type"/>
>                  <path name="javax/lang/model/util"/>
>                  <path name="javax/management"/>
>                  <path name="javax/management/loading"/>
>                  <path name="javax/management/modelmbean"/>
>                  <path name="javax/management/monitor"/>
>                  <path name="javax/management/openmbean"/>
>                  <path name="javax/management/relation"/>
>                  <path name="javax/management/remote"/>
>                  <path name="javax/management/remote/rmi"/>
>                  <path name="javax/management/timer"/>
>                  <path name="javax/naming"/>
>                  <path name="javax/naming/directory"/>
>                  <path name="javax/naming/event"/>
>                  <path name="javax/naming/ldap"/>
>                  <path name="javax/naming/spi"/>
>                  <path name="javax/net"/>
>                  <path name="javax/net/ssl"/>
>                  <path name="javax/print"/>
>                  <path name="javax/print/attribute"/>
>                  <path name="javax/print/attribute/standard"/>
>                  <path name="javax/print/event"/>
>                  <path name="javax/rmi/ssl"/>
>                  <path name="javax/script"/>
>                  <path name="javax/security/auth"/>
>                  <path name="javax/security/auth/callback"/>
>                  <path name="javax/security/auth/kerberos"/>
>                  <path name="javax/security/auth/login"/>
>                  <path name="javax/security/auth/spi"/>
>                  <path name="javax/security/auth/x500"/>
>                  <path name="javax/security/cert"/>
>                  <path name="javax/security/sasl"/>
>                  <path name="javax/sound/midi"/>
>                  <path name="javax/sound/midi/spi"/>
>                  <path name="javax/sound/sampled"/>
>                  <path name="javax/sound/sampled/spi"/>
>                  <path name="javax/sql"/>
>                  <path name="javax/sql/rowset"/>
>                  <path name="javax/sql/rowset/serial"/>
>                  <path name="javax/sql/rowset/spi"/>
>                  <path name="javax/swing"/>
>                  <path name="javax/swing/border"/>
>                  <path name="javax/swing/colorchooser"/>
>                  <path name="javax/swing/event"/>
>                  <path name="javax/swing/filechooser"/>
>                  <path name="javax/swing/plaf"/>
>                  <path name="javax/swing/plaf/basic"/>
>                  <path name="javax/swing/plaf/metal"/>
>                  <path name="javax/swing/plaf/multi"/>
>                  <path name="javax/swing/plaf/nimbus"/>
>                  <path name="javax/swing/plaf/synth"/>
>                  <path name="javax/swing/table"/>
>                  <path name="javax/swing/text"/>
>                  <path name="javax/swing/text/html"/>
>                  <path name="javax/swing/text/html/parser"/>
>                  <path name="javax/swing/text/rtf"/>
>                  <path name="javax/swing/tree"/>
>                  <path name="javax/swing/undo"/>
>                  <path name="javax/tools"/>
>                  <path name="javax/xml"/>
>                  <path name="javax/xml/datatype"/>
>                  <path name="javax/xml/namespace"/>
>                  <path name="javax/xml/parsers"/>
>                  <path name="javax/xml/stream"/>
>                  <path name="javax/xml/stream/events"/>
>                  <path name="javax/xml/stream/util"/>
>                  <path name="javax/xml/transform"/>
>                  <path name="javax/xml/transform/dom"/>
>                  <path name="javax/xml/transform/sax"/>
>                  <path name="javax/xml/transform/stax"/>
>                  <path name="javax/xml/transform/stream"/>
>                  <path name="javax/xml/validation"/>
>                  <path name="javax/xml/xpath"/>
>                  <path name="org/ietf/jgss"/>
>                  <path name="org/w3c/dom"/>
>                  <path name="org/w3c/dom/bootstrap"/>
>                  <path name="org/w3c/dom/css"/>
>                  <path name="org/w3c/dom/events"/>
>                  <path name="org/w3c/dom/html"/>
>                  <path name="org/w3c/dom/ranges"/>
>                  <path name="org/w3c/dom/stylesheets"/>
>                  <path name="org/w3c/dom/traversal"/>
>                  <path name="org/w3c/dom/ls"/>
>                  <path name="org/w3c/dom/xpath"/>
>                  <path name="org/xml/sax"/>
>                  <path name="org/xml/sax/ext"/>
>                  <path name="org/xml/sax/helpers"/>
>              </paths>
>          </system>
>      </dependencies>
> </module>
> Skywalker:main alesj$
>
>
> On Dec 7, 2011, at 2:31 PM, Bill Burke wrote:
>
>> Weird, a user is getting NCDFE for javax/net/ssl/SSLSocketFactory, any
>> ideas why?
>>
>> -------- Original Message --------
>> Subject: [Resteasy-developers] Resteasy client with https in Jboss 7
>> Date: Tue, 06 Dec 2011 11:23:55 -0300
>> From: Fabricio Lemos<[hidden email]>
>> To: [hidden email]
>>
>> Is it possible to use resteasy client with https in Jboss 7?
>>
>> This code works with a standalone Java application:
>>
>> System.out.println(new ClientRequest(MyHttpsURL).get().getStatus());
>>
>> but fails with Jboss 7.0.1 and 7.1.0.Beta1
>>
>> My certification is imported with the args:
>> -Djavax.net.ssl.trustStoreType=jks
>> -Djavax.net.ssl.trustStore=D:\java\certificados\cacert
>> -Djavax.net.debug=ssl -Djavax.net.ssl.trustStorePassword=myPswd
>>
>> I assume the certification is being imported correctly because
>> HttpsURLConnection conn = (HttpsURLConnection) url.openConnection()
>> works with both standalone and a deployed client
>>
>> The error with resteasy client in Jboss 7 is this:
>>
>> 10:47:54,410 BOM
>> [javax.enterprise.resource.webcontainer.jsf.application]
>> (http--127.0.0.1-8080-2) processAction(j_idt4)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Java version: 1.6.0_25
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Java vendor: Sun Microsystems Inc.
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Java class path:
>> D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\jboss-modules.jar
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Operating system name: Windows XP
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Operating system architecture: x86
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) Operating system version: 5.1
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) jboss-sasl 1.0: JBoss SASL Provider 1.0.0.Beta6
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SUN 1.6: SUN (DSA key/parameter generation; DSA
>> signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS
>> keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection
>> CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunRsaSign 1.5: Sun RSA signature provider
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunJSSE 1.6: Sun JSSE provider(PKCS12, SunX509
>> key/trust factories, SSLv3, TLSv1)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunJCE 1.6: SunJCE Provider (implements RSA,
>> DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunJGSS 1.0: Sun (Kerberos v5, SPNEGO)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunSASL 1.5: Sun SASL provider(implements
>> client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5;
>> server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) XMLDSig 1.0: XMLDSig (DOM XMLSignatureFactory;
>> DOM KeyInfoFactory)
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunPCSC 1.6: Sun PC/SC provider
>> 10:47:54,660 DEBUG [org.apache.commons.httpclient.HttpClient]
>> (http--127.0.0.1-8080-2) SunMSCAPI 1.6: Sun's Microsoft Crypto API provider
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.useragent = Jakarta
>> Commons-HttpClient/3.1
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.version = HTTP/1.1
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.connection-manager.class =
>> class org.apache.commons.httpclient.SimpleHttpConnectionManager
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.cookie-policy = default
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.element-charset =
>> US-ASCII
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.protocol.content-charset =
>> ISO-8859-1
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.method.retry-handler =
>> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1e8e6aa
>> 10:47:54,676 DEBUG
>> [org.apache.commons.httpclient.params.DefaultHttpParams]
>> (http--127.0.0.1-8080-2) Set parameter http.dateparser.patterns = [EEE,
>> dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d
>> HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z,
>> EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy
>> HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd
>> MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z,
>> EEE, dd-MM-yyyy HH:mm:ss z]
>> 10:47:55,129 INFO  [br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS]
>> (http--127.0.0.1-8080-2) URI de autenticação no Astra :
>> https://dese2.sefaz.ce.gov.br/sisseg-jee-ws/resource/autenticacao/?siglaSistema=testeplat&auth=208313741943058386f7b9bac1a357a10c8578088dfeb8d386f7b9bac1a3&key=070187211039071227070245078107199218194197049193157064020242196241001233243171101043040164120209
>> 10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
>> (http--127.0.0.1-8080-2) Open connection to dese2.sefaz.ce.gov.br:443
>> 10:47:55,207 DEBUG [org.apache.commons.httpclient.HttpConnection]
>> (http--127.0.0.1-8080-2) Releasing connection back to connection manager.
>> 10:47:55,207 BOM
>> [javax.enterprise.resource.webcontainer.jsf.application]
>> (http--127.0.0.1-8080-2) java.lang.NoClassDefFoundError:
>> javax/net/ssl/SSLSocketFactory: javax.faces.el.EvaluationException:
>> java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
>>       at
>> org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:58)
>>
>> [seam-faces-3.0.0.Final.jar:]
>>       at
>> com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
>>
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at
>> org.jboss.seam.faces.component.UIViewAction.broadcast(UIViewAction.java:365)
>>
>> [seam-faces-3.0.0.Final.jar:]
>>       at
>> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
>> [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>>       at
>> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>>       at
>> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
>>
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at
>> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
>> [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
>>
>> [weld-core-1.1.4.Final.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)
>>
>> [jboss-as-web-7.1.0.Beta1.jar:]
>>       at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
>>
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
>> [jbossweb-7.0.3.Final.jar:]
>>       at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
>> Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocketFactory
>>       at
>> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>>
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>> [commons-httpclient-3.1.jar:]
>>       at
>> org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor.execute(ApacheHttpClientExecutor.java:81)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
>>
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:473)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:704)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:509)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:537)
>> [resteasy-jaxrs-2.2.3.GA.jar:]
>>       at
>> br.gov.ce.sefaz.jee.intranet.RestEasyAstraWS.autenticarUsuario(RestEasyAstraWS.java:30)
>>
>> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>>       at
>> br.gov.ce.sefaz.jee.intranet.AutenticadorAstra.authenticate(AutenticadorAstra.java:52)
>>
>> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>>       at
>> br.gov.ce.sefaz.jee.intranet.AutenticadorAstra$Proxy$_$$_WeldClientProxy.authenticate(AutenticadorAstra$Proxy$_$$_WeldClientProxy.java)
>>
>> [jee-intranet-sefaz-0.0.3-SNAPSHOT.jar:]
>>       at
>> org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:305)
>> [seam-security-3.0.0.Final.jar:]
>>       at
>> org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:229)
>> [seam-security-3.0.0.Final.jar:]
>>       at
>> org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java)
>>
>> [seam-security-3.0.0.Final.jar:]
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [:1.6.0_25]
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> [:1.6.0_25]
>>       at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> [:1.6.0_25]
>>       at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_25]
>>       at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
>> [jbossweb-7.0.3.Final.jar:]
>>       at
>> org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
>>
>> [weld-core-1.1.4.Final.jar:]
>>       at
>> org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
>> [weld-core-1.1.4.Final.jar:]
>>       at
>> com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
>>
>> [jsf-impl-2.1.3-b02-jbossorg-2.jar:]
>>       at
>> org.jboss.seam.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:48)
>>
>> [seam-faces-3.0.0.Final.jar:]
>>       ... 24 more
>> Caused by: java.lang.ClassNotFoundException:
>> javax.net.ssl.SSLSocketFactory from [Module
>> "org.apache.commons.httpclient:main" from local module loader @542529
>> (roots: D:\java\servidores\jboss\jboss-as-7.1.0.Beta1\modules)]
>>       at
>> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
>>       at
>> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
>>       ... 55 more
>>
>> thanks in advance,
>> Fabrício Lemos
>>
>> ------------------------------------------------------------------------------
>> Cloud Services Checklist: Pricing and Packaging Optimization
>> This white paper is intended to serve as a reference, checklist and
>> point of
>> discussion for anyone considering optimizing the pricing and packaging
>> model
>> of a cloud services business. Read Now!
>> http://www.accelacomm.com/jaw/sfnl/114/51491232/
>> _______________________________________________
>> Resteasy-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>

--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError

jtgreene
Administrator
On 12/7/11 3:35 PM, Bill Burke wrote:
> This is what I don't like about AS7.  While every other JBoss version
> was include everything, AS7 is exclude everything by default and you
> must be explicit.
>
> Wouldn't the general case be to include everything, with exclude being
> the minor case?

Yes there are drawbacks but it's worth it (IMO). As we saw in the past,
including everything leads to "surprises" and slower classloading. An
opt out model has the sames problems because you are still vulnerable to
pulling in stuff you never intended. An app server update can readily
conflict with your deployments and/or modules. So you spend little time
up front, and potentially a lot of time later on down the road trying to
fix conflicts. An opt-in model though you spend a little more time up
front AND it makes you actually THINK about your dependencies, but your
chances of conflicts down the road become very slim.

There is of course some balance to be had, so in the case of EE
deployments we try to add a set of sensible imports (which can still be
opted out of). The goal is that a user only sucks in our supported APIs
and not whatever random thing we used to implement them. If however you
work with pure modules, as in this http client case, then you don't get
this particular feature (as doing it reuires understanding what the
module actually does, something known to us when its an EE deployment).
Of course they could have just added the http client jar to their
deployment, or they could have made it a global module, or used
class-path to an extrenal ref, or used extension-list. All of which
would get an SE sdk import.

What would make initial generation of modules easier, for those that
choose to use them, is if we had more tooling (contributions welcome
anyone who is listening). For example something that takes a maven dep
list and constructs a potential module definition.

One last thing to add is that Java SE itself is moving to an opt-in
model (Java modules). So really the days of the big-ball-of-mud approach
are numbered, or as Mark Reinhold put it "the classpath is dead".

--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: NoClassDefFoundError

Nicklas Karlsson
What would make initial generation of modules easier, for those that
choose to use them, is if we had more tooling (contributions welcome
anyone who is listening). For example something that takes a maven dep
list and constructs a potential module definition.


BTW there is a JIRA for something like that: https://issues.jboss.org/browse/AS7-1577

---
Nik

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev