[JBoss-user] TomcatDeployer undeploy application for no apparent reason
Running 4.0.2 under linux. Production. This is the second time in about six months this has happened. Server running for many days untouched. Suddenly for no apparent reason, undeploys the application. Log message is: [TomcatDeployer] undeploy, ctxPath=/city, warUrl=file:/usr/local/ jboss-4.0.2.city/server/default/tmp/deploy/tmp39334city.war/ [StandardWrapper] Waiting for 206 instance(s) to be deallocated No other clues whatsoever. Anyone have any idea how this might happen and what we can do about it? --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] LifeThread.run exits! for no apparent reason
Linux Java jdk1.5.0_03 No database...data from another jboss server (slow connection between them) JBoss 4.0.2 Moderate load production (5000 users daily). First time this has happened. System running for weeks. Suddenly stops for no apparent reason as seen below. JBoss thinks it is supposed to stop for some reason. Restart sees no problems starting up again. No config changes of any sort during this period of time. Anyone know what can cause this? 12:05:59,361 INFO [Server] LifeThread.run exits! 12:05:59,362 INFO [Server] Shutting down the JVM now! 12:05:59,362 INFO [Server] JBoss SHUTDOWN: Undeploying all packages 12:05:59,363 INFO [TomcatDeployer] undeploy, ctxPath=/jmx-console, warUrl=file:/usr/local/jboss-4.0.2.city/server/default/deploy/jmx- console.war/ 12:05:59,367 INFO [StandardWrapper] Waiting for 1 instance(s) to be deallocated 12:05:59,488 INFO [TomcatDeployer] undeploy, ctxPath=/city, warUrl=file:/usr/local/jboss-4.0.2.city/server/default/tmp/deploy/ tmp30519city.war/ 12:05:59,508 INFO [StandardWrapper] Waiting for 448 instance(s) to be deallocated 12:06:00,605 INFO [StandardWrapper] Waiting for 448 instance(s) to be deallocated 12:06:01,705 INFO [StandardWrapper] Waiting for 448 instance(s) to be deallocated 12:06:02,575 INFO [ConnectionFactoryBindingService] Unbound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA from JNDI name 'java:JmsXA' 12:06:02,722 ERROR [HiLoKeyGeneratorFactory] Stopping failed jboss:service=KeyGeneratorFactory,type=HiLo javax.naming.NameNotFoundException: HiLoKeyGeneratorFactory not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java: 491) at org.jnp.server.NamingServer.getBinding(NamingServer.java: 499) at org.jnp.server.NamingServer.unbind(NamingServer.java:224) at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages (TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run (TCPTransport.java:701) at java.lang.Thread.run(Thread.java:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer (StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall (StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at org.jnp.server.NamingServer_Stub.unbind(Unknown Source) at org.jnp.interfaces.NamingContext.unbind (NamingContext.java:737) at javax.naming.InitialContext.unbind(InitialContext.java:379) at org.jboss.naming.Util.unbind(Util.java:127) at org.jboss.naming.Util.unbind(Util.java:118) at org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory.stopServ ice(HiLoKeyGeneratorFactory.java:223) at org.jboss.system.ServiceMBeanSupport.jbossInternalStop (ServiceMBeanSupport.java:320) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle (ServiceMBeanSupport.java:224) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:644) at org.jboss.system.ServiceController$ServiceProxy.invoke (ServiceController.java:897) at $Proxy0.stop(Unknown Source) at org.jboss.system.ServiceController.stop (ServiceController.java:507) at org.jboss.system.ServiceController.stop (ServiceController.java:498) at org.jboss.system.ServiceController.stop (ServiceController.java:498) at org.jboss.system.ServiceController.stop (ServiceController.java:498) at org.jboss.system.ServiceController.stop (ServiceController.java:498) at org.jboss.system.ServiceController.stop (ServiceController.java:498) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at
Re: [JBoss-user] [Beginners Corner] - Re: Configuring JBoss to existing tomcat
We ended up having to add the following to the startup on the server side as part of the JAVA_OPTS: -Djava.rmi.server.useLocalHostname=true -Djava.rmi.server.hostname=appserver.domain.com where appserver.domain.com is the hostname of the jboss server. Then, on the client side added the following to the JAVA_OPTS for tomcat: -Djava.rmi.server.hostname=appserver.domain.com We ended up then defining appserver.domain.com in the hosts table on the client system to avoid a dns lookup. An excellent way to check the configuration from the client side is to use telnet like: telnet appserver.domain.com 1099 It should come back with something looking like: Trying [ip address of appserver.domain.com]... Connected to appserver.domain.com. Escape character is '^]'. ??srjava.rmi.MarshalledObject|???c?IhashlocBytest[BobjBytesq~xp)?? ur[B??T?xp.??thttp://appserver.domain.com:8083/q~q~uq~?sr org.jnp.server.NamingServer_Stubxrjava.rmi.server.RemoteStub exrjava.rmi.server.RemoteObject?a?? a3xpw; UnicastRef2appserver.domain.comJ???Z?xConnection closed by foreign host. You should see buried in the response the hostname you expect to see. If it is there, cool. If an ip address or some other hostname, you have more to do. Also, don't forget to open all the required ports between these servers on the firewall. Frank On May 3, 2005, at 9:57 AM, ice wrote: darranl wrote : Anyone asking how to get JBoss to use a different Tomcat has got their tiers back to front. | | The web tier should make use of the EJB tier, however the EJB tier should have no knowledge of the web tier. | | You should be asking how can I get a standalone Tomcat to make use of JBoss. | | Obtaining the Context should be the same as obtaining the context for any stand alone application. i.e. | | Context ctx = new InitialContext() and make sure that you have a jndi.properties on the classpath of the web app, alternatively pass in the connection properties to the contructor. | | As described earlier in this post you will need to copy soem JBoss jars to the Tomcat installation. The problem here, is that we want to connect a standAlone TOMCAT to our JBOSS (standing on a distant computer) and that without changing the application's code. just working on the configuration files of JBOSS... View the original post : http://www.jboss.org/index.html? module=bbop=viewtopicp=3876280#3876280 Reply to the post : http://www.jboss.org/index.html? module=bbop=postingmode=replyp=3876280 --- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_ids93alloc_id281op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JBoss 3.2.3 Unable to invoke setDelegate
08:48:56,097 INFO [MainDeployer] Starting deployment of package: file:/Volumes/local/jboss-3.2.3/server/default/deploy/mycity.war 08:48:59,156 INFO [EmbeddedTomcatService] deploy, ctxPath=/mycity, warUrl=file:/Volumes/local/jboss-3.2.3/server/default/tmp/deploy/ tmp33352mycity.war/ 08:48:59,348 INFO [Engine] SingleSignOnContextConfig[/mycity]: Added certificates - request attribute Valve 08:48:59,349 INFO [Engine] SingleSignOnContextConfig[/mycity]: Configured an authenticator for method NONE 08:48:59,375 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class loader:[EMAIL PROTECTED] 08:48:59,376 INFO [Engine] StandardManager[/mycity]: Seeding random number generator class java.security.SecureRandom 08:48:59,377 INFO [Engine] StandardManager[/mycity]: Seeding of random number generator has been completed 08:48:59,378 INFO [Engine] StandardWrapper[/mycity:default]: Loading container servlet default 08:48:59,379 INFO [Engine] StandardWrapper[/mycity:invoker]: Loading container servlet invoker 08:48:59,591 INFO [MainDeployer] Deployed package: file:/Volumes/local/jboss-3.2.3/server/default/deploy/mycity.war Moving from jboss-3.2.2RC4_jetty-4.2.11 to jboss-3.2.3 (realize moving from jetty to tomcat), everything deploys right except the application .war file. Get in log: Unable to invoke setDelegate on class loader:[EMAIL PROTECTED] Browser reports tomcat 4.1.29 404 error The requested resource (/mycity/servlet/JspFramework) is not available. Have seen some references to this on email lists, but unclear to me if this is a bug or a config issue. Will be running on a production server, so don't really want to grab some partially known state out of CVS. --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] flushing cache with commit option A
I'm using 3.2.2 in production with commit option A. Every now and then I'd like to do some SQL directly on the database, but doing so would get the cached entity bean content out of sync with the data. Usually it is with database content that I know is not being modified elsewhere (or I'm willing to take the risk). So, what I'd like to do is run the SQL and then somehow flush the caches, forcing the change to be loaded next time it is needed. Any way to do this with commit option A? --- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site=8 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] value object challenge
Using 3.2.2RC4. Same problem under redhat linux and macos X. Note later I explain that this behaves differently with the client running in the same jvm vs. running in a different jvm. In a value object class (MeetingDateValueObject), I do the following: MeetingDateValue meetingDateValue = Factory.getMeetingDateValue(); System.err.println(DEBUG: MeetingDateValueObject.update() id value before: + getId()); boolean temp = meetingDateValue.update(protectionMap,this); System.err.println(DEBUG: MeetingDateValueObject.update() id value after: + getId()); meetingDateValue is a stateless session bean. id is a property of the value object and the primary key of the underlying entity bean. the update method is supposed to set the id value, but getId() returns null before and after the update. In the called session bean, I do the following (it is a facade for the entity bean): public boolean update(ProtectionMap protectionMap,MeetingDateValueObject meetingDateValueObject) { MeetingDateHome meetingDateHome = Factory.getMeetingDateHome(); System.err.println(DEBUG: meeting date value object id before: + meetingDateValueObject.getId()); meetingDateHome.create(meetingDateValueObject); System.err.println(DEBUG: meeting date value object id before: + meetingDateValueObject.getId()); return(true); } MeetingDateHome is an entity bean. The first debug message indicates that the id property in the passed value object is null, which is correct. The second debug message returns an accurate number, reflecting that the entity bean is properly setting the value of id in the value object. So, given that the entity bean exits with the value object id property having an accurate value, why does the second debug message in the session bean still return a null value for the id property? An important consideration here is that this only happens if the client calling the session bean is running in a different JVM. If they are running in the same JVM, the value in the second debug message of the session bean is set accurately. Will appreciate any insight. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] jboss with ipchains/iptable
Running 3.2.2RC4 on redhat 8 with ipchains. One port still varies each time jboss starts up (other than RmiPort). It is usually numbered something like 54915. In jboss-service.xml, I have set RmiPort to 1098 with: attribute name=RmiPort1098/attribute Ipchains lets the following ports through (this is a list of everything I have found on the mailing lists and forums). Some probably aren't needed, but I'm trying to get it to work first: -A input -s 0/0 -d 0/0 8082 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 8083 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 8443 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 1098 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 1099 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 10990 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 10991 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 10992 -p tcp -y -j ACCEPT -A input -s 0/0 -d 0/0 12999 -p tcp -y -j ACCEPT Appears to be at startup only. If I temporarily open the firewall to get things started, I can close it and the external client is able to continue to run. Can someone please tell me what this one port is and how to fix it to a predictable number? Thanks. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] CMP: Local vs. Remote Interface
I have a bunch of entity beans only running with local interfaces. I use a session bean facade for accessing these entity beans along with value objects. Been running in a single JVM for some time without problems. Now want to move to running the servlet container on a separate system. When I move things over, I get the following exception below. Am I going to have to use remote interfaces with the entity beans (which I thought I was avoiding with the session facade)? Using 3.2.0RC2 in this case. Thanks. javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:2 00) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.base2inc.bean.util.Factory.getProfileHome(Factory.java:136) at com.base2inc.bean.value.object.ProfileValueObject.update(ProfileValueObj ect.java:904) at com.base2inc.bean.util.CompositeContainer.update(CompositeContainer.java :141) at com.base2inc.bean.util.ProtectedContainer.update(ProtectedContainer.java :168) at com.base2inc.evaluate.profile.EditProfileStore.run(EditProfileStore.java :133) at com.base2inc.app.framework.JspFramework.doService(JspFramework.java:311) at com.base2inc.app.util.HttpServletExtended.doPost(HttpServletExtended.jav a:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH andler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1723) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon text.java:514) at org.mortbay.http.HttpContext.handle(HttpContext.java:1673) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:783) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:945) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:800) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201 ) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:454) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] CMP: Local vs. Remote Interface
I'm learning this has something to do with the security manager, but haven't yet found anything helpful. Any pointers anyone? On Monday, September 29, 2003, at 12:18 PM, Frank Morton wrote: I have a bunch of entity beans only running with local interfaces. I use a session bean facade for accessing these entity beans along with value objects. Been running in a single JVM for some time without problems. Now want to move to running the servlet container on a separate system. When I move things over, I get the following exception below. Am I going to have to use remote interfaces with the entity beans (which I thought I was avoiding with the session facade)? Using 3.2.0RC2 in this case. Thanks. javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java: 200) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:162 6) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:164 6) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.base2inc.bean.util.Factory.getProfileHome(Factory.java:136) at com.base2inc.bean.value.object.ProfileValueObject.update(ProfileValueOb ject.java:904) at com.base2inc.bean.util.CompositeContainer.update(CompositeContainer.jav a:141) at com.base2inc.bean.util.ProtectedContainer.update(ProtectedContainer.jav a:168) at com.base2inc.evaluate.profile.EditProfileStore.run(EditProfileStore.jav a:133) at com.base2inc.app.framework.JspFramework.doService(JspFramework.java:311 ) at com.base2inc.app.util.HttpServletExtended.doPost(HttpServletExtended.ja va:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplication Handler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567 ) at org.mortbay.http.HttpContext.handle(HttpContext.java:1723) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCo ntext.java:514) at org.mortbay.http.HttpContext.handle(HttpContext.java:1673) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:783) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:945) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:800) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:20 1) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:454) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] CMP: Local vs. Remote Interface
No CMRs or Collections. Just finder methods by a primary key. Accessing a stateless session bean from a remote machine (actually a different jvm on the same machine planning to move to a remote machine). The stateless session bean has a remote interface. The stateless session beans in turn call entity beans using local interfaces. Frank On Monday, September 29, 2003, at 04:44 PM, Adrian Brock wrote: No, You are trying to access a local interface from a remote machine. Probably because you passing back a collection from a CMR get()? Regards, Adrian On Mon, 2003-09-29 at 22:38, Frank Morton wrote: I'm learning this has something to do with the security manager, but haven't yet found anything helpful. Any pointers anyone? On Monday, September 29, 2003, at 12:18 PM, Frank Morton wrote: I have a bunch of entity beans only running with local interfaces. I use a session bean facade for accessing these entity beans along with value objects. Been running in a single JVM for some time without problems. Now want to move to running the servlet container on a separate system. When I move things over, I get the following exception below. Am I going to have to use remote interfaces with the entity beans (which I thought I was avoiding with the session facade)? Using 3.2.0RC2 in this case. Thanks. javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav a: 200) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:151 3) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1 62 6) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:18 45 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1 64 6) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:3 0) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.base2inc.bean.util.Factory.getProfileHome(Factory.java:136) at com.base2inc.bean.value.object.ProfileValueObject.update(ProfileValue Ob ject.java:904) at com.base2inc.bean.util.CompositeContainer.update(CompositeContainer.j av a:141) at com.base2inc.bean.util.ProtectedContainer.update(ProtectedContainer.j av a:168) at com.base2inc.evaluate.profile.EditProfileStore.run(EditProfileStore.j av a:133) at com.base2inc.app.framework.JspFramework.doService(JspFramework.java:3 11 ) at com.base2inc.app.util.HttpServletExtended.doPost(HttpServletExtended. ja va:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356 ) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati on Handler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5 67 ) at org.mortbay.http.HttpContext.handle(HttpContext.java:1723) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication Co ntext.java:514) at org.mortbay.http.HttpContext.handle(HttpContext.java:1673) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:783) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:945) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:800) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 20 1) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:454) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Re: [JBoss-user] CMP: Local vs. Remote Interface
The getProfileHome() looks up an cmp entity bean that only has a local interface. The code looks like: static public ProfileHome getProfileHome() throws NamingException { InitialContext jndiContext = getContext(); ProfileHome profileHome = (ProfileHome)(jndiContext.lookup(Lookup.profile)); setContext(jndiContext); //caches the context return(profileHome); } So, the ProfileValueObject (I now realize) is accessing the entity bean directly. So, if I change the ProfileValueObject to update through a call to a stateless session bean that has a remote interface that in turn updates through an entity bean with a local interface (ie, the session bean is a facade to the entity bean), things should work. Is that right? Thanks for your help. Frank On Monday, September 29, 2003, at 09:09 PM, Adrian Brock wrote: What does getProfileHome() lookup? Regards, Adrian On Tue, 2003-09-30 at 01:04, Frank Morton wrote: No CMRs or Collections. Just finder methods by a primary key. Accessing a stateless session bean from a remote machine (actually a different jvm on the same machine planning to move to a remote machine). The stateless session bean has a remote interface. The stateless session beans in turn call entity beans using local interfaces. Frank On Monday, September 29, 2003, at 04:44 PM, Adrian Brock wrote: No, You are trying to access a local interface from a remote machine. Probably because you passing back a collection from a CMR get()? Regards, Adrian On Mon, 2003-09-29 at 22:38, Frank Morton wrote: I'm learning this has something to do with the security manager, but haven't yet found anything helpful. Any pointers anyone? On Monday, September 29, 2003, at 12:18 PM, Frank Morton wrote: I have a bunch of entity beans only running with local interfaces. I use a session bean facade for accessing these entity beans along with value objects. Been running in a single JVM for some time without problems. Now want to move to running the servlet container on a separate system. When I move things over, I get the following exception below. Am I going to have to use remote interfaces with the entity beans (which I thought I was avoiding with the session facade)? Using 3.2.0RC2 in this case. Thanks. javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.j av a: 200) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1 51 3) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435 ) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java :1 62 6) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java: 18 45 ) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:176 9) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java :1 64 6) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java :3 0) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.base2inc.bean.util.Factory.getProfileHome(Factory.java:136) at com.base2inc.bean.value.object.ProfileValueObject.update(ProfileVal ue Ob ject.java:904) at com.base2inc.bean.util.CompositeContainer.update(CompositeContainer .j av a:141) at com.base2inc.bean.util.ProtectedContainer.update(ProtectedContainer .j av a:168) at com.base2inc.evaluate.profile.EditProfileStore.run(EditProfileStore .j av a:133) at com.base2inc.app.framework.JspFramework.doService(JspFramework.java :3 11 ) at com.base2inc.app.util.HttpServletExtended.doPost(HttpServletExtende d. ja va:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:3 56 ) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplica ti on Handler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle
[JBoss-user] jetty max form size reached?
Using jboss 3.2.0RC2/jetty under MacOS X with JDK 1.4.1. I have a large form with 2095 items. When processing the form, it is only able to find 1819 items in the form request Enumeration. I don't know if it is a form size limit, element count limit, or something else. Everything I have tried ends with the same result. Can anyone describe what is happening and how to get around this, other than redesigning the form. Is there a config option somewhere? --- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Jetty SSL with 3.2.0RC2
I added the following to jboss-service.xml while running 3.2.0RC2 under MacOS X: Call name=addListener Arg New class=org.mortbay.http.SunJsseListener Set name=Port8443/Set Set name=MinThreads5/Set Set name=MaxThreads255/Set Set name=MaxIdleTimeMs5/Set Set name=LowResourcePersistTimeMs2000/Set Set name=Keystore/usr/local/jboss/server/default/conf/keystore/Set Set name=Passwordmypwurd/Set Set name=KeyPasswordmypwurd/Set /New /Arg /Call Nothing is listening on port 8443 at all. This appears to be ignored. Ultimately, I want to configure this on a production 3.0.6 server, too. So, if there are differences in configuring the different versions, please let me know. Anyone else have this running that can tell me what is missing or wrong? Thanks. --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Jetty SSL with 3.2.0RC2
On Friday, March 7, 2003, at 06:19 PM, Jules Gosnell wrote: Frank Morton wrote: I added the following to jboss-service.xml while running 3.2.0RC2 under MacOS X: Call name=addListener Arg New class=org.mortbay.http.SunJsseListener Set name=Port8443/Set Set name=MinThreads5/Set Set name=MaxThreads255/Set Set name=MaxIdleTimeMs5/Set Set name=LowResourcePersistTimeMs2000/Set Set name=Keystore/usr/local/jboss/server/default/conf/keystore/Set Set name=Passwordmypwurd/Set Set name=KeyPasswordmypwurd/Set /New /Arg /Call Nothing is listening on port 8443 at all. This appears to be ignored. Sounds like you are not running the configuration that you have modified... That's what I thought, so I introduced a typo in the config file and got an error message reflecting that typo when I restarted, confirming that it was seen. Still stuck Ultimately, I want to configure this on a production 3.0.6 server, too. So, if there are differences in configuring the different versions, please let me know. Anyone else have this running that can tell me what is missing or wrong? Thanks. --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Jetty SSL with 3.2.0RC2
Thanks! You were a huge help. I missed the obvious and was changing the jboss-service.xml in server/default/conf instead of the one in server/default/deploy/jbossweb.sar/META-INF. Worked first time after that. Your other info was also helpful. Frank On Friday, March 7, 2003, at 08:33 PM, Neal Sanche wrote: On Friday 07 March 2003 09:12 am, Frank Morton wrote: I added the following to jboss-service.xml while running 3.2.0RC2 under MacOS X: Call name=addListener Arg New class=org.mortbay.http.SunJsseListener Set name=Port8443/Set Set name=MinThreads5/Set Set name=MaxThreads255/Set Set name=MaxIdleTimeMs5/Set Set name=LowResourcePersistTimeMs2000/Set Set name=Keystore/usr/local/jboss/server/default/conf/keystore/Set Set name=Passwordmypwurd/Set Set name=KeyPasswordmypwurd/Set /New /Arg /Call Hey Frank, it really looks good, but just in case it's helpful, here's the contents of my jboss-service.xml in server/default/deploy/jbossweb.sar/META-INF which works with JDK 1.4.1 under Linux on a 3.2.0RC2 JBoss. The only thing that I would think would be different is your JDK release. OS X being a JDK 1.3 variant, right? Call name=addListener Arg New class=org.mortbay.http.SunJsseListener Set name=Port8443/Set Set name=MinThreads5/Set Set name=MaxThreads100/Set Set name=MaxIdleTimeMs3/Set Set name=LowResourcePersistTimeMs2000/Set Set name=KeystoreSystemProperty name=jboss.server.home.dir// conf/mykeystore.jks/Set Set name=PasswordMyPassword/Set Set name=KeyPasswordMyPassword/Set Set name=NeedClientAuthtrue/Set /New /Arg /Call Now, I added NeedClientAuth because I was experimenting with the requirement of having SSL client certificates to access this SSL port (which works for anyone who cares), you don't need that. The only other difference is the way I'm setting the Keystore property. It'll basically do the same thing as yours. The only other thing that you really need to ensure is that your keystore file actually exists and is a correct JKS keystore. I created mine with a command very similar to the following: keytool -genkey -alias myalias -keyalg rsa -keysize 2048 -validity 365 -keystore mykeystore.jks -storepass MyPassword -keypass MyPassword Then typed in the answer to the rest of the questions. It doesn't seem to matter what 'alias' you use, I'd guess it probably tries the first alias it finds which has a private key. It seems to settle on the first certificate in alphabetical order. If you have more than one key in your keystore, you may need to make a new keystore with only the keys you want. The keysize is also not important, 1024 also works fine. I'd use at least 1024 bits though. I think you definitely need a keyalg of 'rsa' for this to work at all. I tried using 'dsa' (which is the default algorithm it seems) and it wouldn't work. Also, by default, it seems that keytool generates a self-signed certificate which is all that's needed to get an initial SSL test working. A semi-interesting fact about getting SSL client certificate authentication working is this: The client certificates must be created by a trusted certificate authority. This means that your keystore file must contain the public certificates of the certificate authority your SSL server should trust. Without this the client cannot prove it is trusted by any CA the server knows about, and the client is rejected. That's just an aside, but useful info to someone trying to get client auth working. In your server logs you should see lines like the following if it's working: 2003-03-04 10:22:11,116 INFO [org.jboss.jbossweb] jetty.ssl.keystore=/home/neal/java/jboss-3.2.0RC2/server/default/conf/ mykeystore.jks 2003-03-04 10:22:11,119 INFO [org.jboss.jbossweb] jetty.ssl.password=** 2003-03-04 10:22:11,122 INFO [org.jboss.jbossweb] jetty.ssl.keypassword=** 2003-03-04 10:22:11,125 INFO [org.jboss.jbossweb] jetty.ssl.keystore.type=jks 2003-03-04 10:22:11,132 INFO [org.jboss.jbossweb] jetty.ssl.keystore.provider.name=[DEFAULT] 2003-03-04 10:22:11,434 INFO [org.jboss.jbossweb] SSLServerSocketFactory=com.sun.net.ssl.internal.ssl.SSLServerSocketFact [EMAIL PROTECTED] 2003-03-04 10:22:11,481 INFO [org.jboss.jbossweb] JsseListener.needClientAuth=true 2003-03-04 10:22:11,521 INFO [org.jboss.jbossweb] Started SocketListener on 0.0.0.0:8443 Now at this point you should be able to connect to 8443 and attempt a browser connection to https://localhost:8443/ and if that doesn't work, all I can say is 'it works for me'. Why would Java under OSX be any different with respect to socket communications? Hope this helps out. -Neal --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your
Re: [JBoss-user] jetty filter question
Turns out the order was wrong, plus the DOCTYPE was wrong on my config file. I was getting message that filter was not declared. I moved the filter elements before the servlet element and then changed the doctype to: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; On Thursday, February 20, 2003, at 01:32 AM, Alex Loubyansky wrote: the problem is that, the order of elements in web.xml should match the order of elements declaration in web-app_2_3.dtd or web-app_2_2.dtd (depends on the spec version you use). Here is the snippet: !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, filter*, filter-mapping*, listener*, servlet*, ... So, make sure the filter declaration is not before any element it is declared after. alex Wednesday, February 19, 2003, 11:58:09 PM, you wrote: FM I would like to run a filter on every jsp with 3.0.6. I thought if I FM put the following: FM filter FMfilter-nameTidy/filter-name FM filter-classcom.base2inc.app.filter.FilterTidy/filter-class FM /filter FM filter-mapping FMfilter-nameTidy/filter-name FMurl-pattern/*.jsp/url-pattern FM /filter-mapping FM in the web.xml file for the application that it would run the Tidy FM filter on each page. FM When I do this, I get the message: FM org.jboss.deployment.DeploymentException: Element web-app does not FM allow filter here.; FM Where is the right here? --- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] 10.5.6 finder missing query element exception with 3.0.6
Moving from jboss 3.0.2 to 3.0.6, now getting deployment errors on all finder methods: Bean : Profile Method : public abstract Profile findByProfileHandle(String) throws FinderException Section: 10.5.6 Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor. So, I thought this meant I needed to include something like the following in ejb-jar.xml or jbosscmp-jdbc.xml like the docs describe for the bean: query query-method method-namefindByProfileHandle/method-name method-paramsmethod-paramjava.lang.String/method-param/method- params /query-method declared-sql where![CDATA[ profilehandle = ?1 ]]/where order/order /declared-sql /query Neither made a difference. In ejb-jar.xml it insists on a ejb-ql tag, so I added the following to ejb-jar.xml instead, which still generated the same problem: query query-method method-namefindProfileHandle/method-name method-paramsmethod-paramString/method-param/method-params /query-method ejb-ql![CDATA[ SELECT OBJECT(p) FROM profile p WHERE p.profileHandle = ?1 ]]/ejb-ql /query What is the cause of this error? --- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] jetty filter question
I would like to run a filter on every jsp with 3.0.6. I thought if I put the following: filter filter-nameTidy/filter-name filter-classcom.base2inc.app.filter.FilterTidy/filter-class /filter filter-mapping filter-nameTidy/filter-name url-pattern/*.jsp/url-pattern /filter-mapping in the web.xml file for the application that it would run the Tidy filter on each page. When I do this, I get the message: org.jboss.deployment.DeploymentException: Element web-app does not allow filter here.; Where is the right here? Thanks. --- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] 3.2.0RC2 New DOCTYPE?
Using the following as the start of an ejb-jar.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN http://java.sun.com/j2ee/dtd/ejb-jar_2_0.dtd; ejb-jar with 3.2.0RC2 generates the following exception on startup: 17:23:00,141 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@c86c4838{ url=file:/usr/local/jboss-3.2.0RC2/server/default/deploy/base2.jar, deployedLastModified=0 } org.jboss.deployment.DeploymentException: ejb-jar.xml must define a valid DOCTYPE! at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaDa ta.java:201) at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:152) at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:348) at org.jboss.deployment.MainDeployer.create(MainDeployer.java:779) at org.jboss.deployment.MainDeployer.create(MainDeployer.java:771) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:638) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:612) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy7.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc anner.java:404) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan ner.java:545) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS can(AbstractDeploymentScanner.java:195) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loo p(AbstractDeploymentScanner.java:206) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run (AbstractDeploymentScanner.java:185) --- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] 10.5.6 finder missing query element exception with 3.0.6
) at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLC ompiler.java:144) at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.init(JDBCEJBQLQuery.java :40) at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCC ommandFactory.java:44) at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.j ava:218) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCSt oreManager.java:463) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.j ava:369) at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager. java:198) at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376) at org.jboss.ejb.Container.invoke(Container.java:756) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController .java:1003) at $Proxy4.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:413) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy1066.start(Unknown Source) at org.jboss.ejb.EjbModule.startService(EjbModule.java:430) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController .java:1003) at $Proxy4.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:413) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy10.start(Unknown Source) at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:806) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc anner.java:435) at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeplo ymentScanner.java:656) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan ner.java:507) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS can(AbstractDeploymentScanner.java:212) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loo p(AbstractDeploymentScanner.java:225) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run (AbstractDeploymentScanner.java:202) On Wednesday, February 19, 2003, at 03:05 PM, Frank Morton wrote: Moving from jboss 3.0.2 to 3.0.6, now getting deployment errors on all finder methods: Bean : Profile Method : public abstract Profile findByProfileHandle(String) throws FinderException Section: 10.5.6 Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor. So, I thought this meant I needed to include something like the following in ejb-jar.xml or jbosscmp-jdbc.xml like the docs describe for the bean: query query-method method-namefindByProfileHandle/method-name method-paramsmethod-paramjava.lang.String/method-param/method- params /query-method declared-sql where![CDATA[ profilehandle = ?1 ]]/where order/order /declared-sql /query Neither made a difference. In ejb-jar.xml it insists on a ejb-ql tag, so I added the following to ejb-jar.xml instead, which still generated the same problem: query query-method method-namefindProfileHandle/method-name method
[JBoss-user] MacOS X + Norton Personal Firewall
I upgraded to MacOS X 10.2.1 and Norton Personal Firewall Software 2.0.0 and begin to have strange problems that kind of acted like a resource problem. Port 8080 would just stop responding. Restarting JBoss wouldn't do any good, but rebooting the system made the problem go away for a few hours. After trying many different things, the problem has finally gone away after adding localhost (127.0.0.1) to the firewall allowing access to port 8080. Thought I'd pass it along as more people seem to be using MacOS X. --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] FileNotFoundException: /usr/local/config/security.properties
I have a bunch of session beans with remote interfaces acting as a facade for many entity beans accessible only with local interfaces. Within the jboss container, everything is fine. But, if I try to access a bean from a standalone application running on the same machine, I get the exception below. Only thing I can find is a reference to not having a j2ee.jar file in the classpath, but I need some of the classes it provides, so I must be missing something. There is also an exception referencing ejb.properties file in the same directory structure. Do I really need these files? If so, where can I find some examples (I have all the docs)? If not, what else do I have to configure to allow access to the beans? Thanks. Here is the lookup exception: java.io.FileNotFoundException: /usr/local/config/security.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:59) at java.io.FileInputStream.init(FileInputStream.java:90) at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:56) at com.sun.enterprise.iiop.POAEJBORB.clinit(POAEJBORB.java:83) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:190) at org.omg.CORBA.ORB.create_impl(ORB.java:279) at org.omg.CORBA.ORB.init(ORB.java:323) at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:140) at com.sun.enterprise.util.ORBManager.init(ORBManager.java:69) at com.sun.enterprise.naming.SerialInitContextFactory.init(SerialInitCont extFactory.java:35) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:232) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:647) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241) at javax.naming.InitialContext.init(InitialContext.java:217) at javax.naming.InitialContext.init(InitialContext.java:173) at com.base2inc.bean.util.Factory.getContext(Factory.java:52) at com.base2inc.bean.util.Factory.getProfileValue(Factory.java:181) at org.city.app.mint.ConvertMintSpreadsheet.run(ConvertMintSpreadsh eet.java:43) at org.city.app.mint.ConvertMintSpreadsheet.main(ConvertMintSpreads heet.java:26) --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Still Disappearing JSPs seen via Jetty
I've posted this a number of times with no response each time it happens. And it is happening right now, do I'd like to know if there is anything I can check before restarting for a clue. I'm now using 3.0.2 with JDK 1.3.1-b24 under Red Hat 7.2. Periodically, seems like after long periods of idle time, that Jetty looses track of all the jsp files, so I start getting 404 Not Found errors. For example, my logon url is: http://myhostname/city/jsp/logon.jsp At this moment on a server, I get a 404 error going to that page, but I know it is there. If I look at: http://myhostname/city there is a jsp directory. But, if I look in that directory through the browser, about 80% of the JSPs do not show up as existing, but I know they are there and can look in the "real" directory through a shell and confirm they are there. Plus, if I restart jboss, they show up again and will be fine for some unknown number of days. This is a real problem I've experience now under different versions. Anything I can check on this server right now before I restart jboss?
Re: [JBoss-user] Still Disappearing JSPs seen via Jetty
Look around in /tmp/Jetty_* dirs Is it possible that some chron job is removing the JSPs from these directories ? That must be it! I didn't even realize that tmpwatch is running by default on the red hat systems. That fits the symptoms exactly and explains why it never happened on other systems. I'll make the change and see if it runs fine for awhile. Thanks and I owe you! Frank Jules Frank Morton wrote: I've posted this a number of times with no response each time it happens. And it is happening right now, do I'd like to know if there is anything I can check before restarting for a clue. I'm now using 3.0.2 with JDK 1.3.1-b24 under Red Hat 7.2. Periodically, seems like after long periods of idle time, that Jetty looses track of all the jsp files, so I start getting 404 Not Found errors. For example, my logon url is: http://myhostname/city/jsp/logon.jsp At this moment on a server, I get a 404 error going to that page, but I know it is there. If I look at: http://myhostname/city there is a jsp directory. But, if I look in that directory through the browser, about 80% of the JSPs do not show up as existing, but I know they are there and can look in the real directory through a shell and confirm they are there. Plus, if I restart jboss, they show up again and will be fine for some unknown number of days. This is a real problem I've experience now under different versions. Anything I can check on this server right now before I restart jboss? This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] 3.0.2 CommunicationException Resolution Needed
I see references to this in the forums, but no resolution. In my case, running under MacOS X 10.2, 1.3.1_01, with JBoss 3.0.2, occassionally I will get this exception. Reload the web browser page and all is fine. Normal response time for a page in our system is about 100 milliseconds. When this happens, there is a 5 second delay before the exception occurs. This happens maybe every 100 page views. Anyone know the cause of this? Has this occurred under linux? (our production server which we are close to rolling out 3.0.2...at least we were). Here is the exception 22:37:00,099 WARN [NamingContext] Failed to connect to localhost:1099 javax.naming.CommunicationException: Failed to connect to server localhost:1099. Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099. Root exception is java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124) at java.net.Socket.init(Socket.java:268) at java.net.Socket.init(Socket.java:172) at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:6 9) at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:6 2) at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:156) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1006) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:447) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440) at javax.naming.InitialContext.lookup(InitialContext.java:345) at com.base2inc.bean.util.Factory.getProfileValue(Factory.java:138) at com.base2inc.evaluate.profile.EditProfileRetrieve.run(EditProfileRetrieve.ja va:53) at com.base2inc.app.framework.JspFramework.doService(JspFramework.java:191) at com.base2inc.app.util.HttpServletExtended.doGet(HttpServletExtended.java:50) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl er.java:313) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:183) at org.mortbay.jetty.servlet.Invoker.service(Invoker.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl er.java:313) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554) at org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler .java:199) at org.mortbay.http.HttpContext.handle(HttpContext.java:1572) at org.mortbay.http.HttpContext.handle(HttpContext.java:1522) at org.mortbay.http.HttpServer.service(HttpServer.java:795) at org.jboss.jetty.Jetty.service(Jetty.java:531) at org.mortbay.http.HttpConnection.service(HttpConnection.java:784) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:799) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322) at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716) at java.lang.Thread.run(Thread.java:491) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] 3.0.0-3.0.2 exceptions
I'm moving from 3.0.0 to 3.0.2 on the MacOS X 10.2, java 1.3.1_01. I had the exceptions below from a fresh, unmodified download. I decided to ignore the exceptions and see if my stuff worked anyway, and it did. But, I still have these nagging exceptions in the starutp log I'd like to get rid of: They just look like good old fashion classpath problems, but I get these with the clean distribution using the standard run.sh startup, which I would expect to not be able to mess up. There are two sets of messages. Late in the jboss startup, I get this (I put it first because it is shorter): 22:01:40,829 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationContext=3,context=/jmx-console 22:01:42,458 INFO [jbossweb] Started WebApplicationContext[/jmx-console,file:/usr/local/jboss-3.0.2/server/defaul t/deploy/jmx-console.war/] 22:01:42,517 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@9d7e79f9{ url=file:/usr/local/jboss-3.0.2/server/default/deploy/jmx-console.war/, deployedLastModified=0 } org.jboss.deployment.DeploymentException: org.jboss.jmx.adaptor.html.HtmlAdaptorServlet; - nested throwable: (java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.html.HtmlAdaptorServlet) at org.jboss.jetty.Jetty.deploy(Jetty.java:427) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy4.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne r.java:427) at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymen tScanner.java:648) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner. java:499) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Abstract DeploymentScanner.java:261) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.jav a:967) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:396) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) at $Proxy3.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:564) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221) at org.jboss.Main.boot(Main.java:142) at org.jboss.Main$1.run(Main.java:375) at java.lang.Thread.run(Thread.java:491) + nested throwable: java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.html.HtmlAdaptorServlet at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:183) at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:227) at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:200) at org.mortbay.http.HttpContext.loadClass(HttpContext.java:1192) at org.mortbay.jetty.servlet.Holder.start(Holder.java:152) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:187) at
[JBoss-user] where to report web site typos?
Where should we report jboss.org web site typos? On http://www.jboss.org/docs/#JMX extremelly has an extra l. Frank Morton [EMAIL PROTECTED] --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Showstopper Undeploy Problem??
- Original Message - From: Jules Gosnell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 08, 2002 4:09 PM Subject: Re: [JBoss-user] Showstopper Undeploy Problem?? Frank Morton wrote: More detail that may change your mind on the diagnosis. In addition to a jsp directory containing .jsp files, there were other directories, such as graphics and css that also did not show when looking at the content through the browser that were deployed as part of the same .war file. Restart jboss and everything is back leaving absolutely everything alone (ie, deploying the same .war file without replacing it). Different? Jules Gosnell wrote: No. Restarting JBoss would redeploy every app to Jetty, which would rebuild any temporary caches on disk. Simply touching the webapp that is displaying the problem would probably have the same effect, since it would redeploy it. when you say jsp directory created by deploying the .war file exactly which directory are you talkng about ? I am deploying the application as a .war file. In the .war file are the following directories: WEB-INF css graphics jsp properties template tmp Deploying the application works fine for a number of days, then suddenly 404 errors start coming up. The jsp directory contains all the .jsp files. When this condition occurs (ie, the 404 errors), if you look at the contents of the jsp directory through the browser, last time all .jsp files were gone with the exception of one. Additionally, a directory include within the jsp directory was also missing about half the files it normally contains. I later also noticed that the other directories, like graphics were also not showing. Restart jboss and all is ok again without any other changes. This has happened two times now in about 3 weeks. Since non-jsp files were also disappearing, that is what made me think it was more of a jboss/jetty issue and not a jsp specific issue. I don't see how precompiling jsp files would help graphics files from being undeployed. Thanks for your help. This one is a little unnerving. Frank --- This sf.net email is sponsored by:ThinkGeek Stuff, things, and much much more. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Jetty and Port 80
I just use apache's mod_proxy to redirect. I'm obviously a newbie to JBoss/Jetty. Excuse me if this post would be better posted elsewhere but I would greatly appreciate any thoughts on the following problem: I'm running Redhat 7.2 which has IPCHAINS enabled by default. I'vetried the suggestions for redirecting traffic (http://jetty.mortbay.com/jetty/doc/User80.html)asfollows:/sbin/ipchains -I input --proto TCP --dport 80 -j REDIRECT 8080or:/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT--to-port 8080The IPCHAINS option doesn't work apparently because kernel is NOTcompiled with CONFIG_IP_MASQUERADE? I don't think I want to recompilea kernel...sounds pretty heavy duty.The IPTABLES option didn't work either, I'm getting the followingerror when running iptables:[[EMAIL PROTECTED] webadmin]# /sbin/iptables -L/lib/modules/2.4.9-34/kernel/net/ipv4/netfilter/ip_tables.o:init_module: Device or resource busyHint: insmod errors can be caused by incorrect module parameters,including invalid IO or IRQ parameters/lib/modules/2.4.9-34/kernel/net/ipv4/netfilter/ip_tables.o: insmod/lib/modules/2.4.9-34/kernel/net/ipv4/netfilter/ip_tables.o failed/lib/modules/2.4.9-34/kernel/net/ipv4/netfilter/ip_tables.o: insmodip_tables failediptables v1.2.4: can't initialize iptables table `filter': iptableswho? (do you need to insmod?)Perhaps iptables or your kernel needs to be upgraded.Does anybody have any suggestions to get these options to work oranother method to have Jetty/JBoss listen on port 80? It seems to me this is a basic functionality that would be used extensively or are people out there using other methods for directing their standard port 80 traffic to JBoss/Jetty on port 8080? Thanks,David Sica [EMAIL PROTECTED]
[JBoss-user] Showstopper Undeploy Problem??
Jboss 3.0.0 Linux/JDK 1.4.0 Second time this happened in about 3 weeks. No error reported in any logs. Was running just fine, but started getting 404 errors like the url didn't exist trying to display a commonly used jsp (logon page). If I look at the jsp directory created by deploying the .war file, all of the jsps are gone except one and a directory. If I restart jboss without touching the files in the deploy directory, things go back to normal. Somehow deployed files are getting undeployed while the server is running, even though the originating .war file is untouched. Is there any temporary solution to make an application undeployable? I need help on this one. Thanks. , none of the jsp files look to be deployed now --- This sf.net email is sponsored by:ThinkGeek Oh, it's good to be a geek. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Jetty and Port 80
Look under mod_proxy on the apache site. Don't remember if it compiles into httpd by defaultthink it does. Then, when you configure apache, look in the conf files for references to mod_proxy. As an example case I use, I have the following in the apache config files that routes port 80 to 8080 for a directory/application icva: IfModule mod_proxy.c ProxyPass /icva http://YOURHOSTNAME:8080/icva ProxyPassReverse /icva http://YOURHOSTNAME:8080/icva /IfModule where YOURHOSTNAME is the hostname of your web server, like www.base2inc.com. All the default stuff on the apache config files for the mod_proxy I have commented out and things seem to work fine. This is with apache 1.3.X. --- This sf.net email is sponsored by:ThinkGeek Oh, it's good to be a geek. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Showstopper Undeploy Problem??
More detail that may change your mind on the diagnosis. In addition to a jsp directory containing .jsp files, there were other directories, such as graphics and css that also did not show when looking at the content through the browser that were deployed as part of the same .war file. Restart jboss and everything is back leaving absolutely everything alone (ie, deploying the same .war file without replacing it). Different? Jetty and Tomcat both use Jasper as their JSP engine. This is most likely a problem with Jasper, or some other process on your box cleaning up /tmp. If you are sure that no external process is screwing things up, then one way to avoid this happening would be to precompile your JSPs. This means that you will no longer be deploying any JSPs, but compiled Servlets. Then you will have no temporarily cached class files to worry about. advantages are: - compile-time errors will be caught in development, not production - deploying to a heavily loaded site will not cause multiple concurrent compilations of e.g. index.jsp (patch submitted to Jasper) - dispatch of request to servlet is simpler and therefore quicker since it goes direct from Jetty-Servlet and not Jetty-.Jasper-Servlet. - no compile environment needed on your production box - where it may be considered a security hazard. This FAQ contains an entry on JSP precompilation which I hope will be enlightening http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/FAQ?rev=H EADcontent-type=text/vnd.viewcvs-markup Jules Frank Morton wrote: Jboss 3.0.0 Linux/JDK 1.4.0 Second time this happened in about 3 weeks. No error reported in any logs. Was running just fine, but started getting 404 errors like the url didn't exist trying to display a commonly used jsp (logon page). If I look at the jsp directory created by deploying the .war file, all of the jsps are gone except one and a directory. If I restart jboss without touching the files in the deploy directory, things go back to normal. Somehow deployed files are getting undeployed while the server is running, even though the originating .war file is untouched. Is there any temporary solution to make an application undeployable? I need help on this one. Thanks. , none of the jsp files look to be deployed now --- This sf.net email is sponsored by:ThinkGeek Oh, it's good to be a geek. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Oh, it's good to be a geek. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Oh, it's good to be a geek. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] How do I undeploy running thread?
Using 3.0.0. I have an application that I deploy as a .jar and a .war file separately. Running under supervision of jetty is a servlet that starts and allows to run continually a number of Threads. When I redeploy the application (actually undeploy and then deploy), the old threads continue to run. How can I stop them as part of the deploy process? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Restart JBoss After Out of Memory
Has anyone else seen this JBoss just stop responding? I have had one instance of jboss no longer responding, but memory looked fine. Processes still running. Just no response. Restarted jboss and has been running since. Every once and awhile my JBoss 3.0 (Red Hat 7.2 / Sun 1.3.1_03 JVM) server will die. I assume that it is running out of memory. We specify up to 800MB of RAM at JBoss start up... Our applications get tons and tons of hits. I need to profile our app in JBoss and see where memory is leaking... In the meantime, I'm wondering if anyone has developed a script of daemon that would restart JBoss if it died? Anyone done anything like that? Hunter --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Bringing you mounds of caffeinated joy. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] 3.0.0 InstantiateException + JAWS?
Still transitioning from RC1 to 3.0.0. When I instantiate an EJB 2.0 entity bean, I get an InstantiateException below. Also, in the stack trace is a reference to JAWS, which I thought had nothing to do with EJB 2.0. I must be wrong about that. Any idea what can cause this. Runs fine under RC1. Using mysql underneath. Here is the exception: 00:10:57,538 INFO [Jetty] JSP: init00:11:21,259 WARN [Jetty] WARNING: Servlet Exception for /icva/servlet/IcvaFrameworkjava.lang.reflect.UndeclaredThrowableException: java.rmi.ServerException: Could not instantiate bean; nested exception is: java.lang.InstantiationException: com.base2inc.bean.entity.note.NoteBean; nested exception is: java.rmi.ServerException: Could not instantiate bean; nested exception is: java.lang.InstantiationException: com.base2inc.bean.entity.note.NoteBeanjava.rmi.ServerException: Could not instantiate bean; nested exception is: java.lang.InstantiationException: com.base2inc.bean.entity.note.NoteBeanjava.lang.InstantiationException: com.base2inc.bean.entity.note.NoteBean at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createBeanClassInstance(JAWSPersistenceManager.java:165) at org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassInstance(CMPPersistenceManager.java:165) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createBeanClassInstance(CachedConnectionInterceptor.java:251) at org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityContainer.java:294) at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:208) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:122) at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
Re: [JBoss-user] From RC1 DeploymentException
To fix this problem, I added the following to each jboss.xml for all my entity beans (2.0): configuration-nameStandard CMP EntityBean/configuration-name Did not have to do it with session beans. Frank Moving from RC1 to 3.0.0 release. Looking smooth except when deploying beans I get a DeploymentException: Error in jboss.xml for Bean Profile: configuration '' not found in standardjboss.xml or jboss.xml Here is the jboss.xml file, which I assume is missing something that is now required: ?xml version=1.0 encoding=UTF-8? jboss securefalse/secure container-configurations / enterprise-beans entity ejb-nameProfile/ejb-name local-jndi-namebase2/profile/local-jndi-name configuration-name / /entity /enterprise-beans /jboss Anyone know what is missing or if this is from something else? Frank ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] From RC1 DeploymentException
Moving from RC1 to 3.0.0 release. Looking smooth except when deploying beans I get a DeploymentException: Error in jboss.xml for Bean Profile: configuration '' not found in standardjboss.xml or jboss.xml Here is the jboss.xml file, which I assume is missing something that is now required: ?xml version=1.0 encoding=UTF-8? jboss securefalse/secure container-configurations / enterprise-beans entity ejb-nameProfile/ejb-name local-jndi-namebase2/profile/local-jndi-name configuration-name / /entity /enterprise-beans /jboss Anyone know what is missing or if this is from something else? Frank ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JBoss-3.0rc3: Can't get remote reference to EJB (still)
Another question, should I simply ignore the warnings: 18:42:59,143 INFO [EJBDeployer] Bean : PlaylistBean Section: 9.2.2 Warning: The entity bean class must not be defined as abstract. This problem exists in RC1, but is reported to have been fixed in the final 3.0 release, though I haven't confirmed. When I get warnings like below, I stop everything else and fix the problem it is pointing out. The diagnostics are really very good and very accurate. The section number refers to the EJB 2.0 spec available at javasoft.com and offers further insight at times. 18:42:59,659 INFO [EJBDeployer] Bean : PlaylistBean Method : public Integer ejbCreate(Integer, int, String) throws CreateException Section: 9.2.3 Warning: The return type of an ejbCreate(...) method must be the entity bean's primary key type. 18:42:59,702 INFO [EJBDeployer] Bean : PlaylistBean Section: 9.4.7.1 Warning: The primkey-field element must name a public field in the bean implementation class. ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Running standalone applications with 3.0
RE: [JBoss-user] jndi questionI have a factory class that does jndi lookups and creates a session bean. Using 3.0RC1, things work great if I do these lookups within the jboss context, but if I do it from a stand-alone application, I get the exception below. I assume it is a classpath thing, but I have been unable to figure out what is wrong. Anyone have any clues? I see no signs of a file called security.properties. Is this leftover from some previous install? Here is the exception: java.io.FileNotFoundException: /usr/local/jboss/config/security.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:64) at java.io.FileInputStream.init(FileInputStream.java:95) at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:56) at com.sun.enterprise.iiop.POAEJBORB.clinit(POAEJBORB.java:83) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at org.omg.CORBA.ORB.create_impl(ORB.java:284) at org.omg.CORBA.ORB.init(ORB.java:328) at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:140) at com.sun.enterprise.util.ORBManager.init(ORBManager.java:69) at com.sun.enterprise.naming.SerialInitContextFactory.init(SerialInitContextF actory.java:35) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.init(InitialContext.java:178) at com.base2inc.bean.util.Factory.getNoteValue(Factory.java:126) at com.base2inc.test.query.QueryTestClient.init(QueryTestClient.java:44) at com.base2inc.test.query.QueryTestClient.main(QueryTestClient.java:17) java.io.FileNotFoundException: /usr/local/jboss/config/ejb.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:64) at java.io.FileInputStream.init(FileInputStream.java:95) at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:56) at com.sun.enterprise.iiop.J2EEInitializer.init(J2EEInitializer.java:57) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at com.sun.corba.ee.internal.Interceptors.PIORB.registerORBInitializers(PIORB.j ava:373) at com.sun.corba.ee.internal.Interceptors.PIORB.parseProperties(PIORB.java:343) at com.sun.corba.ee.internal.TxPOA.TxPIORB.parseProperties(TxPIORB.java:116) at com.sun.corba.ee.internal.corba.ORB.set_parameters(ORB.java:449) at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:152) at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:332) at org.omg.CORBA.ORB.init(ORB.java:329) at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:140) at com.sun.enterprise.util.ORBManager.init(ORBManager.java:69) at com.sun.enterprise.naming.SerialInitContextFactory.init(SerialInitContextF actory.java:35) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.init(InitialContext.java:178) at com.base2inc.bean.util.Factory.getNoteValue(Factory.java:126) at com.base2inc.test.query.QueryTestClient.init(QueryTestClient.java:44) at com.base2inc.test.query.QueryTestClient.main(QueryTestClient.java:17) ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JBoss: Sun Needs Us Question
I just read for the first time the article at: http://www.onjava.com/pub/a/onjava/2002/03/20/jboss_interview.html In it, referring to J2EE certification, Fleury and Mason are quoted as saying: Today we can afford this certification. Is that a typo, which should have said could NOT afford the certification or is just sun refusing? What is the cost of certification? Frank ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] AMR Research Application Server Market Study
To the AMR Research people: In your application server market study release today at: http://www.amrresearch.com/pressroom/files/200252.asp there no evidence that you considered open-source application server software, such as the jboss project at www.jboss.org I'd like to suggest that in the future you look at the innovative work being done in the open-source community, which now offers very serious and attractive alternatives to conventional products. Frank Morton [EMAIL PROTECTED] ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection Performance Killer
I have neither a jbosscmp-jdbc.xml or a jaws.xml, assuming it would use standard setting if missing. Is that right? Yes if you don't want to tune loading, but then you are not allowed to complain about speed. -dain From advice from all of you, I have converted all my beans to truly use the 2.0 spec. I also have defined a jbosscmp-jdbc.xml for each bean so I can be allowed to complain about speed ;-) I have also become friends with the dtds and am writing my config files actually looking at them. Highly recommended for all who are lazy like me. I have some minor questions, but I'll get to my big one. I have seen glimmers of very big speed improvements after my conversion, but I have had to use UserTransactions to get what I would expect to be normal behavior without them. Below is a long log with my commentary about what is happening. Basically it is the same Collection iteration issue. I am doing a query resulting in around 200 Attribute beans in a Collection, iterating through the collection and getting a simple property from each Attribute to build a HashMap of Attributes using the name property as the key for the HashMap. If I wrap it with a UserTransaction, things look good, but I don't see why I would have to do so. And, if I do, I have many places where I will have to do the same thing, which I would like to avoid. Without wrapping in my own transaction, when trying to get a single property from a single element in the Collection, it loads the whole Collection. I don't understand why it would do it twice, let alone for each element in the Collection. I also don't understand if it is a function of the commit options, config or it is not working as expected. Here is the log with my commentary preceded by I have taken out a lot of stuff to make it shorter, but it is still pretty long. Thanks. build the Collection of Attributes 2002-04-26 09:26:53,066 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByQuery.Attribute.findByContainerId] Executing SQL: SELECT id FROM attribute WHERE containerId=? 2002-04-26 09:26:53,175 ERROR [STDERR] DEBUG: prep time for collection map: 1 2002-04-26 09:26:53,177 ERROR [STDERR] DEBUG: class used in the reflection: $Proxy171 2002-04-26 09:26:53,179 ERROR [STDERR] DEBUG: field name: name 2002-04-26 09:26:53,191 ERROR [STDERR] DEBUG: just getting the method time is0 begin to iterate the Collection and get the name property for indexing this loads the whole collection which is perfect 2002-04-26 09:26:53,193 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006166] getName() 2002-04-26 09:26:53,196 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.Attribute] Executing SQL: SELECT id,containerId, containerType, name, value FROM attribute WHERE (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR ! (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) 2002-04-26 09:26:55,146 DEBUG [org.jboss.jetty.util.NaiveTimeOutManager] background thread ended: org.jboss.jetty.util.NaiveTimeOutManager@466eea still takes 3 seconds to do this.beats 20 seconds though 2002-04-26 09:26:56,244 ERROR [STDERR] DEBUG: invoking method time is3054 2002-04-26 09:26:56,249 ERROR [STDERR] DEBUG: add field time: 3072 2002-04-26 09:26:56,251 ERROR [STDERR] DEBUG: class used in the reflection: $Proxy171 2002-04-26 09:26:56,253 ERROR [STDERR] DEBUG: field name: name 2002-04-26
Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection Performance Killer
Dain wrote: BTW: there is a difference between doesn't work and is not fast enough for me. You are right about that. With all the weird things I have tried on this, I have never gotten an exception that I didn't cause which is a real testimony to the stability of 3.0.0.RC1. Have you looked at the server.log? What queries are being executed? Don't post the whole file. Give us a summary. Here is the log where I invoke the stateless session bean that first does a find on a Container, then finds a Collection of Attribute beans. I'm after the name property in each Attribute. It is doing individual selects on each Attribute in the Collection. I guess my bottom-line question is if cmp can be coaxed into loading the Collection with a single Select since it takes around 100ms per select, leading to about 20 seconds for a Collection of 200. I'll try any idea you may have. Wow does that leave me open for comment ;-) Frank 2002-04-24 10:02:37,151 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1] getProfileHandle() 2002-04-24 10:02:37,153 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1] getId() 2002-04-24 10:02:37,154 DEBUG [org.jboss.jetty.util.NaiveTimeOutManager] background thread started: org.jboss.jetty.util.NaiveTimeOutManager@7b914d 2002-04-24 10:02:37,248 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1] getId() 2002-04-24 10:02:37,311 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: create() 2002-04-24 10:02:37,318 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: findByPrimaryKeyMap(1004976,name) 2002-04-24 10:02:37,379 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: findByPrimaryKey(1004976) 2002-04-24 10:02:37,383 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exists command executing: SELECT COUNT(*) FROM Container WHERE id=? 2002-04-24 10:02:37,383 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1004976 2002-04-24 10:02:37,387 DEBUG [org.jboss.jetty.util.NaiveTimeOutManager] background thread ended: org.jboss.jetty.util.NaiveTimeOutManager@7b914d 2002-04-24 10:02:37,420 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: findByContainerId(1004976) 2002-04-24 10:02:37,423 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] findByContainerId command executing: SELECT id FROM Attribute WHERE containerId=? 2002-04-24 10:02:37,423 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1004976 2002-04-24 10:02:37,555 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006166] getName() 2002-04-24 10:02:37,556 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,556 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1006166 2002-04-24 10:02:37,623 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006167] getName() 2002-04-24 10:02:37,624 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,625 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1006167 2002-04-24 10:02:37,685 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006168] getName() 2002-04-24 10:02:37,688 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,689 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1006168 2002-04-24 10:02:37,768 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1007007] getName() 2002-04-24 10:02:37,771 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,771 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1007007 2002-04-24 10:02:37,839 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1007008] getName() 2002-04-24 10:02:37,840 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,841 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1007008 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection Performance Killer
Wait. Are you using JAWS? I only ask that because all of the log stuff is from JAWS. If you are using JAWS, I can't help, because I don't know anything about the JAWS optimized loading process. -dain Well, I'm using 3.0 as distributed. I assumed if I set cmp-version to 2.x that I would be using the persistence-manager for Standard CMP 2.x EntityBean, which in standardjboss.xml is orgJDBCStoreManager. So, to answer your question as best I can, I don't think so and I'm thinking if I am, it is by accident and shouldn't be the case. JAWS is for pre-2.0, right? Can you shed light on this? Frank Frank Morton wrote: Dain wrote: BTW: there is a difference between doesn't work and is not fast enough for me. You are right about that. With all the weird things I have tried on this, I have never gotten an exception that I didn't cause which is a real testimony to the stability of 3.0.0.RC1. Have you looked at the server.log? What queries are being executed? Don't post the whole file. Give us a summary. Here is the log where I invoke the stateless session bean that first does a find on a Container, then finds a Collection of Attribute beans. I'm after the name property in each Attribute. It is doing individual selects on each Attribute in the Collection. I guess my bottom-line question is if cmp can be coaxed into loading the Collection with a single Select since it takes around 100ms per select, leading to about 20 seconds for a Collection of 200. I'll try any idea you may have. Wow does that leave me open for comment ;-) Frank 2002-04-24 10:02:37,151 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1] getProfileHandle() 2002-04-24 10:02:37,153 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1] getId() 2002-04-24 10:02:37,154 DEBUG [org.jboss.jetty.util.NaiveTimeOutManager] background thread started: org.jboss.jetty.util.NaiveTimeOutManager@7b914d 2002-04-24 10:02:37,248 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1] getId() 2002-04-24 10:02:37,311 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: create() 2002-04-24 10:02:37,318 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: findByPrimaryKeyMap(1004976,name) 2002-04-24 10:02:37,379 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: findByPrimaryKey(1004976) 2002-04-24 10:02:37,383 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exists command executing: SELECT COUNT(*) FROM Container WHERE id=? 2002-04-24 10:02:37,383 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1004976 2002-04-24 10:02:37,387 DEBUG [org.jboss.jetty.util.NaiveTimeOutManager] background thread ended: org.jboss.jetty.util.NaiveTimeOutManager@7b914d 2002-04-24 10:02:37,420 DEBUG [org.jboss.ejb.plugins.LogInterceptor] InvokeHome: findByContainerId(1004976) 2002-04-24 10:02:37,423 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] findByContainerId command executing: SELECT id FROM Attribute WHERE containerId=? 2002-04-24 10:02:37,423 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1004976 2002-04-24 10:02:37,555 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006166] getName() 2002-04-24 10:02:37,556 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,556 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1006166 2002-04-24 10:02:37,623 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006167] getName() 2002-04-24 10:02:37,624 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,625 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1006167 2002-04-24 10:02:37,685 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1006168] getName() 2002-04-24 10:02:37,688 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,689 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=BIGINT, value=1006168 2002-04-24 10:02:37,768 DEBUG [org.jboss.ejb.plugins.LogInterceptor] Invoke: [1007007] getName() 2002-04-24 10:02:37,771 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Load command executing: SELECT Attribute.id,Attribute.containerId,Attribute.name,Attribute.value,Attribute. containerType FROM Attribute WHERE id=? 2002-04-24 10:02:37,771 DEBUG
[JBoss-user] Moving from EJB 1.x to 2.x
Anyone know what these error messages mean when deploying a 2.x entity bean? What exactly does this message mean: org.jboss...DeploymentException: expected one strategy tag I do have in my ejb-jar.xml a read-aheadstrategy... entry, which is what I assume it is talking about. Also I get this message deploying a bean called Identifier: Bean: Identifier Method: public String ejbCreate(String) Section: 10.6.4 Warning: The throws clause must define the javax.ejb.CreateException Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection Performance Killer
Does your ejb-jar have a jbosscmp-jdbc.xml, or a jaws.xml? It should be only jbosscmp-jdbc.xml (although any jaws.xml should be ignored by JBoss 3.0 or later). Trying to use jaws.xml with JBoss 3.x is getting to be a FAQ issue, but I know Dain's been trying to help you with this so I imagine you've got this right. I have neither a jbosscmp-jdbc.xml or a jaws.xml, assuming it would use standard setting if missing. Is that right? Frank ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Moving from EJB 1.x to 2.x
Does your ejbCreate method have throws CreateException in its definition and the interfaces? Bean: Identifier Method: public String ejbCreate(String) Section: 10.6.4 Warning: The throws clause must define the javax.ejb.CreateException Turns out the ejbCreate method did throw CreateException, but the bean had a superclass with an ejbCreate that did not throw the exception. Still don't know what expected one strategy tag means. Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] CMP: Iterate Collection Performance Killer
Using 3.0.0RC1 with PostgreSQL underneath. Just converted to using a Local Interface, but didn't make as much performance difference as I hoped. I have a case where I need to iterate a Collection resulting from a finder method with an entity bean. Since the collection might have 200 items, performance is very bad iterating the Collection. (I do have an index on the field used for finding). Using a Collection in the first place is what I would like to do since some of the elements require an update. But, since I know I will be looking at each item in the Collection, is there some way to fetch the content of the collection as a group prior to iterating instead of getting killed by the performance of fetching one at a time? TIA. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] CMP: Iterate Collection Performance Killer
Use a transaction or turn off read ahead. You are basically reading ahead data, tossing the read-ahead information out, and then repeating. -dain Thanks for your response. Sorry for my confusion, but I am. Your doc states to use read-ahead with the strategyon-load/strategy for this exact case, but doesn't seem to make a difference at this point. You are saying strategy=none is the right thing to do? I tried that, too, which doesn't appear to make any difference. Please clarify this. There is a lot of contradictory info on the web about this. I also tried setting read-ahead in standardjaws.xml to true and false, neither of which seemed to make any difference. Seems no matter what I do, I get the same behavior, so I must be missing something. While I'm irritating you, can you explain exactly how or refer me to someplace that explains exactly how to use a transaction to speed up reading Collections. Thanks. I'm guessing I'm not the only one that needs to know about this. Frank Here is my ejb-jar.xml file in case it is of use to you: ?xml version=1.0 encoding=UTF-8? ejb-jar descriptionAttribute Management/description display-nameAttribute Management/display-name enterprise-beans entity descriptionAttribute/description ejb-nameAttribute/ejb-name local-homecom.base2inc.bean.entity.attribute.AttributeHome/local-home localcom.base2inc.bean.entity.attribute.Attribute/local ejb-classcom.base2inc.bean.entity.attribute.AttributeBean/ejb-class persistence-typeContainer/persistence-type prim-key-classjava.lang.Long/prim-key-class reentrantFalse/reentrant cmp-version2.x/cmp-version cmp-fieldfield-nameid/field-namejdbc-typeBIGINT/jdbc-type/cmp-fie ld cmp-fieldfield-namecontainerId/field-namejdbc-typeBIGINT/jdbc-type /cmp-field cmp-fieldfield-namecontainerType/field-name/cmp-field cmp-fieldfield-namename/field-name/cmp-field cmp-fieldfield-namevalue/field-name/cmp-field primkey-fieldid/primkey-field read-ahead strategyon-load/strategy limit255/limit cache-size1000/cache-size /read-ahead /entity /enterprise-beans assembly-descriptor container-transaction method ejb-nameAttribute/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar Frank Morton wrote: Using 3.0.0RC1 with PostgreSQL underneath. Just converted to using a Local Interface, but didn't make as much performance difference as I hoped. I have a case where I need to iterate a Collection resulting from a finder method with an entity bean. Since the collection might have 200 items, performance is very bad iterating the Collection. (I do have an index on the field used for finding). Using a Collection in the first place is what I would like to do since some of the elements require an update. But, since I know I will be looking at each item in the Collection, is there some way to fetch the content of the collection as a group prior to iterating instead of getting killed by the performance of fetching one at a time? TIA. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
STILL TRYING: [JBoss-user] CMP: Iterate Collection Performance Killer
I think I'm close.Thanks to all who have given advice. If I get this going, I'll be glad to write up the results, which based on dain's comments, others are also asking about. Here are the details (using 3.0.0.RC1): I have two cmp entity beans: Container and Attribute. I also have a stateless session bean called ContainerControl. In this class, there is a method called findByPrimaryKeyMap. This method does a findByPrimaryKey on a Container. It also does a findByContainerId, which returns a Collection of ~ 200 elements on Attribute, causing the performance problem. The findByPrimaryKeyMap method returns what I call a ContainerMap, which encapsulates the two find results as well as build a lookup table of the Collection. I have a web application that does the following: ContainerControl containerControl = Factory.getContainerControl(); ContainerMap containerMap = containerControl.findByPrimaryKeyMap(id,name); CollectionMap attributeMap = containerMap.getAttributeMap(); Basically looks up the session bean, does the find and gets the results out of the ContainerMap. When the ContainerMap is built, it iterates the Collection, taking over 100 ms per element. Based on that, each step must still think it is a transaction. Based on the ejb-jar below, I think the session bean ought to be a single transaction, but it isn't. The ContainerControl ejb-jar.xml files looks like: ?xml version=1.0 encoding=UTF-8? ejb-jar descriptionContainer Session Beans/description display-nameContainer Session Beans/display-name enterprise-beans session ejb-nameContainerControl/ejb-name homecom.base2inc.bean.session.container.ContainerControlHome/home remotecom.base2inc.bean.session.container.ContainerControl/remote ejb-classcom.base2inc.bean.session.container.ContainerControlBean/ejb-cla ss session-typeStateless/session-type transaction-typeBean/transaction-type /session session ejb-nameContainerValue/ejb-name homecom.base2inc.bean.session.container.ContainerValueHome/home remotecom.base2inc.bean.session.container.ContainerValue/remote ejb-classcom.base2inc.bean.session.container.ContainerValueBean/ejb-class session-typeStateless/session-type transaction-typeBean/transaction-type /session /enterprise-beans assembly-descriptor container-transaction method ejb-nameContainerControl/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar Any idea will be tried. Thanks. You must use a transaction for your unseen session bean that is accessing the entity beans. Otherwise, as Dain says, everytime you change a bean in the collection, it creates a transaction, reads ahead 1000 or so (depending upon read-ahead limit) then when you edit the bean, it commits the transaction, which loses all the read-ahead information. Then as you edit the next bean, it starts the whole process over again. If your session bean was called AttributeManager, you would use a container-transaction like the following in the assembly-descriptor element. This way, the transactions on the Attribute bean are encompassed by the transaction on the session bean method that is iterating over the collection. container-transaction method ejb-nameAttributeManager/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction Michael -Original Message- From: Frank Morton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 11:50 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] CMP: Iterate Collection Performance Killer Use a transaction or turn off read ahead. You are basically reading ahead data, tossing the read-ahead information out, and then repeating. -dain Thanks for your response. Sorry for my confusion, but I am. Your doc states to use read-ahead with the strategyon-load/strategy for this exact case, but doesn't seem to make a difference at this point. You are saying strategy=none is the right thing to do? I tried that, too, which doesn't appear to make any difference. Please clarify this. There is a lot of contradictory info on the web about this. I also tried setting read-ahead in standardjaws.xml to true and false, neither of which seemed to make any difference. Seems no matter what I do, I get the same behavior, so I must be missing something. While I'm irritating you, can you explain exactly how or refer me to someplace that explains exactly how to use a transaction to speed up reading Collections. Thanks. I'm guessing I'm not the only one that needs to know about this. Frank
Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection Performance Killer
Maybe I should try a different tactic. Does anyone have an entity bean that has a method that returns a Collection that performs well with ~200 elements in the Collection? Reaching it through a session bean is fine. If so, would you share the source? I'm beginning to believe that no one actually has done this successfully. Still working on this without success. I have tried all suggestions, including wrapping it with a UserTransaction, but still didn't make any difference. Still wanting cmp to work.. I think I'm close.Thanks to all who have given advice. If I get this going, I'll be glad to write up the results, which based on dain's comments, others are also asking about. Here are the details (using 3.0.0.RC1): I have two cmp entity beans: Container and Attribute. I also have a stateless session bean called ContainerControl. In this class, there is a method called findByPrimaryKeyMap. This method does a findByPrimaryKey on a Container. It also does a findByContainerId, which returns a Collection of ~ 200 elements on Attribute, causing the performance problem. The findByPrimaryKeyMap method returns what I call a ContainerMap, which encapsulates the two find results as well as build a lookup table of the Collection. I have a web application that does the following: ContainerControl containerControl = Factory.getContainerControl(); ContainerMap containerMap = containerControl.findByPrimaryKeyMap(id,name); CollectionMap attributeMap = containerMap.getAttributeMap(); Basically looks up the session bean, does the find and gets the results out of the ContainerMap. When the ContainerMap is built, it iterates the Collection, taking over 100 ms per element. Based on that, each step must still think it is a transaction. Based on the ejb-jar below, I think the session bean ought to be a single transaction, but it isn't. The ContainerControl ejb-jar.xml files looks like: ?xml version=1.0 encoding=UTF-8? ejb-jar descriptionContainer Session Beans/description display-nameContainer Session Beans/display-name enterprise-beans session ejb-nameContainerControl/ejb-name homecom.base2inc.bean.session.container.ContainerControlHome/home remotecom.base2inc.bean.session.container.ContainerControl/remote ejb-classcom.base2inc.bean.session.container.ContainerControlBean/ejb-cla ss session-typeStateless/session-type transaction-typeBean/transaction-type /session session ejb-nameContainerValue/ejb-name homecom.base2inc.bean.session.container.ContainerValueHome/home remotecom.base2inc.bean.session.container.ContainerValue/remote ejb-classcom.base2inc.bean.session.container.ContainerValueBean/ejb-class session-typeStateless/session-type transaction-typeBean/transaction-type /session /enterprise-beans assembly-descriptor container-transaction method ejb-nameContainerControl/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar Any idea will be tried. Thanks. You must use a transaction for your unseen session bean that is accessing the entity beans. Otherwise, as Dain says, everytime you change a bean in the collection, it creates a transaction, reads ahead 1000 or so (depending upon read-ahead limit) then when you edit the bean, it commits the transaction, which loses all the read-ahead information. Then as you edit the next bean, it starts the whole process over again. If your session bean was called AttributeManager, you would use a container-transaction like the following in the assembly-descriptor element. This way, the transactions on the Attribute bean are encompassed by the transaction on the session bean method that is iterating over the collection. container-transaction method ejb-nameAttributeManager/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction Michael -Original Message- From: Frank Morton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 11:50 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] CMP: Iterate Collection Performance Killer Use a transaction or turn off read ahead. You are basically reading ahead data, tossing the read-ahead information out, and then repeating. -dain Thanks for your response. Sorry for my confusion, but I am. Your doc states to use read-ahead with the strategyon-load/strategy for this exact case, but doesn't seem to make a difference at this point. You are saying strategy=none is the right thing to do? I tried
[JBoss-user] Bean Naming Problem: Profile
Transitioning to JBoss 3.0 I have been getting a deployment error complaining about some methods in the bean not having matching method definitions in the bean and the remote interface. I couldn't see anything wrong, so I changed the prefix for the bean from Profile to Proffile and it deployed just fine first shot. The bean structure is essentially the same as my other beans, too, that deploy without problem. Is there something about the name Profile causing problems? ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] jar deployment
Can I deploy helper classes by copying them into the deploy directory as a .jar file rather than have them in the lib directory at startup time? I'm using JBoss 3.0 RC1. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Differences between 2.x and 3.x?
-more flexible deployment and classloading system I have to admit I'm a little confused on deployment, particularly in a development environment where things change a lot. Are there any docs anywhere for 3.x or are any planned? ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] ONJAVA-- JBOSS: SUN NEEDS US
check it out... http://www.onjava.com/pub/a/onjava/2002/03/20/jboss_interview.html he he he marcf bang! bang! bang! That was an inspired interview. You stated Jboss's position very well and it encourages me to move more and more development to Jboss. I would think Sun would read it, and realize that if they hold on too tight, .net is going to hurt them and once again the Microsoft marketing machine will inflict pain upon them with a lesser product. Certifying Jboss is the right thing for Sun to want to happen. Keep it up! Frank Morton [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Documentation: Sams Book
Regarding the various threads on documentation, isn't the SAMS book coming up the definitive guide with the other special for sale docs as supplements for more detail in a specific area, such as CMP? And, is the SAMS book for jboss 3.0? FYI: Amazon link to the book: http://www.amazon.com/exec/obidos/ASIN/0672323478/qid=1016144099/sr=8-1/ref= sr_8_3_1/002-9661662-9694448 I think all ought to buy a copy or two just to support the project! Frank Morton [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] classpath confusion
I have accumulated a lot of stuff in my CLASSPATH and JBOSS_CLASSPATH that probably doesn't need to be there. Advice on the forums seems to range from to not touch JBOSS_CLASSPATH tojust pile everything into the two paths until it works, which is what I've done. Does anyone really know what the "right" jar files should be included in CLASSPATH and JBOSS_CLASSPATH to both start the server and to start applications using the server?
[JBoss-user] cmp read-ahead question
With read-ahead set to true on a cmp entity bean, is the content loaded with a single select or just call load for each bean individually as normal? If it is multiple selects, has anyone looked into prefetching the bean content with a single select? That seems like it would be a significant cmp optimization. I'm still fighting ways to make Collections or 100 items or so perform reasonable (without much success). ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] cmp limitations
I'm still a newbie but I think I'm learning finally that cmp works great retrieving a single row. But, when retrieving a Collection of any size (like 100) the overhead is so significant that performance makes it unusable. So, you are stuck moving to a session bean and doing your own management of the transaction. Is that right or am I missing something really basic? Seems like the biggest short-coming with EJB. Please share your opinion about this and offer solutions. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] jboss-jetty package docs?
Any recent docs on installing and configuring the jboss-jetty package (under linux)? ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] setter/getter methods by name solution
Earlier the list helped me build some methods to include in an entity bean to set/get field values by name using reflection. As it turns out, the PropertyDescriptor approach reported earlier to work doesn't work all the time. I was not able to pin down exactly what the problem was because it worked with some methods and not with others with no pattern that I could see. Below is code that works as part of an entity bean (ie, this is the bean). The ReflectException is my name for an exception handling class and the capitalize utility just make the first letter of a String capitalized. I'm using JDK 1.3.1_01 under Solaris 8/SPARC. Frank public void set(String propertyName,Object value) throws ReflectException { try { Class[] classlist = { value.getClass() }; Method method = getClass().getDeclaredMethod(set+Util.capitalize(propertyName),classlist); Object[] args = { value }; method.invoke(this,args); } catch(NoSuchMethodException e) { throw new ReflectException(unknown property +propertyName,e); } catch(IllegalAccessException e) { throw new ReflectException(unknown property +propertyName,e); } catch(InvocationTargetException e) { throw new ReflectException(unknown property +propertyName,e); } } public Object get(String propertyName) throws ReflectException { try { Method method = getClass().getDeclaredMethod(get+Util.capitalize(propertyName),null); return(method.invoke(this,null)); } catch(NoSuchMethodException e) { throw new ReflectException(unknown property +propertyName,e); } catch(IllegalAccessException e) { throw new ReflectException(unknown property +propertyName,e); } catch(InvocationTargetException e) { throw new ReflectException(unknown property +propertyName,e); } } ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] load failed exception
I have an CMP entity bean running with 2.4.3 and mySQL under Solaris 8/SPARC. The bean was fine, but I needed to add some fields. I added the fields and associated methods as well as modified the ejb-jar.xml file. Redeployed. Dropped the old table. Restarted jboss to make sure it built the new table. New table checks out ok with the new fields. Everything looks fine. When I invoke a find method on the table, it works correctly, but as soon as I attempt to access any of the fields in the bean through an accessor method, I get the exceptions below on the client and server side. I saved to old .java files for the class and diff only shows the additional fields. The only significant difference is the old bean had about 10 fields and the new one has 28. Can anyone give me a clue what object fails to load? I'm continuing to look for a typo-type of error, but any clues anyone can offer will be appreciated. What is Null? On the client side, this is the exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.NullPointerException; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.NullPointerException On the server side this is the exception: [Profile] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exception is: java.lang.NullPointerException; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.NullPointerException [Profile] java.rmi.ServerException: Load failed; nested exception is: [Profile] java.lang.NullPointerException [Profile] java.lang.NullPointerException [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject(JDBCCommand.java :504) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOneEntity(JDBCLoad EntityCommand.java:219) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult(JDBCLoadE ntityCommand.java:176) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleRe sult(JDBCQueryCommand.java:59) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:160 ) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntity Command.java:147) [Profile] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistence Manager.java:156) [Profile] at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager .java:362) [Profile] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron izationInterceptor.java:286) [Profile] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce ptor.java:208) [Profile] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav a:136) [Profile] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [Profile] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:307) [Profile] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [Profile] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12 8) [Profile] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [Profile] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:427) [Profile] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI nvoker.java:393) [Profile] at java.lang.reflect.Method.invoke(Native Method) [Profile] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) [Profile] at sun.rmi.transport.Transport$1.run(Transport.java:152) [Profile] at java.security.AccessController.doPrivileged(Native Method) [Profile] at sun.rmi.transport.Transport.serviceCall(Transport.java:148) [Profile] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465) [Profile] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7 06) [Profile] at java.lang.Thread.run(Thread.java:484) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] load failed exception
Thanks Michael for getting me started down the right track. I had used a utility to generate the list of instance variables in the Bean class which neglected to declare them all public. Set them all to public and all back to normal. Frank I have an CMP entity bean running with 2.4.3 and mySQL under Solaris 8/SPARC. The bean was fine, but I needed to add some fields. I added the fields and associated methods as well as modified the ejb-jar.xml file. Redeployed. Dropped the old table. Restarted jboss to make sure it built the new table. New table checks out ok with the new fields. Everything looks fine. When I invoke a find method on the table, it works correctly, but as soon as I attempt to access any of the fields in the bean through an accessor method, I get the exceptions below on the client and server side. I saved to old .java files for the class and diff only shows the additional fields. The only significant difference is the old bean had about 10 fields and the new one has 28. Can anyone give me a clue what object fails to load? I'm continuing to look for a typo-type of error, but any clues anyone can offer will be appreciated. What is Null? On the client side, this is the exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Load failed; nested exception is: java.lang.NullPointerException; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.NullPointerException On the server side this is the exception: [Profile] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exception is: java.lang.NullPointerException; nested exception is: java.rmi.ServerException: Load failed; nested exception is: java.lang.NullPointerException [Profile] java.rmi.ServerException: Load failed; nested exception is: [Profile] java.lang.NullPointerException [Profile] java.lang.NullPointerException [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject(JDBCCommand.java :504) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOneEntity(JDBCLoad EntityCommand.java:219) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult(JDBCLoadE ntityCommand.java:176) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleRe sult(JDBCQueryCommand.java:59) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:160 ) [Profile] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntity Command.java:147) [Profile] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistence Manager.java:156) [Profile] at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager .java:362) [Profile] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron izationInterceptor.java:286) [Profile] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce ptor.java:208) [Profile] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav a:136) [Profile] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [Profile] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:307) [Profile] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [Profile] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12 8) [Profile] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [Profile] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:427) [Profile] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI nvoker.java:393) [Profile] at java.lang.reflect.Method.invoke(Native Method) [Profile] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) [Profile] at sun.rmi.transport.Transport$1.run(Transport.java:152) [Profile] at java.security.AccessController.doPrivileged(Native Method) [Profile] at sun.rmi.transport.Transport.serviceCall(Transport.java:148) [Profile] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465) [Profile] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7 06) [Profile] at java.lang.Thread.run(Thread.java:484) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] HeuristicRollbackException after being idle RESOLVED
The HeuristicRollbackException after a long period of inactivity was caused by mysql timing out. The changes David Jenks suggested solved the problem. Thanks David! Below are the current settings from my jboss.jcml file for version 2.4.3. Any further refinement suggestions welcome. mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.gjt.mm.mysql.Driver/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:mysql://localhost:3306/yourdatabase/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUseryourlogonid/attribute attribute name=MaxSize10/attribute attribute name=Passwordyourpassword/attribute attribute name=GCEnabledtrue/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledtrue/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize2/attribute /mbean Do your db connections time out? If so, try setting up your pool with idletimeout true, gcenabled true, blocking true, and reasonable times. If you try this please let us know if it works david jencks They do timeout with mysql. All these things were set to false, so my jboss.jcml now contains the following. I wasn't sure what reasonable times were, so let me know if these are not, then I'll let you know if the problem goes away. Thanks. mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:mysql://localhost:3306/yourdatabase/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUseryourlogonid/attribute attribute name=MaxSize10/attribute attribute name=Passwordyourpassword/attribute attribute name=GCEnabledtrue/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledtrue/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize2/attribute /mbean ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] performance problem update
I reported what I thought was a CMP performance problem a few days ago. Many of you responded with helpful ideas. Thanks! In the process I have learned quite a bit, mostly how to use CMP *more* properly. This newbie still has more to learn. I thought I'd pass along what I found out. First, if you are a newbie and having problems (like I was) understanding the *costs* of using CMP, as an exercise, convert a CMP entity bean to BMP. I now understand more of what goes on when using CMP. To solve my performance problem, I started using a stateless session bean doing a database query directly. All I was trying to do was take a snapshot of the contents of a single table and present it in a browser using JSP. Managing persistency was overkill. In doing this, I changed a process from 2500 milliseconds to 2. That's 1000 times faster. All because I didn't really believe that session beans really can be efficient. I also used the ValueObject approach as James Hicks had suggested. That also help quite a bit. Thanks to all who helped. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] performance problem
What is Profile? An EJBObject? Where did the profile object come from? Profile is an EJBObject. It was instantiated in the first place with the findAll() finder method. I stuff the resulting Collection in the session (is this the best way to do it?) which is then retrieved from the session by the jsp. It is on the jsp that accessing the fields is incredibly slow. ejbPassivate() is called at the discretion of the JBoss container, not necessarily when a task is completed. An EB is passivated when it is swapped out of the instance pool. If there are only a few EBs, it is unlikely to be passivated right away. Still a newbie, but making progress thanks to the list I'm using a servlet that processes forms, puts the necessary results in the session and redirects to a jsp page. Working pretty well, but the display of the jsp page is very slow. Poking around, I found out something that probably has an easy resolution, but I don't know what it is. In the session is a Collection of Profile objects. Boiling it down, the assignment to the homeId in the code below can take as long as a full second! What is going on here? Given a Collection called nameList and an int with the size of the list named nameListSize: for(int k=0;knameListSize;++k) { Long homeId = profile.getId(); // takes one full second! } The id is the primary key for the CMP entity bean of type Long. I assume since the servlet is finished that passivate() is being called, so accessing the bean is causing it to not only go back to the database, but to do other stuff, too. What do I do about this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] performance problem
What is Profile? An EJBObject? Where did the profile object come from? Yes. Profile is an EJBObject. ejbPassivate() is called at the discretion of the JBoss container, not necessarily when a task is completed. An EB is passivated when it is swapped out of the instance pool. If there are only a few EBs, it is unlikely to be passivated right away. Still a newbie, but making progress thanks to the list I'm using a servlet that processes forms, puts the necessary results in the session and redirects to a jsp page. Working pretty well, but the display of the jsp page is very slow. Poking around, I found out something that probably has an easy resolution, but I don't know what it is. In the session is a Collection of Profile objects. Boiling it down, the assignment to the homeId in the code below can take as long as a full second! What is going on here? Given a Collection called nameList and an int with the size of the list named nameListSize: for(int k=0;knameListSize;++k) { Long homeId = profile.getId(); // takes one full second! } The id is the primary key for the CMP entity bean of type Long. I assume since the servlet is finished that passivate() is being called, so accessing the bean is causing it to not only go back to the database, but to do other stuff, too. What do I do about this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] performance problem simplified
I now have a simple example of my performance problem. There is a CMP entity bean called Profile. There is also a session bean called ProfileControl. The findAll() method in ProfileControl is a simple pass-through of the findAll() method from the Profile class. The Factory class is just a lookup class to instantiate the beans. The problem is the line getting the value of the id field. It must be going back to the database to get the value because it takes anywhere from 50 to 100 milliseconds, which I would expect to be close to zero since it is just retrieving the value that should already be there. So a Collection of 20 takes almost 2 seconds just to get the id's. Here is the code: ProfileControl profileControl = Factory.getProfileControl(); Collection collection = profileControl.findAll(); Iterator iterator = collection.iterator(); Long id = null; while(iterator.hasNext()) { Profile profile = (Profile)(iterator.next()); id = profile.getId(); // problem line } How can I determine if it is going back to the database (ie, turn debugging on so I can see the sql underneath) and why is it doing this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] performance problem
I know it isn't that hit. See my later email performance problem simplified. If the performance hit comes in an initial JSP call, then it is the one-time JSP page compilation overhead. This is not a problem for a live site. Subsequent page fetches are what's important. Fred Loney Spirited Software, Inc. www.spiritedsw.com - Original Message - From: Frank Morton [EMAIL PROTECTED] To: Fred Loney [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 5:25 AM Subject: Re: [JBoss-user] performance problem What is Profile? An EJBObject? Where did the profile object come from? Profile is an EJBObject. It was instantiated in the first place with the findAll() finder method. I stuff the resulting Collection in the session (is this the best way to do it?) which is then retrieved from the session by the jsp. It is on the jsp that accessing the fields is incredibly slow. ejbPassivate() is called at the discretion of the JBoss container, not necessarily when a task is completed. An EB is passivated when it is swapped out of the instance pool. If there are only a few EBs, it is unlikely to be passivated right away. Still a newbie, but making progress thanks to the list I'm using a servlet that processes forms, puts the necessary results in the session and redirects to a jsp page. Working pretty well, but the display of the jsp page is very slow. Poking around, I found out something that probably has an easy resolution, but I don't know what it is. In the session is a Collection of Profile objects. Boiling it down, the assignment to the homeId in the code below can take as long as a full second! What is going on here? Given a Collection called nameList and an int with the size of the list named nameListSize: for(int k=0;knameListSize;++k) { Long homeId = profile.getId(); // takes one full second! } The id is the primary key for the CMP entity bean of type Long. I assume since the servlet is finished that passivate() is being called, so accessing the bean is causing it to not only go back to the database, but to do other stuff, too. What do I do about this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] performance problem
There are 16 in the Collection. Ranges from 35 to 60 ms for each call to getId(). Calls for other fields from the same instance take a similar time. It is like it is going back to the database for each hit. I'll be messing with different commit options as danch suggested among other things. Exact same behavior if instead of findAll() to get a Collection, I use findByPrimaryKey() for one object. I appreciate the help. Frank How many entities are in the collection being returned from findAll()? James Hicks -Original Message- From: Frank Morton [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 10:47 AM To: Fred Loney; [EMAIL PROTECTED] Subject: Re: [JBoss-user] performance problem I know it isn't that hit. See my later email performance problem simplified. If the performance hit comes in an initial JSP call, then it is the one-time JSP page compilation overhead. This is not a problem for a live site. Subsequent page fetches are what's important. Fred Loney Spirited Software, Inc. www.spiritedsw.com - Original Message - From: Frank Morton [EMAIL PROTECTED] To: Fred Loney [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 5:25 AM Subject: Re: [JBoss-user] performance problem What is Profile? An EJBObject? Where did the profile object come from? Profile is an EJBObject. It was instantiated in the first place with the findAll() finder method. I stuff the resulting Collection in the session (is this the best way to do it?) which is then retrieved from the session by the jsp. It is on the jsp that accessing the fields is incredibly slow. ejbPassivate() is called at the discretion of the JBoss container, not necessarily when a task is completed. An EB is passivated when it is swapped out of the instance pool. If there are only a few EBs, it is unlikely to be passivated right away. Still a newbie, but making progress thanks to the list I'm using a servlet that processes forms, puts the necessary results in the session and redirects to a jsp page. Working pretty well, but the display of the jsp page is very slow. Poking around, I found out something that probably has an easy resolution, but I don't know what it is. In the session is a Collection of Profile objects. Boiling it down, the assignment to the homeId in the code below can take as long as a full second! What is going on here? Given a Collection called nameList and an int with the size of the list named nameListSize: for(int k=0;knameListSize;++k) { Long homeId = profile.getId(); // takes one full second! } The id is the primary key for the CMP entity bean of type Long. I assume since the servlet is finished that passivate() is being called, so accessing the bean is causing it to not only go back to the database, but to do other stuff, too. What do I do about this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] performance problem
Still a newbie, but making progress thanks to the list I'm using a servlet that processes forms, puts the necessary results in the session and redirects to a jsp page. Working pretty well, but the display of the jsp page is very slow. Poking around, I found out something that probably has an easy resolution, but I don't know what it is. In the session is a Collection of Profile objects. Boiling it down, the assignment to the homeId in the code below can take as long as a full second! What is going on here? Given a Collection called nameList and an int with the size of the list named nameListSize: for(int k=0;knameListSize;++k) { Long homeId = profile.getId(); // takes one full second! } The id is the primary key for the CMP entity bean of type Long. I assume since the servlet is finished that passivate() is being called, so accessing the bean is causing it to not only go back to the database, but to do other stuff, too. What do I do about this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] ClassCastException $Proxy3
I hope I can ask this in a way that makes sense. This is pretty deep into things for this newbie... All my CMP entity beans extend a base class I call EntityBeanExtended. It has a number of common methods and a common field id. It also has a method called get(name) that uses reflection to get the value of a field given the name. Now I'm writing a class I call a CollectionMap that has a constructor with a Collection as the first arg (returned from a find) and the name of the field I want to use to lookup the entity bean after building the map as the second arg. The CollectionMap iterates the Collection, doing various things with the content of the bean. Showing part of the iteration: Iterator iterator = collecton.iterator() while(iterator.hasNext()) { Object o = iterator.next(); EntityBeanExtended bean = (EntityBeanExtended)(o); /*problem line*/ Object value = bean.get(fieldName); } When I do this, I get an exception on the line doing the casting of o to the bean: Exception: java.lang.ClassCastException: $Proxy3 The Iterator is clearly a collection of entity beans, always extending from the EntityBeanExtended class. The proxy thing is just way beyond my understanding of jboss at this point. Can I do this somehow? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] HeuristicRollbackException after being idle
Do your db connections time out? If so, try setting up your pool with idletimeout true, gcenabled true, blocking true, and reasonable times. If you try this please let us know if it works david jencks They do timeout with mysql. All these things were set to false, so my jboss.jcml now contains the following. I wasn't sure what reasonable times were, so let me know if these are not, then I'll let you know if the problem goes away. Thanks. mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=DefaultDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attr ibute attribute name=Properties/attribute attribute name=URLjdbc:mysql://localhost:3306/jboss/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUserfmorton/attribute attribute name=MaxSize10/attribute attribute name=Passwordstepabove/attribute attribute name=GCEnabledtrue/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledtrue/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize2/attribute /mbean ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] reflection with entity beans?
If I have an CMP entity bean with a field named name and corresponding methods setName() and getName(), is there a way to use reflection to have the same affect as setName() given the name of the field? In other words, I'd like to have a general method set() that takes the name of the field and the value to set it to, so: setName(frank); would be the same thing as: set(Name,frank); Can someone point me specifically to somewhere describing how to do this? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] HeuristicRollbackException after being idle
I'm using a CMP entity bean to store user profiles. Access to the bean is from a long-running servlet under tomcat. Jboss version is 2.4.3. OS is Solaris 8 with JDK 1.3.1_01. All works fine until the servlet sits idle for a long time (that is, overnight). Next time I try to invoke a finder method, I get the HeuristicRollbackException exception outlined below. Hit the reload button on the web browser, and things go back to normal. I see reports of the on the user forums, but no resolutions. Ideas anyone? java.lang.reflect.UndeclaredThrowableException: javax.transaction.HeuristicRollbackException at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC all.java:245) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno wn Source) at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:25 8) at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182) at $Proxy0.findByProfileHandle(Unknown Source) at com.base2inc.util.Servlet.authenticate(Servlet.java:371) at com.base2inc.app.JspFramework.JspFramework.doService(JspFramework.java:37) [snip] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] sorting with findAll()
I'd like to specify the sorting order with findAll() for a CMP entity bean. First thing I tried was adding the following to standardjaws.xml: enterprise-beans entity ejb-nameProfile/ejb-name finder namefindAll/name query / ordernameLast/order read-aheadfalse/read-ahead /finder /entity /enterprise-beans The docs refer to jaws.xml for this, but I'm a newbie confused if this file is now called standardjaws.xml and they are the same file or if they are different. I also tried putting the finder section into the ejb-jar.xml for the bean, but that didn't work either. I tried adding ASC and DESC to the order in case that was required. I'm running under solaris with 2.4.3-tomcat. What am I doing wrong? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] sorting with findAll()
Thanks for pointing me where the finder properties go, but I'm still missing something. When calling findAll() it still isn't sorting. In fact, I defined the order something that should error (that is, made the order nameLast ERROR) and no error occurred, so it still isn't being used. Everything is working with these config files except the order from findAll(). Thanks again. ejb-jar.xml: ?xml version=1.0 encoding=UTF-8? ejb-jar descriptionProfile Management/description display-nameProfile Management/display-name enterprise-beans entity descriptionProfile/description ejb-nameProfile/ejb-name homecom.base2inc.bean.entity.profile.ProfileHome/home remotecom.base2inc.bean.entity.profile.Profile/remote ejb-classcom.base2inc.bean.entity.profile.ProfileBean/ejb-class persistence-typeContainer/persistence-type prim-key-classjava.lang.Long/prim-key-class reentrantFalse/reentrant cmp-version2.x/cmp-version cmp-fieldfield-nameid/field-namejdbc-typeBIGINT/jdbc-type/cmp-fie ld cmp-fieldfield-nameprofileHandle/field-name/cmp-field cmp-fieldfield-namepassword/field-name/cmp-field cmp-fieldfield-namenameFirst/field-name/cmp-field cmp-fieldfield-namenameInitial/field-name/cmp-field cmp-fieldfield-namenameLast/field-name/cmp-field cmp-fieldfield-nameemail/field-name/cmp-field primkey-fieldid/primkey-field /entity /enterprise-beans assembly-descriptor container-transaction method ejb-nameProfile/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar jaws.xml: ?xml version=1.0 encoding=UTF-8? jaws enterprise-beans entity ejb-nameProfile/ejb-name finder namefindAll/name query / ordernameLast/order read-aheadfalse/read-ahead /finder /entity /enterprise-beans /jaws jboss.xml: ?xml version=1.0 encoding=UTF-8? jboss securefalse/secure container-configurations / enterprise-beans entity ejb-nameProfile/ejb-name jndi-nameprofile/jndi-name configuration-name / /entity /enterprise-beans /jboss ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] newbie session bean question
Hermann RANGAMANA wrote: What you're talking about is singleton pattern ... i've read in a discussion at theserverside.com that it's impossible to achieve singleton pattern with ejb, and didn't do further on my research What I'm trying to accomplish is a way to assign a unique integer-based primary key to all entities. In digging around more, I've discovered the UUID, but I want to use just an integer. I'm finding lots of discussion at places like theserverside but still haven't found a complete solution to this, so if you know one, please let me know. Frank I'm still learning this stuff... I would like to have what I think would be a stateful session bean, but I need to only have one instance of the bean system wide with synchronized access to the members. It is caching some stuff. Can someone give me a guide how to do this or refer me to somewhere that explains some of this. Thanks from the newbie. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] cmp primary key
I'm a newbie for sure, but I've been surfing around for a solution to assigning unique primary key values with CMPs. I have seen lots of vague descriptions of how to do it and some specific ones that are all followed by other comments from people why that solution doesn't work. Does anyone have a specific solution and the complete code to do this they can share? This seems like it must be a very common problem that ought to have a standard solution. Help. I'm really getting frustrated. Frank ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] newbie session bean question
I'm still learning this stuff... I would like to have what I think would be a stateful session bean, but I need to only have one instance of the bean system wide with synchronized access to the members. It is caching some stuff. Can someone give me a guide how to do this or refer me to somewhere that explains some of this. Thanks from the newbie. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Shouldn't It Be CreateException
I'm using JBoss-2.4.1a_Tomcat-3.2.3.zip with mySQL. If I attempt to create two beans with the same primary key, I get back: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: INSERTING AN ALREADY EXISTING BEAN, ID = test; nested exception is: java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = test I was expecting a CreateException. Is this right and can I rely on it with different datastores underneath to return the same exception? Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] newbie jndi.properties question
Newbie making great progress thanks to the good docs, but have a question about the jndi.properties file. I think I now understand that the CLASSPATH has to have a directory in it that contains a jndi.properties file. But, in the provided default jndi.properties file the java.naming.provider.url is commented out with a comment that says Do NOT uncomment this line as it causes in VM calls to go over RMI!. But, in running the interest example, if I don't have the url defined, I get the message No valid context.PROVIDER_URL. It makes sense to me that you have to have the host url defined or names can't be resolved, but the comment saying not to put that there has me confused. What is the right way to do this? Thanks. Frank Morton [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] newbie persistence question
I realize this is probably a really dumb question, but I'm just getting into the different persistence models. I understand CMP and how it could be used nicely for something like users of a system. But what if I want to do a simple query that returns multiple results, like say all users that live in texas? It seems with what I have studied so far that CMP works great for things that have a unique id that are normally retrieved one at a time, but once you go beyond that, you have to start using BMP. So, with a query as simple as: select * from userlist where state='TX'; you'd have to use BMP. Is that right? Thanks for the newbie hand holding... ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Newbie: CMP Often Too Simple?
I believe your observation is quite correct, for EJB 1.1. To do anything sophisticated at all, which is always required in a usefull application, you have to use BMP, which negates much of the advantages of EJB for many people. [snip] Still, I moved to EJB 2.0 quite a while ago. It has been rocky, with very little server support and a moving platform target, but I still hope it will pay off down the road. Thanks for your confirming comments. Can you explain how you moved to EJB 2.0? Using jboss? Frank ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Newbie: CMP Often Too Simple?
I'm an EJB newbie, so be kindand I am reading everything I can find but still have a fundamental question. Is it right that in real-world applications, which inevitably are more complicated than testing examples, that using CMP entity beans is usually too simple-minded and BMP is kind of the default way to go with most entity beans? It seems everything I have ever done requires complex queries beyond what you get for free with CMP. Is this a good generalization or a bad one? All comments will be appreciated as I study to understand the best ways to use persistence. Thanks. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] That rude word (marketing)
Regarding exposure, we ought to be displayed on: http://java.sun.com/products/ejb/tools1.html Becoming a new fan of jboss... Frank Morton [EMAIL PROTECTED] - Original Message - From: "Peter Routtier-Wone" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 31, 2001 2:02 AM Subject: Re: [JBoss-user] That rude word (marketing) Or send this material directly to [EMAIL PROTECTED] | Please take this to the jboss-business list. | (http://groups.yahoo.com/group/jboss-business) | | /Rickard ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user