[Microcontainer] - Making the classloader of one deployment the delegate of ano
by bastib
Hi,
I am currently trying to integrate an Execution Environment for BDI Agents into Jboss. I have a problem making classreloading work properly.
I am deploying a ExecutionEnvironment using a jboss-beans.xml. The AgentApplications are described by two types of xml files. I wrote deployers to deploy AgentApplications packed in a jar.
During the deployment process agent models are loaded. Then agents are started. This means that a concrete agent is created on the base of a loaded agent model. This concrete agent is then marked active and gets executed by an execution service.
The problem is that the execution service is using the BaseClassLoader which has been created during the deployment of the execution environment. Therefore the changed classes never get reloaded, because the classloader of the ExecutionEnvironment always remains the same.
I think a solution would be to make the classloader, which was created for the deployment of the agent application, a delegate of the classloader of the execution environment. How could I do this? But maybe there are alternative solutions.
Thx
Bastian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216921#4216921
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216921
17 years, 1 month
[Installation, Configuration & DEPLOYMENT] - look up jndi problem
by iisrail
I have communication ( may be JNDI ?) problems even by testing the simplest EJB program
My Ejb Bean:
@Stateless(name = "Test1")
| public class Test1 implements Test1Remote {
|
| /**
| * Default constructor.
| */
| public Test1() {
| // TODO Auto-generated constructor stub
| }
|
| public String echo (String str){
| System.out.println("Test1:echo str ="+str);
| return str;
| }
My Remote:
@Remote
| public interface Test1Remote {
|
| public String echo (String str);
|
| }
My Client:
public class Main {
| public static void main(String[] args) {
| try {
| InitialContext ctx = CmsEjbUtil.getInitialCotext();
| Test1Remote dao = (Test1Remote) ctx.lookup("Test1/remote");
| String str =dao.echo("Hello World");
| System.out.println(str);
| } catch (NamingException e) {
|
| e.printStackTrace();
| }
|
| }
CmsEjbUtil.getInitialCotext() :
| public static InitialContext getInitialCotext() throws NamingException {
| Hashtable props = new Hashtable<String, String>();
| props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
| props.put("java.naming.provider.url", "jnp://localhost:1099");
| return new InitialContext(props);
| }
but when I run client I get the following stack trace:
| javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/0:0:0:0:0:0:0:1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/0:0:0:0:0:0:0:1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1725)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:689)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at Main.main(Main.java:14)
| Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/0:0:0:0:0:0:0:1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/0:0:0:0:0:0:0:1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:331)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1696)
| ... 4 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/0:0:0:0:0:0:0:1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
| ... 5 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(Unknown Source)
| at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
| at java.net.PlainSocketImpl.connect(Unknown Source)
| at java.net.SocksSocketImpl.connect(Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:297)
| ... 5 more
When my server don't get any request from client.
While boot of jboss 5.0.1 I got some errors that first error that I've got is:
| 12:22:42,206 DEBUG [ProfileServiceBootstrap] Failed to build ManagedDeployment for: AbstractKernelDeployment@18ddc48{name=file:/C:/AS/jboss-5.0.1.GA/server/default/conf/bootstrap/vfs.xml installed=true beanFactories=[AbstractBeanMetaData@12bbe6b{name=VFSCache bean=null properties=[realCache, permanentRoots] constructor=AbstractConstructorMetaData@1347124{parameters=[null] factoryClass=org.jboss.virtual.spi.cache.VFSCacheFactory factoryMethod=getInstance} autowireCandidate=true start=AbstractLifecycleMetaData@1f02b85{ whenRequired=ControllerState@e28a61{Start} parameters= }}, AbstractBeanMetaData@146ee9c{name=VfsNamesExceptionHandler bean=org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler properties= constructor=AbstractConstructorMetaData(a)1db52c8{parameters=[java.lang.String]} autowireCandidate=true}]}
| org.jboss.deployers.spi.DeploymentException: Error deploying: file:/C:/AS/jboss-5.0.1.GA/server/default/conf/bootstrap/vfs.xml
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:136)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.initBootstrapMDs(ProfileServiceBootstrap.java:453)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:199)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalStateException: ClassLoader has not been set
| at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.getClassLoader(AbstractDeploymentUnit.java:152)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:60)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
| ... 6 more
Could it be the prooblems stems from my OS Vista? Please help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216909#4216909
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216909
17 years, 1 month
[Remoting] - Messaging blocked by long time-out
by rtm333
Hi,
I posted this question originally in the Messaging forum (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=152037), but was told that it seems to be more of a Remoting issue.
I'm repeating the introductory description here, but would ask you to follow the link above for the full stack trace.
anonymous wrote :
| We are using JBAS 4.2.2.GA with JBM 1.4.2.GA-SP1 and jboss-remoting-2.2.2.SP11-brew.jar.
|
| The server (running on Linux) is publishing on several topics to some Windows clients. If the network connection to one of the clients fails, the updates to ALL clients stop until a time-out occurs after about 15 to 18 minutes!
|
| Below is the stack trace of the server-side exception caused by the time-out. It should help to identify the offending operation that takes so long to time out.
|
| Can I do anything to shorten this time-out substantially to, say, 10 secs?
|
I suppose that the JIRA mentioned by Tim in his reply might be one of JBREM-1069, JBREM-1082 or JBMESSAGING-1482 that all seem to be concerned with passing parameters from the Messaging configuration to Remoting. But I'm rather confused whether my problem is really related to one of these and whether it should have been expected to be fixed by either Remoting 2.2.2.SP11-brew or Messaging 1.4.2.GA-SP1.
Any help welcome.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216905#4216905
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216905
17 years, 1 month