[EJB 3.0] - Re: Help!! Failed to call remote methods in jboss 4. (EJB3,
by MyNameIsDaniel
oooops!!! Fogot to give the code.
The code of EJB is totally ok. Here're some codes of the Swing client:
/*
*RemoteString.java
*/
package ejbtest;
import java.util.*;
import javax.naming.*;
import com.foshanshop.ejb3.HelloWorld;
public class RemoteString {
public static String getRemoteString(String name,String url) throws Exception{
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
props.setProperty("java.naming.provider.url", url + ":1099");
InitialContext ctx = new InitialContext(props);
HelloWorld helloworld = (HelloWorld)ctx.lookup("HelloWorldBean/remote");
return helloworld.SayHello(name);
}
}
/*
*A part of the codes for Swing, mouse event:
*/
public void mouseReleased(MouseEvent arg0) {
try{
String info[] = textField.getText().split(":");
textArea.setText(RemoteString.getRemoteString(info[1],info[0]));
}
catch(Exception e){textArea.setText(e.getMessage());}
}
I repeat: the SwingEJBTest.JAR ran well on the server computer,
but not in other ones.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179333#4179333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179333
17 years, 6 months
[JBoss Portal] - wsdl-override does not work with portal 2.6.6, fine with 2.6
by jimpo
I try to override my @WebServiceRef wsdl location using jboss.xml and wsdl-location. This works fine with portal 2.6.4 which is deployed on JBossAS 4.2.1GA but override is not being done with bundled portal 2.6.6 (JBossAS 4.2.3GA).
One of my EJBs:
| @WebServiceRef(com.fooz.baz.webservice.vacationrequest.VacationRequestService_Service.class)
| private transient VacationRequestService vacationRequestService;
|
| @WebServiceRef(com.fooz.baz.webservice.employee.EmployeeService_Service.class)
| private transient EmployeeService employeeService;
jboss.xml excerpt:
<session>
| <ejb-name>ApplicationListingAction</ejb-name>
| <service-ref>
| <service-ref-name>com.fooz.baz.portlet.searchandapply.ApplicationListingAction/vacationRequestService</service-ref-name>
| <wsdl-override>http://remoteserver:8080/service/vacation?wsdl</wsdl-override>
| </service-ref>
| <service-ref>
| <service-ref-name>com.fooz.baz.portlet.searchandapply.ApplicationListingAction/employeeService</service-ref-name>
| <wsdl-override>http://remoteserver:8080/employee-service/employee?wsdl</wsdl-override>
| </service-ref>
| </session>
| </enterprise-beans>
| </jboss>
When this is deployed on JBoss4.2.1GA I see what name the servicerefs get, and am able to use the same name in jboss.xml service-ref-name:
| 14:14:13,722 INFO [EJBContainer] STARTED EJB: com.fooz.baz.portlet.freetextsearch.SearchAction ejbName: SearchAction
| 14:14:13,725 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateful.StatefulContainer
| 14:14:13,726 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=portlets.ear,jar=ejb.jar,name=ManagerApplicationEditAction,service=EJB3 with dependen
| cies:
| 14:14:13,739 INFO [ServiceRefHandlerJAXWS] setupServiceRef [jndi=/env/com.fooz.baz.portlet.manager.ManagerApplicationEditAction/vacationRequestProcess,tar
| get=com.fooz.baz.webservice.vacationrequestprocess.VacationRequestProcess]
| 14:14:13,742 INFO [ServiceRefHandlerJAXWS] setupServiceRef [jndi=/env/com.fooz.baz.portlet.manager.ManagerApplicationEditAction/employeeService,target=com
| .fooz.baz.webservice.employee.EmployeeService]
| 14:14:13,743 INFO [ServiceRefHandlerJAXWS] setupServiceRef [jndi=/env/com.fooz.baz.portlet.manager.ManagerApplicationEditAction/fortimeVacationService,tar
But none of that is displayed when I deploy on JBoss 4.2.3 GA. When I ttry to use the EJB I see that the override ("remoteserver") is not working and instead the original wsdl ("localhost") location is used:
| 14:25:38,497 INFO [STDOUT] DEBUG ApplicationListingAction.create(108) | Creating
| 14:25:38,642 WARN [ServiceDelegateImpl] Cannot access wsdlURL: http://localhost:8080/employee-service/employee?wsdl
| 14:25:38,644 WARN [ServiceDelegateImpl] Cannot get port meta data for: {http://www.ugu.fi/soa-poc/EmployeeServiceWSDL}EmployeeServiceSOAP
| 14:25:38,749 WARN [ServiceDelegateImpl] Cannot access wsdlURL: http://localhost:8080/service/vacation?wsdl
| 14:25:38,751 WARN [ServiceDelegateImpl] Cannot get port meta data for: {http://www.ugu.fi/soa-poc/VacationRequestServiceWSDL}VacationRequestServiceSOAP
| 14:25:38,917 INFO [STDOUT] DEBUG ApplicationListingAction.create(108) | Creating
| 14:25:39,001 ERROR [STDERR] 29.9.2008 14:25:38 com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/pages/apply/applicationList.xhtml]
| javax.ejb.EJBTransactionRolledbackException: org.jboss.ws.WSException: Target endpoint address not set
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
Also I think I should be able to see the webservice-ref in the JNDI using JMXConsole -> JNDIView, but neither server displays the webservice-refs there, why? How could I see which JNDI name the webservice-refs are bound to?
I have also tried adding "name" and "mappedName" attributes to the WebServiceRef annotation and using the same value as service-ref-name, without success.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179332#4179332
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179332
17 years, 6 months
[EJB 3.0] - Help!! Failed to call remote methods in jboss 4. (EJB3, Stat
by MyNameIsDaniel
Hi all,
I got a problem with my first EJB3 test.
I could call my remote method ONLY in the computer that runs JBoss.
Here's the detailed situation:
I wrote a Stateless Session Bean in Eclipse.
It simply provides (remote) a static String method SayHello(String name).
SayHello("Daniel") -> "Daniel says: Hello!"
Then I copied the exported JAR file into server/default/deploy.
JBoss 4 was launched and the jndi was up there. HelloWorldBean/remote
Everything ran pretty well.
Then I started another project in Eclipse which is called "SwingEJBTest"
I wanted to use a Swing project to call the remote method.
There was a JTextField (for Input), a JTextArea (for Output) and a JButton.
I'm not good at describing things in English, please see my code below...
I copied the interface HelloWorld.class and all the JARs in client folder.
Then I set all the Classpaths, wrote codes and generated JAR with FatJAR.
I launched the SwingEJBTest.jar with .bat file and everything was OK.
I input "localhost:Daniel" and it outputs "Daniel says: Hello!".
Then I copied the JAR to another computer and the problem came:
I input "192.168.1.101:Daniel" (JBossServer: 192.168.1.101:1099).
There was an exception thrown:
Could not obtain connection to any of these urls: 192.168.1.101:1099...
I closed the firewall on the JBossServer computer, pinged 198.168.1.101,
but I found nothing abnormal. I can access the server computer,
JBoss was still running there, firewall totally off.
I packed the JAR with FatJAR, totally dependant from external JARs.
Could anyone tell me why I got this Exception on another computer?
Thanks a lot for your kind help.
Regards,
Daniel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179329#4179329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179329
17 years, 6 months
[EJB 3.0] - 2 Stateless session beans, same name+interface, different ja
by gr28
Hello,
using JBoss 4.2.3
We are having a Stateless Session bean with a specific name ("mybean"):
@Local(IBean1.class)
@Stateless(name="mybean")
public class Bean1 implements IBean1 {
The class Bean1 and the interface IBean1 belong to core.jar.
An other SLSB (in core.jar) injects the "mybean" bean:
@EJB(beanName="mybean")
IBean1 beanImpl;
I now want to replace the bean under name "mybean" with a project specific implementation. We add project.jar, which has a dependeny to core.jar. It deploys the following bean:
@Local(IBean1.class)
@Stateless(name="mybean")
public class Bean1Project implements IBean1 {
The "mybean" is now registered under JNDI as follows:
ear=naming.ear,jar=core.jar,name=mybean,service=EJB3
ear=naming.ear,jar=project.jar,name=mybean,service=EJB3
After a simple test I found out that beanImpl gets an instance of Bean1Project injected. Can anyone please explain, why that bean is used?
Is it possible to remove the SLSB from JNDI defined in core.jar without changing core.jar? The requirement is that the product core defines several SLSB that are always deployed and can always be replaced by a project specific implementation.
Thank you for any help!
Georg Raffer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179322#4179322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179322
17 years, 6 months
[JBoss Cache: Core Edition] - Re: Resident Nodes evicted in heavy load conditions
by mahendragoyal
Hi Markus,
we have encountered the same issue again, following are the settings used
jboss.Transaction.IsolationLevel=NONE
jboss.clustered.CacheMode=LOCAL
jboss.policyClass=org.jboss.cache.eviction.LRUPolicy
jboss.evictionThread.wakeUpIntervalSeconds=600
jboss.region.products.maxNodes=300jboss.region.products.timeToLiveSeconds=14400
jboss.region.products.eventQueueSize=200000
Stack Trace
--------------
org.jboss.cache.NodeNotValidException: Node /Products is not valid. Perhaps it has been moved or removed.
| at org.jboss.cache.invocation.NodeInvocationDelegate.assertValid(NodeInvocationDelegate.java:497)
| at org.jboss.cache.invocation.NodeInvocationDelegate.getChild(NodeInvocationDelegate.java:330)
| at com.pearson.commonbiz.app.appservices.caching.JBossCacheAdpater.getFromCache(JBossCacheAdpater.java:316)
| at com.pearson.commonbiz.app.appservices.ResourcesCacheHelper.getFromCache(ResourcesCacheHelper.java:232)
| at com.pearson.commonbiz.app.appservices.ResourcesCacheHelper.getResourceIDTypeListFromCache(ResourcesCacheHelper.java:156)
| at com.pearson.ph.ois.presentation.actions.OISCoreAction.isProductHasService(OISCoreAction.java:734)
| at com.pearson.ph.ois.presentation.actions.GetAllAssignmentsForClassAction.processRequest(GetAllAssignmentsForClassAction.java:319)
| at com.pearson.ph.ois.presentation.actions.OISCoreAction.execute(OISCoreAction.java:87)
| at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
| at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| at com.pearson.commonsys.dynaweb.uicontroller.ConcertActionServlet.process(ConcertActionServlet.java:230)
| at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
Like I told you earlier we store the "Product" node in a hashtable which is marked as resident in the begining after the creation
Lately in our performance tests the error was coming up in logs every few hours.
I am not sure how I can reproduce it since its very inconsistent.
Could you please help us a bit with this
Many Thanks,
mahendra
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179320#4179320
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179320
17 years, 6 months
Migrate Tomcat configuration to JBoss 4.2.x
by Sertic Mirko, Bedag
Hi@all
I am running some Tomcat 5.5 applications, all deployed as a .war file.
For JNDI and DataSource configuration, I use the external context.xml
files, all stored in conf/catalina/localhost/<contextname>.xml. Now, I
want to deploy some of the applications to JBoss 4.2.x. Now, the
question is : where to put the datasource, and how can i use the
external context configuration file on JBoss 4.2.x out of the box? Is
there a tutorial available?
Thanks a lot
Mirko
17 years, 6 months
[Remoting] - org.jboss.remoting.marshal.InvalidMarshallingResource: Can n
by sridhargoud_k
Hi,
Am using "SourceInfo.java" It is a transfer object containing some elementary details of a Source.It is created so as to transfer the data across, in a SOAP friendly manner.
This clas is being deployed as part of .ejb3 jar file on jboss server.When the server is running am getting the following exception seldomly.
| org.jboss.remoting.marshal.InvalidMarshallingResource: Can not find a valid marshaller for data type: serializable
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:79)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy0.getSourcesInfo(Unknown Source)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at com.barco.cms.dependency.CmsPerspectiveMgt$PerspectiveMgtInvocationHandler.invokeMethod(Unknown Source)
| at com.barco.cms.dependency.CmsPerspectiveMgt$PerspectiveMgtInvocationHandler.invoke(Unknown Source)
| at $Proxy1.getSourcesInfo(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.pool.SourcePool.getSourceInfo(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.impl.ProxySource.getSourceInfo(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.impl.ProxySource.isOnline(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.SourceEventSupport.onSourcePropertyChanged(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.SourceEventSupport.onPropertyChanged(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.SourceEventSupport.fireEvent(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.impl.ProxySource.fireEvent(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.PerspectiveMgtEventReader.fireEvent(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.PerspectiveMgtEventReader.access$700(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.PerspectiveMgtEventReader$EventProcessor.run(Unknown Source)
| at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
| at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
| at java.util.concurrent.FutureTask.run(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
| at java.lang.Thread.run(Unknown Source)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy0.getSourcesInfo(Unknown Source)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at com.barco.cms.dependency.CmsPerspectiveMgt$PerspectiveMgtInvocationHandler.invokeMethod(Unknown Source)
| at com.barco.cms.dependency.CmsPerspectiveMgt$PerspectiveMgtInvocationHandler.invoke(Unknown Source)
| at $Proxy1.getSourcesInfo(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.pool.SourcePool.getSourceInfo(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.impl.ProxySource.getSourceInfo(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.impl.ProxySource.isOnline(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.SourceEventSupport.onSourcePropertyChanged(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.SourceEventSupport.onPropertyChanged(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.SourceEventSupport.fireEvent(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.impl.ProxySource.fireEvent(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.PerspectiveMgtEventReader.fireEvent(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.PerspectiveMgtEventReader.access$700(Unknown Source)
| at com.barco.cms.perspectivemgtproxy.eventsupport.PerspectiveMgtEventReader$EventProcessor.run(Unknown Source)
| at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
| at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
| at java.util.concurrent.FutureTask.run(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
| at java.lang.Thread.run(Unknown Source)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179308#4179308
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179308
17 years, 6 months