Tomcat 5.5 Virtual Hosting
Okay, after much struggle here is the solution I came up with for virtual hosting... 1 Machine, 3 DNS Entries - mymachine.me.com, app01.me.com, app02.me.com == server.xml - 3 host entries under the Catalina engine: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=app01.me.com appBase=webapps-app01.me.com unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=app02.me.com appBase=webapps-app02.me.com unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Notice each host has a separate appBase. == == Create directories for host contexts: [TOMCAT]/conf/Catalina/app01.me.com [TOMCAT]/conf/Catalina/app02.me.com These are the directories that Tomcat will look in to figure out how to process incoming URLs. Copy manager.xml from [TOMCAT]/conf/Catalina/localhost to both of these new directories. This allows you to use the manager to deploy into each host. == == Start Tomcat, browse to app01.me.com/manager/html, which will bring up the manager for app01.me.com. Deploy your application, make sure the WAR file is named with the context you want. To deploy to the root context you need to name the WAR: ROOT.war, with 'root' all caps. == Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help figuring out Virtual Hosts
Dola, I believe in order to serve static content you'll need to create a context XML file. I just posted an email outlining how I was able to get virtual hosting working. An additional step in your case would be to create a file [TOMCAT]/conf/Catalina/servera.com/ROOT.xml and include a context definition. The your content would reside in the [TOMCAT]/webapps-servera.com directory. Bernie -Original Message- From: Dola Woolfe [mailto:[EMAIL PROTECTED] Sent: Friday, September 16, 2005 2:44 PM To: Tom Cat Subject: Help figuring out Virtual Hosts Hi, I've certainly RTFM'd and had thoroughly read http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.ht ml#Host%20Name%20Aliases but I just can't figure out how to get virtual servers to work. Basically, assume that DNS is set up properly and that ServerA.com ServerB.com and Server.com resolve to the same IP. Now, I want ServerA.com to go to Server.com/MyAppA/index.jsp and ServerB.com to go to Server.com/MyAppB/index.jsp. This, in my mind is sort of like how Apache lets you do it, where of course it takes advantage of the convention of index.html being the default destination. OK, how do I achieve this with Tomcat? Could anyone please provide a specific example? Many thanks, Dola __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Virtual Hosts
I am having trouble configuring virtual hosts in Tomcat 5.5.9. I have two applications app01 and app02. I have 2 DNS entries app01.myserver.com and app02.myserver.com that both point to the machine on which Tomcat is running. How do I configure Tomcat to serve from app01.war when app01.myserver.com is hit and app02.war when app02.myserver.com is hit. Thanks, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual Hosts
Okay, so I created two host elements in my server.xml... Host name=app01.myserver.com appBase=webapps autoDeploy=true deployOnStartup=true deployXML=true unpackWARs=true xmlValidation=false xmlNamespaceAware=false / Host name=app02.myserver.com appBase=webapps autoDeploy=true deployOnStartup=true deployXML=true unpackWARs=true xmlValidation=false xmlNamespaceAware=false / ...but how do I tell Tomcat which context to process? There will be no context correct? Do I need a separate appBase directory for each host element? Thanks, Bernie -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Thursday, September 15, 2005 12:10 PM To: Tomcat Users List Subject: RE: Virtual Hosts Simplistically ... Configure Host elements inside your Engine. Create a folder for each application within webapps. Set the Host docBase to each. Check out the online ref. -Original Message- From: Durfee, Bernard [mailto:[EMAIL PROTECTED] Sent: 15 September 2005 17:07 To: tomcat-user@jakarta.apache.org Subject: Virtual Hosts I am having trouble configuring virtual hosts in Tomcat 5.5.9. I have two applications app01 and app02. I have 2 DNS entries app01.myserver.com and app02.myserver.com that both point to the machine on which Tomcat is running. How do I configure Tomcat to serve from app01.war when app01.myserver.com is hit and app02.war when app02.myserver.com is hit. Thanks, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploying root context
Is there a way to use the Tomcat 5.5.9 manager to deploy a WAR file as the root context? If not, how to I munge the deployed web application to make it the root context? Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Oracle Tomcat 5.5.x
Hello, I am trying to create an Oracle 10g datasource with connection caching enabled. In my server.xml I have the following... Resource name=jdbc/myDS auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@my.db.com:1521:me username=my_name password=my_pass connectionCacheName=my-cache connectionCachingEnabled=true / ...under GlobalNamingResources. Is this properly creating an Oracle datasource with implicit connection caching enabled? If so, how do I verify that this datasource is pooling connections? Thanks, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
resource processing
How are Resource elements in the server.xml file processed? For instance... Resource name=jdbc/myDS auth=Container type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@my.db.com:1521:me username=me password=it connectionProperties=SetBigStringTryClob=true initialSize=0 maxActive=20 maxIdle=10 minIdle=0 maxWait=6 / ...am I correct in thinking that when Tomcat is started it will grab an instance of org.apache.commons.dbcp.BasicDataSourceFactory. It will then call getObjectInstance() to retrieve the datasource. Is the rest handled by the factory? Does Tomcat assume all remaining attributes are properties that should be sent to the object factory? Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OracleDataSourceFactory
In the ever confusing quest to properly create an Oracle data source in Tomcat 5.5.x using the 10g JDBC drivers, I am stuck trying to properly configure connection caching. I've tried the following in my context XML file... Resource name= jdbc/suny auth= Container type= oracle.jdbc.pool.OracleDataSource driverClassName = oracle.jdbc.driver.OracleDriver factory = oracle.jdbc.pool.OracleDataSourceFactory url = jdbc:oracle:thin:@xyz.com:1521:etc user= abc password= def connectionCachingEnabled= true implicitCachingEnabled = true maxStatementsLimit = 5 minLimit= 0 maxLimit= 20 validateConnection = true / ...but when I retrieve the data source in my code and examine it... OracleDataSource ods = (OracleDataSource)m_dataSource; message.append(\nExtended Oracle data source information); message.append(\nName: + ods.getDataSourceName()); message.append(\nDescription: + ods.getDescription()); message.append(\nCaching enabled: + ods.getConnectionCachingEnabled()); message.append(\nImplicit caching enabled: + ods.getImplicitCachingEnabled()); message.append(\nExplicit caching enabled: + ods.getExplicitCachingEnabled()); message.append(\nFast Failover enabled:+ ods.getFastConnectionFailoverEnabled()); message.append(\nConnection cache properties: + ods.getConnectionCacheProperties()); ...I get the following inconsistent results... Extended Oracle data source information Name: OracleDataSource Description:null Caching enabled:true Implicit caching enabled: false Explicit caching enabled: false Fast Failover enabled: false Connection cache properties: {MaxStatementsLimit=0, AbandonedConnectionTimeout=0, MinLimit=0, TimeToLiveTimeout=0, LowerThresholdLimit=20, InitialLimit=0, ValidateConnection=false, ConnectionWaitTimeout=0, PropertyCheckInterval=900, InactivityTimeout=0, ClosestConnectionMatch=false, MaxLimit=2147483647, AttributeWeights=NULL} ...that show that the data source is correct and the connectionCachingEnabled property is getting through. But I can't seem to set any of the other properties, most importantly the maximum number of connections for the pool. So I have a few questions... Is this is latest and greatest way to properly create and configure an Oracle data source in Tomcat? How does Tomcat go about creating the data source and how does it decide what properties to set on the data source? Is there a definitive list of properties for the Oracle data source? Thanks, Bernie Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clustering: Slow session creation
I have been having a problem with clustered sessions in Tomcat 5.5.7. I am using the pooled replication mode, but I have also tried asynchronous mode. Right now there is one machine, the other machine is down. I would have assumed that machine one would have seen that machine two is down and not bothered to try to replicate the session, but it appears as if it is trying to communicate anyway... org.apache.catalina.connector.RequestFacade.getSession(boolean) org.apache.catalina.connector.Request.getSession(boolean) org.apache.catalina.connector.Request.doGetSession(boolean) org.apache.catalina.cluster.session.DeltaManager.createSession() org.apache.catalina.cluster.session.DeltaManager.createSession(boolean) org.apache.catalina.cluster.session.DeltaManager.getNewDeltaSession() org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(ClusterMessage) org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(ClusterMessage, Member) java.io.ObjectOutputStream.writeObject(Object) org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(Strin g, byte[]) org.apache.catalina.cluster.io.XByteBuffer.createDataPackage(byte[]) org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(S tring, byte[], IDataSender) org.apache.catalina.cluster.tcp.PooledSocketSender.sendMessage(String, byte[]) org.apache.catalina.cluster.tcp.SocketSender.sendMessage(String, byte[]) org.apache.catalina.cluster.tcp.SocketSender.connect() java.net.Socket.init(InetAddress, int) ...it looks like the ReplicationTransmitter is trying to send a message, which hangs until the socket times out. Where can I set the timeout for this? 20 seconds seems long, 2 seconds would probably be more appropriate. I enabled DEBUG messages for the cluster component, but this is all I get in the logs... [2005-06-21 13:53:38,281 DEBUG] [org.apache.catalina.cluster.session.DeltaManager] Manager (/xyz) send new session (6359D20C5E68DE71BB557443724A0218) [2005-06-21 13:53:59,406 DEBUG] [org.apache.catalina.cluster.session.DeltaManager] Created a DeltaSession with Id[6359D20C5E68DE71BB557443724A0218] Total count=1 ...no other information about why an attempt is made to create the socket and why it takes so long to timeout. I've sort of solved the problem by disabling clustering, but I would like to get it working at some point. Any ideas? Thanks, Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getSession(true) VERY slow - 5.5.7
I am running Tomcat 5.5.7 on Windows 2000 and when a user logs in, the call to request.getSession(true) is taking 20 seconds. Any ideas on how to track down the source of this problem? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Garbage Collection
How is garbage collection controlled in Tomcat 5.5? I ran a bit of an experiment by profiling Tomcat 5.5.7 while running a web application. I ran a load test against the application that finished with the allocated object size just below the heap size. If it grew any more, garbage collection would run. So the load test was done and with Tomcat idle, the garbage collector never ran. It would seem like a good time to run the garbage collector. As is stands now the next person to hit the application will push the heap size over the limit and they will have to wait for garbage collection. Seems like Tomcat should either attempt to trigger the garbage collector when idle. Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Garbage Collection
Right, my question was whether or not Tomcat would call System.gc() to 'suggest' to the JVM that garbage collection take place. Tomcat itself is the best authority as to how busy it is. Since Tomcat has been around for a long time I figured that this might have been implemented at some point. Bernard Durfee -Original Message- From: Pete Guyatt [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 3:33 PM To: Tomcat Users List Subject: RE: Garbage Collection Hi There, Tomcat does not control the garbage collection, it is up to the JVM to decide if and when a garbage collection is performed. The only way you can request a garbage collection is by using the System.gc() method, which the JVM can ignore. For more information on this Topic read the documentation for the JVM that you are using. Pete -Original Message- From: Durfee, Bernard [mailto:[EMAIL PROTECTED] Sent: 12 April 2005 20:12 To: Tomcat Users List Subject: Garbage Collection How is garbage collection controlled in Tomcat 5.5? I ran a bit of an experiment by profiling Tomcat 5.5.7 while running a web application. I ran a load test against the application that finished with the allocated object size just below the heap size. If it grew any more, garbage collection would run. So the load test was done and with Tomcat idle, the garbage collector never ran. It would seem like a good time to run the garbage collector. As is stands now the next person to hit the application will push the heap size over the limit and they will have to wait for garbage collection. Seems like Tomcat should either attempt to trigger the garbage collector when idle. Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Thread Timeout
Is there a way to set the timeout on request processing threads? I'd like to be able to say that If a request takes more than 60 seconds, then kill it. Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Garbage Collection
I'd rather have a major garbage collection kick off with no users logged in vs. 100 users logged in. My application pulls data from a database and generates charts on the fly. Both of those operations require object creation. So my heap usage grows over time. My usage trends tend to be bunched, rather than constant. So in my case, more predictable garbage collection would be a great benefit. Bernard Durfee -Original Message- From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 4:32 PM To: Tomcat Users List Subject: Re: Garbage Collection Calling System.gc() is considered to be a bad thing since this would trigger a major garbage collection which would take relatively long, compared with a minor collection. Besides this: Tomcat knows that it has nothing to do in right this moment. But does that mean that is always a good idea to make a GC now? No, maybe one millisecond later a new request will arrive and if Tomcat is then in GC, it is busy and cannot handle the request. I think this is the reason why Tomcat doesn't call the GC itself. Christoph Durfee, Bernard wrote: Right, my question was whether or not Tomcat would call System.gc() to 'suggest' to the JVM that garbage collection take place. Tomcat itself is the best authority as to how busy it is. Since Tomcat has been around for a long time I figured that this might have been implemented at some point. Bernard Durfee -Original Message- From: Pete Guyatt [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 3:33 PM To: Tomcat Users List Subject: RE: Garbage Collection Hi There, Tomcat does not control the garbage collection, it is up to the JVM to decide if and when a garbage collection is performed. The only way you can request a garbage collection is by using the System.gc() method, which the JVM can ignore. For more information on this Topic read the documentation for the JVM that you are using. Pete -Original Message- From: Durfee, Bernard [mailto:[EMAIL PROTECTED] Sent: 12 April 2005 20:12 To: Tomcat Users List Subject: Garbage Collection How is garbage collection controlled in Tomcat 5.5? I ran a bit of an experiment by profiling Tomcat 5.5.7 while running a web application. I ran a load test against the application that finished with the allocated object size just below the heap size. If it grew any more, garbage collection would run. So the load test was done and with Tomcat idle, the garbage collector never ran. It would seem like a good time to run the garbage collector. As is stands now the next person to hit the application will push the heap size over the limit and they will have to wait for garbage collection. Seems like Tomcat should either attempt to trigger the garbage collector when idle. Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unpackWARs
Does the setting unpackWARs affect performance during runtime? The WAR ends up unpacked to the 'work' directory regardless of this setting, correct? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.library.path - DLL - Domino ..why not use CORBA?
Jesper, I seemed to me that there would be a performance increase in using the DLL, since the servlet is running on the same machine as Domino. Using the CORBA method to connect to the same machine seemed like extra overhead. Bernard Durfee -Original Message- From: Jesper B. KiƦr [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 3:03 AM To: Tomcat Users List Subject: Re: java.library.path - DLL - Domino ..why not use CORBA? Hi I'm wondering why you're using the Domino DLLs to access Domino? Domino has a Corba interface which enables you to access all the Domino classes (exept the Notes UI) This whould be the normal way to do it. What makes you choose the other way? regards Jesper B. Kiaer http://www.jezzper.com -Durfee, Bernard [EMAIL PROTECTED] wrote: - To: Tomcat Users List From: Durfee, Bernard Date: 04/06/2005 22:33 Subject: java.library.path - DLL - Domino I am trying to use the native library for connecting to Domino from a servlet. I was under the impression that the DLL needed to be in the path specified by the java.library.path system property. However, this does not seem to work. I got to the point where even brute force did not work... System.setProperty(java.library.path, D:\\Lotus\\Domino); m_logger.info(Using java.library.path: + System.getProperty(java.library.path)); ...from the logger... Using java.library.path: D:\Lotus\Domino ...then the line... System.loadLibrary(nlsxbe); ...fails with the following exception... java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) ...and indeed I do have a DLL file D:\Lotus\Domino\nlsxbe.dll. This is on a Windows 2000 machine. Any ideas? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.library.path - DLL - Domino
I am trying to use the native library for connecting to Domino from a servlet. I was under the impression that the DLL needed to be in the path specified by the java.library.path system property. However, this does not seem to work. I got to the point where even brute force did not work... System.setProperty(java.library.path, D:\\Lotus\\Domino); m_logger.info(Using java.library.path: + System.getProperty(java.library.path)); ...from the logger... Using java.library.path: D:\Lotus\Domino ...then the line... System.loadLibrary(nlsxbe); ...fails with the following exception... java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) ...and indeed I do have a DLL file D:\Lotus\Domino\nlsxbe.dll. This is on a Windows 2000 machine. Any ideas? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.library.path - DLL - Domino
No dice. It just seems that a call to System.loadLibrary() is not using the 'java.library.path', otherwise how could it possibly not see the DLL? Bernard Durfee -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 4:43 PM To: Tomcat Users List Subject: Re: java.library.path - DLL - Domino On Apr 6, 2005 3:33 PM, Durfee, Bernard [EMAIL PROTECTED] wrote: I am trying to use the native library for connecting to Domino from a servlet. I was under the impression that the DLL needed to be in the path specified by the java.library.path system property. However, this does not seem to work. Try manually registering the DLL: regsvr32 D:\Lotus\Domino\nlsxbe.dll REgards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.library.path - DLL - Domino
Yes, I started by making sure that the DLL was in the Windows system path. I also tried running the DLL as you suggested and it did indeed find the DLL and complain about the bad entry point. I believe that Tomcat supplies a special class loader to each web application. I also believe that the class loader is expected to find libraries and such. So the question is, where do I put my DLL so that the web application class loader can find it? Apparently the answer is not java.library.path, unless there is a bug in Tomcat preventing it from properly parsing the path. Bernard Durfee -Original Message- From: Jay Burgess [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 5:01 PM To: tomcat-user@jakarta.apache.org Subject: RE: java.library.path - DLL - Domino Have you tried putting it into your system path via the PATH environment variable? (If you're running Tomcat as a service, you'll need to reboot to have it take effect I think.) If it's there, what happens if you run rundll32 nlsxbe SomeDummyEntryPoint? it should find the DLL, but complain about the invalid entry point. Jay Vertical Technology Group http://www.vtgroup.com/ -Original Message- From: Durfee, Bernard [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 3:34 PM To: Tomcat Users List Subject: java.library.path - DLL - Domino I am trying to use the native library for connecting to Domino from a servlet. I was under the impression that the DLL needed to be in the path specified by the java.library.path system property. However, this does not seem to work. I got to the point where even brute force did not work... System.setProperty(java.library.path, D:\\Lotus\\Domino); m_logger.info(Using java.library.path: + System.getProperty(java.library.path)); ...from the logger... Using java.library.path: D:\Lotus\Domino ...then the line... System.loadLibrary(nlsxbe); ...fails with the following exception... java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) ...and indeed I do have a DLL file D:\Lotus\Domino\nlsxbe.dll. This is on a Windows 2000 machine. Any ideas? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.library.path - DLL - Domino
The DLL was found when I put it in the C:\JavaTools\JRE1.5.0\bin which is in the sun.boot.library.path. Looking through the code in ClassLoader.java, it should search the paths in java.library.path after it searches sun.boot.library.path. ClassLoader parses java.library.path once at the first call to loadLibrary... usr_paths = initializePath(java.library.path); ...so why is it not finding the DLL on that path? The only possible reason would have something to do with Tomcat or Java security interfering, but I can find no evidence of this. Bernard Durfee -Original Message- From: Durfee, Bernard Sent: Wednesday, April 06, 2005 4:34 PM To: Tomcat Users List Subject: java.library.path - DLL - Domino I am trying to use the native library for connecting to Domino from a servlet. I was under the impression that the DLL needed to be in the path specified by the java.library.path system property. However, this does not seem to work. I got to the point where even brute force did not work... System.setProperty(java.library.path, D:\\Lotus\\Domino); m_logger.info(Using java.library.path: + System.getProperty(java.library.path)); ...from the logger... Using java.library.path: D:\Lotus\Domino ...then the line... System.loadLibrary(nlsxbe); ...fails with the following exception... java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) ...and indeed I do have a DLL file D:\Lotus\Domino\nlsxbe.dll. This is on a Windows 2000 machine. Any ideas? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.library.path - DLL - Domino
Problem solved, I restarted Eclipse, waved my hands a couple times and presto, the DLL is found no problem. The wonders of Java on Windows. Although it would be great if someone could explain how with a DLL in a path in the java.library.path could not be found. Bernard Durfee -Original Message- From: Durfee, Bernard Sent: Wednesday, April 06, 2005 4:34 PM To: Tomcat Users List Subject: java.library.path - DLL - Domino I am trying to use the native library for connecting to Domino from a servlet. I was under the impression that the DLL needed to be in the path specified by the java.library.path system property. However, this does not seem to work. I got to the point where even brute force did not work... System.setProperty(java.library.path, D:\\Lotus\\Domino); m_logger.info(Using java.library.path: + System.getProperty(java.library.path)); ...from the logger... Using java.library.path: D:\Lotus\Domino ...then the line... System.loadLibrary(nlsxbe); ...fails with the following exception... java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) ...and indeed I do have a DLL file D:\Lotus\Domino\nlsxbe.dll. This is on a Windows 2000 machine. Any ideas? Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cluster Deployment Question
I am ready to set Tomcat up in a clustered environment. So to test I have installed two instances of Tomcat 5.5.7 on the same XP machine. One listens on 8080 and the other on 8081. I configured the server.xml as follows... Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true notifyListenersOnReplication=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 / Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=10 / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled ackTimeout=15000 / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt; / Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ watchDir=/tmp/war-listen/ watchEnabled=false / /Cluster ...with tcpListenPort as 4001 in one instance and 4002 in the other. With watchEnabled false on one but true on the other. The Tomcat instances start fine and both indicate... INFO: Replication member added ...when started. This tells me that they see each other. When I try to deploy a web-app by dropping it in the war-listen directory I get... SEVERE: Unable to install WAR file java.io.FileNotFoundException: C:\tmp\war-deploy\clustertest.war (The system cannot find the path specified) ...okay, so that doesn't work. So I try to deploy through the manager on 8080 using Select WAR file to upload... The 8080 server says: WARNING: Manager[/clustertest], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://123.321.21.25:4002,1 41.254.21.25,4002, alive=227500]. This operation will timeout if no session state has been received within... The 8081 server then says: Mar 18, 2005 3:03:35 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist:/clustertest ...then the 8080 server waits, then times out and says... SEVERE: Manager[/clustertest], No session state received, timing out. ...any ideas? Seems like the Tomcats are talking and trying, but can't send the WAR from one to the other. Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Major bug in deployer!!
Thanks for the response Doug. Can you describe how to do this remotely? I tried renaming 'context.xml' to 'servlet#myservlet.xml' in the WAR file, but as I expected the deployer did not find the file. I'm not sure where this is described in the documentation, the only significant item I could find was... You may define as many Context elements as you wish. Each such Context MUST have a unique context path, which is defined by the path attribute. ...and... Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file. ...but neither mention the usage of the '#' character or that the 'path' attribute is ignored and the name of the WAR file is used instead as the context path. I am pretty sure this is the case because I just changed my 'context.xml' file to... ... Context path=/something-other-than-myservlet reloadable=true ... ...and when I deployed the servlet 'myservlet.war' Tomcat simply created a 'myservlet.xml' file and used 'myservlet' as the context path. To me it seems like a problem when the documentation discourages the inclusion of a context in the 'server.xml' file and yet does not respect the 'path' attribute in the context element. So my question remains... Is there a workaround for this problem that will allow me to deploy my web application using the deployer when my web application context path needs to be '/servlet/myservlet'? Yes, the context NEEDS to be '/servlet/myservlet'! Bernard Durfee -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 6:17 PM To: Tomcat Users List Subject: Re: Major bug in deployer!! This is the default action of the 5.5 path and is noted on the context documentation. The way to fix this is to name the context.xml as servlet#myservlet.xml Doug - Original Message - From: Durfee, Bernard [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 20, 2005 10:48 AM Subject: Major bug in deployer!! I am trying to use the Tomcat manager to deploy a web application packed in a WAR file. In my WAR file I have a directory named 'META-INF' and in that directory I have a file named 'context.xml'. The 'context.xml' file looks like... ?xml version=1.0 encoding=UTF-8? Context path=/servlet/myservlet reloadable=true ... /Context ...so I am telling Tomcat to send all URLs ending with '/servlet/myservlet' to the web application being deployed. I do a browse, point to the WAR file and then press 'Deploy'. Tomcat then copies the WAR file to '/webapps' and copies the 'context.xml' file to 'conf/.../myservlet.xml'. So far so good. Now when I go to the manager listing the web applications I see '/myservlet' in the 'Applications' column. Uh oh! Seems that the 'path' attribute in the 'context.xml' file is being completely ignored! So right now I am forced to put the Context element in the 'server.xml' file directly, in which Tomcat respects the 'path' attribute. So my question is... Is there a workaround for this problem that will allow me to deploy my web application using the deployer when my web application context path needs to be '/servlet/myservlet'? Yes, the context NEEDS to be '/servlet/myservlet'! I have tried this in 5.5.4, 5.5.6 and 5.5.7 with the same results. The deployer would make life on our network admin MUCH easier because I would be able to deploy new versions of the web application without bugging him to install them manually. Thanks in advance!! Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Major bug in deployer!!
I am trying to use the Tomcat manager to deploy a web application packed in a WAR file. In my WAR file I have a directory named 'META-INF' and in that directory I have a file named 'context.xml'. The 'context.xml' file looks like... ?xml version=1.0 encoding=UTF-8? Context path=/servlet/myservlet reloadable=true ... /Context ...so I am telling Tomcat to send all URLs ending with '/servlet/myservlet' to the web application being deployed. I do a browse, point to the WAR file and then press 'Deploy'. Tomcat then copies the WAR file to '/webapps' and copies the 'context.xml' file to 'conf/.../myservlet.xml'. So far so good. Now when I go to the manager listing the web applications I see '/myservlet' in the 'Applications' column. Uh oh! Seems that the 'path' attribute in the 'context.xml' file is being completely ignored! So right now I am forced to put the Context element in the 'server.xml' file directly, in which Tomcat respects the 'path' attribute. So my question is... Is there a workaround for this problem that will allow me to deploy my web application using the deployer when my web application context path needs to be '/servlet/myservlet'? Yes, the context NEEDS to be '/servlet/myservlet'! I have tried this in 5.5.4, 5.5.6 and 5.5.7 with the same results. The deployer would make life on our network admin MUCH easier because I would be able to deploy new versions of the web application without bugging him to install them manually. Thanks in advance!! Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OracleDataSourceFactory
Has anyone been able to get the OracleDataSourceFactory working with Tomcat 5? It seems that no matter how I set up the Resource element in my context the factory returns a null data source. Any help would be appreciated. Bernard Durfee -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 05, 2005 5:33 PM To: Tomcat Users List Subject: Re: Speed issues with SQL Server 2000 and JTDS Hey Charles, I have implement a database driver that I found online do you think it will help you out??? Charles P. Killmer wrote: I bought the Core Servlets and Java Server Pages and read it over the weekend. Happy New Year to me. I did get out to a few parties though. ;) I am having trouble getting JTDS to return results quickly. Has anyone got any example code for how to properly query a SQL Server 2000 database? The code I write needs to work with both SQL Server 2000 and SQL Server 7. In creating the connection, I am specifying TYPE_SCROLL_INSENSITIVE and TYPE_CONCUR_READ_ONLY. I tried not specifying anything and got errors about not being able to scroll the results. Is the only solution to this, use FORWARD_ONLY and buffer the contents myself? I hoping there is a better way. Thank you Charles Killmer -- Dwayne A. Ghant Application Developer Temple University 215.204. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]