• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't launch from JavaMonitor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't launch from JavaMonitor


  • Subject: Re: Can't launch from JavaMonitor
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 15 Mar 2011 16:40:48 -0700


On 2011-03-15, at 3:05 PM, John Baldwin wrote:

Thanks.

On the memory problem, it works "sometimes" when I put in adjusted memory settings. So I think the problem is related to launching a java app in  the server, which is overloaded at this point. I still have more success when launching by hand. But I don't think it's a WO issue.

It could be that the JVM can't allocate enough memory for the minimum heap size.


I don't think my Wonder install is that old. circa Jan. 31.

As long as that is 2011 that should be plenty new enough.  :-)


I did some research, and saw others had the "not a subclass of WOComponent" issue before.  (Your suggestion from then to log the name of the class showed it was org.apache.log4j.chainsaw.Main that was getting found.) The suggestion I followed that worked for me was to put the Main class in the same package as the Application class.

It looks it up as "Main" so finding the right class is classpath order dependant.

Another suggestion was to rename the Main component to XYZMain (or whatever). Perhaps a fully qualified class name might work also (com.mypackage.components.Main).

Yes.

I also tried moving the ERJars jar down in the build order, but that caused an error (Your main bundle is JavaFoundation...)

Do you have anything in the Java/Extensions directory on that machine?


Chuck


On Tuesday Mar 15  1:33 PM, at 1:33 PM, Chuck Hill wrote:


On Mar 15, 2011, at 12:42 AM, John Baldwin wrote:

I set up my application on a server, but when I try to launch it via JavaMonitor, I get:

/Local/Library/WebObjects/Applications/FAIdealDashboard.woa/FAIdealDashboard

java.io.IOException: error=12, Cannot allocate memory

This happens immediately, before any logging can occur. The application runs fine in development.

Initially, I was getting the same error when I tried to run the application from the command line on the server. So I changed the launch parameters in the UNIXClassPath.txt  to set memory parameters, and then I could launch the application from the command line.

But still the application won't launch through JavaMonitor. Are there other steps I need to take to adjust the memory within WebObjects? (I've tried removing the application and adding the application and an instance, but to no avail.)

Add the memory setting to the Additional Arguments section in JavaMonitor.  Is it possible that you are trying to allocate more memory than is supported under CentOS?



This is running on a CentOS system. The application is fully embedded.

When I run from the command line, I can connect to the application, but it throws an exception:

Error:java.lang.IllegalArgumentException: Class 'Main' exists but is not a subclass of WOComponent.

Main is a subclass of ERXComponent. I doubt this is related, but just in case.

That should indicate that ERXExtensions is not getting loaded first.  It should be if Application extends ERXApplication and the main() function follows the Wonder pattern.  Or it could mean your version of Wonder is old.  :-)


Chuck

-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/products/practical_webobjects









 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can't launch from JavaMonitor
      • From: John Baldwin <email@hidden>
References: 
 >Can't launch from JavaMonitor (From: John Baldwin <email@hidden>)
 >Re: Can't launch from JavaMonitor (From: Chuck Hill <email@hidden>)
 >Re: Can't launch from JavaMonitor (From: John Baldwin <email@hidden>)

  • Prev by Date: Re: Can't launch from JavaMonitor
  • Next by Date: ftp nsdata?
  • Previous by thread: Re: Can't launch from JavaMonitor
  • Next by thread: Re: Can't launch from JavaMonitor
  • Index(es):
    • Date
    • Thread