[Beginner's Corner] - Re: JBoss (Apr) jboss-native :: linux
by rbrtfreund
First. PeterJ - I can't tell you how much I appreciate you getting me headed in the right direction! Four days trying to get this setup... frustrated at best!
Anyway, I finally got what I was looking for with your help ... the output:
server.log
| 2009-11-30 22:02:58,133 DEBUG [org.apache.catalina.core.AprLifecycleListener] Loaded Apache Tomcat Native library 1.1.18.
| 2009-11-30 22:02:58,133 INFO [org.apache.catalina.core.AprLifecycleListener] APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
|
So.... to hopefully help out the next guy in my situation let me recap what I discovered...
Getting jboss-native(APR) setup in a linux environment.
1.) My Environment
Some people use a hosting provider who allows you to install JBoss. There are many out there who provide JBoss hosting and like myself I use one of these companies. Now... usually to install JBoss you click a button or follow a set of steps to get your JBoss version installed. My particular steps are to click a button and have JBoss installed. So I do that. Now... what happens? JBoss is installed, you can drop war's , ear's deploy etc... Fine for most. It removes you from having to know how it is set up (nuts + bolts) of your environment / hosting solution. What also is usually the case of these is that they run your JBoss through a wrapper and as a service. Probably some variation of http://wrapper.tanukisoftware.org/doc/english/download.jsp. (I say all this because I think my setup is like a lot who try to setup APR and have issues). Now when debugging why it doesn't work you have extra things (you may consider) when trying to find out why (and i'm no linux expert). So my environment by running (to keep this complete)
| uname -a
| Linux [yourdomain].com 2.6.18-028stab064.7 #1 SMP Wed Aug 26 13:11:07 MSD 2009 i686 i686 i386 GNU/Linux
|
Also note... It's a CentOS5 setup with jboss (version 4.2.3) running as a service existing at /opt/jboss4/
2.) Installing jboss-native (APR) support
So, back to our installing... Per Forums, Docs, Instructions etc... you get directed to http://www.jboss.org/jbossweb/downloads/jboss-native/?action=a&windowstat... to download a jboss-native package for your specific OS / platform. I download the jboss-native binaries - linux2 x86 package. After extraction you will get a directory tree like the following
jboss-native-2.0.8-linux2-x86-ssl
> bin
>native
>engines
>libarp-1.so
(etc...)
> licenses
jboss-native... or in this case bin/native needs to be placed in ${jboss.home}/bin. So following all the instructions, forums again I do this and it doesn't work. So now what?
3.) Here's what I did... (not sure really what it did but it works).
I placed the native directory in jboss/bin/ like told by forums and instructions.
Then I ran ldd native/libtcnative-1.so.
| ldd: warning: you do not have execution permission for `native/libtcnative-1.so'
| libssl.so.0.9.8 => not found
| libcrypto.so.0.9.8 => not found
| libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0xb7eee000)
| libuuid.so.1 => /lib/libuuid.so.1 (0xb7eea000)
| librt.so.1 => /lib/librt.so.1 (0xb7ee1000)
| libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7eb2000)
| libpthread.so.0 => /lib/libpthread.so.0 (0xb7e9b000)
| libdl.so.2 => /lib/libdl.so.2 (0xb7e97000)
| libc.so.6 => /lib/libc.so.6 (0xb7d57000)
| /lib/ld-linux.so.2 (0xb7f3c000)
|
This pointed me in the direction that libssl.so.0.9.8 and libcrypto.so.0.9.8 were not found. Not sure why? Anyway. So I followed the convention of the .so's that were found and placed libssl.so.0.9.8 and libcrypto.so.0.9.8 in the /usr/lib directory. Then I ran again the ldd native/libtcnative-1.so
| ldd: warning: you do not have execution permission for `native/libtcnative-1.so'
| libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7eb7000)
| libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7dbb000)
| libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0xb7d93000)
| libuuid.so.1 => /lib/libuuid.so.1 (0xb7d8f000)
| librt.so.1 => /lib/librt.so.1 (0xb7d86000)
| libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7d58000)
| libpthread.so.0 => /lib/libpthread.so.0 (0xb7d40000)
| libdl.so.2 => /lib/libdl.so.2 (0xb7d3c000)
| libc.so.6 => /lib/libc.so.6 (0xb7bfc000)
| /lib/ld-linux.so.2 (0xb7f14000)
|
As you can see now the two files were found. So thinking all is good I restart jboss4 and look at the output hoping to see
| 2009-11-30 22:02:58,133 DEBUG [org.apache.catalina.core.AprLifecycleListener] Loaded Apache Tomcat Native library 1.1.18.
|
and I didn't see it I still got...
| 2009-11-30 22:54:55,371 DEBUG [org.apache.catalina.core.AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jboss4/lib
|
Noting above that it was looking in java.library.path: /opt/jboss4/lib I copied all the libtcnative-1.so,libtcnative-1.so.0,libtcnative-1.so.0.1.18 into the /opt/jboss4/lib folder and restarted Jboss... This time I got what I was looking for
| 2009-11-30 22:56:30,083 DEBUG [org.apache.catalina.core.AprLifecycleListener] Loaded Apache Tomcat Native library 1.1.18.
| 2009-11-30 22:56:30,083 INFO [org.apache.catalina.core.AprLifecycleListener] APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
|
Not sure if this is the best way to get it working or even what all those changes did to make it work but hopefully it helps someone save some time.
A side note:
So developing my app is what I originally wanted to do.. Not all this config stuff. So back to the app. Here's a few notes I found when using APR setup like this on a hosting provider. use of mod_proxy and the like proved to work for me and not mod_jk. So if your using JKMount /* ajp13 it may not pick up.. or maybe just me but if so use mod_proxy variants instead.
Much love to the JBoss Forum users for getting back to developing!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268193#4268193
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268193
15 years
[JBoss Web Services Users] - Re: Newbie: Empty ArrayList Passed on WS Call
by gwzoller
Ok... I have 1/2 an answer. By playing with the annotations (brute force really) I can now get my list going over the wire, but... I lost my WSDL.
New Interface:
@WebService
| public interface OrderTakerRemote {
| public String msg(ArrayList<String> say);
| }
|
New Impl:
@Remote(OrderTakerRemote.class)
| @WebService(endpointInterface="com.kepler.ecom.services.OrderTakerRemote")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| @Stateless
| public class OrderTaker implements OrderTakerRemote {
|
| // Default constructor.
| public OrderTaker() {
| }
|
| @WebMethod
| public String msg(ArrayList<String> say) {
| // same as before
| }
| }
I'd rather annotate the interface, not the implementation but to get it working it's a minor quibble.
My larger problem is the WSDL. If I specify a simple @WebService (no endpoint parameter) in the impl then my WSDL looks something like this:
<definitions name="OrderTakerService" targetNamespace="http://ecom.kepler..com/">
| -
| <types>
| -
| <xs:schema targetNamespace="http://ecom.kepler.com/" version="1.0">
| <xs:element name="msg" type="tns:msg"/>
| <xs:element name="msgResponse" type="tns:msgResponse"/>
| -
| <xs:complexType name="msg">
| -
| <xs:sequence>
| <xs:element maxOccurs="unbounded" minOccurs="0" name="arg0" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| -
| <xs:complexType name="msgResponse">
| -
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| -
| <message name="OrderTaker_msg">
| <part element="tns:msg" name="msg"/>
| </message>
| -
| <message name="OrderTaker_msgResponse">
| <part element="tns:msgResponse" name="msgResponse"/>
| </message>
| -
| <portType name="OrderTaker">
| -
| <operation name="msg" parameterOrder="msg">
| <input message="tns:OrderTaker_msg"/>
| <output message="tns:OrderTaker_msgResponse"/>
| </operation>
| </portType>
| -
| <binding name="OrderTakerBinding" type="tns:OrderTaker">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| -
| <operation name="msg">
| <soap:operation soapAction=""/>
| -
| <input>
| <soap:body use="literal"/>
| </input>
| -
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| -
| <operation name="placeOrder_1_0">
| <soap:operation soapAction=""/>
| -
| <input>
| <soap:body use="literal"/>
| </input>
| -
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
| -
| <service name="OrderTakerService">
| -
| <port binding="tns:OrderTakerBinding" name="OrderTakerPort">
| <soap:address location="http://127.0.0.1:8080/keplerEAR-kepler/OrderTaker"/>
| </port>
| </service>
| </definitions>
As shown in this code (with the endpoint parameter) my WSDL looks like this:
<definitions name="OrderTakerService" targetNamespace="http://ecom.kepler.com/">
| <import location="http://127.0.0.1:8080/keplerEAR-kepler/OrderTaker?wsdl&resource=OrderTake..." namespace="http://services.ecom.kepler.aviall.com/"/>
| -
| <service name="OrderTakerService">
| -
| <port binding="ns1:OrderTakerRemoteBinding" name="OrderTakerPort">
| <soap:address location="http://127.0.0.1:8080/keplerEAR-kepler/OrderTaker"/>
| </port>
| </service>
| </definitions>
Somehow my Java client was fine with the abbreviated WSDL but I'm worried a non-Java client may need all the detail in the longer version. The annotation combo that gives me the longer (more complete?) WSDL doesn't let me pass my list. The short WSDL passes my list.
Any ideas what's going on? What happened to all the stuff that defined the method calls and the parameter types?
Any ideas appreciated! Confused newbie.
Greg
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268184#4268184
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268184
15 years
[Beginner's Corner] - Re: JBoss (Apr) jboss-native :: linux
by rbrtfreund
Thanks for the help! Still in the same situation. It doesn't seem to pick it up no matter how I try it.
| The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jboss4/lib
|
How can I check or set where it looks for libraries to load. It's obvious from all the forums/ blogs/ irc / etc... that something isn't being loaded. Didn't have this problem on win only on linux. Is there some way to debug what's going on with this better? I already enabled the apache debug which provides me this
| Caused by: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path, no libtcnative-1 in java.library.path(/opt/jboss4/lib)
| at org.apache.tomcat.jni.Library.<init>(Library.java:56)
| at org.apache.tomcat.jni.Library.initialize(Library.java:157)
| ... 116 more
|
but still in the same spot. Any more ideas on where(what) to check?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268174#4268174
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268174
15 years