[Performance Tuning] - JBoss always at 100% CPU but not doing anything!
by jsinglet@gmail.com
Hi All,
I am having a horrible problem with my JBoss deployment. I am using Jboss-4.0.4CR2 with JAVA_OPTS="-server -Xmx2256m -Xms2256m -Djava.awt.headless=true", the JDK is BEA JRockit 1.5.0_07.
The application is a EJB 3.0 application, with lots of servlets, and JSF stuff on the client side. All of the session beans are stateless.
After about 1 day of running the CPU hits 100% and stays there until I reboot JBoss, then the process repeats. I've been profiling the code locally, but am unable to find a place where the code would be hanging up. Also, tailing server.log (with debug logging on) confirms that nothing is happening.
Question: What in the world can I do to figure out what is hanging the processor? I've confirmed that garbage collection is not the source by logging the garbage collection during this process.
I am at a total loss for how to move forward, but needless to say I find it totally unacceptable.
Can someone point me in the right direction?
Thanks,
JLS
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973045#3973045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973045
19 years, 7 months
[Persistence, JBoss/CMP, Hibernate, Database] - The CMP development Problem!!!
by chengshan
When I develop a CMP ,I meet a problem,My env is :
1.dev env:Jbuilder;
2.run env:jboss 4.0,jdk1.5
3.I develop it ,when I deloply success,run my test client,the console information looks like:
java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkMulticast(SecurityManager.java:1188)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:269)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1254)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at product.client.ProductClient.main(ProductClient.java:47)
My test client is like this:
package product.client;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.PortableRemoteObject;
import java.util.*;
import product.ProductHome;
import product.Product;
public class ProductClient {
public ProductClient() {
}
public static void main(String[] args) throws Exception {
ProductClient productclient = new ProductClient();
ProductHome home = null;
try{
System.setProperty("java.security.policy","policy");
System.setSecurityManager(new RMISecurityManager());
//if(System.getSecurityManager() == null)
// System.setSecurityManager(new RMISecurityManager());
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
Context ctx = new InitialContext(props);
home = (ProductHome)ctx.lookup("ProductBean");
//Object obj = ctx.lookup("ProductBean");
//if(obj == null)
// System.out.println("ProductBean is null");
//home = (ProductHome)PortableRemoteObject.narrow(obj,ProductHome.class);
home.create("100","P5-350","350 MHZ Pentium",200);
home.create("101","P5-400","400 MHZ Pentium",300);
home.create("102","P5-450","450 MHZ Pentium",400);
home.create("103","SD-64","64MB SDRAM",50);
home.create("104","SD-128","128MB SDRAM",100);
home.create("105","SD-256","256MB SDRAM",200);
Iterator i = home.findByName("SD-64").iterator();
System.out.println("These products match the name SD-64:");
while(i.hasNext()){
Product prod = (Product)i.next();
System.out.println("prod.getDescription()"+prod.getDescription());
}
System.out.println("Finding all Products that cost $200");
i = home.findByBasePrice(200).iterator();
while(i.hasNext()){
Product prod = (Product)i.next();
System.out.println("prod.getDescription"+prod.getDescription());
}
}catch(Exception e){
e.printStackTrace();
}finally{
if(home != null){
System.out.println("Destroying products....");
Iterator i = home.findAllProducts().iterator();
while(i.hasNext()){
try{
Product prod = (Product)i.next();
if(prod.getProductId().startsWith("123")){
prod.remove();
}
}catch(Exception e){
e.printStackTrace();
}
}
}
}
}
}
I don't know hot to modify(add) the my policy file,the new policy file must be which dir?how to add the VM argument use policy file?
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973043#3973043
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973043
19 years, 7 months
[EJB/JBoss] - The CMP development Problem!!!
by chengshan
When I develop a CMP ,I meet a problem,My env is :
1.dev env:Jbuilder;
2.run env:jboss 4.0,jdk1.5
3.I develop it ,when I deloply success,run my test client,the console information looks like:
java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkMulticast(SecurityManager.java:1188)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:269)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1254)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at product.client.ProductClient.main(ProductClient.java:47)
My test client is like this:
package product.client;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.PortableRemoteObject;
import java.util.*;
import product.ProductHome;
import product.Product;
public class ProductClient {
public ProductClient() {
}
public static void main(String[] args) throws Exception {
ProductClient productclient = new ProductClient();
ProductHome home = null;
try{
System.setProperty("java.security.policy","policy");
System.setSecurityManager(new RMISecurityManager());
//if(System.getSecurityManager() == null)
// System.setSecurityManager(new RMISecurityManager());
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
Context ctx = new InitialContext(props);
home = (ProductHome)ctx.lookup("ProductBean");
//Object obj = ctx.lookup("ProductBean");
//if(obj == null)
// System.out.println("ProductBean is null");
//home = (ProductHome)PortableRemoteObject.narrow(obj,ProductHome.class);
home.create("100","P5-350","350 MHZ Pentium",200);
home.create("101","P5-400","400 MHZ Pentium",300);
home.create("102","P5-450","450 MHZ Pentium",400);
home.create("103","SD-64","64MB SDRAM",50);
home.create("104","SD-128","128MB SDRAM",100);
home.create("105","SD-256","256MB SDRAM",200);
Iterator i = home.findByName("SD-64").iterator();
System.out.println("These products match the name SD-64:");
while(i.hasNext()){
Product prod = (Product)i.next();
System.out.println("prod.getDescription()"+prod.getDescription());
}
System.out.println("Finding all Products that cost $200");
i = home.findByBasePrice(200).iterator();
while(i.hasNext()){
Product prod = (Product)i.next();
System.out.println("prod.getDescription"+prod.getDescription());
}
}catch(Exception e){
e.printStackTrace();
}finally{
if(home != null){
System.out.println("Destroying products....");
Iterator i = home.findAllProducts().iterator();
while(i.hasNext()){
try{
Product prod = (Product)i.next();
if(prod.getProductId().startsWith("123")){
prod.remove();
}
}catch(Exception e){
e.printStackTrace();
}
}
}
}
}
}
I don't know hot to modify(add) the my policy file,the new policy file must be which dir?how to add the VM argument use policy file?
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973042#3973042
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973042
19 years, 7 months
[JNDI/Naming/Network] - The CMP development Problem!!!
by chengshan
When I develop a CMP ,I meet a problem,My env is :
1.dev env:Jbuilder;
2.run env:jboss 4.0,jdk1.5
3.I develop it ,when I deloply success,run my test client,the console information looks like:
java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkMulticast(SecurityManager.java:1188)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:269)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1254)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at product.client.ProductClient.main(ProductClient.java:47)
My test client is like this:
package product.client;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.PortableRemoteObject;
import java.util.*;
import product.ProductHome;
import product.Product;
public class ProductClient {
public ProductClient() {
}
public static void main(String[] args) throws Exception {
ProductClient productclient = new ProductClient();
ProductHome home = null;
try{
System.setProperty("java.security.policy","policy");
System.setSecurityManager(new RMISecurityManager());
//if(System.getSecurityManager() == null)
// System.setSecurityManager(new RMISecurityManager());
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
Context ctx = new InitialContext(props);
home = (ProductHome)ctx.lookup("ProductBean");
//Object obj = ctx.lookup("ProductBean");
//if(obj == null)
// System.out.println("ProductBean is null");
//home = (ProductHome)PortableRemoteObject.narrow(obj,ProductHome.class);
home.create("100","P5-350","350 MHZ Pentium",200);
home.create("101","P5-400","400 MHZ Pentium",300);
home.create("102","P5-450","450 MHZ Pentium",400);
home.create("103","SD-64","64MB SDRAM",50);
home.create("104","SD-128","128MB SDRAM",100);
home.create("105","SD-256","256MB SDRAM",200);
Iterator i = home.findByName("SD-64").iterator();
System.out.println("These products match the name SD-64:");
while(i.hasNext()){
Product prod = (Product)i.next();
System.out.println("prod.getDescription()"+prod.getDescription());
}
System.out.println("Finding all Products that cost $200");
i = home.findByBasePrice(200).iterator();
while(i.hasNext()){
Product prod = (Product)i.next();
System.out.println("prod.getDescription"+prod.getDescription());
}
}catch(Exception e){
e.printStackTrace();
}finally{
if(home != null){
System.out.println("Destroying products....");
Iterator i = home.findAllProducts().iterator();
while(i.hasNext()){
try{
Product prod = (Product)i.next();
if(prod.getProductId().startsWith("123")){
prod.remove();
}
}catch(Exception e){
e.printStackTrace();
}
}
}
}
}
}
I don't know hot to modify(add) the my policy file,the new policy file must be which dir?how to add the VM argument use policy file?
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973041#3973041
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973041
19 years, 7 months
[JBoss Portal] - Re: Topic Watch error on Forum Portlet - Jboss portal 2.4 GA
by mmontoni
Hello Peter,
Yes, I am aware of that MySQL 5 issue. I already fixed that.
Hummm....I can try to delete the tables I created on the database and do another build and see if Hibernate then creates the tables for me...
I found a setup.dll and created the tables. Then my error changes to this one:
| 14:47:29,569 ERROR [JDBCExceptionReporter] Cannot add or update a child row: a foreign key constraint fails (`geportaldb/jbp_forums_topics`, CONSTRAINT `FK6C1A04CAC1FFF134` FOREIGN KEY (`jbp_poster`) REFERENCES `jbp_forums_users` (`jbp_id`))
| 14:47:29,584 ERROR [ForumsModuleImpl] Cannot create topic
| org.hibernate.exception.ConstraintViolationException: could not insert: [org.jboss.portlet.forums.impl.TopicImpl]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
| at org.hibernate.exception.JDBCExceptionHelper.convert
| ...
|
I Have a feeling, I did something wrong...
thanks
Mariella.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973040#3973040
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973040
19 years, 7 months