-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Web Services - java.lang.NoClassDefFoundError: Configuration
PostPosted: Fri Mar 01, 2013 12:06 am 
Newbie

Joined: Sun Feb 24, 2013 10:06 pm
Posts: 2
I have built a EAR file (using ANT build.xml from eclipse) and deploy it to WebLogic server, when I test the web service with a Test Client, I will receive the exception:

java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration


Anything wrong with my build.xml file below? Why I get this exception?


Code:
<?xml version="1.0" encoding="UTF-8"?>

<project name="MyWebServices" default="all">   

   <!-- set global properties for this build -->   
   <property name="wls.username" value="weblogic" />   
   <property name="wls.password" value="abcd1234" />   
   <property name="wls.hostname" value="localhost" />   
   <property name="wls.port" value="7001" />   
   <property name="wls.server.name" value="AdminServer" />   
   <property name="ear.deployed.name" value="MyWebServicesEar" />
   <property name="example-output" value="output" />   
   <property name="ear-dir" value="${example-output}/MyWebServicesEar" />   
   <property name="clientclass-dir" value="${example-output}/clientclasses" />   

   <path id="client.class.path">       
      <pathelement path="${clientclass-dir}" />       
      <pathelement path="${java.class.path}" />   
   </path>
   
   <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" />   
   <taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />   
   <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" />


   <target name="build-service">       
      <jwsc srcdir="src" destdir="${ear-dir}">
         <classpath>       
            <pathelement path="${java.class.path}" />
            <pathelement path="WebContent/WEB-INF/lib"/>
         </classpath>
         
         <module contextPath="MyWebServices" name="MyWebServicesModule">
            <jws file="/hk/com/my/webservices/servicefacade/CustomerWS.java" type="JAXWS" />             
            <jws file="/hk/com/my/webservices/servicefacade/LoginWS.java" type="JAXWS" />         
            <jws file="/hk/com/my/webservices/servicefacade/PaymentWS.java" type="JAXWS" />
            <!-- <jws file="/hk/com/my/webservices/servicefacade/RedemptionWS.java" type="JAXWS" /> -->
         </module>
      </jwsc>
   </target>   

   <target name="deploy">
      <wldeploy action="deploy" name="${ear.deployed.name}" source="${ear-dir}" user="${wls.username}" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${wls.server.name}" />   
   </target>   

   <target name="undeploy">       
      <wldeploy action="undeploy" name="${ear.deployed.name}" failonerror="false" user="${wls.username}" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${wls.server.name}" />   
   </target>       

   
   <target name="all" depends="clean,build-service,deploy" />
   <target name="clean" depends="undeploy">       
      <delete dir="${example-output}" />   
   </target> 
   
   <target name="run">       
      <java classname="hk.com.my.webservices.servicefacade.client.Main" fork="true" failonerror="true">
         <classpath refid="client.class.path" />                     
         <arg line="http://${wls.hostname}:${wls.port}/MyServices" />
      </java>   
   </target>

</project>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.