[JBoss Web Services] - New to Jboss Webservices
by Pankaj Chawla
Pankaj Chawla [https://community.jboss.org/people/pankajchawla] created the discussion
"New to Jboss Webservices"
To view the discussion, visit: https://community.jboss.org/message/749584#749584
--------------------------------------------------------------
Hello Friends,
I am facing the below error..
with jboss 5.1 at time of creating the webservice
| java.lang.NoClassDefFoundError: org/jboss/wsf/spi/tools/cmd/WSProvide |
|
| Caused by: java.lang.ClassNotFoundException: org.jboss.wsf.spi.tools.cmd.WSProvide |
|
|
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200) |
|
|
| at java.security.AccessController.doPrivileged(Native Method) |
|
|
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188) |
|
|
| at java.lang.ClassLoader.loadClass(ClassLoader.java:307) |
|
|
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) |
|
|
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252) |
|
|
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) |
|
| Could not find the main class: org.jboss.wsf.spi.tools.cmd.WSProvide. Program will exit. |
|
| Exception in thread "main" |
|
Please help
Thanks in Advance :)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/749584#749584]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JNDI and Naming] - Unable to access EJB from a second JBOSS 7.1 server instance
by Amit Sharma
Amit Sharma [https://community.jboss.org/people/amitsoprna] created the discussion
"Unable to access EJB from a second JBOSS 7.1 server instance"
To view the discussion, visit: https://community.jboss.org/message/749623#749623
--------------------------------------------------------------
Hi
We have a Utility class with the following code inside it.
private static Hashtable<String, String> initContextEnv = new Hashtable<String, String>();
private static final String PKG_INTERFACES = "org.jboss.ejb.client.naming";
public static final String PROPERTY_PROVIDER_URL_VALUE = "remote://localhost:4447";
public static final String JNDI_PREFIX = "ejb:my_beans/my_beans//";
initContextEnv.put(Context.URL_PKG_PREFIXES, PKG_INTERFACES);
initContextEnv.put(Context.PROVIDER_URL, PROPERTY_PROVIDER_URL_VALUE);
initialContext = new InitialContext(initContextEnv);
public final <T> T getEJB(Class<T> beanClass) throws NamingException {
String ejbName = beanClass.getSimpleName() + IMPL;
String remoteInterfaceName = beanClass.getName();
String jndiName = JNDI_PREFIX + ejbName + "!" + remoteInterfaceName;
Object ref = initialContext.lookup(jndiName);
return beanClass.cast(ref);
}
All my stateless session beans are there in the my_beans.jar file which is deployed on server instance 1 as below:
Server instance1
my_beans.ear
|---------------my_beans.jar
|---------------my_persistence_beans.jar
*When I deploy my second application on the same server instance then it works fine* and I am able to succesfully invoke methods on these stateless session beans *using the above utility class.*
Server instance 1
my_application_one.ear
|---------------my_application.war
|---------------META_INF
|----------------jboss-deployment-structure.xml
Wherein the jboss-deployment-structure.xml has the following contents:
<?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="deployment.my_beans.ear.my_beans.jar" export="true" />
<module name="deployment.my_beans.ear.my_persistence_beans.jar" export="true" />
</dependencies>
</deployment>
</jboss-deployment-structure>
But when I try to invoke methods on these stateless session beans from other server instance it throws an exception
Server Instance 2:
my_application2.ear
|----------------my_application2.war
|------------WEB-INF
|--------lib
|--------my_jar_containing_remote_interfaces_of_stateles_session_beans_and_utility_class.jar
07:56:44,086 ERROR [tv.blackarrow.apt.web.controllers.LoginController] (http-192.168.149.129-192.168.149.129-8580-2) Authenticating user with emailAddress = mailto:aptadmin1@blackarrow.tv aptadmin1(a)blackarrow.tv: java.lang.IllegalStateException: *No EJB receiver available for handling [appName:my_beans,modulename:my_beans,distinctname:]* combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@456c56
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]
at $Proxy24.login(Unknown Source) at tv.blackarrow.services.client.AuthenticationClientImpl.login(AuthenticationClientImpl.java:59) [ba_services_client.jar:]
at tv.blackarrow.apt.web.controllers.LoginController.handleRequest(LoginController.java:86) [blackarrow-apt.jar:]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) [spring-webmvc.jar:2.5]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874) [spring-webmvc.jar:2.5]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808) [spring-webmvc.jar:2.5]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) [spring-webmvc.jar:2.5]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) [spring-webmvc.jar:2.5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at tv.blackarrow.apt.web.filters.BAEncodingAndClientCacheFilter.doFilter(BAEncodingAndClientCacheFilter.java:65) [blackarrow-apt.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]
What am I missing here? Do I need to include some jar? I have tried various ways to access EJBs by googling and implementing those solutions but nothing was fruitful. Need some directions :(
attached is my standalone.xml file.
I am using JBOSS7.1 migrating my application from JBOSS4.2. I have created the second server instance by copying the standalone folder of JBOSS. and then giving the server base directory while starting the second server instance as the renamed and copied standalone folder.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/749623#749623]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss Messaging] - Security JMS Queue
by john gregory
john gregory [https://community.jboss.org/people/jjgrego] created the discussion
"Security JMS Queue"
To view the discussion, visit: https://community.jboss.org/message/746703#746703
--------------------------------------------------------------
We operate in a 2-way ssl environment. I'm trying to secure a jms queue I created in jboss 5.
Using jndi, I can create my initial context and send messages to the cue, but I want to lock it down.
We've switched our containers from weblogic to jboss. In weblogic, when creating an initial context,
in changing the url over, it was as simple as changing t3 to t3s and the port from 8080 to 443.
Nothing really complicated there. However, in jboss, I get all kinds of CommunicationExceptions --
failed to retrieve stub from server... when using jnps://mymachine:443
I need to be able to send messages to this machine from various remote clients in a 2-way ssl environment.
Any ideas would be greatly appreciated. Once I lock this down, I'll start asking about securing it further
by protecting with roles... :-)
Thanks,
John
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746703#746703]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[Beginner's Corner] - java_opts use of ")"
by Ian Haigh
Ian Haigh [https://community.jboss.org/people/ian_h] created the discussion
"java_opts use of ")""
To view the discussion, visit: https://community.jboss.org/message/749481#749481
--------------------------------------------------------------
Hopefully very simple question I am trying to set my java_opts with a string which contains spaces and brackes, I have replaced the spaces with "+", but a closing bracket ")" is causing me a problem, and no end of searching is turning up an answer. I have tried using ^, \, and / before the bracket without success. This is a setting in my run.bat.
eg. say I am trying to add
set java_opts=%java_opts% -Dblah.blah.blah=this+is+a+sting(just+one+value)+to+be+added
in such a case the ")" after the 'value' would cause a string/command break in JBoss, giving me an error something like "+to+be+added was unexpected at this time"
Can anyone help me work out how to do this, I'm running Jboss 5.1.0 on windows 2008.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/749481#749481]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months