RE: Beginner Webobjects Web Service Question
RE: Beginner Webobjects Web Service Question
- Subject: RE: Beginner Webobjects Web Service Question
- From: "Jeffrey Pearson" <email@hidden>
- Date: Wed, 14 Sep 2005 13:28:45 -0700
- Thread-topic: Beginner Webobjects Web Service Question
Chuck,
Thanks very much. That was exactly the info I was looking for. Ive set that up. Now when I try to compile, it fails with log4j pitching a bith. The exact error is:
[Session started at 2005-09-14 13:26:50 -0700.]
Reading MacOSClassPath.txt ...
Launching wstest.woa ...
java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory="/System" -DWOLocalRootDirectory="" -DWOUserDirectory="/Users/jeffreypearson/wstest/build/Development" -DWOEnvClassPath="" -DWOApplicationClass=Application -DWOPlatform=MacOS -Dcom.webobjects.pid=28603 -classpath WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap
appRoot is /Users/jeffreypearson/wstest/build/Development/wstest.woa/Contents
Loading /Users/jeffreypearson/wstest/build/Development/wstest.woa/Contents/MacOS/MacOSClassPath.txt
Generated classpath:
/Users/jeffreypearson/wstest/build/Development/wstest.woa/Contents/Resources/Java/wstest.jar
/System/Library/Frameworks/JavaFoundation.framework/Resources/Java/javafoundation.jar
/System/Library/Frameworks/JavaEOControl.framework/Resources/Java/javaeocontrol.jar
/System/Library/Frameworks/JavaEOAccess.framework/Resources/Java/javaeoaccess.jar
/System/Library/Frameworks/JavaWebObjects.framework/Resources/Java/javawebobjects.jar
/System/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/JavaWOExtensions.jar
/System/Library/Frameworks/JavaXML.framework/Resources/Java/javaxml.jar
/System/Library/Frameworks/JavaJDBCAdaptor.framework/Resources/Java/javajdbcadaptor.jar
/System/Library/Frameworks/JavaWOJSPServlet.framework/Resources/Java/javawojspservlet.jar
/System/Library/Frameworks/JavaWebServicesSupport.framework/Resources/Java/javawebservicessupport.jar
/Users/jeffreypearson/Library/Java
/Library/Java/
/System/Library/Java/
/Network/Library/Java
/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar
/Library/WebObjects/Extensions/avalon-framework-4.1.2.jar
/Library/WebObjects/Extensions/axis-ant.jar
/Library/WebObjects/Extensions/axis.jar
/Library/WebObjects/Extensions/commons-discovery.jar
/Library/WebObjects/Extensions/commons-logging.jar
/Library/WebObjects/Extensions/jaxrpc.jar
/Library/WebObjects/Extensions/log4j-1.2.4.jar
/Library/WebObjects/Extensions/log4j-1.2.8.jar
/Library/WebObjects/Extensions/logkit-1.0.1.jar
/Library/WebObjects/Extensions/saaj.jar
/Library/WebObjects/Extensions/servlet.jar
/Library/WebObjects/Extensions/wsdl4j.jar
/Library/WebObjects/Extensions/
[2005-09-14 13:26:54 PDT] <main> WOMaxIOBufferSize=8196
[2005-09-14 13:26:54 PDT] <main> WOWorkerThreadCountMin=16
[2005-09-14 13:26:54 PDT] <main> WOSocketMonitorSleepTime=50
[2005-09-14 13:26:54 PDT] <main> WODirectConnectEnabled=true
[2005-09-14 13:26:54 PDT] <main> WOIncludeCommentsInResponse=true
[2005-09-14 13:26:54 PDT] <main> WOWorkerThreadCount=8
[2005-09-14 13:26:54 PDT] <main> WOAdaptorURL=http://localhost/cgi-bin/WebObjects
[2005-09-14 13:26:54 PDT] <main> WOPlatform=MacOS
[2005-09-14 13:26:54 PDT] <main> WODebuggingEnabled=true
[2005-09-14 13:26:54 PDT] <main> WOEnvClassPath=
[2005-09-14 13:26:54 PDT] <main> WOListenQueueSize=128
[2005-09-14 13:26:54 PDT] <main> WOMissingResourceSearchEnabled=true
[2005-09-14 13:26:54 PDT] <main> WOSessionStoreClassName=WOServerSessionStore
[2005-09-14 13:26:54 PDT] <main> WOContextClassName=WOContext
[2005-09-14 13:26:54 PDT] <main> WOCachingEnabled=false
[2005-09-14 13:26:54 PDT] <main> WOApplicationClass=Application
[2005-09-14 13:26:54 PDT] <main> WOAcceptMalformedCookies=false
[2005-09-14 13:26:54 PDT] <main> NSProjectSearchPath=("..")
[2005-09-14 13:26:54 PDT] <main> WOMonitorEnabled=false
[2005-09-14 13:26:54 PDT] <main> WOAllowRapidTurnaround=true
[2005-09-14 13:26:54 PDT] <main> WORootDirectory=/System
[2005-09-14 13:26:54 PDT] <main> WOLocalRootDirectory=
[2005-09-14 13:26:54 PDT] <main> WOGenerateWSDL=true
[2005-09-14 13:26:54 PDT] <main> WOWorkerThreadCountMax=256
[2005-09-14 13:26:54 PDT] <main> WOAllowsConcurrentRequestHandling=false
[2005-09-14 13:26:54 PDT] <main> WOAdaptor=WODefaultAdaptor
[2005-09-14 13:26:54 PDT] <main> WOSessionTimeOut=3600
[2005-09-14 13:26:54 PDT] <main> WOMaxSocketIdleTime=180000
[2005-09-14 13:26:54 PDT] <main> WODefaultUndoStackLimit=10
[2005-09-14 13:26:54 PDT] <main> WOAutoOpenClientApplication=true
[2005-09-14 13:26:54 PDT] <main> WOAutoOpenInBrowser=true
[2005-09-14 13:26:54 PDT] <main> WOApplicationBaseURL=/WebObjects
[2005-09-14 13:26:54 PDT] <main> WOMaxHeaders=200
[2005-09-14 13:26:54 PDT] <main> WOLifebeatEnabled=true
[2005-09-14 13:26:54 PDT] <main> WOAllowsCacheControlHeader=true
[2005-09-14 13:26:54 PDT] <main> WOSMTPHost=smtp
[2005-09-14 13:26:54 PDT] <main> WOFrameworksBaseURL=/WebObjects/Frameworks
[2005-09-14 13:26:54 PDT] <main> WOStatisticsStoreSessionMax=50
[2005-09-14 13:26:54 PDT] <main> WOAdditionalAdaptors=()
[2005-09-14 13:26:54 PDT] <main> WOLifebeatDestinationPort=1085
[2005-09-14 13:26:54 PDT] <main> WOPort=-1
[2005-09-14 13:26:54 PDT] <main> WOLifebeatInterval=30
[2005-09-14 13:26:54 PDT] <main> WOSocketCacheSize=100
[2005-09-14 13:26:54 PDT] <main> WOUserDirectory=/Users/jeffreypearson/wstest/build/Development
[2005-09-14 13:26:54 PDT] <main> WODisplayExceptionPages=true
[2005-09-14 13:26:54 PDT] <main> com.webobjects.pid = 28603
[2005-09-14 13:26:54 PDT] <main> ------------------------
[2005-09-14 13:26:54 PDT] <main> Created adaptor of class WODefaultAdaptor on port 56593 and address daemon.pmsultd.com/192.168.1.131 with WOWorkerThread minimum of 16 and maximum of 256
[2005-09-14 13:26:54 PDT] <main> NSBundle is unable to find "ExtensionsForResources.plist" in the main bundle. Ignoring optional configuration file.
[2005-09-14 13:26:55 PDT] <main> Application project found: Will locate resources in '' rather than '/Users/jeffreypearson/wstest/build/Development/wstest.woa' .
[2005-09-14 13:26:54 PDT] <main> *** The application has found the following opened, development-mode Xcode projects: (<com.webobjects.appserver._private.WOProjectBundle: projectName='wstest'; bundlePath='/Users/jeffreypearson/wstest/build/Development/wstest.woa'; projectPath=''>)
[2005-09-14 13:26:55 PDT] <main> java.lang.ExceptionInInitializerError
at com.webobjects.appserver.WOWebServiceRegistrar.setUpDeploymentDocument(WOWebServiceRegistrar.java:46)
at com.webobjects.appserver.WOWebServiceRegistrar.<clinit>(WOWebServiceRegistrar.java:38)
at Application.<init>(Application.java:24)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.webobjects.appserver.WOApplication.main(WOApplication.java:323)
at Application.main(Application.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:71)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@e2d0ab for org.apache.commons.logging.impl.Log4JLogger
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414)
at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:76)
at org.apache.axis.utils.XMLUtils.<clinit>(XMLUtils.java:103)
... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@e2d0ab for org.apache.commons.logging.impl.Log4JLogger
at org.apache.commons.logging.impl.Lo[2005-09-14 13:26:55 PDT] <main> Creating LifebeatThread now with: wstest 56593 daemon.pmsultd.com/192.168.1.131 1085 30000
Welcome to wstest!
[2005-09-14 13:26:55 PDT] <main> A fatal exception occurred: null
gFactoryImpl.getLogConstructor(LogFactoryImpl.java:432)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
... 20 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
at java.lang.Class.getConstructor0(Class.java:1930)
at java.lang.Class.getConstructor(Class.java:1027)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:429)
... 21 more
I tried the calculator sample and it errors with the same error. Any ideas?
-----Original Message-----
From: Chuck Hill [mailto:email@hidden]
Sent: Wed 9/14/2005 12:44 PM
To: Jeffrey Pearson
Cc: WOdev List
Subject: Re: Beginner Webobjects Web Service Question
Posted a short while ago, maybe this will help:
> Here is a (very short) "getting started". It's probably not
> the best way but works surprisingly well. :)
>
> - Create a new "Java WebObjects Application" project the way you
> have always done.
> - Add the JavaWebServicesSupport framework.
> - In a good place (Application constructor for example),
> add the following line:
> WOWebServiceRegistrar.registerWebService(MyClass.class, true);
> - Create a class: "public MyClass extends Object { }", then add
> methods like you normally would; you can return what you want,
> for example Strings, NSDictionary, NSArray as long as it is
> serializable.
>
> Methods that should be visible in the WSDL have to be declared public.
>
> To get the session in a WebServices environment, call
> WOWebServiceUtilities.currentWOContext().session();
>
> Instruct the java compiler to generate debugging information.
> In makefile.preamble, add "OTHER_JAVATOOL_FLAGS=-g". If you
> don't do this, the WSDL will list each parameter as "in0", "in1"
> and so on.
>
> To get the WSDL, call
> http://localhost/cgi-bin/WebObjects/myApp.woa/ws/MyClass?wsdl
>
> For now, we have done the clients in Flash only but writing a
> WOApp that consumes webservices should be easy. Have a look
> at all the classes that start with "WOWebService...", they
> are quite well
> documented. Classes exist to read and decipher the WSDL from
> the server and call each operation a webservice provides. You
> can even move your client session from one service to another
> (Flash does this
> automatically).
>
> Basically, all you have to do is to include the framework and
> add a call to "WOWebServiceRegistrar", you can even use an
> existing class for testing.
>
> -- Stefan Apelt
On Sep 14, 2005, at 9:41 AM, Jeffrey Pearson wrote:
> I have it. Which is why I posted the question here. It only shows
> you how to make one using the direct 2 web services which requires
> the data model. Hence my posting.
>
>
>
>
>
> -----Original Message-----
> From: LD [mailto:email@hidden]
> Sent: Wed 9/14/2005 12:34 AM
> To: Jeffrey Pearson
> Cc: email@hidden
> Subject: Re: Beginner Webobjects Web Service Question
>
> Hi there,
>
> On 14/09/2005, at 3:49 PM, Jeffrey Pearson wrote:
>
>
>> Please pardon the most basic beginner question. I've been [s]
>> earching all day and yet to find an answer.
>>
>> Coming from the .Net world to Java, I am making my foray into Web
>> Services. Of course being a Mac person, I would REALLY like to use
>> Web Objects to develop them.
>>
>
> 1) Go to: http://developer.apple.com/webobjects/
> 1) Click on: "Documentation"
> 2) Click on "Web Services"
> 3) Click on "WebObjects Web Services Programming Guide" [html | pdf]
>
> with regards,
> --
>
> LD
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40global-village.net
>
> This email sent to email@hidden
>
>
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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