[JBossWS] - Getting "java.lang.NoClassDefFoundError: javax/annotation/Po
by stattit
Hi,
AM trying to use the UsernameToken Profile in code and everything seems to be OK at the client side. Using tcpmon, I am able to see the <wsse:username> in the header. However at the server end, I am getting the following stack trace.
| 14:53:23,718 INFO [STDOUT] <org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/fsb-securityservice-1.0.0].[AuthenticationService]> <ERROR> ~ <Servlet.service() for servlet AuthenticationService threw exception>
| java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
| at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.callPostConstruct(HandlerResolverImpl.java:194)
| at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.addHandler(HandlerResolverImpl.java:160)
| at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.initHandlerChain(HandlerResolverImpl.java:134)
| at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:80)
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.callRequestHandlerChain(AbstractServiceEndpointInvoker.java:112)
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:162)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
| at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
Tcpmon output is
|
| POST /fsb-securityservice-1.0.0/AuthenticationService?datatype=JBossWSMessage HTTP/1.1
| Authorization: Basic Z29vZHVzZXI6Z29vZHBhc3N3b3Jk
| SOAPAction: "http://com.fsb.security/services/authentication/authenticateUser"
| Content-Type: text/xml; charset=UTF-8
| JBoss-Remoting-Version: 2
| User-Agent: JBossRemoting - 2.0.0 GA (Boon)
| Host: localhost:8000
| Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
| Connection: keep-alive
| Content-Length: 634
|
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header><wsse:Security env:mustUnderstand='1' xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext...' xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...'><wsse:UsernameToken wsu:Id='token-1-1178650403577-12437939'><wsse:Username>gooduser</wsse:Username><wsse:Password>goodpassword</wsse:Password></wsse:UsernameToken></wsse:Security></env:Header><env:Body><ns1:username xmlns:ns1='http://com.fsb.security/services/authentication/'>gooduser</ns1:username></env:Body></env:Envelope>
|
|
We are using JBoss AS 4.0.5 GA and JBossWS 1.2.1 GA. Looking through the source and the distribution the only reference to javax/annotation/PostConstruct is in the jbossws-thirdparty.jar file under the integration-tomcat folder. Placing that file under the JBoss AS 4.0.5 installation causes other weird errors. Am I missing something?
Any help in this matter is appreciated. If any additional information is needed, I will gladly provide it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044047#4044047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044047
19 years, 1 month
[EJB 3.0] - Re: Problem running Stateless bean with JBOSS 4.0.4 GA and E
by delkant
this:
context.lookup("TestStatelessBean/remote");
is the rigth way... but here you will recive a remote interface, that is what you are requesting with the "/remote" part...
so.. you have to cast it to ....
(TestStateless)context.lookup("TestStatelessBean/remote");
your servlet have tobe something like this:
| public class TestStatelessEJBServlet extends HttpServlet {
|
| /**
| *
| */
| private static final long serialVersionUID = 1L;
| private TestStateless testRemoteInterface;
|
| public void init() {
| try {
| Context context = new InitialContext();
| System.out.println("Before lookup");
| testRemoteInterface = (TestStateless) context.lookup("TestStatelessBean/remote");
| System.out.println("After lookup");
|
| } catch (NamingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
|
| public void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
| PrintWriter writer = resp.getWriter();
| writer.write("The stateless bean returned this string: " +
| TestStateless.testBean());
| }
|
| public void doPost(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
| this.doGet(req, resp);
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044046#4044046
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044046
19 years, 1 month
[JBossCache] - Replication om AIX machines
by annette
I have two AIX servers, each of it running a JBoss Cache instance. I configurd CacheMode REPL_SYNC with the cluster config as shown below.
Replication does not work.
The same configuration (exept for the bind_addr) works, when using two windows server instead. What is the problem?
AIX machine 1 (31.132.132.103)
ClusterName: TreeCache-Cluster-T7
ClusterConfig:
<UDP mcast_addr="228.1.2.3" mcast_port="10494"
ip_ttl="64" ip_mcast="true" bind_addr="31.132.132.103"
mcast_send_buf_size="150000"
mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="false"/>
<PING timeout="2000" num_initial_members="3"
up_thread="false" down_thread="false"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"
up_thread="false" down_thread="false"/>
<pbcast.NAKACK gc_lag="50"
retransmit_timeout="600,1200,2400,4800"
max_xmit_size="8192" up_thread="false"
down_thread="false"/>
<UNICAST timeout="600,1200,2400" window_size="100"
min_threshold="10"
down_thread="false"/>
<pbcast.STABLE desired_avg_gossip="20000"
up_thread="false" down_thread="false"/>
<FRAG frag_size="8192"
down_thread="false" up_thread="false"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER up_thread="true"
down_thread="true"/>
AIX machine 2 (31.132.132.153)
ClusterName: TreeCache-Cluster-T7
ClusterConfig:
<UDP mcast_addr="228.1.2.3" mcast_port="10494"
ip_ttl="64" ip_mcast="true" bind_addr="31.132.132.153"
mcast_send_buf_size="150000"
mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="false"/>
<PING timeout="2000" num_initial_members="3"
up_thread="false" down_thread="false"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"
up_thread="false" down_thread="false"/>
<pbcast.NAKACK gc_lag="50"
retransmit_timeout="600,1200,2400,4800"
max_xmit_size="8192" up_thread="false"
down_thread="false"/>
<UNICAST timeout="600,1200,2400" window_size="100"
min_threshold="10"
down_thread="false"/>
<pbcast.STABLE desired_avg_gossip="20000"
up_thread="false" down_thread="false"/>
<FRAG frag_size="8192"
down_thread="false" up_thread="false"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER up_thread="true"
down_thread="true"/>
Thank you for your advice
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044043#4044043
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044043
19 years, 1 month