JAXB - ECLIPSE

Hello,
I am a new user of JAXB. And I have a problem for one week.
At fisrt, I execute jaxb with command line:
"/java/jwsdp-1.3/jaxb/bin/xjc.sh -p test.jaxb books.xsd -d Lundi"
(books.xsd is the example of JAXB)
It works perfectly after copy all endorsed files.
Then I have tried to use eclipse and to make the same command line with a build.xml file. It does'nt work.
I have tried again to make it with command line"/java/jwsdp-1.3/jaxb/bin/xjc.sh -p test.jaxb books.xsd -d Lundi"
And now it doesn't work too. It is strange because I didn't touch any jaxb file.
Errors was:
"[WARNING] Unable to validate your schema. Most likely, the JVM has loaded an incompatible XML parser implementations.."
So I 've understood I need ti copy xercesImpl.jar from jwsdp-1.3/jaxp/lib/endorsed to $JAVA_HOME/jre/lib/endorsed
But now I have a new problem:
==============================
[flefevre@mars flefevre]$ /java/jwsdp-1.3/jaxb/bin/xjc.sh -p test.jaxb JAXB/books.xsd -d JAXB/Lundi
parsing a schema...
compiling a schema...
java.lang.reflect.InvocationTargetException
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 org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.NullPointerException
at com.sun.tools.xjc.generator.SkeletonGenerator.generateStaticRuntime(SkeletonGenerator.java:233)
at com.sun.tools.xjc.generator.SkeletonGenerator.<init>(SkeletonGenerator.java:128)
at com.sun.tools.xjc.generator.SkeletonGenerator.generate(SkeletonGenerator.java:108)
at com.sun.tools.xjc.Driver.generateCode(Driver.java:366)
at com.sun.tools.xjc.Driver.run(Driver.java:215)
at com.sun.tools.xjc.Driver._main(Driver.java:80)
at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
at com.sun.tools.xjc.Driver$1.run(Driver.java:60)
=========================================
So I have tried to do make it directly with the jar file:
$ java -jar $JAXB_HOME/lib/jaxb-xjc.jar ./JAXB/books.xsd
It parse the schema but noway to compile it.
================
parsing a schema...
compiling a schema...
Exception in thread "main" java.lang.NullPointerException
at com.sun.tools.xjc.generator.SkeletonGenerator.generateStaticRuntime(SkeletonGenerator.java:233)
at com.sun.tools.xjc.generator.SkeletonGenerator.<init>(SkeletonGenerator.java:128)
at com.sun.tools.xjc.generator.SkeletonGenerator.generate(SkeletonGenerator.java:108)
at com.sun.tools.xjc.Driver.generateCode(Driver.java:366)
at com.sun.tools.xjc.Driver.run(Driver.java:215)
at com.sun.tools.xjc.Driver._main(Driver.java:80)
at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
at com.sun.tools.xjc.Driver$1.run(Driver.java:60)
===============================
echo $CLASSPATH
echo $JAVA_HOME
/usr/java/j2sdk1.4.2_04
echo $JAXB_HOME
/java/jwsdp-1.3/jaxb
Do you have any idea? What do I need to do?
Thanks a lot for your help
Francois from Paris in France.

Hey,
At fisrt thanks you to be still there.
So I am sorry I don't understand what you tell me.
I give you at this end my build file.
I can't run Ant with eclipse because it tell me that "taskdef A class needed by class "com.sun.tools.xjc.XJCTask" cannot be found: org/apache/tools/ant/Task
So when I open External tools (run>external tools), I have
Ant buildMain>buildfile = ${workspace_loc:/Jaxp_Build/build.xml}
Main> base directory = nothing
Main>arguments= nothing
Refresh = no available
Target = no target
ClassPath>ANT_HOME (default) = many .jar , with ant.jar but no optional.jar ( path= /user/local/eclipse/plugins/org.apache.ant_1.6.1/ant.jar
When you told me to setup JAVA_HOME and JAXB_HOME in you environmental variables, it is not in the build.xml. But with export JAVA_HOME=...
If it is the case, I have already done it in my .bashrc.
I am totaly lost. Could we restart the discussion?
I will reinstall jwsdp and eclipse in windows xp and linux.
what do I have to extra configure?
then I will use your build.xml
Thanks again
Francois
[email protected]
build.xml
================
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project basedir="." name="Test_JAXB" default="all">
<description>
Gion de JAXB books
</description>
<property name="projet" location="/home/flefevre/Projets/workspace/Jaxp_Build"/>
<property name="bin" location="${projet}/bin"/>
<property name="src" location="${projet}/src"/>
<!--property name="data" location="${projet}/data"/-->
<path id="classpath_jaxb">
     <pathelement location="."/>
     <fileset dir="/java/jwsdp-1.3/jaxb/lib" includes="*.jar"/>
     <fileset dir="/java/jwsdp-1.3">
          <include name="jaxp/**/*.jar"/>
          <include name="jaxp/lib/endorsed/xercesImpl.jar"/>
          <include name="jwsdp-shared/lib/**/*.jar"/>
     </fileset>
</path>
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
     <classpath refid="classpath_jaxb" />     
</taskdef>
<target name="jaxb" description="Generate JAXB classes" >
     <!-- generate the Java content classes from the schema -->
     <echo message="Compiling the schema..."/>
     <property name="build.src" value="." />
     <xjc schema="books.xsd" target="${build}" package="org.test.jaxb"/>
</target>
<target name="init" description="Initialisation">
<tstamp/>
<buildnumber file="numerobuild.txt" />
<echo message="Generation numero : ${build.number} du ${TODAY}"/>
</target>
<target name="compil" depends="init" description="Compilation">
<javac srcdir="${src}" destdir="${bin}">
     <classpath refid="classpath.base"/>
</javac>
</target>
<target name="all" depends="init, jaxb, compil" description="Generation complete">
<echo message="Generation complete."/>
</target>
</project>

Similar Messages

  • Re: JAXB 2.0 on eclipse : the chosen operation is not currently available

    I am trying to install plug in for JAXB 2.0 on eclipse 3.2( XJC ). I am using JAXB 2.0 and tried putting org.jvnet.jaxbw.eclipse_1.0.0 in eclipse/plugin folder. I am getting error dialog box "the chosen operation is not currently available".
    anyone have any idea, why i might be having this problem?? help really appreciated

    I am having the same problem of "the chosen operation is not currently available". I am using JAXB 2.0 and tried org.jvnet.jaxbw.eclipse_1.0.0 in eclipse/plugin folder.
    anyone have any idea, why i might be having this problem?? help really appreciated.

  • JAXB 2.0 on eclipse : the chosen operation is not currently available

    Hi. I have downloaded the JAXB2.0 plug-in, unzipped it into the plugin directory of my Eclipse, started Eclipse.
    I right-click on a .xsd file and get JAXB2.->Run XJC, but then I get "The chosen operation is not currently available.
    In Eclipse error log file, I see
    Plug in org.jvnet.jaxbw.eclipse ... was unable to load class ...RunXjcAction
    How do I solve the problem ?
    Many thanks,
    G.

    I am having the same problem of "the chosen operation is not currently available". I am using JAXB 2.0 and tried org.jvnet.jaxbw.eclipse_1.0.0 in eclipse/plugin folder.
    anyone have any idea, why i might be having this problem?? help really appreciated.

  • Strange problem with Eclipse, JAXB and JBoss

    Hello,
    I've been confronted to a very strange problem for the last week, and I still can't manage to fix it. I'm working on a J2EE application, using JBOSS. One of its functionality require the use of XML parsing. For this task, I've used JAXB since everyone in my company use this library. So I've written a small test class, that read my XML file, unmarshal it to java beans, and then write it back to another file (just for testing purpose only, I'm not trying to make the worst "copy" implementation ever done :) .)
    jaxbContext = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName());
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    //Unmarshal from XML to Bean
    XMLResult result = (XMLResult)unmarshaller.unmarshal(new File("path/to/file/myTestFile.xml"));
    //[Test] marshal back to XML
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.marshal(result, new File("path/to/file/output.xml"));When I run this file, I first get an error about namespaces...
    unexpected element (uri:"http://myNamespace.com", local:"XMLResult"). Expected elements are <{http://myNamespace.com/}Patient>,<{}Episode>, ..... <{}XMLResult>, etc...
    (Result is the root, patient and episode are sub elements)
    I have absolutely no idea why my root (XMLResult) should have no namespace, but some other elements should, and some shouldn't... but that's not the real problem. I've tried to fix this for days, changing namespaces, removing them.. but it didn't work. And then, I once chose to clean my project in Eclipse, and re-run my test. and it worked... !
    After some changes to the XSD, I re-run XJC, then recompile my project, and re-deploy it to JBOSS. I ran my test once more and... same error as before. Then, again, I clean the project.. and the test worked.
    So when I use the basic compiler for eclipse, everything works, but if I choose to use ant to build and deploy, it won't... even if they are supposed to be the same (run configuration / jre / use same as workspace). Here is an example of XML file I'm trying to read, and the related XSD :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    targetNamespace="http://myNamespace.com"
    xmlns:ar="http://myNamespace.com">
    <xs:element name="XMLResult">
         <xs:complexType>
              <xs:sequence>               
                   <xs:element ref="ar:Patient"/>
                   <xs:element ref="ar:Episode"/>
              </xs:sequence>          
         </xs:complexType>
    </xs:element>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <XMLResult xmlns="http://myNamespace.com">
      <Patient >
      </Patient>
      <Episode >
      </Episode>
    </XMLResult>Any idea of what I'm doing wrong? I think I've tried everything.... and looked everywhere, but had no success :/ I still don't know why it work with the basic compilation, or why my namespaces are wrong... (if they are).

    I don?t know if its a bug of the lomboz, if it is,
    please tell me what to do.It is a bug in Lomboz. It has a forum here: http://forge.objectweb.org/forum/forum.php?forum_id=360.

  • Anyone used JAXB with Eclipse PDE

    It was bizarre that I can use&run jaxb generated classes when I run it as Java appliation. However, when I tried to use those classes into a PDE project. it always reported "Unhandled exception caught in event loop.
    Reason:
    java.lang.NullPointerException" behind the message, system seems has problem finding "java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement"
    Any one has clue, please advise, appreciated!!!

    Hi,
    i am having the same kind of problem. I have a code
    that perfectly run as standard Java application (with
    a main method), but fails when run from a servlet
    under Tomcat.
    The error is :
    java.lang.NoClassDefFoundError:
    javax/xml/bind/StructureValidationException
    Hi,
    Are you trying the EA release?
    The beta release may need jaxb.properties file in the system classpath
    of tomcat. But I do not think you are using that release since your problem is related to the EA release which is not available anymore.
    Thanks,
    Bhakti
    However, i have put the run time jar of jaxb in the
    /WEB-INF/lib directory.
    If you have solved your problem, i am very interrested
    by your solution.
    Regards,
    C�dric

  • Error while running simple JAXB test class

    I am new to JAXB and trying to run simple tutorial code.
    I created Java project and added required jar files in a classpath.
    But I get error as
    "com.jaxbtest" doesnt contain ObjectFactory.class or jaxb.index
    I am using Eclipse and I have added these external jars in build path as well as in "Open Run Dialog" classpath.
    Thank you in advance.
    YB

    Hi Timo,
    Im using JDev version 11.1.1.6.0.
    I checked the class path on the jdev console. All the library references are mentioned in the manifest.mf classpath of the test project like below:
    Manifest-Version: 1.0
    Class-Path: lib/identitystore.jar
    lib/adfm.jar
    lib/groovy-all-1.6.3.jar
    lib/adftransactionsdt.jar
    lib/adf-dt-at-rt.jar
    lib/adfdt_common.jar
    lib/adflibrary.jar
    lib/xmlparserv2.jar
    lib/db-ca.jar
    lib/jdev-cm.jar
    lib/ojmisc.jar
    lib/commons-el.jar
    lib/jsp-el-api.jar
    etc...
    So I expect the library references should be resolved looking at the manifest file.
    Another set of entries that I see in the jdev classpath are related to the Model project which is under test.
    -classpath
    D:\CurrentProject_1\16_7_2013_3pm\11_7_2013\.adf;
    D:\CurrentProject_1\16_7_2013_3pm\11_7_2013\Model\classes;
    How do I put these entries into my class path? Will it be sufficient if I add the Model.jar into my test project classpath?
    Thanks,
    Sapna

  • Eclipse as a development environment with Jakarta Tomcat

    Hello:
    I am setting up the new development environment for my application (project). Below are the components involved::
    �     Eclipse 3.1
    �     myEclipse - EnterpriseWorkbenchInstaller_4.0GA_E3.1
    �     jakarta-tomcat-5.0.28 (Application Server)
    �     Sysdeo Eclipse Tomcat Launcher plugin - tomcatPluginV31beta
    �     SDK 1.4.2_08
    �     Microsoft XP sp2 operating system
    I have no issue with creation of project structure in eclipse IDE, compilation, and deployment, but there are some exception upon running the application.
    My project folder structure as follows:
    MyApplication/
    src/
    Conf/
    Web/
    classes
    taglib
    lib
    web.xml
    �     my application has few dependent projects, therefore I copied all the dependent projects final compiled classes (jars) to �lib� folder.
    �     I set all necessary classpath according to tomcat documentation.
    �     I created MyApplication.xml file under D:\jakarta-tomcat-5.0.28\conf\Catalina\localhost\ folder with the below context
    <Context path="/MyApplication " docBase="D:/xx/xxx/dev/src/ MyApplication/web" debug="0" reloadable="true" />
    �     I don�t get any exception during compilation and deployment process.
    �     I would greatly appreciate if you could give me a tips!!!!!!!!!!!!!!!!!!!!!!
    Error as follows:
    2005-10-10 17:31:45 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2005-10-10 17:31:47 StandardContext[jsp-examples]ContextListener: contextInitialized()
    2005-10-10 17:31:47 StandardContext[jsp-examples]SessionListener: contextInitialized()
    2005-10-10 17:31:47 StandardContext[servlets-examples]ContextListener: contextInitialized()
    2005-10-10 17:31:47 StandardContext[servlets-examples]SessionListener: contextInitialized()
    2005-10-10 17:32:27 StandardContext[manager]HTMLManager: init: Associated with Deployer 'localhost'
    2005-10-10 17:32:27 StandardContext[manager]HTMLManager: init: Global resources are available
    2005-10-10 17:32:27 StandardContext[manager]HTMLManager: list: Listing contexts for virtual host 'localhost'
    2005-10-10 17:32:35 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
         at org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:599)
         at org.apache.coyote.tomcat5.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:163)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:122)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
         at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:190)
         at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115)
         at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)
         at org.apache.jsp.default_jsp._jspService(default_jsp.java:101)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    path setting as follows:
    %JAVA_HOME%\bin;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Borland\AppServer\bin;C:\Program Files\CA\PEC\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\system32\nls;%SystemRoot%\system32\nls\ENGLISH;C:\Program Files\Attachmate\E!E2K\;C:\Program Files\CA\AllFusion Harvest Change Manager;D:\jwsdp-1.1\jaxb-1.0\bin;D:\jwsdp-1.1\jwsdp-shared\bin;C:\Borland\classes12.zip;C:\Program Files\UltraEdit;D:\jakarta-tomcat-5.0.28\webapps\cst\WEB-INF\classes;D:\EPS\EB_CST_v3.7.2\dev\src\cst;%PATH%
    Classpath setting as follows:
    .;%third_pty%\xerces.jar;D:\EPS\EB_CST_v3.7.2\dev\src\cst;D:\jakarta-tomcat-5.0.28\webapps\cst;D:\jakarta-tomcat-5.0.28\common\lib\servlet-api.jar;D:\jakarta-tomcat-5.0.28\common\lib\jsp-api.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-api.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-ri.jar;%third_pty%\ant.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed\dom.jar;D:\jwsdp-1.1\jwsdp-shared\lib\jax-qname.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-libs.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-xjc.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\jaxp-api.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed\sax.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed\xercesImpl.jar;%third_pty%\activation.jar;%third_pty%\ant-optional.jar;%third_pty%\j2ee.jar;%third_pty%\jakarta-regexp.jar;%third_pty%\jaxp.jar;%third_pty%\jcert.jar;%third_pty%\jnet.jar;%third_pty%\jsse.jar;%third_pty%\xalan.jar;C:\MSJDBSLib\msbase.jar;C:\MSJDBSLib\mssqlserver.jar;C:\MSJDBSLib\msutil.jar;
    Other IDE setting:
    As per tomcat documentation.

    Hello:
    I overcame the above issue by changing index.html to index.jsp, but now i am facing another issue as shown below:
    On top of the above change i too included j2ee.jar (from websphere) in the classpath to overcome the below issue, but even then i am getting the same error.
    Error as follows:
    javax.servlet.ServletException: Error instantiating servlet class com.metavante.cst.control.web.LoginMainServlet
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:996)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:214)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    ----- Root Cause -----
    java.lang.NoClassDefFoundError: javax/ejb/EJBObject
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         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.newInstance0(Class.java:278)
         at java.lang.Class.newInstance(Class.java:261)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:987)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:214)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

  • Eclipse as a development environment with Jakarta Tomcat - Need help!!

    Hello:
    Subject: Eclipse as a development environment with Jakarta Tomcat
    I am setting up the new development environment for my application (project). Below are the components involved::
    �     Eclipse 3.1
    �     myEclipse - EnterpriseWorkbenchInstaller_4.0GA_E3.1
    �     jakarta-tomcat-5.0.28 (Application Server)
    �     Sysdeo Eclipse Tomcat Launcher plugin - tomcatPluginV31beta
    �     SDK 1.4.2_08
    �     Microsoft XP sp2 operating system
    I have no issue with creation of project structure in eclipse IDE, compilation, and deployment, but there are some exception upon running the application.
    My project folder structure as follows:
    MyApplication/
    src/
    Conf/
    Web/
    classes
    taglib
    lib
    web.xml
    �     my application has few dependent projects, therefore I copied all the dependent projects final compiled classes (jars) to �lib� folder.
    �     I set all necessary classpath according to tomcat documentation.
    �     I created MyApplication.xml file under D:\jakarta-tomcat-5.0.28\conf\Catalina\localhost\ folder with the below context
    <Context path="/MyApplication " docBase="D:/xx/xxx/dev/src/ MyApplication/web" debug="0" reloadable="true" />
    �     I don�t get any exception during compilation and deployment process.
    �     I would greatly appreciate if you could give me a tips!!!!!!!!!!!!!!!!!!!!!!
    Error as follows:
    2005-10-10 17:31:45 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2005-10-10 17:31:47 StandardContext[jsp-examples]ContextListener: contextInitialized()
    2005-10-10 17:31:47 StandardContext[jsp-examples]SessionListener: contextInitialized()
    2005-10-10 17:31:47 StandardContext[servlets-examples]ContextListener: contextInitialized()
    2005-10-10 17:31:47 StandardContext[servlets-examples]SessionListener: contextInitialized()
    2005-10-10 17:32:27 StandardContext[manager]HTMLManager: init: Associated with Deployer 'localhost'
    2005-10-10 17:32:27 StandardContext[manager]HTMLManager: init: Global resources are available
    2005-10-10 17:32:27 StandardContext[manager]HTMLManager: list: Listing contexts for virtual host 'localhost'
    2005-10-10 17:32:35 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
         at org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:599)
         at org.apache.coyote.tomcat5.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:163)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:122)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
         at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:190)
         at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115)
         at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)
         at org.apache.jsp.default_jsp._jspService(default_jsp.java:101)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    path setting as follows:
    %JAVA_HOME%\bin;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Borland\AppServer\bin;C:\Program Files\CA\PEC\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\system32\nls;%SystemRoot%\system32\nls\ENGLISH;C:\Program Files\Attachmate\E!E2K\;C:\Program Files\CA\AllFusion Harvest Change Manager;D:\jwsdp-1.1\jaxb-1.0\bin;D:\jwsdp-1.1\jwsdp-shared\bin;C:\Borland\classes12.zip;C:\Program Files\UltraEdit;D:\jakarta-tomcat-5.0.28\webapps\cst\WEB-INF\classes;D:\EPS\EB_CST_v3.7.2\dev\src\cst;%PATH%
    Classpath setting as follows:
    .;%third_pty%\xerces.jar;D:\EPS\EB_CST_v3.7.2\dev\src\cst;D:\jakarta-tomcat-5.0.28\webapps\cst;D:\jakarta-tomcat-5.0.28\common\lib\servlet-api.jar;D:\jakarta-tomcat-5.0.28\common\lib\jsp-api.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-api.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-ri.jar;%third_pty%\ant.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed\dom.jar;D:\jwsdp-1.1\jwsdp-shared\lib\jax-qname.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-libs.jar;D:\jwsdp-1.1\jaxb-1.0\lib\jaxb-xjc.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\jaxp-api.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed\sax.jar;D:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed\xercesImpl.jar;%third_pty%\activation.jar;%third_pty%\ant-optional.jar;%third_pty%\j2ee.jar;%third_pty%\jakarta-regexp.jar;%third_pty%\jaxp.jar;%third_pty%\jcert.jar;%third_pty%\jnet.jar;%third_pty%\jsse.jar;%third_pty%\xalan.jar;C:\MSJDBSLib\msbase.jar;C:\MSJDBSLib\mssqlserver.jar;C:\MSJDBSLib\msutil.jar;
    Other IDE setting:
    As per tomcat documentation.

    Need tips to solve this issue!!!

  • JAXB Demo Crashes - using JDK 1.4.2

    I have installed the pack (1.6) with JDK 1.4.2. That finished 'ok'.
    Now I am getting the error: [java] java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    when trying to run the bind choice jaxb demo.
    As far as I can tell the javax.xml libraries in the java jdk1.4 are too old. How will this work with jdk 1.4 ?
    Thanks.

    Just FYI -
    (This issue is also discussed in this forum, named Java Forums - JAXB JDK requirement.)
    I had a hard time trying to figure out the -D and the build file config. I am using Eclipse 3.1, so it is supposed to take care of all this for me, right?
    In Eclipse, if you click on the right side of the Run button to open it up, then from the dropdown select Run, a new window will open up that has all of your projects displayed. Select your JAXB project (which might already be highlighted) and you'll see some tabs.
    Select the Classpath tab.
    Here you'll see Bootstrap Entries. On the right you'll see an Add Jars button. Click on it.
    Add the JAXB and JAXP jar files, per the Sun specs:
    jaxb-api.jar
    jaxb-impl.jar
    jaxb-libs.jar
    jaxb-xjc.jar
    jaxp-api.jar
    dom.jar
    sax.jar
    xalan.jar
    xercesImpl.jar
    ....basically all the jars in the JAXB and JAXP lib directories, including the endorsed files, will do.
    This will take care of this issue with JAXB and the 1.4.2 issue when you use Eclipse 3.1. Hope this helps, as it took an experienced Eclipse developer to show me this...

  • JAXB in JDeveloper 11gR1 PS1

    Hello,
    I'm using JDeveloper 11gR1PS1 and I've generated JAXB 2.0 bindings for an XSD I am using (right-click on the XSD and select "Generate JAXB2.0 Content Model").
    In one complex type of the XSD, there's an element of type "xsd:string" whose presence is mandatory when creating an XML document, even if its content is empty. So if I set the field in my JAXB Object to the empty string:
    myJAXBObject.setSomeStringField("");
    myJAXBObject.setSomeOtherStringField("This has a value");I expect to see (after mashalling) this kind of XML:
    <myJAXB>
            <someStringField></someStringField>
            <someOtherStringField>This has a value</someOtherStringField>
    </myJAXB>Instead I get:
    <myJAXB>
            <someOtherStringField>This has a value</someOtherStringField>
    </myJAXB>Why is this happening? How can I fix it?
    Details on my situation can also be found here: http://stackoverflow.com/questions/3186621/jaxb-empty-string-does-not-produce-empty-element

    The bug has been fixed and will be included in the EclipseLink 2.1.1 maintenance release. If you want access to this fix earlier you can pick up the nightly download starting July 8th from:
    - http://www.eclipse.org/eclipselink/downloads/nightly.php
    -Blaise

  • JAXB Configuration

    how to configure JAXB to add equal and hashCode methods to the generated classes ?

    In fact, I am familiar with JAXB and used it in several projects. I wrote the ObjectFactory by myself, of course, we can generate it by using xjc command. The project runs well in eclipse or netbeans without this exception because the file is there.
    This exceptioin occurs only when I make installation package by using BuildDesk. I find when I don't choose the obfuscation options in BuildDesk, it runs well. I think the shrink/optimize/obfuscate operation destroyed the ObjectFactory.class when processing the .jar file. I think the solution is package the JAXB model into a separate jar and use it as a external library, so BuildDesk doesn't process it in any case. Thank you all the same. :)
    Edited by: 807218 on Nov 3, 2010 7:29 AM

  • JAXB Exception...!

    When I coded the return value to java.String, I can deploy my web services. But After I changed my return value to java class with JAXB,
    I can't deploy my web services. Pls,check my code. I need your advice! Thanks in advance.
    - Persons.java
    package com.aaa.ws;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name="", propOrder = {"id", "name", "passwd"})
    public class Persons {
    @XmlElement
    protected String id;
    @XmlElement
    protected String passwd;
    @XmlElement
    protected String name;
    //getter and setter method
    - WSLoginTestPort.java
    package com.aaa.ws;
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    import javax.jws.WebResult;
    import javax.jws.WebParam;
    import com.aaa.ws.Persons;
    @WebService
    public interface WSLoginTestPort {
    @WebMethod
    @WebResult
    public Persons loginFunc(@WebParam String id, @WebParam String passwd);
    - WSLoginTest.java
    package com.aaa.ws;
    import javax.jws.WebService;
    import com.aaa.ws.Persons;
    @WebService
    public class WSLoginTest implements WSLoginTestPort {
    public Persons loginFunc(String ID, String Passwd) {
    // TODO Auto-generated method stub
    p.setId(ID);
    p.setPasswd(Passwd);
    p.setName("Jo");
    return p;
    But I can't deploy this web service. The Exception is like below
    org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/home/julian/workplace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1305009211342/deploy/TotalTestEAR.ear/TotalTest.war/
    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:335)
    at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:62)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:238)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:481)
    at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:112)
    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:110)
    at org.jboss.webservices.integration.deployers.WSDeploymentAspectDeployer.internalDeploy(WSDeploymentAspectDeployer.java:107)
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    ... 25 more
    Caused by: org.apache.cxf.service.factory.ServiceConstructionException
    at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:341)
    at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:442)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:680)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:242)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:148)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:183)
    at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:407)
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:314)
    ... 33 more
    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
    Two classes have the same XML type name "{http://ws.aaa.com/}loginFunc". Use @XmlType.name and @XmlType.namespace to assign different names to them.
    this problem is related to the following location:
    at com.aaa.ws.jaxws.LoginFunc
    this problem is related to the following location:
    at com.aaa.ws.LoginFunc
    at public com.aaa.ws.LoginFunc com.aaa.ws.ObjectFactory.createLoginFunc()
    at com.aaa.ws.ObjectFactory
    Two classes have the same XML type name "{http://ws.aaa.com/}loginFuncResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
    this problem is related to the following location:
    at com.aaa.ws.jaxws.LoginFuncResponse
    this problem is related to the following location:
    at com.aaa.ws.LoginFuncResponse
    at public com.aaa.ws.LoginFuncResponse com.aaa.ws.ObjectFactory.createLoginFuncResponse()
    at com.aaa.ws.ObjectFactory
    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
    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:597)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:201)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:362)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
    at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:564)
    at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:504)
    at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324)
    ... 44 more
    17:38:25,420 WARN [HDScanner] Failed to process changes
    org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
    *** DEPLOYMENTS IN ERROR: Name -> Error
    vfsfile:/home/julian/workplace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1305009211342/deploy/TotalTestEAR.ear/ -> org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/home/julian/workplace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1305009211342/deploy/TotalTestEAR.ear/TotalTest.war/
    DEPLOYMENTS IN ERROR:
    Deployment "vfsfile:/home/julian/workplace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1305009211342/deploy/TotalTestEAR.ear/" is in error due to the following reason(s): com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
    Two classes have the same XML type name "{http://ws.aaa.com/}loginFunc". Use @XmlType.name and @XmlType.namespace to assign different names to them.
    this problem is related to the following location:
    at com.aaa.ws.jaxws.LoginFunc
    this problem is related to the following location:
    at com.aaa.ws.LoginFunc
    at public com.aaa.ws.LoginFunc com.aaa.ws.ObjectFactory.createLoginFunc()
    at com.aaa.ws.ObjectFactory
    Two classes have the same XML type name "{http://ws.aaa.com/}loginFuncResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
    this problem is related to the following location:
    at com.aaa.ws.jaxws.LoginFuncResponse
    this problem is related to the following location:
    at com.aaa.ws.LoginFuncResponse
    at public com.aaa.ws.LoginFuncResponse com.aaa.ws.ObjectFactory.createLoginFuncResponse()
    at com.aaa.ws.ObjectFactory
    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

    Your problem is that you try to overload the webservice method 'loginFunc' - that is not possible in jax-ws without some additional parameters. I do not know how to do it from the top of my head, but try to investigate in the annotations that the stack trace mentions:
    Use @XmlType.name and @XmlType.namespace
    A quick and dirty solution would be to just rename one of the methods and so not to use overloading.

  • Unable to start weblogic 10 with eclipse

    Hello,
    i've a weblogic 10 server and it runs normally if i want to start from the DOS command-line and my ear is correctly deployed.
    When i try to start the same server within eclipse, my application seems to be initialized but at the end of the starting i've the following error :
    <Critical> <WebLogicServer> <AdminServer> <main> <<WLS Kernel>> <> <BEA-000386> <Server subsystem failed. Reason: java.lang.NoClassDefFoundError: weblogic/management/internal/DynamicMBeanImpl
    java.lang.NoClassDefFoundError: weblogic/management/internal/DynamicMBeanImpl
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployment(ClassDeploymentManager.java:198)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployments(ClassDeploymentManager.java:177)
         at weblogic.management.deploy.classdeployment.ClassDeploymentManager.runStartupsAfterAppActivation(ClassDeploymentManager.java:158)
         at weblogic.management.deploy.classdeployment.StartupClassPrelistenService.start(StartupClassPrelistenService.java:13)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    >
    I don't know what i have to do, and where should i find the DynamicMBeanImpl in the weblogic 10 API.
    Thanks

    Hi, David. Adding weblogic.jar by the full path will and does work. It makes sense to doubt this, but have a look at the manifest.mf file. It is these relative classpath entries that don't resolve correctly unless the real path of weblogic.jar is in the eclipse launch path. Hunting individual jars is a never-ending process in wls10. It is easiest to just use the original weblogic.jar file.
    This is why. Notice all the relative classpath entries:
    unknown-00-1b-63-07-ce-dc:~/bea/wlserver_10.3/server/lib adriancole$ jar -xvf weblogic.jar META-INF/MANIFEST.MF
    inflated: META-INF/MANIFEST.MF
    unknown-00-1b-63-07-ce-dc:~/bea/wlserver_10.3/server/lib adriancole$ cat META-INF/MANIFEST.MF
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.5
    Created-By: R27.6.0-50_o-100423-1.6.0_05-20080626-2105-windows-ia32 (B
    EA Systems, Inc.)
    Main-Class: weblogic.Server
    Implementation-Vendor: BEA Systems
    Implementation-Title: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 20
    08 1137967
    Implementation-Version: 10.3.0.0
    Class-Path: ../../../modules/features/weblogic.server.modules_10.3.0.0
    .jar schema/weblogic-domain-binding.jar schema/diagnostics-binding.ja
    r schema/diagnostics-image-binding.jar wlcipher.jar webservices.jar x
    mlx.jar ojdbc6.jar jconn2.jar jconn3.jar jConnect.jar EccpressoAsn1.j
    ar EccpressoCore.jar EccpressoJcae.jar mysql-connector-java-commercia
    l-5.0.3-bin.jar wlbase.jar wlutil.jar wlsqlserver.jar wldb2.jar wlsy
    base.jar wloracle.jar wlinformix.jar wlw-langx.jar ../../common/lib/p
    dev.jar wlw-system.jar jcom.jar weblogic-L10N.jar
    unknown-00-1b-63-07-ce-dc:~/bea/wlserver_10.3/server/lib adriancole$ jar -xvf ../../../modules/features/weblogic.server.modules_10.3.0.0.jar META-INF/MANIFEST.MF
    inflated: META-INF/MANIFEST.MF
    unknown-00-1b-63-07-ce-dc:~/bea/wlserver_10.3/server/lib adriancole$ cat META-INF/MANIFEST.MF
    Manifest-Version: 1.0
    Implementation-Vendor: BEA Systems
    Implementation-Title: BEA Modules WebLogic Server Dependencies 10.3 Th
    u Jul 10 07:58:50 MDT 2008
    Implementation-Version: 10.3.0.0
    Feature-Name: weblogic.server.modules
    Source-Repository-Change-Id: 1133362
    Class-Path: weblogic.server.modules.L10N_10.3.0.0.jar ../com.bea.core.
    antlr.runtime_2.7.7.jar ../com.bea.core.descriptor.j2ee_1.1.0.0.jar .
    ./com.bea.core.descriptor.j2ee.binding_1.1.0.0.jar ../com.bea.core.de
    scriptor.wl_1.1.0.0.jar ../com.bea.core.descriptor.wl.binding_1.1.0.0
    .jar ../com.bea.core.datasource6_1.4.0.0.jar ../com.bea.core.datasour
    ce6.binding_1.4.0.0.jar ../com.bea.core.beangen_1.4.0.0.jar ../com.be
    a.core.descriptor.settable.binding_1.4.0.0.jar ../com.bea.core.diagno
    stics.accessor_1.1.0.0.jar ../com.bea.core.diagnostics.accessor.bindi
    ng_1.1.0.0.jar ../com.bea.core.management.core_2.3.0.0.jar ../com.bea
    .core.management.core.binding_2.3.0.0.jar ../com.bea.core.ejbgen_1.0.
    0.0.jar ../org.apache.ant.patch_1.1.0.0_1-6-5.jar ../org.apache.ant_1
    .6.5/lib/ant-all.jar ../com.bea.core.repackaged.apache.bcel_5.2.1.0.j
    ar ../com.bea.core.repackaged.jdt_3.2.2.0.jar ../com.bea.core.apache.
    commons.collections_3.2.0.jar ../com.bea.core.apache.commons.lang_2.1
    .0.jar ../com.bea.core.apache.commons.pool_1.3.0.jar ../com.bea.core.
    apache.dom_1.0.0.0.jar ../com.bea.core.apache.logging_1.0.0.0.jar ../
    org.apache.openjpa_2.2.0.0_1-1-0.jar ../com.bea.core.xml.xmlbeans_1.0
    .0.0_2-4-0.jar ../com.bea.core.logging_1.4.0.0.jar ../com.bea.core.be
    a.opensaml_1.0.0.0_5-0-2-0.jar ../com.bea.core.bea.opensaml2_1.0.0.0_
    5-0-2-0.jar ../com.bea.core.monitoring.harvester.api_2.1.0.0.jar ../c
    om.bea.core.monitoring.harvester.jmx_2.1.0.0.jar ../com.bea.adaptive.
    harvester.utils_1.2.0.0.jar ../com.bea.mbean.typing.util_1.2.0.0.jar
    ../javolution_3.7.19.0.jar ../joda.time_1.2.1.0.jar ../com.bea.core.x
    ml.staxb.buildtime_1.3.0.0.jar ../com.bea.core.xml.staxb.runtime_1.3.
    0.0.jar ../com.bea.core.annogen_1.2.0.0.jar ../com.bea.core.kodo_1.0.
    0.0_4-2-0.jar ../com.bea.core.kodo.integration_1.3.0.0.jar ../com.bea
    .core.kodo.integration.binding_1.3.0.0.jar ../com.bea.core.kodo.integ
    ration.tools_1.2.0.0.jar ../com.bea.core.process_5.4.0.0.jar ../com.b
    ea.core.xml.beaxmlbeans_1.0.0.0_2-4-0.jar ../com.bea.core.repackaged.
    aspectj.aspectjweaver_5.1.0.jar ../com.bea.core.repackaged.apache.com
    mons.logging_1.2.0.jar ../com.bea.core.repackaged.springframework.spr
    ing_2.0.3.jar ../com.bea.core.repackaged.springframework.pitchfork_1.
    1.0.0_1-0.jar ../com.bea.core.common.security.i18n_1.0.0.0_5-0-2-0.ja
    r ../com.bea.core.common.security.xacml_1.0.0.0_5-0-2-0.jar ../com.be
    a.core.common.security.saml2.utils_1.0.0.0_5-0-2-0.jar ../com.bea.cor
    e.common.engine.impl_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.engin
    e.api_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.security.api_1.0.0.0
    _5-0-2-0.jar ../com.bea.core.common.security.impl_1.0.0.0_5-0-2-0.jar
    ../com.bea.core.common.security.jdkutils_1.0.0.0_5-0-2-0.jar ../com.
    bea.core.common.security.utils_1.0.0.0_5-0-2-0.jar ../com.bea.core.co
    mmon.security.saml2_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.securi
    ty.saml2.manage_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.security.p
    roviders.utils_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.security.sa
    ml.utils_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.security.xacmlpro
    viders.utils_1.0.0.0_5-0-2-0.jar ../com.bea.core.common.security.prov
    iders.env_1.0.0.0_5-0-2-0.jar ../com.bea.core.certj_1.0.0.0.jar ../co
    m.bea.core.ldapjdk_1.0.0.0.jar ../com.bea.core.apache.commons.net_1.0
    .0.0_1-4-1.jar ../com.bea.core.weblogic.saaj_1.3.0.0.jar ../com.bea.c
    ore.weblogic.stax_1.4.0.0.jar ../glassfish.el_2.1.0.jar ../glassfish.
    jaxb_2.1.6.jar ../glassfish.jaxb.xjc_2.1.6.jar ../glassfish.jaxws.res
    olver_2.1.3.jar ../glassfish.jaxws.fastinfoset_2.1.3.jar ../glassfish
    .jaxws.rt_2.1.3.jar ../glassfish.jaxws.mimepull_1.0.144.jar ../com.be
    a.core.woodstox_1.0.0.0_3-2-4.jar ../glassfish.jaxws.tools_1.0.0.0_2-
    1-3.jar ../glassfish.stax.ex_1.0.0.0_1-2.jar ../glassfish.xmlstreambu
    ffer_0.5.221.jar ../com.bea.core.apache.oro_1.0.0.0_2-0-8.jar ../java
    x.activation_1.1.0.0_1-1.jar ../javax.annotation_1.1.jar ../javax.int
    erceptor_1.0.jar ../javax.ejb_3.0.1.jar ../javax.jdo_2.0.1.jar ../jav
    ax.enterprise.deploy_1.2.jar ../javax.jms_1.1.1.jar ../javax.jsp_1.1.
    0.0_2-1.jar ../javax.jws_2.0.jar ../javax.mail_1.1.0.0_1-1.jar ../jav
    ax.management.j2ee_1.0.jar ../javax.persistence_1.0.0.0_1-0.jar ../ja
    vax.resource_1.5.1.jar ../javax.security.jacc_1.0.0.0_1-1.jar ../java
    x.servlet_1.0.0.0_2-5.jar ../javax.transaction_1.0.0.0_1-1.jar ../jav
    ax.xml.bind_2.1.1.jar ../javax.xml.registry_1.0.0.0_1-0.jar ../javax.
    xml.soap_1.3.1.0.jar ../javax.xml.stream_1.1.1.0.jar ../javax.xml.ws_
    2.1.1.jar ../javax.xml.rpc_1.2.1.jar ../monfox.dsnmp.agent_1.0.0.0_4-
    6-5.jar ../com.bea.core.jsafe_3.5.0.jar ../com.bea.core.serp_1.14.2.0
    .jar ../com.bea.core.apache_1.2.0.0.jar ../com.bea.core.beaninfo_1.4.
    0.0.jar ../com.bea.core.descriptor_1.4.0.0.jar ../com.bea.core.repack
    aged.asm_3.0.jar ../com.bea.core.repackaged.asm.commons_3.0.jar ../co
    m.bea.core.repackaged.asm.tree_3.0.jar ../com.bea.core.repackaged.asm
    .util_3.0.jar ../com.bea.core.diagnostics.core_2.1.0.0.jar ../com.bea
    .core.diagnostics.logging_1.1.0.0.jar ../com.bea.core.diagnostics.que
    ry_1.0.0.0.jar ../com.bea.core.diagnostics.accessor_1.1.0.0.jar ../co
    m.bea.core.diagnostics.instrumentor_1.3.0.0.jar ../com.bea.core.diagn
    ostics.notifications_1.1.0.0.jar ../com.bea.core.diagnostics.query_1.
    0.0.0.jar ../com.bea.core.diagnostics.snmp_1.1.0.0.jar ../com.bea.cor
    e.i18n_1.4.0.0.jar ../com.bea.core.i18n.generator_1.3.0.0.jar ../com.
    bea.core.i18n.tools_1.1.0.0.jar ../com.bea.core.management.jmx_1.1.0.
    0.jar ../com.bea.core.mbean.maker_1.3.0.0.jar ../com.bea.core.mbean.s
    upport_1.3.0.0.jar ../com.bea.core.messaging.kernel_1.4.0.0.jar ../co
    m.bea.core.resourcepool_1.4.0.0.jar ../com.bea.core.weblogic.socket.a
    pi_1.0.0.0.jar ../com.bea.core.weblogic.rmi.client_1.4.0.0.jar ../com
    .bea.core.weblogic.security.wls_1.0.0.0_5-0-2-0.jar ../com.bea.core.w
    eblogic.lifecycle_1.1.0.0.jar ../com.bea.core.store_1.4.0.0.jar ../co
    m.bea.core.store.gxa_1.4.0.0.jar ../com.bea.core.store.admintool_1.1.
    0.0.jar ../com.bea.core.store.jdbc_1.1.0.0.jar ../com.bea.core.transa
    ction_2.5.0.0.jar ../com.bea.core.utils.full_1.4.0.0.jar ../com.bea.c
    ore.utils.agent_1.0.0.0.jar ../com.bea.core.utils.classloaders_1.4.0.
    0.jar ../com.bea.core.utils.compiler_1.0.0.0.jar ../com.bea.core.util
    s.expressions_1.3.0.0.jar ../com.bea.core.utils.wrapper_1.3.0.0.jar .
    ./com.bea.core.timers_1.4.0.0.jar ../com.bea.core.weblogic.workmanage
    r_1.4.0.0.jar ../com.bea.core.workarea_1.4.0.0.jar ../com.bea.core.xm
    l.weblogic.xpath_1.1.0.0.jar ../com.bea.core.jatmi_1.2.0.3.jar ../com
    .bea.core.weblogic.security_1.0.0.0_5-0-2-0.jar ../com.bea.core.weblo
    gic.security.auth_1.0.0.0.jar ../com.bea.core.weblogic.security.diges
    t_1.0.0.0.jar ../com.bea.core.weblogic.security.identity_1.1.0.0.jar
    ../com.bea.core.weblogic.security.logger_1.1.0.0.jar ../com.bea.core.
    nodemanager.plugin_1.2.0.0.jar ../com.bea.core.jmspool_1.4.0.0.jar ..
    /com.bea.core.compat.wl.90_1.1.0.0.jar ../com.bea.core.http.pubsub.mb
    ean_1.2.0.0.jar ../com.bea.core.weblogic.web.api_1.2.0.0.jar ../com.b
    ea.core.redef_1.1.0.0.jar ../com.bea.core.redefagent_1.1.0.0.jar ../c
    om.bea.core.redef.binding_1.1.0.0.jar
    Source-Repository-URI: p4://p4jrep.bea.com:7999://depot/dev/src_stable
    /repository/modules/features
    Created-By: 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00 (Sun Microsystem
    s Inc.)
    See what I mean? You would end up needing a crazy amount of individual jars to get the equivalent classpath of the weblogic.jar in its original location.
    Does that make sense?
    Cheers,
    -Adrian

  • EJB Service and Eclipse Link marshalling error.

    Hi all. I have a problem with using EJB Service in BPEL.
    I have two JPA entities linked with @OneToMany association
    // RegistryItemBuffer
    @Entity
    @NamedQueries( { @NamedQuery(name =
    "RegistryItemBuffer.findRegItemsBufByRegId",
    query =
    "select o from RegistryItemBuffer o where o.registry.registryId = :registryId") })
    @Table(name = "PP_PERSON_ST_RG_ITEM_B")
    public class RegistryItemBuffer implements Serializable {
    private Long registryItemId;
    private Registry registry;
    private static final long serialVersionUID = 7526471155622776147L;
    public RegistryItemBuffer() {
    *@ManyToOne*
    *@JoinColumn(name = "PP_PERSON_ST_RG_ID")*
    *public Registry getRegistry() {*
    return registry;
    *public void setRegistry(Registry registry) {*
    this.registry = registry;
    //Registry
    @Entity
    @Table(name = "PP_PERSON_ST_RG")
    public class Registry implements Serializable {
    private Long registryId;
    private Set<RegistryItemBuffer> registryItemBufferSet;
    private static final long serialVersionUID = 7526471155622776100L;
    public Registry() {
    *@OneToMany(mappedBy = "registry", fetch = FetchType.EAGER)*
    *public Set<RegistryItemBuffer> getRegistryItemBufferSet() {*
    return registryItemBufferSet;
    *public void setRegistryItemBufferSet(Set<RegistryItemBuffer> registryItemBufferSet) {*
    this.registryItemBufferSet = registryItemBufferSet;
    In my stateless session bean I have a method which fetches registry items by registry id using named query:
    @SuppressWarnings("unchecked")
    public List<RegistryItemBuffer> getRegistryItems(Long registryId) {
    Query query =
    em.createNamedQuery("RegistryItemBuffer.findRegItemsBufByRegId");
    query.setParameter("registryId", registryId);
    List<RegistryItemBuffer> items = query.getResultList();
    return items;
    If I call this method from EJB Client it works fine.
    In my composite application I've add EJB Service. I have add a jar with EJB Remote Interface to SCA-INF/lib and specified JNDI path and remote interface in EJB Service Reference.
    When I invoking getRegistryItems method from BPEL it fetches all items by the EclipseLink Exception throws at the end:
    javax.xml.bind.MarshalException
    - with linked exception:
    [Exception [EclipseLink-7242] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.Val
    idationException
    Exception Description: An attempt was made to traverse a relationship using indirection that had a null Session. This often
    occurs when an entity with an uninstantiated LAZY relationship is serialized and that lazy relationship is traversed after
    serialization. To avoid this issue, instantiate the LAZY relationship prior to serialization.]
    at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:375)
    at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:401)
    Why EclipseLink cannot serialize fetched registry items ?
    I would be grateful to any advice.
    P.S. Sorry, If there is more appropriate forum.

    Any clues to this one?

  • Problem Generating JAXB Classes

    I am using Eclipse (Enterprise Pack) and want to generate JAXB classes from a schema. I right click on the schema, select Generate JAXB classes - fill in package name, next and get the error:
    java.lang.NoClassDefFoundError: com/sun/tools/xjc/XJCFacade
    Caused by: java.lang.ClassNotFoundException: com.sun.tools.xjc.XJCFacade
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
    Exception in thread "main"
    Am I missing a library?
    Steve Watson

    The web service project will add additional server runtime libraries to the classpath thus resolving the jaxb dependencies, in the case of a dynamic web project, you'll have to manage that with the JPA facet and eclipselink, or by adding the Moxy jars seperately. However, if you want to use the target runtime libraries create a user-library and reference the following server libraries: (from Server Install Dir\modules) glassfish.jaxb_"version".jar, glassfish.jaxb.xjc_"version".jar, javax.activation_"version".jar, javax.xml.bind_"version".jar, javax.xml.stream_"version".jar.

Maybe you are looking for

  • Illustrator Crashes with printing in 10.6.8

    I'm trying to print directly from Adobe's Illustrator CS (when I click the app it says that it's version 11). I was printing just fine from the program on October 29. The printer I'm using is the HP C6280. Today (November 14th) I'm attempting to prin

  • Why does it say to go to itune store support when I try n purchase sum gems?

    When I try n purchase gems it says to contact itune store support to complete the transaction

  • Request delivery date at line item level

    Hi, I understand that the requested delivery date at the order header level applies to all its line items, but is there any possibility that for different line items, we can have different requested delivery dates. If YES, where do we enter requesste

  • Is it ok to download DropSync and use it?

    Hi: I don't want to make the same mistake I made before when I downloaded a program that could've been a big problem (yes, you guessed it, I downloaded MacKeeper, but got rid of it after reading all about it).  Anyway, I want an app that will allow m

  • Summ a measure over 12 months for a specific sales month

    Hi I have been trying to Sum a measure (Income) over the next 12 months (Date) for a specific sales month (SalesDate) This query at least returns values but does not limit the measure to the first 12 months: With Member [Measures].[Income - plus 12]