Trouble with creating subdomains for .local address

I'm a web developer on Mac OS X 10.5.6 and I use my MacBook Pro as my primary development and testing machine. I have Apache 2 running and Entropy PHP 5.2.4. All of that works fine. In the past, I didn't use virtual hosts. Instead, I would divide my projects into subfolders of /Library/WebServer/Documents
One day, I wised up and created virtual hosts by adding the appropriate entries to /etc/apache2/extra/httpd-vhosts.conf and by adding a few corresponding hostnames to /etc/hosts.
In the hosts files, I "created" subdomains for each site. For example: If I was working on a site for Dairy Queen, I might add the following line to /etc/hosts:
127.0.0.1 dq.local
Then I would add the virtual host to /etc/apache2/extra/http-vhosts.conf and it would look something like the following:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Library/WebServer/DairyQueen/Documents"
ServerName dq.local
<Directory "/Library/WebServer/DairyQueen/Documents">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I've been setup in the above way for many months and it all works great. On my computer, I can enter dq.local in my browser and it pops right up.
I've even modified the hosts file in my Parallels Virtual machines running Windows. And from any browser in any of my Virtual machines, I can reach my various .local domains hosted by Mac OS X.
*The Problem:* If I want to browse the site from another computer on my local network (or my iPhone), they will not find my MacBook Pro in the .local domain without editing the /etc/hosts files on those devices -- which is a nightmare scenario because A) I can easily edit the /etc/hosts file on the iPhone, B) It's inconvenient to have to edit /etc/hosts files on the myriad of devices, and C) I would have to have my laptop set to a static IP -- something I could easily accomplish, but it's just not as clean of a solution as I'm looking for.
I realized that when using Bonjour, my MacBook Pro shows up to other computers as "Christophers-MacBook-Pro.local". I thought, hmmm ... maybe I could utilize that by dividing it into subdomains. For example, I would modify the vhosts file setting the new domain name to dq.christophers-macbook-pro.local, I would modify my own /etc/hosts file to say:
127.0.0.1 dc.christophers-macbook-pro.local
... and Voila! I'd be done, right? Nope!
Of course on the MacBook Pro that's hosting the sites, I can browse to dq.christophers-macbook-pro.local, and it works fine just like it did when it was dq.local.
On a PowerBook G4 (running a freshly installed and clean 10.5.6), going to dq.christophers-macbook-pro.local results in the wrong site from coming up. What!?
Note that when I go to just "christophers-macbook-pro.local" on the iPhone and the PowerBook, the correct site comes up -- from the MacBook Pro.
Turns out, my xServe running Leopard Server is responding to the request and serving up my photo gallery site on both the PowerBook and the iPhone!
I do have DNS running on the server. The other computers are connected wirelessly and via DHCP from an Airport Extreme Base Station that IS NOT getting DNS from the server, rather it's getting DNS from Comcast. The notbooks and the iPhone are getting DNS from the Base Station.
When I stop the DNS service on my xServe, there's no effect -- the web response is still coming from the server. (Yes, I flushed the DNS cache on the PowerBook just to be sure). I checked the virtual hosts on the server and none of them is configured with a wildcard as an alias. The photo site IS the first entry in the sites list -- the first virtual host.
So, how do I break my MacBook Pro's .local domain into subdomains? What am I missing?

HI,
That's about 6 miles over my head but I can suggest that you post in the Apple Mac OS Technologies forum:
http://discussions.apple.com/category.jspa?categoryID=162
Carolyn

Similar Messages

  • Bypass Proxy for Local Addresses

    All-
    With the new 2.0 software, I am now able to connect my 3G iPhone to the WiFi network at work. The network uses an authenticated proxy to get external access. I can access external sites just fine now, but I can't see internal sites. The proxy settings on my work desktop give me the option to "bypass proxy server for local addresses".
    Is there any way to do this on an iPhone?
    Right now I need to make a choice between access only internal sites or only external sites.
    Thanks!
    MF

    While not wanting to be a total weenie, ME TOO
    After a bit of searching, the best we're going to be able to do right now is use a Proxy Auto-Config (.pac) file. I'm drawn to this conclusion from combining a lot of web searches with a peek at the "iPhone and iPod touch Enterprise Deployment Guide, Second Edition" (available at http://manuals.info.apple.com/enUS/Enterprise_DeploymentGuide.pdf, or via the Apple iPhone Enterprise support page at http://www.apple.com/support/iphone/enterprise/.
    Setting the PAC file using the iPhone v2.x software is pretty direct - click the little arrow next to the network you want to configure, scroll down to the bottom where the proxy settings live. Choose "Auto" and enter the Auto-config URL.
    That's the good news. The bad news is that I'm not entirely sure what that entails w.r.t. using one with the iPhone software. I'm not entirely clever enough to create such a file nor am I clever enough to know how to stick such a file onto my iPhone. I'm going to run this around my local team to see what they can come up with. If they come up with a solution (and it's simple enough for me to do AND explain), then I'll post a follow-up. Until then, good luck to you AND if you figure something out feel free to share with everyone else.
    Ron

  • JRE proxy bypass for local addresses always bypasses proxy

    Hi all,
    I'm currently dealing with an issue with the proxy configuration in java.
    Situation: I need a proxy server to connect to the internet, and I have some addresses configured in Internet Explorer that bypass the proxy.
    example of the way I configured it : *.google.com;212.115.*;62.69.179.198
    The address that I am trying to reach is not in the bypass list, or in any of the excluded ranges in the bypass list.
    Initially I had java configured using browser settings. I thought it did not pick up the browser settings at all.
    However after configuring the proxy manually in java it was still not working.
    During the research I came to the conclusion that as soon as I enable the "bypass proxy server for local addresses" in Internet Explorer, or manually in java.
    The JRE client automatically bypasses the proxy and is always using "proxy=direct" . As soon as I disable that feature it starts using the proxy server.
    I have no idea why this is happening ?

    Your message was an eye opener for me. Thanks!
    You were right, that option shouldn't be enabled. During testing I got confused and was told that option needed to be enabled to enable the exception list.
    But that was a stupid assumption.
    I disabled the option bypass proxy for local addresses and just filled in the exception list and now it works again.

  • How to know whether bypass proxy for local address is enabled in browser

    Can anyone help me in finding out whether the check box "bypass proxy server for local address" in Internet explorer (Tools->Internet options->Connections->LAN Settings) is enabled from java plug in.
    In my applet application if that checkbox is enabled then i have to throw a message saying that the checkbox is enabled.
    Thanks in Advance
    Regards
    Vijay

    We have been in discussions with Microsoft over the last few days on this issue - which is seen with Outlook 2007 versions onwards.  Extract from resolution communication from Microsoft:
    The issue you have raised is known as it has been reported and when you have a proxy set in Internet Explorer and “Bypass proxy settings for local addresses”, Outlook will attempt to connect to Office 365 directly – like the bypass rule would apply.
    Because the direct connection is blocked in the Firewall, Outlook needs to have the connections going in Timeout before attempting to connect using the Proxy.
    Your network trace proves the issue.
    Microsoft have scheduled a fix for Outlook 2010 in February 2014 cumulative update. A fix for Outlook 2013 will also follow, but Outlook 2007 will not be addressed because it is in Extended Support.
    There are two possible workarounds for this behaviour:
    First, and I wouldn’t recommend it, is to allow Direct traffic through the Firewall to Office 365.
    The advantage of this approach is that it will be done centralized and it will impact everyone immediately.
    Information about the O365 IP addresses
    There are two downsides to this behaviour:
    1.  First you need to maintain the Firewall exceptions as IP from O365 server can change without notice
    2.  Second, winhttp traffic may go through both proxy and direct and this can cause unforeseen behaviour.
    The second approach is to use a proxy pac instead of manually setting in the proxy and the exceptions.
    The advantage is that you will have centralized method to control how winhttp traffic goes and the issue will not be experienced anymore.
    If a single pac does not be fit, you can configure proxy pac files for each site requirements and use an IIS server to store it.

  • Bypass Proxy for Local Addresses - Office 365 connection/ Outlook 2010

    This is a strange one.  Connectivity to Office 365 within our netwotk works fine although very slow for outlook 2010 client to initially connect. Once connected, it works ok.  I have done a netwotk trace using netmon to see if i can identify
    the reason for the slow startup (2 mins minumum for profile to load and for outlook to connect to exchange). The trace tell me that my local pc tries to make a direct connection to the office365 external IPs first, then tries the TMG proxy. Once it hits the
    proxy, it kicks into life and works.
    So it looks to me like it thinks the external IP address of office 365 is an internal address and spends it time trying all the ip addresses until it trys the proxy.  At this point, the
    Bypass Proxy Server for Local Addresses is ticked.
    As soon as i untick this box, all traffic heads directly to the proxy and of course it connects like lighting.  The exchange settings proxy is set in outlook for "on fast networks, connect using HTTP first, then connect using TCP/IP" (tick
    is on) and the same for slow networks.
    I cant for the life of me work out why it tries to connect directly to the external IPs first and not connect via TMG until i untick the
    Bypass Proxy Server for Local Addresses
    Would love any ideas that may assist.

    We have been in discussions with Microsoft over the last few days on this issue - which is seen with Outlook 2007 versions onwards.  Extract from resolution communication from Microsoft:
    The issue you have raised is known as it has been reported and when you have a proxy set in Internet Explorer and “Bypass proxy settings for local addresses”, Outlook will attempt to connect to Office 365 directly – like the bypass rule would apply.
    Because the direct connection is blocked in the Firewall, Outlook needs to have the connections going in Timeout before attempting to connect using the Proxy.
    Your network trace proves the issue.
    Microsoft have scheduled a fix for Outlook 2010 in February 2014 cumulative update. A fix for Outlook 2013 will also follow, but Outlook 2007 will not be addressed because it is in Extended Support.
    There are two possible workarounds for this behaviour:
    First, and I wouldn’t recommend it, is to allow Direct traffic through the Firewall to Office 365.
    The advantage of this approach is that it will be done centralized and it will impact everyone immediately.
    Information about the O365 IP addresses
    There are two downsides to this behaviour:
    1.  First you need to maintain the Firewall exceptions as IP from O365 server can change without notice
    2.  Second, winhttp traffic may go through both proxy and direct and this can cause unforeseen behaviour.
    The second approach is to use a proxy pac instead of manually setting in the proxy and the exceptions.
    The advantage is that you will have centralized method to control how winhttp traffic goes and the issue will not be experienced anymore.
    If a single pac does not be fit, you can configure proxy pac files for each site requirements and use an IIS server to store it.

  • Remote Desktop "Bypass RD gateway server for local addresses" no longer working in Windows 8

    Hi,
    After installing windows 8, it seems like the "Bypass RD gateway server for local addresses" is no longer working.
    In Windows 7, when the option is checked, I could have the server name set always and the client will automatically detect whether to use the RD gateway or not. For example, from my house, if I am connecting to a computer at my work, which requires
    the RD gateway, it will automatically pops up the dialog for authentication method. However, if I connect to a computer in my home network, it will just automatically connects without asking authentication for the RD gateway.
    However, after installing windows 8, this does not seem to work as expected anymore. The option is checked but the Windows Security dialog pops up in both situations and so i have to either save the rdp file locally and pin it to the taskbar or switch between
    disabling and enabling the RD gateway whenever I need to connect to different machines.
    Is this a regression in Windows 8? Is anyone else experiencing the same issue?
    Thanks

    Another way to resolve this issue for me, beside of configuring RDP to connect directly to server also on unmanaged network, will be to turn the "wifi" subnet in a managed network, as the "wired" subnet is.
    The differences between thoses to subnets, dynamically assigned by the same DHCP server, are:
    The "wifi" is in a private IP range, the "wired" is in a public IP range
    There's an ACL on the "wifi" subnet, not on the "wired"
    The next step is to compare frames send/received when on the two networks. Something will likely tell for the network to be managed.
    Beside, I'm still searching informations about NLA, which is responsible for setting a nework as managed or not.
    Here are some clues:
    http://blogs.technet.com/b/networking/archive/2010/09/08/network-location-awareness-nla-and-how-it-relates-to-windows-firewall-profiles.aspx
    http://social.technet.microsoft.com/Forums/windows/en-US/49ea0a6b-9c03-407d-8e26-24a92849a282/network-location-awareness-signature?forum=w7itpronetworking
    If anybody has official MS informations about NLA (A for Awareness and not Authentication), please share!

  • AddressProvider for local-address

    I was wondering if it is possible to use the AddressProvider for local-address. For <unicast-listener> there are sub elements <adddress> and <port>. Is it possible to use address provider to set this value?
    I understand the address-provider can be used under the <well-known-address> to provide list of all wka nodes dynamically. Wanted a similar option to set the local port as well.
    Edited by: 798623 on Oct 5, 2010 9:12 AM

    I'm afraid there is no "pluggable" capability for selecting local hostname and port.
    Can you elaborate a bit more as to why you would need this capability?
    /Christer

  • Anyone having trouble with iPad app for Comcast?

    Anyone having trouble with iPad app for Comcast?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents—again, the text, not a screenshot. I know the report is long. Please post all of it anyway.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • Can't create a new account at ePrintCenter - trouble with the server for 2 weeks.

    Hi. I'm trying to create an account at ePrintCenter and all the time getting mesage 'Возникла проблема с сервером. Проблема будет устранена в ближайшее время. Приносим извинения за неудобства.' (A trouble with the server, wait, bla bla bla). When will it be fixed?

    For those who are experiencing ongoing issues with their web services, you can attempt to try the following steps that may help resolve your problems.
    1.) Completely shut down your printer and restart it
    2.) If you have prints that have not printed, log into ePrint Center (or create an account if you do not have one) and then look for your printer status. If printer status is green but you still have pending jobs, delete the pending jobs one at a time (Starting with the oldest first). There may be a print job stuck in the queue that further restricts other jobs from completing.
    a. If option 1 or 2 above still doesn’t work, removing web services and re-adding web services will cause the printer to reattach to the cloud.
    b. Please note that if you attempt option 3, you will get a new eprint email address (and lose your custom one with no ability to get it back) furthermore, you will need to re-add your printer back to your ePC account.
    I am an HP employee

  • How to set up with cacheing DNS for local network?

    Our new Lion Server has a static IP Address pointed to over the internet by our registrar's zone file. Planning the Lion Server installation process with the intent of hosting Web, Mail and Open Directory services to a small number of users who are nearly all located off-site. I do also want Lion Server to be a caching DNS Server and DHCP authority on the local network to replace what dnsmasq does on our current Linux server.
    I am looking forward to offloading some of the lower level Linux administration tasks and putting myself in the hands of the Lion Server Setup Assistant and Server App :-) but at the same time don't understand some of  its assumptions and fear having to spend a lot of time experimenting and re-installing.
    So, specifically, I want the Server App to know that my Lion Server has a "Host Name for the Internet" but that the DNS it sets up will not be the DNS for my zone - I will be managing that through my registrar's interfaces.
    Second problem is my fnot understanding what name space devices on the local network will / should use. e.g.  The Linux server will be available for backups etc  on the local intranet (and optionally have a static ip address on the Internet) but MacBooks, PCs, iPads and iPhones will be served ip addresses by the Lion Server's DHCP. So will / should these dynamic devices have their machine names fully qualified by our domain name with RFC 1918 style ip addresses or something like .local?  How do I tell this to Lion's Server App / Setup Assistant? How easy is it to update these initial settings later?

    You do indeed need to have a master zone on lion server.  There's no way to get around that since Open Directory depends on Kerberos and Kerberos depends on the DNS.  LS scripts may see that the rDNS record exists, but I highly doubt that it'll auto configure everything for you... and given the number of possible variables, I bet that even if it worked something would need additional tweaking.
    Sounds like an interesting lab excersize.  You should try it on a test server!
    Again... you just need to folow the set up procedure that Lion Server presents you with. 
    It won't be smart enough to see your external records and use them to configure a key distribution center for your OD. 
    As far as your caching needs...  Could you set up your DHCP server to set the DNS server setting to show your internal server as the first hit, and your external as the second?  That way when the client requests a resolution it'll not get a hit on your local server but will from the external? 
    The question then is how long will it wait for a response from the first server?  Or will the first server respond with "I don't know" sending the client immediately to the second.
    The server set up that I have works similarly.  I have an internal master DNS that is replicated to a secondary.  The first DNS has an A record (community.server.com) that points to the INTERNAL ip address of the secondary server that's also running the web service.  The first server is running DHCP.  It tells the clients to use the first and second servers as it's DNS lookup. 
    Now...  Externally, my registrar hosts an A record for community.server.com that points to the external IP address of my router which then forwards the request to the proper port on the internal network.
    This way, the local clients internally look up and get a response locally when they go for community.server.com.  Externally, clients that look up community.server.com get the external connection to the router in my school.
    Yikes...  I fear that this is as clear as mud!
    -Graham

  • Trouble with database connector for FAST for Sharepoint

    I have plenty of experience with the JDBC connector for FAST ESP using Oracle, but this is the first experience I have with the same connector for FAST for Sharepoint (F4SP).  I've created the XML config exactly to specs based on the technet guides
    and configured my user accounts on the SQL Server appropriately.  I'm using SQL Server 2008 R2.
    If I try to use a Windows account, no level of access granted on the SQL Server results in a successful login.  Any attempt to use the connector is met with "Login failed for user:  domain\username".  If I try a SQL Server account, I no longer
    see a login failure, but this instead:
    PS C:\FASTSearch\bin> jdbcconnector start -f ..\etc\DTtest.xml
    Copyright (c) Microsoft Corporation.  All rights reserved.
    14:44:59,870 INFO  [JDBCConnector] Starting the connector!
    14:44:59,870 INFO  [JDBCConnector] Validating config.......
    14:45:00,136 INFO  [JDBCConnector] Testing connections to external systems
    14:45:00,198 INFO  [JDBCConnector] Checking if connections to source and target work....
    14:45:00,620 INFO  [JDBCAdapter] Opened JDBC Connection
    14:45:00,620 INFO  [JDBCConnector] Connection made to source system
    14:45:00,620 INFO  [CCTKDocumentFeeder] Publisher :Initializing: com.fastsearch.esp.cctk.publishers.CCTKDocumentFeeder
    14:45:00,620 ERROR [JDBCConnector] Failed creating publisher. Test connection failed.
    14:45:00,620 ERROR [JDBCConnector] Caused by: Unable to create status tracker.
    14:45:00,620 ERROR [JDBCConnector] Caused by: Could not connect to database. Make sure TCP/IP is enabled for SQLServer.
    14:45:00,620 ERROR [JDBCConnector] Caused by: No suitable driver found for ;integratedSecurity=true
    14:45:00,620 INFO  [JDBCConnector] Connection made to target system
    TCP/IP is certainly enabled for SQL Server -- I am connecting to it with Sharepoint 2010, not to mention a test install of Toad Freeware for SQL Server from another machine, resulting in no errors.  My connection string, username and password are all
    set up according to the technet guide, including the encrypted password set by the encryption utility run the in F4SP Powershell.  The same user who runs the connector also ran the encryption tool, so that should not be a problem either.
    I've never had this kind of trouble connecting to Oracle databases with the JDBC connector for FAST ESP.  Any suggestions?  These failures aren't exactly helpful to me.  Thanks in advance.

    I found the solution to this problem in case anyone else was still curious.
    This was caused not by JDBC settings, permissions/access on SQL Server, etc.  It was caused simply by a missing SQL Server in F4SP configuration.  When you run the F4SP config wizard, either as single-node or multi-node installations, the wizard
    might end up ignoring the value you select for SQL Server, even if you are using a deployment XML file.  When configuring as a multi-node setup, the wizard ignored both my deployment XML tag <connector-databaseconnectionstring> and the SQL Server
    setting done manually in the wizard itself.  Examing the evidence, I suspect this was caused by corrupt installation media (since the installer also failed to create some core files in /etc upon doing a reinstall).
    The bottom line is that you must see a value for SQL Server in your install_info.txt file in order for the JDBC connector to work with SQL Server, like this:
    Other services
    Log Server:             myserver.mydomain.com:13415
    SQL Server database:    jdbc:sqlserver://myserver.mydomain.com;DatabaseName=FASTSearchAdminDatabase;integratedSecurity=true
    If you see this instead, the connector will never work:
    So, the JDBC connector is certainly dependent on the main configuration of F4SP, regardless of what SQL Server is targeted in your connector's XML configuration.
    Other services
    Log Server:             myserver.mydomain.com:13415
    SQL Server database:   
    ;integratedSecurity=true
    I had no idea there was a connection between my install_info setup and the use of the JDBC connector.  But, the connection makes sense considering this was the error message from the JDBC connector:
    09:20:04,016 ERROR [JDBCConnector] Caused by: No suitable driver found for ;integratedSecurity=true

  • Trouble while creating package for extraction

    I am working on generic extraction using views. 
    I was told that after selecting a view when I save the data source I cannot save using a local package as it cannot be transported.  Hence I am trying to create a new package.
    So I have opened a new session, entered T code se80 to create a new package.
    While creating a package I selected Home as software component and in the Package type box I select Not a main package.  The package got created but when I am saving the data
    1 I am getting the screen "Create DataSource for Transactn data YBW1" where YBW1 is my data source name. 
    2. The message in the screen reads as "Customer object TABLZOXD30092 cannot be assigned to package RSUM"
    I don't understand why is it saying ".... cannot be assigned to package RSUM" when the name of my package is zcss
    3. However I hit on the continue button then the screen "Create Object Directory Entry" screen opened and in the Package box RSUM appears.
    4.I have deleted RSUM and entered ZCSS and when I hit on the save button I am getting the screen “Create Object Directory Entry” with the message “Cannot extend package ZCSS”
    5. I had cancelled the above screen and then I get message "Customer object TABLZOXD30092 cannot be assigned to package RSUM"
    Can any one please explain me how to create this package while going for generic extraction using views?
    Your help will be highly appreciated.
    Thank you.
    TR.

    Hi
    When you create a Development Class make sure the
    Transport Layer is pointing to your DEV system.
    If it does not then you create a non transport Class.
    You can go to SE80 and load your newly created Class
    and make sure it is pointing to your DEV sys.
    Reg's
    Edan

  • Having trouble with creating objects from instances created with ClassLoade

    Hi.
    I'm having a bit of trouble with casting an instance of an object from a custom ClassLoader. Don't worry - the code isn't for anything sinister - it's for one of those life simulation thingies, but I want to make it modular so people can write their own 'viruses' which compete for survival. You know the score.
    Anyway. I've got the beginnings of my main class, which seems to load the class data for all 'virus' classes in a folder called 'strains'. There is a abstract class called AbstractVirus which declares the method calls for how the viruses should behave and to get textual descriptions, etc. AbstractVirus is to be subclassed to create working virus classes and these are what my main class is trying to load instances of.
    Unfortuantely, I can't cast the instances into AbstractVirus objects. The error I've been getting is 'ClassCastException' which I presume is something to do with the fact that my ClassLoader and the Bootstrap ClassLoader aren't seeing eye-to-eye with the class types. Can anyone help? This line of programming is really new to me.
    My code for the main class is below:
    /* LifeSim.java */
    public class LifeSim {
      public LifeSim() {
        /* Get a list of all classes in the 'strains' directory and store non-
         * abstract classes in an array. */
        Class virusClasses[] = null;
        try {
          /* Get a reference to the file folder 'strains' and make sure I can read
           * from it. */
          java.io.File modulesFolder = new java.io.File("strains");
          if (!modulesFolder.isDirectory() || !modulesFolder.canRead()) {
         System.out.println("Failed to find accessible 'strains' folder");
         System.exit(-1);
          /* Get a list of all the class files in the folder. */
          String virusFiles[] = modulesFolder.list(new ClassFileFilter());
          if (virusFiles.length == 0) {
         System.out.println("No virus strains in 'strains' folder");
         System.exit(-1);
          /* Create an array of class objects to store my Virus classes. Ignore the
           * abstract class as I cannot instantiate objects directly from it.*/
          virusClasses = new Class[virusFiles.length];
          VirusClassLoader classLoader = new VirusClassLoader();
          int j = 0;
          for (int i = 0; i < virusFiles.length; i++) {
         String virusName = "strains/" + virusFiles;
         Class tempClass = classLoader.loadClass(virusName);
         if (tempClass.getName().compareToIgnoreCase("strains.AbstractVirus") != 0) {
         virusClasses[j++] = tempClass;
    } catch (ClassNotFoundException ncfe) {
    System.out.println("Failed to access virus class files.");
    ncfe.printStackTrace();
    System.exit(-1);
    /* TEST CODE: Create an instance of the first virus and print its class
    * name and print details taken from methods defined in the AbstractVirus
    * class. */
    if (virusClasses.length > 0) {
    try {
         // Print the class name
         System.out.println(virusClasses[0].getName());
         Object o = virusClasses[0].newInstance();
         strains.AbstractVirus av = (strains.AbstractVirus) o;
         // Print the virus name and it's description
         System.out.println(av.getQualifiedName());
         System.out.println(av.getDescription());
    } catch (InstantiationException ie) { ie.printStackTrace(); }
         catch (IllegalAccessException iae) { iae.printStackTrace(); }
    public static void main(String args[]) {
    new LifeSim();
    class ClassFileFilter implements java.io.FilenameFilter {
    public boolean accept(java.io.File fileFolder, String fileName) {
    if (_fileName.indexOf(".class") > 0) return true;
    return false;
    class VirusClassLoader extends ClassLoader {
    private String legalClassName = null;
    public VirusClassLoader() {
    super(VirusClassLoader.class.getClassLoader());
    public byte[] findClassData(String filename) {
    try {
    java.io.File sourcefile = new java.io.File(filename);
    legalClassName = "strains." + sourcefile.getName().substring(0,sourcefile.getName().indexOf("."));
    java.io.FileInputStream fis = new java.io.FileInputStream(sourcefile);
    byte classbytes[] = new byte[fis.available()];
    fis.read(classbytes);
    fis.close();
    return classbytes;
    } catch (java.io.IOException ioex) {
    return null;
    public Class findClass(String classname) throws ClassNotFoundException {
    byte classbytes[] = findClassData(classname);
    if (classbytes == null) throw new ClassNotFoundException();
    else {
    return defineClass(legalClassName, classbytes, 0, classbytes.length);
    Thank you in advance
    Morgan

    Two things:
    I think your custom ClassLoader isn't delegating. In general a ClassLoader should begin by asking it's parent ClassLoader to get a class, and only if the parent loader fails get it itself. AFAIKS you could do what you're trying to do more easilly with URLClassLoader.
    Second, beware that a java source file can, and often does, generate more than one class file. Ignore any class files whose names contain a $ character. It's possible you are loading an internal class which doesn't extend your abstract class.

  • GWIA doing DNS lookup for local address

    Hello,
    I am running GW8.0.2 on Netware 6.5sp8. I have a server that our recreation department uses to send out confirmation emails when a customer signs up for a class. The recreation server and the GWIA are on the same subnet.
    Here's the problem: When the Rec server sends out the first email confirmation, it gets sent out successfully. Subsequent emails after that fail. After about twenty minutes the next email will go out OK again but subsequent emails will fail.
    The verbose logs on the GWIA don't tell me much but the diagnostic logs show what looks like a reverse DNS lookup happening at the GWIA for my local IP address of 10.0.0.3 (the Rec server). This reverse DNS lookup fails (probably a timeout) and subsequent emails from this local Rec server get dropped by the GWIA without the DNS lookup.
    DNS is being done by DNS proxy on Bordermanager 9.2. I've bypassed the Bordermanager DNS and the same thing happens. I've made entries for the local Rec server into a route.cfg file but the GWIA seems to want to ignore these entries and keeps doing the DNS lookup.
    The wierdest part of the puzzle is that if I restart the proxy on the Bordermanager the next email will go out with, of course, subsequent emails failing. I've looked at the proxy dns cache and can't even find an entry for my Rec server.
    Attached are the entries from the Diagnostic logs of the GWIA. Novell tech support has assured me that the GWIA and the BM are working fine. I am also having this problem with a scanner that scans then emails but all other email and Bordermanager are functioning fine. This server and scanner were not having this problem before upgrading to GW8.0.2.
    I don't understand why GWIA is doing DNS lookups for a local address and I don't know what I can do to stop it. Any help would be greatly appreciated.
    This is a successful transfer right after restarting the proxy: 10.0.0.3 is the Rec server, 10.0.0.130 is the GWIA and 10.0.0.1 is the Bordermanager.
    16:04:13 D15 NgwResQuery(3.0.0.10.in-addr.arpa, 1, 12)
    16:04:13 D15 Querying server (# 1) address = 10.0.0.1
    16:04:13 D15 HEADER:
    16:04:13 D15 opcode = QUERY, id = 17615, rcode = SERVFAIL, flags: qr aa rd
    16:04:13 D15 query = 1, answer = 0, authority = 0, additional = 0
    16:04:13 D15
    16:04:13 D15 QUESTIONS:
    16:04:13 D15 3.0.0.10.in-addr.arpa, type = PTR, class = IN
    16:04:13 D15
    16:04:13 D15 rcode = 2, ancount=0
    16:04:13 D15 NgwResQuery failed
    16:04:13 D15 DMN: MSG 2000909 Accepted connection: [10.0.0.3] ()
    16:04:13 D15 Successful login with client/server access: 10.0.0.130:1677
    16:04:13 D15 DMN: MSG 2000909 Receiving file: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\3RD\receive\df30 fad4.221
    16:04:13 D15 DMN: MSG 2000909 SMTP session ended: [10.0.0.3] ()
    This is an unsuccessful transfer:
    16:06:08 D04 timeout
    16:06:08 D04 NgwResQuery: send error
    16:06:08 D04 NgwResQuery failed
    16:06:08 D04 DMN: MSG 2000933 Accepted connection: [10.0.0.3] ()
    16:06:08 D04 DMN: MSG 2000933 SMTP session ended: [10.0.0.3] ()
    Then the successful email comes back into the system:
    16:06:26 AA8 MSG 2000909 Processing inbound message: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\receive\DF30FAD4 .221
    16:06:26 AA8 MSG 2000909 Sender: [email protected]
    16:06:26 AA8 MSG 2000909 Recipient: [email protected]
    16:06:26 AA8 MSG 2000909 Queuing to MTA
    16:06:26 AA8 MSG 2000909 File: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\wpcsin\4\4daf048 2.8m1 Message Id: (4DAF66F2.B67:244:35687) Size: 163.3 Kb

    Thanks Massimo. I could have swore I already did that but when I did it again just to make sure it solved the problem. Appreciate the help. Have a good one.
    Originally Posted by mrosen
    On 02.05.2011 21:06, avanrav wrote:
    >
    > Hello,
    >
    > I am running GW8.0.2 on Netware 6.5sp8. I have a server that our
    > recreation department uses to send out confirmation emails when a
    > customer signs up for a class. The recreation server and the GWIA are on
    > the same subnet.
    >
    > Here's the problem: When the Rec server sends out the first email
    > confirmation, it gets sent out successfully. Subsequent emails after
    > that fail. After about twenty minutes the next email will go out OK
    > again but subsequent emails will fail.
    >
    > The verbose logs on the GWIA don't tell me much but the diagnostic logs
    > show what looks like a reverse DNS lookup happening at the GWIA for my
    > local IP address of 10.0.0.3 (the Rec server). This reverse DNS lookup
    > fails (probably a timeout) and subsequent emails from this local Rec
    > server get dropped by the GWIA without the DNS lookup.
    >
    > DNS is being done by DNS proxy on Bordermanager 9.2. I've bypassed the
    > Bordermanager DNS and the same thing happens. I've made entries for the
    > local Rec server into a route.cfg file but the GWIA seems to want to
    > ignore these entries and keeps doing the DNS lookup.
    >
    > The wierdest part of the puzzle is that if I restart the proxy on the
    > Bordermanager the next email will go out with, of course, subsequent
    > emails failing. I've looked at the proxy dns cache and can't even find
    > an entry for my Rec server.
    The reverse DNS done by GWIA is normal, and can't be stopped or tricked.
    That it fails in such odd ways must be a bug with the reverse DNS proxy
    of Bordermanager though. Apparently on the second lookups, it doesn't
    answer in a timely manner (the type of answer is irrelevant, just it
    *has* to answer). Use a different, "real" DNS server for your GWIA.
    CU,
    Massimo Rosen
    Novell Product Support Forum Sysop
    No emails please!
    Untitled Document

  • How to create Vendors for local scenario

    Hi,
    Please let me know how to create vendors for locla scenarion in EBP.
    Thanks,
    Manu

    Hi,
    Goto the path as mentioned by Muthu and create the business partner of type vendor.Make sure that you have the administrator role(SAP_BBP_STAL_ADMINISTRATOR).
    Also see these related threadS:
    Vendors in Standalone scenario
    Standalone scenario - create vendors
    BR,
    Disha.

Maybe you are looking for

  • Spot Color in photoshop

    I have a customer that does a front and back newsletter in photoshop. They use 100% black and 100% magenta and save it as a .psd. (They don't have no other layout programs) How can I put it in an IndesignCS2 or quark document and separate it into 2 c

  • Mtrace profiling on tomcat war

    I wanted to see a very simple example of JVMTI. For that I included the sun provided sample mtrace.dll and mtrace.jar (with couple of sysouts and again I created a jar) in tomcat 6.0 bin directory and also from Tomcat configuration I provided -Xbootc

  • Top Link error 17002 The Network Adapter could not establish the connection

    I have installed an application developped in an another environnement. I have created the database schema in my own database. I have created a database connection to this schema. I have reconciled the schema using this connection (so the database an

  • Printing Contact Sheets in Elements 5.0

    When printing contact sheets is it possible to also print file #'s or a number of my choosing under the pictures? I've been able to do this with previous versions but can't seem to find it in version 5. Thanks for any help...

  • Popup with userid and password

    Running FP_TEST_00 results in a popup asking for userid and password. Trying to activate a form results in the same symptom. Testing the connection with SM59 ends successful. We are using the ABAP stack. The system user ADSUser is created. Any sugges