Just for my remind.
https://svn.apache.org/repos/asf/cxf/
Buscar este blog
domingo, 22 de marzo de 2015
domingo, 8 de marzo de 2015
Export SpringBean as Servlet Context Attribute
Suppouse you have a bean callede "oneSpringBean" in your Root Application Context and you want to read it from a Servlet.
There are two solutions.
Simple way, when there is not context mess:
In the servlet you get the bean using WebApplicationContextUtils.getWebApplicationContext(getServletContext()).getBean("oneSpringBean")
Complex way, when you have custom context scopes:
In the servlet you get the bean using getServletContext().getAttribute("myAttribute")
There are two solutions.
Simple way, when there is not context mess:
In the servlet you get the bean using WebApplicationContextUtils.getWebApplicationContext(getServletContext()).getBean("oneSpringBean")
Complex way, when you have custom context scopes:
<bean class="org.springframework.web.context.support.ServletContextAttributeExporter"> <property name="attributes"> <map> <entry key="myAttribute" value-ref="oneSpringBean" /> </map> </property> </bean>
In the servlet you get the bean using getServletContext().getAttribute("myAttribute")
sábado, 7 de marzo de 2015
JBoss CLI enable SSL
Domain Mode, profile full-ha:
Standalone Mode:
Note. You can replace "/opt/jboss" (my jboss home dir) with "${jboss.home.dir}"
/profile=full-ha/subsystem=web/connector=HTTPS/:add(socket-binding=https,scheme=https,protocol=HTTP/1.1,secure=true) /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration:add(name=https) /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=certificate-key-file,value="/opt/jboss/domain/configuration/certificates/jboss_identity(1234).jks") /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=password,value="1234") /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=key-alias,value="jboss-identity") /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=keystore-type,value=jks) /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=certificate-file,value="/opt/jboss/domain/configuration/certificates/jboss_truststore(1234).jks") /profile=full-ha/subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=truststore-type,value=jks) /host=master/system-property="javax.net.ssl.trustStore":add(value="/opt/jboss/domain/configuration/certificates/jboss_truststore(1234).jks") /host=master/system-property="javax.net.ssl.trustStorePassword":add(value="1234")
Standalone Mode:
/subsystem=web/connector=HTTPS/:add(socket-binding=https,scheme=https,protocol=HTTP/1.1,secure=true) /subsystem=web/connector=HTTPS/ssl=configuration:add(name=https) /subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=certificate-key-file,value="/opt/jboss/standalone/configuration/certificates/jboss_identity(1234).jks") /subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=password,value="1234") /subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=key-alias,value="jboss-identity") /subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=keystore-type,value=jks) /subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=certificate-file,value="/opt/jboss/standalone/configuration/certificates/jboss_truststore(1234).jks") /subsystem=web/connector=HTTPS/ssl=configuration/:write-attribute(name=truststore-type,value=jks) /system-property="javax.net.ssl.trustStore":add(value="/opt/jboss/standalone/configuration/certificates/jboss_truststore(1234).jks") /system-property="javax.net.ssl.trustStorePassword":add(value="1234")
Note. You can replace "/opt/jboss" (my jboss home dir) with "${jboss.home.dir}"
mod_cluster + JBoss + SSL: Network is unreachable
Working with mod_cluster and SSL you can get this exception:
You need to set apache server (httpd) in the proxy list:
The error will not disapear, but at least apache will bind with JBoss and work propertly.
ERROR [org.jboss.modcluster] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) MODCLUSTER000043: Failed to send INFO to 255.255.255.255/255.255.255.255:443: java.net.ConnectException: Network is unreachable
at java.net.PlainSocketImpl.socketConnect(Native Method) [rt.jar:1.7.0_75]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) [rt.jar:1.7.0_75]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) [rt.jar:1.7.0_75]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) [rt.jar:1.7.0_75]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [rt.jar:1.7.0_75]
at java.net.Socket.connect(Socket.java:579) [rt.jar:1.7.0_75]
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625) [jsse.jar:1.7.0_75]
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnection(DefaultMCMPHandler.java:818)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnectionWriter(DefaultMCMPHandler.java:841)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:482)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:583)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:370)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:350)
at org.jboss.modcluster.ModClusterService.status(ModClusterService.java:458)
at org.jboss.modcluster.container.catalina.CatalinaEventHandlerAdapter.lifecycleEvent(CatalinaEventHandlerAdapter.java:249)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1323) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1588) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1574) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
You need to set apache server (httpd) in the proxy list:
The error will not disapear, but at least apache will bind with JBoss and work propertly.
miércoles, 18 de febrero de 2015
Maven WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
Este error se produce al intentar generar una aplicación que contiene servicios CXF.
Por ejemplo, al hacer el maven install del siguiente proyecto: https://svn.apache.org/repos/asf/cxf/tags/cxf-2.7.7/distribution/src/main/release/samples/sts/
Por ejemplo, al hacer el maven install del siguiente proyecto: https://svn.apache.org/repos/asf/cxf/tags/cxf-2.7.7/distribution/src/main/release/samples/sts/
Solución:
Es necesario borrar del repositorio local maven (.m2) los artefactos de org.codehaus.woodstox.
Suscribirse a:
Entradas (Atom)

