I am trying to integrate yugabytedb with springboot application, but when trying to run the application I am getting the attached exception
[Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.yugabyte.data.jdbc.core.convert.DefaultYsqlDataAccessStrategy.<init>(DefaultYsqlDataAccessStrategy.java:49)
The following method did not exist:
'void org.springframework.data.jdbc.core.convert.DefaultDataAccessStrategy.<init>(org.springframework.data.jdbc.core.convert.SqlGeneratorSource, org.springframework.data.relational.core.mapping.RelationalMappingContext, org.springframework.data.jdbc.core.convert.JdbcConverter, org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations)'
The calling method's class, com.yugabyte.data.jdbc.core.convert.DefaultYsqlDataAccessStrategy, was loaded from the following location:
jar:file:/Users/shubhankar.ghosh/.m2/repository/com/yugabyte/spring-data-yugabytedb-ysql/2.3.0/spring-data-yugabytedb-ysql-2.3.0.jar!/com/yugabyte/data/jdbc/core/convert/DefaultYsqlDataAccessStrategy.class
The called method's class, org.springframework.data.jdbc.core.convert.DefaultDataAccessStrategy, is available from the following locations:
jar:file:/Users/shubhankar.ghosh/.m2/repository/org/springframework/data/spring-data-jdbc/2.4.2/spring-data-jdbc-2.4.2.jar!/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.class
The called method's class hierarchy was loaded from the following locations:
org.springframework.data.jdbc.core.convert.DefaultDataAccessStrategy:][1]
Related
I'm trying to install axis2.jar (1.7) in Websphere 8.5 which is using java 8. I have selected parent last in axis2.jar. Axis2 has some wsdls installed and it'll communicate with oracle 12c to retrieve data. In axis2 shared libraries i'm including xdb6, ojdbc7.jar. When i start to post an xml through SOAP UI, im getting the below error in WAS.
"[7/30/18 11:19:04:368 EEST] 000000b7 IntegrationLa E
'IntegrationLandscapeService' is currently not availble OR does not
exist - RuntimeException : Error creating bean with name
'IntegrationLandscapeServiceImpl' defined in class path resource
[integrationLandscapeServiceContext.xml]: Instantiation of bean
failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[com.temenos.services.integrationlandscape.IntegrationLandscapeServiceImpl]:
Constructor threw exception; nested exception is
java.lang.LinkageError: loading constraint violation when overriding
method
"java/sql/SQLXML.getSource(Ljava/lang/Class;)Ljavax/xml/transform/Source;"
during creation of class "oracle/xdb/XMLType": loader
"com/ibm/ws/classloader/CompoundClassLoader#924d5a69" of class
"oracle/xdb/XMLType" and loader
"com/ibm/oti/vm/BootstrapClassLoader#e7afefce" of class
"java/sql/SQLXML" have different types for the method signature"
Oracle.xdb.XMLType is loaded from xdb6.jar and other applications using this xdb6.jar is working fine without issues. But when used from axis2.jar its creating the above error.
Can someone help me or shed some light on this since i couldnt figure out the issue here.
Try to use an isolated class loader. When you configure you shared lib check the "Use an isolated class loader for this shared library".
I am facing an issue related to linkage when i deployed my application websphere 8.5
Error in the XML parsing of the included Input Stream: java.lang.LinkageError: loading constraint violation when resolving method "javax/xml/parsers/SAXParser.parse(Lorg/xml/sax/InputSource;Lorg/xml/sax/helpers/DefaultHandler;)V" : loader "com/ibm/ws/classloader/CompoundClassLoader#aa54261e" of class "com/XMLParser/CreateParser" and loader "com/ibm/oti/vm/BootstrapClassLoader#1c4565b7" of class "javax/xml/parsers/SAXParser" have different types for the method signature.
I have the following jars in my class path.
I have set the loader to PARENT_LAST.
I tried to debug the class alone using a main method and found that it is taking the impl of saxparser of jdk 1.5 rt.jar and it is working as expected. After deploying the ear it is throwing the exception while the code hits the SAXParser.parse(InputSoruce,DefaultHandler) method.
jaxb-impl 2.2.6,
jaxb-libs-1.0.5,
jaxb-xjc-2.0EA3,
dom4j-1.1,
sax 2.0.1
Does any one have any idea about this problem?
Your class loader has visibility to two copies of org.xml.sax. The first because you've included the SAX APIs in your PARENT_LAST class loader, and the second indirectly via javax.xml.parsers in the JRE. You either need to remove the SAX API JAR from your application or you need to add the javax.xml (and perhaps more) APIs + impl to your application.
From our Grails/Groovy app we need to use a service from a legacy Java service class, the constructor of which has a parameter of type org.springframework.core.io.Resource, e.g.
public ServiceClass(Resource someResource)
We need to inject an instance of the service class into a Groovy class of our app using Spring DSL, with the Resource referring to an XML file within our /src/main/resources. I tried to create the Spring config for this purpose, but so far I couldn't find a working solution. The relevant part of the config file looks like this
beans = {
xmlns aop:"http://www.springframework.org/schema/aop",
sec:"http://www.springframework.org/schema/security",
context:"http://www.springframework.org/schema/context"
serviceClass(com.somepackage.ServiceClass) {
//here we need to refer to the constructor arg XML file some way
}
}
I have tried multiple syntaxes found in various tutorials, e.g. closure for beanDefinition.constructorArgs, but unfortunately without success so far. Although neither the app compilation (grails:war) nor the startup (grails:run-app) indicates any problems with the bean wiring, when the app is actually loaded into the browser, we receive a NPE stating that our Groovy class into which the service class is injected, is a null object. So it seems that the bean wiring was not successful after all. Any help is appreciated
After fixing various issues with the project setup itself and multiple cleanups/recompiles, it seems that the following two approaches are both OK
serviceClass(com.somepackage.ServiceClass, '/WEB-INF/constructor-arg-xml-file.xml') {}
and
serviceClass(com.somepackage.ServiceClass) { bean ->
bean.constructorArgs = [
'/WEB-INF/constructor-arg-xml-file.xml'
]
}
I am migrating my application from EJB2.0 to EJB3.0 and at the same migrating server from WAS5.0 to WAS7.0, I did all the changes required to migrate the EJB and has no compile time errors however when I deploy my EAR into the server and hit the application it gives me an error -
NMSV0605W: A javax.naming.Reference object looked up from the context "ejblocal:" with the name "ejb/com/freight/xyz/UserLocalHome" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ejs.container.util.EJBLocalInterfaceObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: com.freight.xyz.UserLocalHome
Type: EJBLocalInterfaceInfo
Content: com.ibm.ejs.container.util.EJBLocalInterfaceInfo#5bb95bb9
Exception data follows:
com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.; nested exception is: java.lang.NoClassDefFoundError: com.freight.ecw.dto.User
at com.ibm.ws.runtime.component.EJBContainerImpl.initializeDeferredEJB(EJBContainerImpl.java:4938)
Along with this in the logs I can also see-
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.
Does anyone has any idea how to resolve this?
The application Bean is getting Invoked, but failing to reate a new document
Following is the error "Bean got an error: Can’t make class document." number -2710 from document to class
I'm a newbie in this, please help
Does Bean have AppleScript support? You can check here: AppleScript Editor --> File --> Open Dictionary