[Installation, Configuration & Deployment] - Re: Configuring virtual host in jboss-4.2.0.GA?
by tgarcia
To setup a virtual host in 4.0.5, I edited the server.xml file located in ${JBOSS_HOME}/server/default/deploy/jbossweb-tomcat55.sar by changing the HTTP/1.1 Connector port to "80" and added a new < Host > element below the existing < Host name="localhost" > element. Next, I added a <virtual-host> element to ${APP_NAME}.war/WEB-INF/jboss-web.xml (listed below).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
<jboss-web>
<context-root>/</context-root>
<virtual-host>somehost.com</virtual-host>
</jboss-web>
This worked without any problems at all.
When attempting to setup a virtual host with 4.2.0, the structure had changed a bit so I took my best shot by changing the system variable (JBOSS_HOME) to point to the new installation and modifying the server.xml file located in ${JBOSS_HOME}/server/all/deploy/jboss-web.deployer/server.xml. I changed the HTTP/1.1. Connector port to "80", added the new < Host > element below the existing < Host name="localhost" >. The application being deployed to the new virtual host has not changed (still contains the jboss-web.xml file specifying the virtual-host).
If there's anything that I've overlooked, your assistance would be greatly appreciated.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049671#4049671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049671
18 years, 10 months
[Installation, Configuration & Deployment] - ~~JBoss Hot Deployment~~
by dwarakanathan
Hi,
How can i make the Hot Deployment enabled in JBoss. I have a application which is like a java editor deployed in JBoss.
Now the problem is:
Step 1)I have saved a java file named "Class-1" then compiled to produce the class file.
Step 2)Exported the java file to my physical hard disk. i.e. Backup
Step 3)Run the java file. Then Deleted the java file. This deletes the class file. But the memory still has the class file loaded onto its cache.
Step 4)Now, I import back the same java file But make lot of changes and save it in the same name as the previous java file "Class-1".
Step 5) Now, when i run the java file, the memory is loading the older java class. This is by Class.forName("Class-1",false,ClassLoader);
Step 6) Is there anything i can do to load the newer java class without restarting the server.
Can hot deployment be usefull, if so Please help me out on how can we bring hot deployment into picture.
Thanks !!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049666#4049666
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049666
18 years, 10 months
[JBoss AOP] - unable to resolve an AOP IllegalArgumentException
by laurentSalse
Hi,
I work on eclipse. I've configure an interceptor in my program. In a following time, I make the war of the project and I execute the run.bat file of the Jboss server. I have these Errors at runtime.
Caused by: java.lang.IllegalArgumentException
at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
at java.lang.reflect.Field.set(Field.java:656)
at org.jboss.aop.ClassAdvisor.initializeMethodChain(ClassAdvisor.java:464)
at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:594)
at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:82)
at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:299)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:271)
at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
at com.fitnetapplication.bilan.service.BilanCongesServiceImpl.(BilanCongesServiceImpl.java)
Caused by: org.apache.jasper.JasperException
So, I went to the UnsafeStaticObjectFieldAccessorImpl class source (.java) and looked at the line 61.
Here is the code :
protected TLongObjectHashMap initializeMethodChain()
{
TLongObjectHashMap newInterceptors = new TLongObjectHashMap();
long[] keys = advisedMethods.keys();
for (int i = 0; i < keys.length; i++)
{
// Keep compatible with AOP 1.3.x until AOP 2.0 is FINAL
MethodInfo info = new MethodInfo();
Method amethod = (Method) advisedMethods.get(keys);
info.setAdvisedMethod(amethod);
Method umethod = (Method) unadvisedMethods.get(keys);
if (umethod == null) umethod = amethod;
info.setUnadvisedMethod(umethod);
info.setHash(keys);
info.setAdvisor(this);
newInterceptors.put(keys, info);
try
{
Field infoField = clazz.getDeclaredField(MethodExecutionTransformer.getMethodInfoFieldName(amethod.getName(), keys));
infoField.setAccessible(true);
infoField.set(null, new WeakReference(info));
}
catch (NoSuchFieldException e)
{
// ignore, method may not be advised.
}
catch (IllegalAccessException e)
{
throw new RuntimeException(e); //To change body of catch statement use Options | File Templates.
}
}
return newInterceptors;
}
It's the last line inside the try block which make the IllegalArgumentException.
I use the jboss server -4.0.5.GA and Jdk 1.5.0_06. I disabled the AOP builder from my java project in eclipse, I cleaned the project, and deployed it using with EnableLoadTimeWeaving= true. I have followed each advice in the reference tutorial and the user'guide.
I stay on these errors and I don't arrive resolve it.
Could I have some help please ?
Thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049663#4049663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049663
18 years, 10 months