[JBoss-user] Out of sync EJBs after passivation
Hey, all, I'm having a problem that looks to be a variation of a problem posted here earlier. However, I never saw if it was classified a bug and is being fixed, or if there is a workaround. I have an EJB A. It contains one to many EJBs B. When I retrieve several A EJBs via a column other than the primary key, they load and get the B EJBs associated with them. Everything works fine. After a few minutes, everything passivates and I try to retrieve the same set of A EJBs. But the B EJBs have now scrambled and are associated with the wrong A EJBs. (Side note: I've heard that EJBs containing other EJBs is not recommended, even by Sun, but I also need to get B EJBs directly in other parts of the application.) It appears this is probably the same issue under the subject of "Serious Bug? EntityBean out of synch with database". However, I am not using EJBDoclet and I am using BMP. The interesting thing is, I put some logging in ejbActivate() and ejbPassivate(). No other code is in those methods. When they EJBs are passivated and activated, they look fine. It is when my application tries to access the data when the trouble arises. I tried re-retrieving the B EJBs in ejbActivate(), but that also didn't help. Is this a bug? Is there a workaround? Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Database inserts via stateless session beans
Yes it was. I changed it to 'Container' and it works fine. After further reading, I understand now that I had told JBoss that I was going to manage the database transaction myself. So the database insert didn't work because there was no transaction involved (no commit). Is that correct? Thanx. Norton -Original Message- From: Allen Fogleson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 7:00 PM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Database inserts via stateless session beans You dont by any chance have the transaction-type set to bean in the deployment descriptor do you? Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Norton Lam Sent: Tuesday, May 29, 2001 5:44 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] Database inserts via stateless session beans Hi, all, I'm getting some strange behavior with my code and I was hoping someone would be able to give me some hints as to what I'm doing wrong. I have a stateless session bean that is doing a database insert. I have log messages printing before the PreparedStatement argument settings and after the PreparedStatement.executeUpdate(). All print out with no exceptions and everything seems to work. However, when I check the db, the row isn't inserted. A manual insert through the db interface works fine. I know my set up is ok because I have entity beans doing inserts, updates, and deletions happily. In fact, I am running a JUnit test suite that includes a run of the session bean, which isn't working, and an entity bean test that works fine. Both the entity bean and session bean are calling the same util method to get the database connection from JBoss. Upon further investigation, the stateless session bean is not inserting rows into the db table that the entity bean successfully inserts into. So it's definitely something related to the session bean. Is there something special I have to do in order to do database transactions in a stateless session bean? I'm running JBoss 2.2.1 on Linux connecting to MySQL. Thanx. Norton ___ 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 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Cached selection list - design question
This is more of a design question rather than JBoss specific, but I thought it was a situation that other people have encountered and was wondering what they did. I'm sure the answer would be helpful to others. I have a table in my db that indicates valid types for one of my business entities. They won't change very often, but often enough that I didn't want to update code everytime changes are made. I want to load these types into an object and cache them so that I don't have to go to the database to retrieve them each time. In a previous post, there were suggestions for me to use a stateless session bean for user transaction recording because entity beans are expensive and I don't need to keep the bean around after the transaction is recorded. Would a stateless session bean make sense here? I could keep an internal cache that retrieves data if it is empty. As I understand it, a stateful session bean wouldn't make sense because there is a valid state for each client. There is essentially only one "state" in this case. Would an entity bean make sense? If so, I would probably use a findAll() method to get all the possible types. Would JBoss (or other app server) cache all these EJBs so that next time I call a findAll(), it woudn't go back to the db for the data? Would all these EJBs hold too much memory captive? The type list isn't very big, but I will have many such lists. Thanx for your advice. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Database inserts via stateless session beans
Hi, all, I'm getting some strange behavior with my code and I was hoping someone would be able to give me some hints as to what I'm doing wrong. I have a stateless session bean that is doing a database insert. I have log messages printing before the PreparedStatement argument settings and after the PreparedStatement.executeUpdate(). All print out with no exceptions and everything seems to work. However, when I check the db, the row isn't inserted. A manual insert through the db interface works fine. I know my set up is ok because I have entity beans doing inserts, updates, and deletions happily. In fact, I am running a JUnit test suite that includes a run of the session bean, which isn't working, and an entity bean test that works fine. Both the entity bean and session bean are calling the same util method to get the database connection from JBoss. Upon further investigation, the stateless session bean is not inserting rows into the db table that the entity bean successfully inserts into. So it's definitely something related to the session bean. Is there something special I have to do in order to do database transactions in a stateless session bean? I'm running JBoss 2.2.1 on Linux connecting to MySQL. Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] A problem with the list archive ??
Why doesn't someone just point the _Archive_ link on the sourceforge.net page to the "real" archive? That's how everybody is getting to GeoCrawler. -Original Message- From: Burkhard Vogel [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 12:39 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] A problem with the list archive ?? We sould really put this somewhere prominent even more obvious the FAQ, this link is _NOT_ working, has never and probably will not ever. Everybody should _REALLY_ use the link provided on www.jboss.org/business/lists.html , if this will ever be??? - Original Message - From: "Hermann RANGAMANA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 21, 2001 4:00 PM Subject: [JBoss-user] A problem with the list archive ?? > Hi all, > > I always get the following error while performing search at the list archive > : > "htsearch detected an error. Please report this to the returned matches > webmaster of this site. The error message is: > > Unable to read configuration file '/bigassraid/htdig//conf/10767.conf' > What is the problem? > --h > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, May 21, 2001 3:10 PM > Subject: [JBoss-user] How to use Jboss Built in database > > > > Hi, > > > > I am a new bie. I would like to know how to configure and access the > built in database > > > > thanks in advance > > > > > > > > > > > > > > --- > > Runbox Mail Manager - www.runbox.no > > Gratis epost-tjeneste > > > > ___ > > 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 ___ 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
[JBoss-user] EAR deployment: Can't find jar
I searched the archive for this problem and found some messages, but no final solution. I'm deploying an ear file in JBoss 2.2.1 (runs with Tomcat and Apache on a Linux box). When the J2EE default deployer runs, I get the following: [J2EE Deployer Default] Deploy J2EE application: file:/usr/local/jboss-2.2.1/deploy/myapp.ear [J2EE Deployer Default] Create application myapp.ear [J2EE Deployer Default] install module myapp.jar [J2EE Deployer Default] module myapp.jar not found in myapp.ear [Auto deploy] Deployment failed:file:/usr/local/jboss-2.2.1/deploy/myapp.ear [Auto deploy] org.jboss.deployment.J2eeDeploymentException: module [Auto deploy] myapp.jar [Auto deploy] not found in myapp.ear [Auto deploy] at org.jboss.deployment.Installer.execute(Installer.java:245) [Auto deploy] at org.jboss.deployment.InstallerFactory.install(InstallerFactory.java:101) [Auto deploy] at org.jboss.deployment.J2eeDeployer.installApplication(J2eeDeployer.java:356) [Auto deploy] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:174) [Auto deploy] at java.lang.reflect.Method.invoke(Native Method) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [Auto deploy] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358) [Auto deploy] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221) [Auto deploy] at java.lang.Thread.run(Thread.java:484) Both the war and jar in my ear deployed successfully outside the ear file. The contents of my ear file look right: META-INF/ META-INF/MANIFEST.MF META-INF/application.xml myapp.jar myapp.war Here is my application.xml file: http://java.sun.com/j2ee/dtds/application_1_2.dtd";> myapp myapp.jar myapp.war /myapp I'm sure it's something simple. TIA Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Primary Key warnings
Ah... I understand now. The problem is that my GUID class, by definition, creates a new GUID for every call to the default constructor. I use it to create unique IDs for newly created EJBs. Therefore, the below code could never be true. Given that, I guess I'll just have to live with the warnings. I'm assuming I'm not violating the EJB spec by designing my PK class like this, am I? I'll have to check into that. I was thinking that you guys (the JBoss developers) were checking for equals() and hashCode() this way due to the spec, but I guess there's no other way for you to check for the override of these methods generically. Thanx to everyone that tried to help. Norton P.S. Dain, I'm using BMP for the moment... -Original Message- From: Dain Sundstrom To: '[EMAIL PROTECTED]' Sent: 5/18/01 1:44 PM Subject: RE: [JBoss-user] Primary Key warnings Norton, I had this same problem. The code you are running into follows: Object one, two; try { one = cls.newInstance(); two = cls.newInstance(); try { if(!one.equals(two)) { status = false; fireSpecViolationEvent(entity, new Section("9.2.9.b")); } } catch(NullPointerException e) {} // That's OK - the implementor expected the fields to have values try { if(one.hashCode() != two.hashCode()) { status = false; fireSpecViolationEvent(entity, new Section("9.2.9.c")); } } catch(NullPointerException e) {} // That's OK - the implementor expected the fields to have values } catch(IllegalAccessException e) { // other stuff.. As you see your pk class needs to either throw a NullPointerException or return a hash codes that are equal. This is kind of lame, so I just have my PK just throws a NullPointerException when equals or hashCode is called on an uninitialized instance. By the way, I think the _guid field must be public for CMP to work. -dain ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Primary Key warnings
No... The _guid property is private. I've overridden the toString() method to return a _guid.toString(). Thanx for the thought. -Original Message- From: Rafael Alves Chaves [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 10:20 AM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] Primary Key warnings Norton, Your PK equals method: public boolean equals(Object obj) { GUID compareTo = (GUID)obj; if (_guid.toString().equals(compareTo.toString())) { return(true); } return(false); } The correct would be: ... if (_guid.toString().equals(compareTo._guid.toString())) { ... Correct? Rafael ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Primary Key warnings
I changed my hashCode() method as recommended below. I also made the default constructor change as recommended in the posts referenced by Alexander (sorry I forgot to check the archives first). However, I'm still getting the same warnings. Any other suggestions? Thanx. Norton -Original Message- From: danch (Dan Christopherson) [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 5:14 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Primary Key warnings > > /** >* Hash code method. >*/ > public int hashCode() { > return(super.hashCode()); > } This is the problem. This is delegating to the Object.hashCode method that uses the object's address as its input, so when the verifier tries to verify that your hashCode method is right (by creating two keys and comparing the hashes) it gets different answers when it should get the same answer. maybe return _guid.toString().hashCode() ? -danch ___ 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
RE: [JBoss-user] Apache SOAP 2.1 example does not work with JBoss 2.2.1 with embedded Tomcat 3.2.1 (Long and involved)
Adam, I had some problems with the jars in $TOMCAT_HOME}/lib. My JBoss log reported that the jars there were added to the classpath extension, but jboss couldn't find them. I fixed it by adding the jars to the classpath argument of the org.jboss.Main call. I asked this list about why this is, but never got a response. Hope that helps. Norton -Original Message- From: Adam Lipscombe [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 5:51 AM To: Apache SOAP Mailing List; JBoss User Mailing List Subject: [JBoss-user] Apache SOAP 2.1 example does not work with JBoss 2.2.1 with embedded Tomcat 3.2.1 (Long and involved) Folks, I am tearing my hair out trying to get the SOAP 2.1 examples to work with JBoss. Any help will be very gratefully received. Set-up: NT 4.0, JDK 1.3, Apache Soap 2.1, JBoss 2.2.1 / Embedded Tomcat 3.2.1, Xerces 1.2.3. (Already been through the Xerces 1.3.1 pain :-)) soap.jar and xerces.jar are located in the tomcat\lib dir. Presumably they are picked up automatically by Tomcat from there? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Primary Key warnings
Hi, I'm getting warnings from the JBoss verifier that I need to override equals() and hashCode() in my primary key class. The problem is, I *am* overriding these methods. At the risk of world-wide embarrassment, here's the log and code snippets: [Verifier] Bean : Item Section: 9.2.9 Warning: The primary key class must override equals(). [Verifier] Bean : Item Section: 9.2.9 Warning: The primary key class must override hashCode(). /** * Class that provides a Global Unique ID (GUID) * for primary keys in the database. */ public class GUID implements Serializable { . . . /** * Test for equality. */ public boolean equals(Object obj) { GUID compareTo = (GUID)obj; if (_guid.toString().equals(compareTo.toString())) { return(true); } return(false); } /** * Hash code method. */ public int hashCode() { return(super.hashCode()); } . . . } The method signatures are correct, right? What am I missing? Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Immediate deletion of object from cache
Hi, Before my next question I would like to say thanx to all those who are responding to questions on this list. I've never been on a list where people are so helpful (and paitent). I've never been able to count on answers from some mailing lists, let alone useful ones. On to my question: Is there a way to force a deletion of an entity bean in the cache after creation? I have a system where I'll be logging user transactions in one of my tables. I won't ever need to access them again. Is there something I can specify somewhere so that the entity bean won't be held in cache after I leave the method that creates it? This will potentially be a heavily used system and I don't want to take up any more memory than necessary. Thanx for your help. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: SV: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN..... problem
Lennart, Do you actually need it to compile and run? Or would code that you can peruse do? -Original Message- From: Lennart Petersson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 10:05 AM To: Norton Cc: [EMAIL PROTECTED] Subject: SV: SV: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN. problem Copying this to jboss-user list also. Is it possible to have copies of your test cases? /L - Original Message - From: Norton <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 15, 2001 8:51 PM Subject: RE: SV: [JBoss-user] INSERTING AN ALREADY EXISTING BEAN. problem > This message was sent from Geocrawler.com by "Norton" <[EMAIL PROTECTED]> > > Hi, > > I've been encountering this problem consistently. > > I have a two tests in a JUnit test case. One > creates a bean, the other delets it. It runs > fine the first time, but the second time I > run it, I get this exception. If I run it > again, it works. Essentially, it fails every > other time. > > Don't know if that helps... > > Norton > > ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JBoss archve search problem
Is anyone else having problem with the jboss-user archive on GeoCrawler? I keep getting: Your search for htsearch detected an error. Please report this to the returned matches webmaster of this site. The error message is: Unable to read configuration file '/bigassraid/htdig//conf/10767.conf' for at least two weeks. I've e-mailed the webmaster, but I don't get any response from him/her. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Datasource availability
There's something I'm not understanding about datasources. I have a utility class that includes the following method: public static Connection getConnection() throws SQLException { try { InitialContext ic = new InitialContext(); DataSource ds = (DataSource)ic.lookup("java:/mysql"); return(ds.getConnection()); } catch (NamingException e) { // Log exception throw(new SQLException("Datasource not found: " + e.getMessage())); } } When called from an entity bean, this method works fine. However, when called from outside an entity bean, I get: NamingException: mysql not bound The jboss server.log reports that java:/mysql is bound (I also know it is bound because it works from the entity bean): [mysql] Starting [mysql] XA Connection pool mysql bound to java:/mysql [mysql] Started The class that is calling this method also uses the entity bean that uses the same method and the entity bean works fine. Is there something I need to do in my non-entity bean code that the entity bean is doing for me? Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Integrating Apache+Tomcat+jBoss, can't see jBoss web apps
Todd, Could you please point me to this meesage, give me an approximate date as to when you posted it, or repost it? The GeoCrawler search facility isn't working at the moment. I sent a note to the GeoCrawler webmaster a couple of days ago, but it still isn't working yet.Thanx.Norton -Original Message-From: Todd Chaffee [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 4:49 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] Integrating Apache+Tomcat+jBoss, can't see jBoss web appsWhen jboss deploys a tomcat app it has no way deploying it to a specific virtual hosts. You can get more details by searching the message archives with 'apache tomcat virtual host'. You should find a very detailed message with my findings about how to work around this limitation. Good luck.- Todd ChaffeeAt 12:58 PM 05/01/01 -0400, you wrote: I was able to get Apache to Serve Tomcat applications with the following configuration in my httpd.conf, however applications deployed through jBoss are not visible to Apache since the .war file is placed in jBoss deployment directly, anyone know what I should do to make applications deployed in jBoss available to Apache?Thanks! httpd.conf = DocumentRoot "/opt/JBoss-2.2.1_Tomcat-3.2.1/jakarta-tomcat-3.2.1/webapps" # Configure mod_jk # JkWorkersFile /opt/JBoss-2.2.1_Tomcat-3.2.1/jakarta-tomcat-3.2.1/conf/workers. properties JkLogFile /usr/local/apache/logs/mod_jk.log JkLogLevel warn # First Virtual Host. # DocumentRoot /opt/JBoss-2.2.1_Tomcat-3.2.1/jakarta-tomcat-3.2.1/webapps ServerName foo.bar.com JkMount /* ajp13 JkMount /*.jsp ajp13 JkMount /servlet/* ajp13
[JBoss-user] JBoss - Even Closer to a BEA Killer
I thought all of you would be interested in this article: http://www.theserverside.com/reviews/thread.jsp?thread_id=6215 Kudos to all the JBoss developers. I, too, have been happy with my use of JBoss. Keep up the good work. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] EJB 1.1 throws RemoteException deprecated
Toby, You're right. I should have looked up the EJB 1.1 spec, but I was lazy. Since you called me on it, I looked up the spec. The person in the forum was correct. The "throws RemoteException" clause for certain methods are indeed deprecated. The methods instead require that EJBException be thrown. But since EJBException is a RuntimeExeption, it doesn't need to be declared explicitly. (See section 12.3.7. It is also pointed out in sections 12.6, 6.10.3, 6.10.4, and 9.2.4-6.) So my question now changes to: Is the requirement that is specified by JBoss 2.2.1 (I made a mistake in regards to the version I'm running in my original post) upon deployment a design decision or an oversight? The reason this came up is that I am refactoring my code to use the Details Object pattern as described in the theserverside.com post I quoted. I would like to keep my details object as clean as possible by not delcaring a 'throws RemoteException' clause if I don't have to. Thanx. Norton -Original Message- From: Toby Allsopp [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 1:22 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] EJB 1.1 throws RemoteException deprecated Norton Lam wrote: > I read in a theserverside.com forum that the > 'throws RemoteException' previously required by > all remote interfaces had been deprecated in the > EJB 1.1 spec. > > (See http://www.theserverside.com/patterns/thread.jsp?thread_id=79 > in a post from callum wallach dated Dec 12, > 2000. Sixth post from the bottom.) > > In JBoss 2.1 on Linux, I tried creating a remote interface > where the business method stub didn't throw a RemoteException > and JBoss reported an error that the remote method stubs > *must* throw RemoteExceptions. > > Was this a design decision, an oversight, or is this person > incorrect about the deprecation in EJB 1.1? I'm curious. Why do you ask this list rather than looking for yourself? Toby. P.S. Sorry for not being helpful, but I'm genuinely perplexed by some of the questions people ask this list. ___ 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
[JBoss-user] EJB 1.1 throws RemoteException deprecated
I read in a theserverside.com forum that the 'throws RemoteException' previously required by all remote interfaces had been deprecated in the EJB 1.1 spec. (See http://www.theserverside.com/patterns/thread.jsp?thread_id=79 in a post from callum wallach dated Dec 12, 2000. Sixth post from the bottom.) In JBoss 2.1 on Linux, I tried creating a remote interface where the business method stub didn't throw a RemoteException and JBoss reported an error that the remote method stubs *must* throw RemoteExceptions. Was this a design decision, an oversight, or is this person incorrect about the deprecation in EJB 1.1? Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Auto-deploy problem
Hi, I love the auto-deploy feature of JBoss. However, it's not working as I expect it to. I created a jar file and put it in the $JBOSS_HOME/deploy directory. One of the remote interface classes didn't throw a RemoteException, and JBoss reported that problem on the auto-deploy. So I added the 'throws RemoteException' to the interface definition, compiled, jar'ed it up, and copied it to the deploy directory. JBoss recognized the change and attempted a redeploy, but the same error came up. When I stop and start the server (without a change to the jar), the auto-deployer doesn't report any errors and my new application is successfully started. Shouldn't the auto-deployer have retrieved the new class file and deployed my app successfully without a restart? Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Classpath Extension
Hi, I'm curious about the Classpath extension in JBoss. I am using JBoss-Tomcat on Linux. I uncommented the lines: The jboss server log reports that the jars in $TOMCAT_HOME/lib were added to the classpath: [Info] Java version: 1.3.0_02,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Client VM 1.3.0_02,Sun Microsystems Inc. [Info] System: Linux 2.2.12-20,i386 [Classpath extension] Added directory:file:/usr/local/jboss-2.2.1/tmp/ [Classpath extension] Added directory:file:/usr/local/jboss-2.2.1/db/ [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/ant .jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/jax p.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/ser vlet.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/par ser.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/web server.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/jas per.jar [Classpath extension] Added library:file:/usr/local/jdk1.3.0_02/lib/tools.jar But when I try to run a servlet, I got a ClassDefNotFoundException for javax/servlet/http/HttpServlet. After a bunch of fiddling, I finally put the servlet.jar in the -classpath argument of the java call to org.jboss.Main and it finally worked. So my question is, why didn't the classpath extension allow JBoss to find the HttpServlet class? Does the classpath extension do something else that I'm not understanding? Thanx. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpSe
I'm not using the system classpath to add jars. I uncommented the section about Tomcat in the JBOSS_HOME/conf/default/jboss.conf file: "../../lib/ext/"> Upon startup, the log shows that all the jars in this dir are being added to the classpath (see the log snippet in my original note). The j2ee.jar is not being added automatically, but I've read a previous message that JBoss doesn't play well with j2ee.jar. I have tried adding j2ee.jar to the classpath upon invocation of org.jboss.main and there are all kinds of error messages that appear upon restart. SoI don't believe that is the right approach. Thanx.Norton -Original Message-From: Vinay Menon [mailto:[EMAIL PROTECTED]]Sent: Wednesday, May 02, 2001 11:39 AMTo: JBOSSSubject: Re: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpSe Yes, Since they are both in the same VM you typically needn't add the servlet.jar to the jboss lib. But first of all, it would be best if you didn't use the system classpath while jboss start up! Just too many errors could happen with that! Make sure that your java installation is good and it should pick up the j2ee jar automatically. Do you want to verify that? Putting the servlet jar in ext was just to force it to load it! Vinay ----- Original Message - From: Norton Lam Sent: Wednesday, May 02, 2001 3:09 PM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpSe Vinay, Thank you for your quick reply. I tried adding servlet.jar to JBOSS_HOME/lib/ext and restarted, but it didn't work. As I understand it, JBoss and Tomcat are running under the same VM (1.2.2-RC2 in this case) so any servlet.jar being added in the classpath extension should affect both Tomcat and JBoss. Besides, if it is only Tomcat that gets the classpath addition, it should still work because it is Tomcat that is processing the servlet, not JBoss, right? Thanx for your help. Norton -Original Message-From: Vinay Menon [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 5:05 PMTo: JBOSSSubject: Re: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServle It is not loading servlet.jar cos that is only there in the tomcat lib. Just shove a copy of that under JBOSS_HOME/lib/ext and it should find it on restart. Vinay ----- Original Message - From: Norton Lam Sent: Tuesday, May 01, 2001 10:58 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServle Can someone please help me with this exception I'm getting from my servlet?java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletat java.lang.ClassLoader.defineClass0(Native Method)at java.lang.ClassLoader.defineClass(ClassLoader.java, CompiledCode)atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java, CompiledCode)at java.net.URLClassLoader.defineClass(URLClassLoader.java, CompiledCode)at java.net.URLClassLoader.access$1(URLClassLoader.java, CompiledCode)at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java, CompiledCode)at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,Compiled Code)at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)atorg.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java, Compiled Code)atorg.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java, Compiled Code)atorg.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java,Compiled Code)at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java,Compiled Code)at org.apache.tomcat.core.Handler.service(Handler.java, CompiledCode)atorg.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, CompiledCode)atorg.apache.tomcat.core.ContextManager.internalService(ContextManager.java,Compiled Code)atorg.apache.tomcat.core.ContextManager.service(ContextManager.java, CompiledCode)atorg.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java,
RE: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServle
Vinay, Thank you for your quick reply. I tried adding servlet.jar to JBOSS_HOME/lib/ext and restarted, but it didn't work. As I understand it, JBoss and Tomcat are running under the same VM (1.2.2-RC2 in this case) so any servlet.jar being added in the classpath extension should affect both Tomcat and JBoss. Besides, if it is only Tomcat that gets the classpath addition, it should still work because it is Tomcat that is processing the servlet, not JBoss, right? Thanx for your help. Norton -Original Message-From: Vinay Menon [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 5:05 PMTo: JBOSSSubject: Re: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServle It is not loading servlet.jar cos that is only there in the tomcat lib. Just shove a copy of that under JBOSS_HOME/lib/ext and it should find it on restart. Vinay - Original Message - From: Norton Lam Sent: Tuesday, May 01, 2001 10:58 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServle Can someone please help me with this exception I'm getting from my servlet?java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletat java.lang.ClassLoader.defineClass0(Native Method)at java.lang.ClassLoader.defineClass(ClassLoader.java, CompiledCode)atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java, CompiledCode)at java.net.URLClassLoader.defineClass(URLClassLoader.java, CompiledCode)at java.net.URLClassLoader.access$1(URLClassLoader.java, CompiledCode)at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java, CompiledCode)at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java,Compiled Code)at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)atorg.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java, Compiled Code)atorg.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java, Compiled Code)atorg.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java,Compiled Code)at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java,Compiled Code)at org.apache.tomcat.core.Handler.service(Handler.java, CompiledCode)atorg.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, CompiledCode)atorg.apache.tomcat.core.ContextManager.internalService(ContextManager.java,Compiled Code)atorg.apache.tomcat.core.ContextManager.service(ContextManager.java, CompiledCode)atorg.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java, Compiled Code)atorg.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,Compiled Code)atorg.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,Compiled Code)at java.lang.Thread.run(Thread.java, Compiled Code)I'm running on Linux with Apache 1.3.19 delegating to Tomcat/Jboss. I'mrunningmy own version of tomcat (instead of the JBoss-Tomcat distribution) becauseIneed a virtual host configuration through apache.Jboss reports the TOMCAT_HOME/lib/servlet.jar being added to the classpathextension when it's started.[Classpath extension] Addedlibrary:file:/usr/local/jakarta-tomcat-3.2.1/lib/ant.jar[Classpath extension] Addedlibrary:file:/usr/local/jakarta-tomcat-3.2.1/lib/jaxp.jar[Classpath extension] Addedlibrary:file:/usr/local/jakarta-tomcat-3.2.1/lib/servlet.jar[Classpath extension] Addedlibrary:file:/usr/local/jakarta-tomcat-3.2.1/lib/parser.jar[Classpath extension] Addedlibrary:file:/usr/local/jakarta-tomcat-3.2.1/lib/webserver.jar[Classpath extension] Addedlibrary:file:/usr/local/jakarta-tomcat-3.2.1/lib/jasper.jar[Classpath extension] Added library:file:/usr/local/jdk1.2.2/lib/tools.jarThe servlet works fine when run via tomcat alone, but not with thejboss/tomcatcombination.Is there something else I should check?Thanx for your help.Norton___JBoss-user mailing list[EMAIL PROTECTED]http://lists.sourceforge.net/lists/listinfo/jboss-user Get your FREE download of MSN Explorer at http://explorer.msn.com
[JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServlet
Can someone please help me with this exception I'm getting from my servlet? java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled Code) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java, Compiled Code) at java.net.URLClassLoader.defineClass(URLClassLoader.java, Compiled Code) at java.net.URLClassLoader.access$1(URLClassLoader.java, Compiled Code) at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled Code) at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java, Compiled Code) at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code) at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j ava, Compiled Code) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad er.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java, Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code) I'm running on Linux with Apache 1.3.19 delegating to Tomcat/Jboss. I'm running my own version of tomcat (instead of the JBoss-Tomcat distribution) because I need a virtual host configuration through apache. Jboss reports the TOMCAT_HOME/lib/servlet.jar being added to the classpath extension when it's started. [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/ant .jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/jax p.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/ser vlet.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/par ser.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/web server.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/jas per.jar [Classpath extension] Added library:file:/usr/local/jdk1.2.2/lib/tools.jar The servlet works fine when run via tomcat alone, but not with the jboss/tomcat combination. Is there something else I should check? Thanx for your help. Norton ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user