soapUI error when testing for WSI compliance - java

When I test my web service for WSI conformance I get a java exception thrown - please see console output below. I know the issue isn't caused by absence of a main() method as the service isn't an application.
soapUI Console output:
command: [cmd.exe, /C, C:\Web Services\eclipse\wsi-test-tools\java\bin\Analyzer.bat, -config, C:\Users\Admin\AppData\Local\Temp\wsi-analyzer-config6023712173002373188.xml]
Exception in thread "main" java.lang.NoSuchMethodError: org/apache/xerces/dom/ElementImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/apache/xerces/dom3/UserDataHandler;)Ljava/lang/Object;
at org.wsi.xml.dom.DOMParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.wsi.xml.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.wsi.xml.XMLUtils.parseXML(Unknown Source)
at org.wsi.xml.XMLUtils.parseXML(Unknown Source)
at org.wsi.test.analyzer.config.impl.AnalyzerConfigReaderImpl.readAnalyzerConfig(Unknown Source)
at org.wsi.test.analyzer.config.impl.AnalyzerConfigReaderImpl.readAnalyzerConfig(Unknown Source)
at org.wsi.test.analyzer.config.impl.AnalyzerConfigImpl.parseArgs(Unknown Source)
at org.wsi.test.analyzer.Analyzer.<init>(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.<init>(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.main(Unknown Source)
Log Output:
ERROR:An error occurred [org.xml.sax.SAXParseException: Premature end of file.], see error log for details
When I run C:\Web Services\eclipse\wsi-test-tools\java\bin\Analyzer.bat, -config, C:\Users\Admin\AppData\Local\Temp\wsi-analyzer-config6023712173002373188.xml] directly from command prompt I get:
Analyzer Error: The specified option is not supported: ,.
For some reason soapUI doesn't run the service but analyses the generated WSDL. WSI compliance html report file is generated but with no content. I suspect this might be a result of a configuration issue. I've double checked the following:
Java applets run correctly in Eclipse
Logs directory has been created
soapUI preference is correctly entered
WSI_HOME environment variable is correctly set up
Any ideas what might be causing the error?

Looks like you have incompatible jars:
java.lang.NoSuchMethodError: org/apache/xerces/dom/ElementImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/apache/xerces/dom3/UserDataHandler;)Ljava/lang/Object
But without seeing your dependencies i can not say which.

Related

"Unable to load recource" Error running Java Web Start application (JPsychoMorph)

I have no prior experience with Java to be clear.
I'm trying to run this Java app (https://users.aber.ac.uk/bpt/jpsychomorph/), but when launching the application from the .jnlp file in my ..\downloads folder, I get "Unable to launch the application" application error.
In the "Details" part of the error there is:
Error: Unable to load resource:
http://users.abecer.ac.uk.bpt/jpsychomorph/version5/lib/jognl.jnlp
Here is the Exception form the error message:
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://users.aber.ac.uk/bpt/jpsychomorph/version5/lib/jogl.jnlp
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getJreResource(Unknown Source)
at com.sun.javaws.LaunchDownload._downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I have tried to add this link to the "Exception site list" in the Java Control panel,
but it didn't make difference. I even added multiple versions of this link (http and https versions).
My system:
Windows 10 pro, 21H2 AMD Ryzen 5 5500U
Java 64bit, Version 8 update 341 (build 1.8.0_341-b10) I have Java security settings "High"
Browser: Firefox Deveoper edition (but same resoults on Chrome)
(In my Firefox file format setting list I don't see .jnlp files... somewhere I read, that you should set there .jnlp files to be opened with Firefox, but I don't see that file type there.. it that a problem maybe?)
At this point I don't know what to try.
Thanks for any advice!

How to run this project as a jar file?

Can you make a jar file out of this project that runs with no initializererror?
Project here.
https://github.com/piersy/BasicTesseractExample
I've tried using jarsplice to splice the project jar with the tesseract & javacpp jars and I get this initializer error, when running the jar in the command prompt. I don't know if jarsplice is even required but that was my effort.
C:\Users\user\Desktop\JavaWorkspace>java -jar fatOCR.jar Exception in thread "main" java.lang.ExceptionInInitializerError
at BasicTesseractExampleTest.givenTessBaseApi_whenImageOcrd_thenTextDisplayed(BasicTesseractExampleTest.java:14)
at runOCR.main(runOCR.java:7) Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at java.base/sun.reflect.annotation.AnnotationParser.parseClassArray(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseArray(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.base/java.lang.Class.createAnnotationData(Unknown Source)
at java.base/java.lang.Class.annotationData(Unknown Source)
at java.base/java.lang.Class.createAnnotationData(Unknown Source)
at java.base/java.lang.Class.annotationData(Unknown Source)
at java.base/java.lang.Class.getAnnotation(Unknown Source)
at java.base/java.lang.reflect.AnnotatedElement.isAnnotationPresent(Unknown Source)
at java.base/java.lang.Class.isAnnotationPresent(Unknown Source)
at org.bytedeco.javacpp.ClassProperties.load(ClassProperties.java:128)
at org.bytedeco.javacpp.Loader.loadProperties(Loader.java:203)
at org.bytedeco.javacpp.Loader.load(Loader.java:372)
at org.bytedeco.javacpp.Loader.load(Loader.java:354)
at org.bytedeco.javacpp.tesseract$TessBaseAPI.<clinit>(tesseract.java:3422)
... 2 more
I don't think you can run this project because it contains only tests (1 test in this case) and does not contain the main method.

Project runs in IDE but the JAR file does not execute due to NPE in proxy manager

The project compiles and runs as expected in the IDE; I am using IntelliJ. In order for it to run in it's current environment, it needs to use the browser's proxy settings.
When I build the project to a Jar file and attempt to run it, I get a null pointer exception. I am trying to understand the following:
- What is the reason for this? Does the JAR file get the wrong class-path configurations?
- How can the null pointer exception be resolved? Would it have to do with the settings or is this a code error?
- How does the project work in the IDE but not the JAR file? I checked the contents and the folder structure appears identical.
Debugging is not effective as I am not able to reproduce this in the IDE, it only occurs when I attempt to run the JAR artifact.
//Code to initialize proxy using browser settings
System.setProperty("java.net.useSystemProxies", "true");
System.out.println("detecting proxies");
ExtendedProxyManager.init();
Project properties:
Link to project code on Github: https://github.com/62696e617279/educatorProductivityToolkit/blob/master/src/com/arcologydesigns/Main.java
Here is a detailed stack trace:
java.lang.NullPointerException
at com.sun.deploy.net.proxy.DynamicProxyManager.getProxyList(Unknown Source)
at com.sun.deploy.net.proxy.DeployProxySelector.select(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.arcologydesigns.Main.main(Main.java:44)
Exception in thread "main" java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.arcologydesigns.Main.main(Main.java:44)
Manifest content and in Jar:
Many thanks in advance!

Java web start error after update Java 7u17 to Java 8u25 SecurityException

Java web start error after update Java 7u17 to Java 8u25
SecurityException com.sun.deploy.net.JARSigningExceptions: Found unsigned entry in resource:
My application deploy via JWS using self sign method.
I use JDK6 to generate keystore, cert and sign the jar. And use JRE7u17 (actually start from JRE6u21 then update it along the way) on client side to load jnlp file and start the application.
Everything works fine until I update client JRE to the newest one which is 8u25. Then I double click shortcut as always to start the application. However the below error occur.
All environments are on Windows
com.sun.deploy.net.JARSigningException: Found unsigned entry in resource:(http://xxx.xxx.xxx.xxx/app/app.jar, 0.2.2.01)
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
at com.sun.javaws.security.SigningInfo.check(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
at com.sun.javaws.Launcher.prepareResources(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The error said about unsigned entry, but I didn't modify the application jar at all. Therefore, I think that it was properly signed.
I tried to search around the internet and didn't find specific solutions, so I would like your help to resolve this problem.

UnsatisfiedLinkError on Websphere Application Server 6.1 Data Source

I am unable to start the installed App on my WAS instance. I believe the root cause is an UnsatisfiedLinkError which is shown as follows:
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3147)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3143)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:441)
at oracle.jdbc.driver.T2CConnection.(T2CConnection.java:132)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:515)
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:159)
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:133)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:935)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:972)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1625)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1220)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1988)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1660)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2341)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:932)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:608)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:449)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:418)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDataSource(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl.lookupConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Unknown Source)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown Source)
at org.apache.ojb.broker.accesslayer.RsIterator.(Unknown Source)
at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)
at com.ascential.xmeta.persistence.orm.impl.ojb.OjbPersistentEObjectPersistenceRegistry.loadPackageCache(OjbPersistentEObjectPersistenceRegistry.java:371)
... 115 more
My LD_LIBRARY_PATH variable for the 'was' user is /opt/oracle/product/10.2.0/lib
What else should I be checking to fix this error?
Please help.
Thanks
Verify that "Java Library Path" in the trace header of SystemOut.log contains "/opt/oracle/product/10.2.0/lib". If it does not contain the path, then your LD_LIBRARY_PATH setting is not taking effect (perhaps the variable isn't exported, or perhaps you're executing startServer as a different user).
Regardless, I would recommend setting adding "/opt/oracle/product/10.2.0/lib" to the native library path of the JDBC provider rather than trying to set it at the OS level.
Finally, double-check that the server has the proper OS permissions to access the native library.

Categories

Resources