0 Replies Latest reply on Apr 17, 2007 11:01 AM by Björn Karpenstein

    No service endpoint generated?

    Björn Karpenstein Newbie

      Hello i have the following maven-Script added to my pom.xml which starts wstools with an ANT-Task:

      
       <artifactId>maven-antrun-plugin</artifactId>
       <executions>
       <execution>
       <id>antTask</id>
       <phase>process-classes</phase>
       <goals>
       <goal>run</goal>
       </goals>
       <configuration>
       <tasks>
      <!-- Define a taskdef for the wstools ant task
      <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
      <classpath refid="library.classpath"/>
      <classpath refid="test.client.classpath"/>
      <classpath path="${build.test.classes.dir}"/>
      </taskdef>-->
       <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
       <classpath refid="maven.dependency.classpath"/>
       <classpath>
       <fileset dir="C:/servers/client/">
       <include name="activation.jar"/>
       <include name="javassist.jar"/>
       <include name="jbossall-client.jar"/>
       <include name="jbossretro-rt.jar"/>
       <include name="jboss-backport-concurrent.jar"/>
       <include name="jbossws-client.jar"/>
       <include name="jboss-xml-binding.jar"/>
       <include name="jbossws14-client.jar"/>
       <include name="log4j.jar"/>
       <include name="mail.jar"/>
       </fileset>
       <fileset dir="C:/servers/lib/endorsed">
       <include name="*.jar"/>
       </fileset>
       </classpath>
       </taskdef>
       <echo message="********** Running jboss ws **************"/>
       <mkdir dir="ws" />
       <wstools dest="C:/dev/helloMaven/FirstEJB-ejb/ws"
       config="C:/dev/helloMaven/FirstEJB-ejb/resources/wstools-mybean-config.xml"/>
       </tasks>
       </configuration>
       </execution>
       </executions>
      


      Here the EJB.Code

      package org.test;
      
      import java.rmi.RemoteException;
      
      import java.math.*;
      import javax.ejb.SessionBean;
      import javax.ejb.SessionContext;
      
      /**
       * Trade Session EJB manages all Trading services
       *
       * @ejb.bean name="FirstEJBBean"
       * display-name="FirstEJBBean"
       * description="A simple hello world bean."
       * local-jndi-name="FirstEJBBean"
       * type=stateless
       * view-type="service-endpoint"
       *@ejb.interface generate="service-endpoint"
       * service-endpoint-class="org.test.StatlessEJBEndpoint"
       *
       * @wsee.port-component name="org.test.StatlessEJBEndpointPort"
       */
      public class StatlessEjbBean implements SessionBean
      {
      
       BigDecimal yenRate = new BigDecimal("121.6000");
      
       BigDecimal euroRate = new BigDecimal("0.0077");
      
       /**
       * @ejb.interface-method view-type="service-endpoint"
       */
       public BigDecimal dollarToYen(BigDecimal dollars) {
       BigDecimal result = dollars.multiply(yenRate);
       return result.setScale(2, BigDecimal.ROUND_UP);
       }
      
       /**
       * @ejb.interface-method view-type="service-endpoint"
       */
       public BigDecimal yenToEuro(BigDecimal yen) {
       BigDecimal result = yen.multiply(euroRate);
       return result.setScale(2, BigDecimal.ROUND_UP);
       }
      
       public StatlessEjbBean() {
       }
      
       public void ejbCreate() {
       }
      
       public void ejbRemove() {
       }
      
       public void ejbActivate() {
       }
      
       public void ejbPassivate() {
       }
      
       public void setSessionContext(SessionContext sc) {
       }
      }


      i get the following error:

      
      [INFO] [antrun:run {execution: antTask}]
      [INFO] Executing tasks
       [echo] ********** Running jboss ws **************
      log4j:WARN No appenders could be found for logger (org.jboss.ws.tools.WSTools).
      log4j:WARN Please initialize the log4j system properly.
      org.jboss.ws.WSException: Endpoint com.bbraun.bbmag.test.StatlessEJBEndpoint can
      not be loaded
       at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(Too
      lsHelper.java:113)
       at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
       at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
       at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
       at org.apache.tools.ant.Task.perform(Task.java:364)
       at org.apache.tools.ant.Target.execute(Target.java:341)
       at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
      ntMojo.java:108)
       at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
      
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:420)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:539)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
      fecycle(DefaultLifecycleExecutor.java:480)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:459)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:311)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:278)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:143)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error executing ant tasks
      
      Embedded error: Error running jbossws:
      Endpoint com.bbraun.bbmag.test.StatlessEJBEndpoint cannot be loaded
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 minute 9 seconds
      [INFO] Finished at: Tue Apr 17 16:31:46 CEST 2007
      [INFO] Final Memory: 9M/20M
      [INFO] ------------------------------------------------------------------------