Have no idea about this, but I think it's not the ofbiz problem, there are something wrong in your program, please check this in detail.
2007/10/16, RockyOfbiz <[EMAIL PROTECTED]>: > > > Hi weizhan > > Thanks for reply. > > I have googled and found the same page so then i have replaced > saaj-api.jar > and saaj-impl.jar in > D:\opentaps-1.0\framework\base\lib\j2eespecs. It worked. > > Now i have another problem here.. Please help me again .. It says it can > not > cast the newpackage.NewWebService. When looked the method loadServelet in > org.apache.catalina.core.StandardWrapper.loadServlet().. it return type is > javax.servlet.Servlet. > > It throws this error .. > > StandardContext.java:3953:ERROR] Servlet /webapplication4 threw load() > exception > java.lang.ClassCastException: newpackage.NewWebService > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java > :1055) > at org.apache.catalina.core.StandardWrapper.load( > StandardWrapper.java:932) > at > org.apache.catalina.core.StandardContext.loadOnStartup( > StandardContext.java:3951) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4225) > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java > :1013) > at org.apache.catalina.core.StandardHost.start(StandardHost.java > :718) > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java > :1013) > at org.apache.catalina.core.StandardEngine.start( > StandardEngine.java:442) > at org.apache.catalina.startup.Embedded.start(Embedded.java:821) > at > org.ofbiz.catalina.container.CatalinaContainer.start( > CatalinaContainer.java:225) > at org.ofbiz.base.container.ContainerLoader.start( > ContainerLoader.java:83) > at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266) > at org.ofbiz.base.start.Start.startServer(Start.java:317) > at org.ofbiz.base.start.Start.start(Start.java:321) > at org.ofbiz.base.start.Start.main(Start.java:407) > > Any idea? > > help out... > > > guo weizhan wrote: > > > > Looks like javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String) > > method is not found, > > http://forums.java.net/jive/thread.jspa?messageID=33340 > > > > maybe this post can help you. > > > > you need to copy the jars your need to the classpath(like > > build/web/WEB-INF/lib/ ) to let the class execute correctly > > > > 2007/10/16, RockyOfbiz <[EMAIL PROTECTED]>: > >> > >> > >> Hi weizhan > >> > >> Thansk for your reply. You are right. I appreciate it. > >> > >> > >> I created a jar file containing newWebService.class and its > >> methodclasses. > >> Here am attaching a image which gives a screen shot of Webapplication4 > >> which > >> i place in hotdeploy > >> > >> http://www.nabble.com/file/p13228821/errorScreen.jpg > >> > >> When i put the myfile.jar in lib it worked but at the same time it > thrown > >> an > >> other error > >> > >> Can u also guide me through this problem. > >> > >> Exception sending context initialized event to listener instance of > class > >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener > >> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: > >> failed to parse runtime descriptor: java.lang.NoSuchMethodError: > >> javax.xml.soap.MessageFactory.newInstance > >> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory; > >> at > >> > >> > com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized > >> (WSServletContextListener.java:107) > >> at > >> org.apache.catalina.core.StandardContext.listenerStart( > >> StandardContext.java:3763) > >> at > >> org.apache.catalina.core.StandardContext.start(StandardContext.java > :4211) > >> at org.apache.catalina.core.ContainerBase.start( > ContainerBase.java > >> :1013) > >> at org.apache.catalina.core.StandardHost.start(StandardHost.java > >> :718) > >> at org.apache.catalina.core.ContainerBase.start( > ContainerBase.java > >> :1013) > >> at org.apache.catalina.core.StandardEngine.start( > >> StandardEngine.java:442) > >> at org.apache.catalina.startup.Embedded.start(Embedded.java:821) > >> at > >> org.ofbiz.catalina.container.CatalinaContainer.start( > >> CatalinaContainer.java:225) > >> at org.ofbiz.base.container.ContainerLoader.start( > >> ContainerLoader.java:83) > >> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266) > >> at org.ofbiz.base.start.Start.startServer(Start.java:317) > >> at org.ofbiz.base.start.Start.start(Start.java:321) > >> at org.ofbiz.base.start.Start.main(Start.java:407) > >> Caused by: java.lang.NoSuchMethodError: > >> javax.xml.soap.MessageFactory.newInstance > >> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory; > >> at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:163) > >> at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:68) > >> at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:304) > >> at > >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding( > >> DeploymentDescriptorParser.java:286) > >> at > >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters( > >> DeploymentDescriptorParser.java:227) > >> at > >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse( > >> DeploymentDescriptorParser.java:133) > >> at > >> > >> > com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized > >> (WSServletContextListener.java:97) > >> ... 13 more > >> > >> Thanks in advance. > >> /R > >> > >> guo weizhan wrote: > >> > > >> > it seems you haven't add the NewWebService class to the classpath, > >> have > >> > you packege the class to the jar and place in the lib folder? > >> > try add : <classpath type="dir" location="build/web/WEB-INF/lib"/> > >> > > >> > > >> > 2007/10/16, RockyOfbiz <[EMAIL PROTECTED]>: > >> >> > >> >> > >> >> Hi there. > >> >> > >> >> Sorry...I am new to java and ofbiz. It might sounds odd to you. But > I > >> >> will > >> >> give a explanation here. > >> >> > >> >> Basically we like to use all the functionalities provided by ofbiz > but > >> we > >> >> wanna replace the UI. So what we thought is we can just expose the > >> ofbiz > >> >> functionalities like product, catelog and etc to outside using > >> services. > >> >> > >> >> To satisfy that requirement. I looked into server.xml. Unfortunately > >> we > >> >> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and > >> >> service.xml. Probably we need to make so many stub generations from > >> WSDL. > >> >> We > >> >> didnt liked it. > >> >> > >> >> So what we convinced ourselves is to make a web service like this. > >> >> > >> >> package wspackage; > >> >> > >> >> import javax.jws.WebMethod; > >> >> import javax.jws.WebService; > >> >> > >> >> @WebService() > >> >> public class NewWebService { > >> >> @WebMethod > >> >> public String getName() { > >> >> return "Here we will contact Ofbiz classes or services"; > >> >> } > >> >> } > >> >> > >> >> So i created a new webapplication in hotdepoy and created a simple > >> >> webpage > >> >> (index.jsp) and a simple service(NewWebService). The combiled > classes > >> are > >> >> placed in build/web/WEB-INF/lib. and configured that inside > >> >> ofbiz-component.xml. When i start the ofbiz server it throws error > >> saying > >> >> it > >> >> cant find the classes. > >> >> > >> >> classpath in is ofbiz-component.xml > >> >> <classpath type="jar" location="build/web/WEB-INF/lib/*"/> > >> >> > >> >> Is this makes any sense? > >> >> > >> >> Just wondering with this issue .. i might be wrong .. i dont know > >> whether > >> >> am > >> >> allowed to do like this or not. > >> >> > >> >> /R > >> >> > >> >> > >> >> > >> >> > >> >> BJ Freeman wrote: > >> >> > > >> >> > maybe someone else will understand what you are trying to do > >> >> > But I need clarification. > >> >> > please explain java web services you are referring to. > >> >> > you are not following normal best practices so I not sure what you > >> are > >> >> > doing. > >> >> > > >> >> > RockyOfbiz sent the following on 10/15/2007 12:29 PM: > >> >> >> Hi There > >> >> >> > >> >> >> Thanks for your reply. Certainly i have gone through of these > >> videos. > >> >> >> > >> >> >> I have created a new web application (myOwnWebapplication) in > >> >> hot-deploy. > >> >> >> and configured in ofbiz-component.xml > >> >> >> > >> >> >> it works perfect. > >> >> >> > >> >> >> But if i create a java web service in that webapplication > >> >> >> (myOwnWebapplication) and trying to run the server and it throws > >> the > >> >> >> error > >> >> >> saying it cant find the web service implementation. I have set > the > >> >> class > >> >> >> paths to build/web/WEB-INF/lib. and all classes are there. > >> >> >> > >> >> >> I am using java 1.5 and netbeans. > >> >> >> > >> >> >> Any idea Whats wrong? > >> >> >> Thanks in advance > >> >> >> > >> >> >> Here is a stack trace > >> >> >> 2007-10-15 20:50:28,468 (main) [ > >> StandardContext.java:3767:ERROR] > >> >> >> Exception sending context initialized event to listener instance > of > >> >> class > >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener > >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletException: > >> WSSERVLET11: > >> >> >> failed to parse runtime descriptor: > >> >> >> com.sun.xml.ws.util.exception.LocatableWebServiceException: class > >> not > >> >> >> found > >> >> >> in runtime descriptor: newpackage.NewWebService > >> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml > >> >> >> at > >> >> >> > >> >> > >> > com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized > >> >> (WSServletContextListener.java:107) > >> >> >> at > >> >> >> org.apache.catalina.core.StandardContext.listenerStart( > >> >> StandardContext.java:3763) > >> >> >> at > >> >> >> org.apache.catalina.core.StandardContext.start( > StandardContext.java > >> >> :4211) > >> >> >> at > >> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java > >> >> :1013) > >> >> >> at org.apache.catalina.core.StandardHost.start( > >> StandardHost.java > >> >> :718) > >> >> >> at > >> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java > >> >> :1013) > >> >> >> at > >> >> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java > >> :442) > >> >> >> at org.apache.catalina.startup.Embedded.start(Embedded.java > >> :821) > >> >> >> at > >> >> >> org.ofbiz.catalina.container.CatalinaContainer.start( > >> >> CatalinaContainer.java:225) > >> >> >> at > >> >> >> > >> >> > >> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83) > >> >> >> at > >> org.ofbiz.base.start.Start.startStartLoaders(Start.java:266) > >> >> >> at org.ofbiz.base.start.Start.startServer(Start.java:317) > >> >> >> at org.ofbiz.base.start.Start.start(Start.java:321) > >> >> >> at org.ofbiz.base.start.Start.main(Start.java:407) > >> >> >> Caused by: > >> com.sun.xml.ws.util.exception.LocatableWebServiceException: > >> >> >> class > >> >> >> not found in runtime descriptor: newpackage.NewWebService > >> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml > >> >> >> at > >> >> >> > >> >> > >> > com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass > >> >> (DeploymentDescriptorParser.java:531) > >> >> >> at > >> >> >> > >> >> > >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters( > >> >> DeploymentDescriptorParser.java:207) > >> >> >> at > >> >> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse( > >> >> DeploymentDescriptorParser.java:133) > >> >> >> at > >> >> >> > >> >> > >> > com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized > >> >> (WSServletContextListener.java:97) > >> >> >> ... 13 more > >> >> >> Caused by: java.lang.ClassNotFoundException: > >> newpackage.NewWebService > >> >> >> at > >> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass( > >> >> WebappClassLoader.java:1355) > >> >> >> at > >> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass( > >> >> WebappClassLoader.java:1201) > >> >> >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java > >> :319) > >> >> >> at java.lang.Class.forName0(Native Method) > >> >> >> at java.lang.Class.forName(Class.java:242) > >> >> >> at > >> >> >> > >> >> > >> > com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass > >> >> (DeploymentDescriptorParser.java:528) > >> >> >> > >> >> >> > >> >> >> jacques.le.roux wrote: > >> >> >>> You may have at least a look at http://docs.ofbiz.org/x/PQM > >> >> >>> and more generally > >> >> >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index > >> >> >>> > >> >> >>> Jacques > >> >> >>> > >> >> >>> De : "RockyOfbiz" <[EMAIL PROTECTED]> > >> >> >>> > >> >> >>> > >> >> >>>> Hi BJ > >> >> >>>> > >> >> >>>> No i am not talking about contribution. I am just trying to > >> >> understand > >> >> >>>> the > >> >> >>>> things now so i dont think i can do contribute at this stage. > >> ;-). > >> >> >>>> > >> >> >>>> I am just trying to find out a way to my problem. > >> >> >>>> > >> >> >>>> How can i deploy my own java xml web services on ofbiz tomcat > >> >> server?. > >> >> >>>> > >> >> >>>> is it possible or not? > >> >> >>>> > >> >> >>>> /R > >> >> >>>> > >> >> >>>> BJ Freeman wrote: > >> >> >>>>> You are welcome to do what you want. > >> >> >>>>> Are you asking if it is something you can to contribute to > >> ofbiz? > >> >> >>>>> Have you read the best practices > >> >> >>>>> > >> >> >>>> > >> >> > >> > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices > >> >> >>>>> > >> >> >>>>> > >> >> >>>>> > >> >> >>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM: > >> >> >>>>>> Hi BJ, > >> >> >>>>>> > >> >> >>>>>> I am not sure about the framework/example. Can u tell me in > >> detail > >> >> if > >> >> >>>>>> possible please?. > >> >> >>>>>> > >> >> >>>>>> I wanna develop a web service layer kinda stuff. So that i > can > >> >> reduce > >> >> >>>> the > >> >> >>>>>> generation of stubs for WSDL. > >> >> >>>>>> > >> >> >>>>>> It can act like a wrapper and combile all the services > >> >> (service.xml > >> >> ) > >> >> >>>> and > >> >> >>>>>> provide only one endpoint for each application like this. > >> >> >>>>>> > >> >> >>>>>> http://localhost/webtools/product?wsdl > >> >> >>>>>> http://localhost/webtools/accounting?wsdl > >> >> >>>>>> > >> >> >>>>>> Do u have any other plans? > >> >> >>>>>> > >> >> >>>>>> /R > >> >> >>>>>> > >> >> >>>>>> BJ Freeman wrote: > >> >> >>>>>>> Like me when I first came, I had a misconception about what > >> >> things > >> >> >>>>>>> meant. > >> >> >>>>>>> I believe you would be farther ahead by reading the wealth > of > >> >> >>>>>>> information in the document site. It was not available when > I > >> >> >>>> started. > >> >> >>>>>>> for instance the service.xml is for runing services defined > in > >> >> other > >> >> >>>> xml > >> >> >>>>>>> files that relate to ofbiz structure. > >> >> >>>>>>> > >> >> >>>>>>> what you call a java xml web service would be a module like > >> the > >> >> one > >> >> >>>> in > >> >> >>>>>>> /framework/example > >> >> >>>>>>> > >> >> >>>>>>> > >> >> >>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM: > >> >> >>>>>>>> Hi all > >> >> >>>>>>>> > >> >> >>>>>>>> I am a newbie to ofbiz. I understood that the services are > >> >> >>>>>>>> specified > >> >> >>>>>>>> service.xml. > >> >> >>>>>>>> > >> >> >>>>>>>> Is there any possibility to develop my own "java xml web > >> >> services" > >> >> >>>> and > >> >> >>>>>>>> deploy then om ofbiz tomcat server?. > >> >> >>>>>>>> > >> >> >>>>>>>> Need : I want to make a web services layer in ofbiz project > >> and > >> >> >>>> expose > >> >> >>>>>>>> the > >> >> >>>>>>>> ofbiz services (service.xml) with some extra funtionality. > >> >> >>>>>>>> > >> >> >>>>>>>> Suggestion are welcome :-) > >> >> >>>>>>>> > >> >> >>>>>>>> Thanks in advance > >> >> >>>>>>>> > >> >> >>>>>>>> /Regards > >> >> >>>>>>>> Rakesh > >> >> >>>>>>>> > >> >> >>>>> > >> >> >>>> -- > >> >> >>>> View this message in context: > >> >> >>>> > >> >> > >> > http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333 > >> >> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com. > >> >> >>>> > >> >> >>> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> > http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873 > >> >> Sent from the OFBiz - User mailing list archive at Nabble.com. > >> >> > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13228821 > >> Sent from the OFBiz - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13229837 > Sent from the OFBiz - User mailing list archive at Nabble.com. > >
