I try to deploy a application on WebLogic 12c(version:12.1.2.0.0), when staring up it encounters an Exception as blow:
Failed to create the JAXB binder; nested exception is javax.xml.bind.JAXBException: provider org.eclipse.persistence.jaxb.JAXBContextFactory could not be instantiated: javax.xml.bind.JAXBException:
Exception Description: The java interface org.apache.camel.Endpoing can not be mapped by JAXB as it has multiple mappable parent interfaces. Multiple inheritence is not supported
- with linked exception:
[Exception [EclipseLink-50089] (Eclipse Persistence Service - 2.4.2.v2013-0514-5956486): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The java interface org.apache.camel.Endpoing can not be mapped by JAXB as it has multiple mappable parent interfaces. Multiple inheritence is not supported
But it doesn't happen when deploy to WebLogic11g(version:10.3.3.0).
Is this caused by a jar conflict?
I found a solution at the following threads:
http://camel.465427.n5.nabble.com/Spring-Camel-Context-initialization-error-in-weblogic-12c-td5733202.html
http://camel.465427.n5.nabble.com/Help-on-deploying-Camel-on-Weblogic-12c-Name-Collision-td5720837.html
After putting the jaxb.properties in my camel-spring-x.x.x.jar and redeploy, the problem has gone.
Related
I asked this questions already here:
https://www.eclipse.org/forums/index.php/t/1098133/
Now, after 3 weeks, i hope to have luck to reach a response here in stackoverflow.
I have a RCP applcation using MOXy to parse complex XML, the annotated classes are generated by XJC, and the package contains a ObjectFactory and a jaxb.properties pointing to MOXy.
The problem: The application works with Java8, but starting the application with Java11, i get this exception:
java.lang.RuntimeException: javax.xml.bind.JAXBException
- with linked exception:
[Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The context path mypackage contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and sessions.xml was found or was invalid.
Internal Exception: Exception [EclipseLink-7095] (Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The sessions.xml resource [sessions.xml] was not found on the resource path. Check that the resource name/path and classloader passed to the SessionManager.getSession are correct. The sessions.xml should be included in the root of the application's deployed jar, if the sessions.xml is deployed in a sub-directory in the application's jar ensure that the correct resource path using "/" not "\" is used.]
My target platform contains:
org.eclipse.persistence.moxy_2.7.4....jar
jaxb-osgi-2.3.2.jar
jakarta.activation.jar
jakarta.xml.bind-api.jar
I use Multi-Release: true to be able to handle Java8 vs. Java9+.
In the main MANIFEST.FM i require org.eclipse.persistence.moxy.
In the versions/9/OSGI-INF/MANIFEST.FM I add the import packages: com.sun.xml.bind.v2, javax.xml.bind
To start the application in the Eclipse run configuration dialog, i switch the JRE Java8 vs Java11, and in the plugins tab, i remove (J8) or add (J11) com.sun.xml.bind.jaxb-osgi (jaxb-osgi.jar) to make it startable.
Can someone help?
regards
Frank
I have a simple maven project created based on camel blueprint archetype.
When I do "mvn camel:run" I see this error
Caused by: java.lang.RuntimeException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:295)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:256)
at org.apache.camel.test.blueprint.Main.doStart(Main.java:110)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:138)
at org.apache.camel.main.MainSupport.run(MainSupport.java:390)
at org.apache.camel.test.blueprint.Main.main(Main.java:79)
Why is a test package being used ? I don't have anything in test scope or test classes. What is the sequence of the OsgiService creation and which class is supposed to create it ?
The issue was CamelContext was not getting created. The problem went away when I removed the reference to an unknown class.
I move to karaf
I am using WebLogic 11g. I am using Eclipse. I have created a EJB project. This project is called 'remote-ejb'.
The bean class HelloWorldBean implements a remote interface HelloWorldBeanRemote with just on method; public String getName();
I then deployed this project as an application successfully.
I then created a second EJB project called cart-ejb. This project uses the bean from the first project. When I deploy this
project I get the following error:
Module named 'cart-ejb' failed to deploy. See Error Log view for more detail.
weblogic.application.ModuleException: java.lang.ClassNotFoundException: beans.HelloWorldBeanRemote
Exception received from deployment driver. See Error Log view for more detail.
How can I fix this error?
I am migrating Toplink 11g to EclipseLink 12.1.3. I have EclipseLink.jar to the classpath. I have few mapping xml files. When executing the application, i am getting following error.
Exception [EclipseLink-9005] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.SessionLoaderException
Exception Description: An exception was thrown while loading the project-xml file [META-INF/Business.xml].
Internal Exception: Exception [EclipseLink-43] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Missing class for indicator field value [toplink:object-type-mapping] of type [class java.lang.String].
Descriptor: XMLDescriptor(org.eclipse.persistence.mappings.DatabaseMapping --> [DatabaseTable(attribute-mapping)]).
How to resolve this.
You are required to run package renamers etc as described here http://docs.oracle.com/middleware/1212/toplink/TLADG/migrnativetoplink.htm
If you have run the package renamer tools already, search your project.xml file for the toplink:object-type-mapping string which apparently wasn't converted correctly and the logs from running the renaming tool to determine why it wasn't converted.
I'm trying to unit testing a EJB with entity crud operations. I already was capable of testing it just running my web application (and all works), but I want to do it with JUnit.
So, my environment is Netbeans 7, Glassfish 3.1 (JavaDB, EclipseLink), JUnit4.
When I create a test class for my EJB, the code template uses the following line of code that throw an exception when I run the code:
EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
the exception is:
java.lang.RuntimeException: Invalid resource : jdbc/mine__pm
Exception while preparing the app : Invalid resource : jdbc/mine__pm
My EJB has an injected EntityManager that points to my persistence unit. This persistence unit is referencing a data source that I JNDI named jdbc/mine created by Netbeans for my Glassfish. It runs and I can see it on my server. I tried using a glassfish-resource.xml to do the same thing too.
Why doesn't it work?