• 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: Practical Webobjects PracticalUtilites project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Practical Webobjects PracticalUtilites project


  • Subject: Re: Practical Webobjects PracticalUtilites project
  • From: David Avendasora <email@hidden>
  • Date: Fri, 1 Aug 2008 15:42:46 -0400

Hi Jeff,

Is it possible that when you ran it, you selected a Application class other than the one from your project?

(Right-Click on project -> Run As... WOApplication, then make sure you are selecting _your_ Application class)

If that isn't it, Google is your friend:

http://www.google.com/search?client=safari&rls=en-us&q=Class+'Main'+exists+but+is+not+a+subclass+of+WOComponent.&ie=UTF-8&oe=UTF-8

http://lists.apple.com/archives/webobjects-deploy/2007/Nov/msg00008.html

I hope this helps.

Dave


On Aug 1, 2008, at 3:07 PM, Jeff Schmitz wrote:

Don't think so, although there are a few things in there. Here my LIbrary/WebObject/Extensions:

axis-ant.jar			jaxrpc.jar
axis.jar			log4j-1.2.14.jar
commons-discovery-0.2.jar	saaj.jar
commons-logging-1.0.4.jar	serializer.jar
derby.jar			servlet.jar
derbyclient.jar			wsdl4j-1.5.1.jar


And here's Library/Java/Extensions:

OpenBaseJDBC.jar			libsvnjavahl-1.jnilib
activation.jar				mail.jar
frontbasejdbc.jar			mysql-connector-java-5.0.5-bin.jar


On Aug 1, 2008, at 1:58 PM, Chuck Hill wrote:

Have you been dumping jars in /Library/Java/Extensions or /Library/ WebObjects/Extensions?


On Aug 1, 2008, at 11:52 AM, Jeff Schmitz wrote:

OK, that got me a little further, but now I get a similar problem with Main (see exception below). I tried adding

  protected Class _mainClass()
  {
  	return com.apress.practicalwo.chap3app.Main.class;
  }

to both Application and Session but that didn't help.


WorkerThread0 Dispatch request /cgi-bin/WebObjects/Chap3App.woa
WorkerThread0 Application awake
[2008-8-1 19:50:32 CDT] <WorkerThread0> +++ Lock number (1) in WorkerThread0
WorkerThread0 Session xm0mpDw9ywHAm0Yc3bKvFM awake
[2008-8-1 19:50:32 CDT] <WorkerThread0> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
java.lang.IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'Main' exists but is not a subclass of WOComponent.
[2008-8-1 19:50:32 CDT] <WorkerThread0> java.lang.IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'Main' exists but is not a subclass of WOComponent.
at com .webobjects .appserver ._private .WOComponentDefinition._componentClass(WOComponentDefinition.java: 518)
at com .webobjects .appserver ._private .WOComponentDefinition.componentClass(WOComponentDefinition.java: 526)
at com .webobjects .appserver ._private .WOComponentDefinition ._componentInstanceInContext(WOComponentDefinition.java:532)
at com .webobjects .appserver ._private .WOComponentDefinition .componentInstanceInContext(WOComponentDefinition.java:664)
at com .webobjects .appserver.WOApplication.pageWithName(WOApplication.java:2323)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:284)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java: 332)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369)
at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:445)
at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1678)


On Aug 1, 2008, at 1:44 PM, David Avendasora wrote:

Hi Jeff,

Somehow it is picking up a Session class from one of the frameworks included in your build path. As it's saying: "org.apache.axis.session.Session" - which is _not_ the right session class.

Instructions on how to fix are here: http://lists.apple.com/archives/webobjects-dev/2008/Jan/msg00063.html

Dave

On Aug 1, 2008, at 2:31 PM, Jeff Schmitz wrote:

OK, I got the PracticalUtilities JUnit tests to run with no Failures and 4 Errors, so I've moved on to chapter 3 app. On startup I get the below exception. Seems it gets confused as to what Session class to use. I looked for references in the code to Session, but the only thing I came up with was the Session class itself (which extends WOSession), so I'm not sure what's going on:

com.apress.practicalwo.chap3app.Application> Class 'Session' exists (interface org.apache.axis.session.Session) but is not a subclass of WOSession.
[2008-8-1 19:21:1 CDT] <WorkerThread0> java.lang.IllegalArgumentException: <com.apress.practicalwo.chap3app.Application> Class 'Session' exists (interface org.apache.axis.session.Session) but is not a subclass of WOSession.
at com .webobjects .appserver.WOApplication._sessionClass(WOApplication.java:1925)
at com .webobjects .appserver .WOApplication.createSessionForRequest(WOApplication.java:1964)
at com .webobjects .appserver .WOApplication._initializeSessionInContext(WOApplication.java: 2101)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java: 319)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369)
at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:445)
at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1678)
at com .apress .practicalwo .chap3app.Application.dispatchRequest(Application.java:98)
at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java: 144)
at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:613)



On Aug 1, 2008, at 12:25 PM, Chuck Hill wrote:


On Aug 1, 2008, at 10:09 AM, Jeff Schmitz wrote:

Hello,
I'm trying to setup the Practical Webobjects code in Eclipse following the books Appendix. I'm getting stuck on trying to run the JUnit tests on the PracticalUtilities project. Everything seems to go fine, but the "Run" button on the Run Diaglog stays "greyed out". I did select the "Run a single test" radio button and entered the Test class (com.apress.preacticalwo.practicalutilities.tests.AllTests), along with entering the specified workding directory.


The project itself does have a red X on it, but nothing in the project has one, so I've no idea why. Any ideas on what may be causing this? I was able to run the database setup scripts fine.


That red X might be important. Open the Problems view and have a look.

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


_______________________________________________ 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

-- 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
References: 
 >Practical Webobjects PracticalUtilites project (From: Jeff Schmitz <email@hidden>)
 >Re: Practical Webobjects PracticalUtilites project (From: Chuck Hill <email@hidden>)
 >Re: Practical Webobjects PracticalUtilites project (From: Jeff Schmitz <email@hidden>)
 >Re: Practical Webobjects PracticalUtilites project (From: David Avendasora <email@hidden>)
 >Re: Practical Webobjects PracticalUtilites project (From: Jeff Schmitz <email@hidden>)
 >Re: Practical Webobjects PracticalUtilites project (From: Chuck Hill <email@hidden>)
 >Re: Practical Webobjects PracticalUtilites project (From: Jeff Schmitz <email@hidden>)

  • Prev by Date: Re: Practical Webobjects PracticalUtilites project
  • Next by Date: Re: Source of unixclasspath.txt
  • Previous by thread: Re: Practical Webobjects PracticalUtilites project
  • Next by thread: Source of unixclasspath.txt
  • Index(es):
    • Date
    • Thread