Error in custom java class imported into Oracle EBS r12 - oracle12c

I have a custom java class imported into Oracle forms in Oracle EBS R12, but when I am going to run the java functionality in the application it gives me the following error:
exception:java.lang. exception: java.lang.NoClassDefFoundError: getsipbyname_proxy/proxy/GET_SIP_by_NamePortClient
Could you help me to know why am I getting this error?

Related

How to find JCDIWebListener class for IBM WebSphere Application Server version 9.0.0.10?

I try to start the Enterprise Application in WebSphere Application Server version 9.0.0.10 and there is missing class com.ibm.ws.webbeans.services.JCDIWebListener.
Fix pack for version 9.0.0.10 didn't help for this. There still are warning that prevents application starting in SystemLog.log file:
000000a7 annotation W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper collectClasses SRVE8000W: Skipped class that failed to initialize for annotation scanning.
java.lang.ClassNotFoundException: com.ibm.ws.webbeans.services.JCDIWebListener
Where to get that class if latest fix pack won't bring that?
Or is there other libraries where to get that class? I'm running on Java version = 1.8.0_191, Java Runtime Version = 8.0.5.26

TestConnection fails for db connector in Anypoint Studio 7.3

I have installed Anypoint Studio 7.3 and trying to connect to oracle database using DB Connector. I have added the below dependency ±
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
</dependency>
But I am still getting error±
org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source Caused by: org.mule.extension.db.api.exception.connection.ConnectionCreationException: Could not obtain connection from data source Caused by: org.mule.runtime.extension.api.exception.ModuleException: java.sql.SQLException: Error trying to load driver: oracle.jdbc.driver.OracleDriver : Cannot load class 'oracle.jdbc.driver.OracleDriver': [ oracle.jdbc.driver.OracleDriver, Cannot load class 'oracle.jdbc.driver.OracleDriver': [ Class 'oracle.jdbc.driver.OracleDriver' has no package mapping for region 'domain/default/app/tooling-application-8e2bb850-e8d8-11e8-bc79-fe8a20524153'., Cannot load class 'oracle.jdbc.driver.OracleDriver': [ oracle.jdbc.driver.OracleDriver, Class 'oracle.jdbc.driver.OracleDriver' not found in classloader for artifact 'container'.]]]
Can anyone suggest please . Thanks, Sanjukta
That error happens because Maven can not find the dependency you added. That is because the Oracle JDBC driver is not available in the Maven Central repository. You will need to download the jar from Oracle and install it manually in the local Maven repository of your computer. Note that you need to match the coordinates of the dependency to the ones used in the install command, otherwise Maven will not find it.

NoClassDefFoundError when using instrumentation on Bluemix

I am trying to add a javaagent to my bluemix app, this agent uses Instrumentation. The thing is that when I run the application I get the following error:
premain() - Instrumentation is already running
...
CWWKF0004E: An unknown exception occurred while installing or removing features. Exception: java.lang.NoClassDefFoundError: agent.ClassInstrumentorTransform
ERR at com.ibm.ws.kernel.feature.internal.subsystem.SubsystemFeatureDefinitionImpl.setHeader(SubsystemFeatureDefinitionImpl.java)
ERR at [internal classes]
I have tried creating another agent with the same Premain-Class and Agent-Class structure but with my own classes and it works, I have tried uploading my own copy of Instrumentation classes and point the javaagent to it using Class-Path but the error still appears.
Any sugestion what can be the problem?
I suspect maybe the Bluemix enviorment uses the Instrumentation, any ideas how this might be checked and how I can solve the inter dependency?
Based on the error message, it looks like you have a class in a feature bundle that is trying to access a class from the javaagent, but you have not added the javaagent package to org.osgi.framework.bootdelegation as described in the Specifying Liberty profile bootstrap properties" topic in the knowledge center topic.

JPA metamodel not recognized with Netbeans 7.4

I have a web application that is working fine under Netbeans 7.3. When I installed it on another computer with Netbeans 7.4, all references to the JPA metamodel are now undefined.
The import statements referring to the metamodel (those ending with an underscore, like the 3rd import statement below) are not recognized :
import bfMetier.ApplicationInitialise;
import entites.Locations;
import entites.Locations_;
And when I run the project, it aborts with a «cannot find symbol Locations_» error :
SEVERE: Exception while loading the app : EJB Container initialization error
java.lang.ExceptionInInitializerError
(...)
Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: class Locations_
location: package entites
at beansFacades.LocationsFacade.<clinit>(LocationsFacade.java:10)
I'm using ecclipse as the JPA 2.0 provider and running the app under Glassfish 3.1.2.2.
Is there any parameter I need to add in order for the metamodel classes to be generated?
Thanks!
I created a new java project in 7.4 and found some differences...
There is no option in context menu for generating classes from database (like 7.3).
I found this option in New Java Class... Persistence category.
The entity generated by 7.4 do not have metadata classes.
Might be, the metadata classes are no longer generated/or needed by netbeans.

websphere 7 and (application based) open-jpa 2

I want to not use the built in Websphere 7 jpa plugin, instead use an application WEB-INF/lib/open-jpa 2 and a proprietary persistence provider. I cannot install the OSGI and JPA 2 feature pack for Websphere.
Originally, I was getting a sax parse error simply trying to load the persistence.xml (version="2" not supported). The error was thrown by a class in open-jpa 1.2.3. When I run websphere/appserver/bin/wsjpaversion.bat, the open-jpa 1.2.3 jar is displayed. By default it overrides the open-jpa 2 jar in the app. I created a shared library containing the open-jpa 2 jar with this config option checked: 'Use an isolated class loader for this shared library'. I set my application classloader to load parent last and assigned it the new shared library resource. The 'version 2' error is gone, but there is another problem. When I try to initialize an EntityManager I get an error:
Caused by: javax.persistence.PersistenceException: Failed to load provider from META-INF/services
at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:91)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
... 2 more
Caused by: java.lang.ClassCastException: com.ibm.websphere.persistence.PersistenceProviderImpl incompatible with javax.persistence.spi.PersistenceProvider
at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:110)
... 11 more
One more detail: inside the persistence.xml, the provider element is set to the proprietary PersistenceProviderImpl not the default Websphere persistence provider. So where is this websphere default coming from and how do I prevent it? (another important note: when I remove persistence.xml completely, I get the same error)
Thank you
Without installing the feature pack, you're fighting a losing battle. While it is possible to plug in your own JPA implementation, it is not possible to do that with JPA API — so WAS 7 ties you to the 1.0 version of JPA (see, for example, here how this is done — no class loader policy juggling will change that, though it seems tempting at first).