JNPL with ULC 7.0 on Ubuntu throws ZipException - zip

Stacktrace follows below, but first my search results so far:
Somebody ran into a similar problem. Allegedly it was a problem with the ULCAppletPane in ULC 6.1. I am using ULC 7.0, so I guess I can safely forget those links.
Someone else had a similar ZipException with the very same readUTF() method of the InflaterInputStream. The proposed solution was to use readUTF() differently:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4529325
Is ULC using readUTF() wrong? In this similar InflaterInputStream.readUTF() issue on Stackoverflow, the proposed solution is to get the source code and debug the library with exception breakpoint.
java.util.zip.zipexception : unknown compression method
The search results on Stackoverflow (and also on Google) pretty much end there. The best idea I have now is to decompile the closed-source ULC library and debug it. Will I have to do that or can anybody help me with this issue?
[Client]
OS: Linux (3.0.0-32-generic, amd64)
Java: Sun Microsystems Inc. (1.6.0_26)
ULC: ULC Core (20206)
[Stacktrace]
com.ulcjava.base.client.ConnectorException: I/O exception has been thrown.
at com.ulcjava.container.servlet.client.ServletConnector.a(ServletConnector.java:81)
at com.ulcjava.container.servlet.client.ServletConnector.b(ServletConnector.java:41)
at com.ulcjava.container.servlet.client.ServletConnector.start(ServletConnector.java:88)
at com.ulcjava.base.client.UISession.startConnector(UISession.java:133)
at com.ulcjava.base.client.launcher.DefaultSessionStateListener.sessionStarted(DefaultSessionStateListener.java:13)
at com.ulcjava.base.client.UISession.a(UISession.java:114)
at com.ulcjava.base.client.UISession.access$16(UISession.java:92)
at com.ulcjava.base.client.UISession$0.run(UISession$0.java:6)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(FilteringEventQueue.java:55)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: com.ulcjava.container.servlet.client.IOConnectorCommandException: I/O exception has been thrown.
at com.ulcjava.container.servlet.client.ConnectorCommand.execute(ConnectorCommand.java:37)
at com.ulcjava.container.servlet.client.ServletConnector.executeCommand(ServletConnector.java:22)
at com.ulcjava.container.servlet.client.ServletConnector.a(ServletConnector.java:104)
... 22 more
Caused by: java.util.zip.ZipException: unknown compression method
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
at java.io.DataInputStream.readByte(DataInputStream.java:248)
at com.ulcjava.base.shared.internal.UlcDataInputStream.readByte(UlcDataInputStream.java:4)
at com.ulcjava.base.shared.internal.UlcObjectInputStream.a(UlcObjectInputStream.java:67)
at com.ulcjava.base.shared.internal.UlcObjectInputStream.readObject(UlcObjectInputStream.java:78)
at com.ulcjava.container.servlet.client.AbstractBasicAuthenticationCommand.handleResponse(AbstractBasicAuthenticationCommand.java:8)
at com.ulcjava.container.servlet.client.ConnectorCommand.execute(ConnectorCommand.java:53)
... 24 more

Related

WebSphere 9.0.5.3 and MyFaces 2.2 with CACHE_EL_EXPRESSIONS

When org.apache.myfaces.CACHE_EL_EXPRESSIONS with value alwaysRecompile is in web.xml, WAR starts but when trying to go to any JSF view, this exception is thrown:
java.lang.NoSuchMethodException: org.apache.myfaces.view.facelets.AbstractFaceletCache.setMemberFactories(javax.faces.view.facelets.FaceletCache$MemberFactory, javax.faces.view.facelets.FaceletCache$MemberFactory)
Any ideas? WebSphere 9 is using MyFaces 2.2. Are there some limitations as compared to "usual" MyFaces 2.2 implementation?
I tested on 9.0.5.6 and also encountered the same error.
java.lang.NoSuchMethodException: org.apache.myfaces.view.facelets.AbstractFaceletCache.setMemberFactories(javax.faces.view.facelets.FaceletCache$MemberFactory, javax.faces.view.facelets.FaceletCache$MemberFactory)
at java.lang.Class.newNoSuchMethodException(Class.java:567)
at java.lang.Class.throwExceptionOrReturnNull(Class.java:1222)
at java.lang.Class.getMethodHelper(Class.java:1308)
at java.lang.Class.getDeclaredMethod(Class.java:936)
at org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.<init>(DefaultFaceletFactory.java:166)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.createFaceletFactory(FaceletViewDeclarationLanguage.java:2233)
I see the code is trying to retrieve the setMemberFactories method with 2 args rather than 3 (as the exception indicates, too).
I'll create an issue and have this issue resolve in the next WAS 9 release cycle. Thanks for discovering this!

Fiji(ImageJ) takes too long to load (on linux), together with a lengthy error message

I'm using Fiji on linux (inside a virtual machine) from the command line.
Specifically I have a python script that calls many fiji macros.
Each time fiji loads it takes about a minute, making it the bottleneck of the process and slowing me considerably.
I wonder if this is normal. Could fiji perhaps be made to load more quickly?
Fiji also outputs a lengthy error message when it is called. I wonder if it is related to the lengthy time it takes to load.
The command I use to call it (for example)
//shared_directory/projects/Fiji.app/ImageJ-linux64 --headless
-macro //shared_directory/projects/retracted/fiji_scripts/patch_cropper.txt
The error message is as follows
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at ij.plugin.frame.PlugInFrame.<init>(PlugInFrame.java:13)
at ij.plugin.frame.RoiManager.<init>(RoiManager.java:94)
at ij.macro.Interpreter.getBatchModeRoiManager(Interpreter.java:1875)
at ij.plugin.frame.RoiManager.getInstance(RoiManager.java:1795)
at ij.ImagePlus.deleteRoi(ImagePlus.java:1735)
at ij.ImagePlus.close(ImagePlus.java:391)
at ij.plugin.Commands.closeImage(Commands.java:136)
at ij.plugin.Commands.close(Commands.java:83)
at ij.plugin.Commands.run(Commands.java:29)
at ij.IJ.runPlugIn(IJ.java:187)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at ij.IJ.run(IJ.java:297)
at ij.IJ.run(IJ.java:272)
at ij.macro.Functions.doRun(Functions.java:603)
at ij.macro.Functions.doFunction(Functions.java:96)
at ij.macro.Interpreter.doStatement(Interpreter.java:230)
at ij.macro.Interpreter.doStatements(Interpreter.java:218)
at ij.macro.Interpreter.run(Interpreter.java:115)
at ij.macro.Interpreter.run(Interpreter.java:85)
at ij.macro.Interpreter.run(Interpreter.java:96)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:155)
at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:139)
at ij.IJ.runMacroFile(IJ.java:148)
at net.imagej.legacy.IJ1Helper$4.call(IJ1Helper.java:1056)
at net.imagej.legacy.IJ1Helper$4.call(IJ1Helper.java:1052)
at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:986)
at net.imagej.legacy.IJ1Helper.runMacroFile(IJ1Helper.java:1052)
at net.imagej.legacy.LegacyCommandline$Macro.handle(LegacyCommandline.java:188)
at org.scijava.console.DefaultConsoleService.processArgs(DefaultConsoleService.java:102)
at net.imagej.legacy.LegacyConsoleService.processArgs(LegacyConsoleService.java:81)
at org.scijava.AbstractGateway.launch(AbstractGateway.java:95)
at net.imagej.Main.launch(Main.java:62)
at net.imagej.Main.main(Main.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:279)
at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:186)
at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
java.lang.IllegalArgumentException: Cannot handle app name in ij.gui.YesNoCancelDialog's public <init>(java.awt.Frame parent, java.lang.String title, java.lang.String msg)
at net.imagej.patcher.CodeHacker.replaceAppNameInCall(CodeHacker.java:446)
at net.imagej.patcher.LegacyExtensions.insertAppNameHooks(LegacyExtensions.java:419)
at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:291)
at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:308)
at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:109)
at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:101)
at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:495)
at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:397)
at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376)
at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:134)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:302)
at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269)
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:231)
at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:340)
at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269)
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:231)
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:194)
at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:166)
at org.scijava.Context.<init>(Context.java:278)
at org.scijava.Context.<init>(Context.java:234)
at org.scijava.Context.<init>(Context.java:174)
at org.scijava.Context.<init>(Context.java:160)
at net.imagej.ImageJ.<init>(ImageJ.java:77)
at net.imagej.Main.launch(Main.java:61)
at net.imagej.Main.main(Main.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:279)
at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:186)
at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
Caused by: javassist.CannotCompileException: No code replaced!
at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1280)
at net.imagej.patcher.CodeHacker.replaceAppNameInCall(CodeHacker.java:443)
... 36 more
Thanks!
I wonder if this is normal. Could fiji perhaps be made to load more quickly?
I don't think this is intended behavior. As this issue is very specific to ImageJ/Fiji, you should better raise this point on the ImageJ forum.
java.lang.IllegalArgumentException: Cannot handle app name in ij.gui.YesNoCancelDialog's public <init>(java.awt.Frame parent, java.lang.String title, java.lang.String msg)
This is likely due to ij1-patcher not handling ij.gui.YesNoCancelDialog to make it independent on the Java AWT framework (which interferes with the goal of running things headless).
You are welcome to submit a patch to the ij1-patcher project to make it deal with YesNoCancelDialog in a similar way as it currently does with GenericDialog, see these lines.
As a workaround, simply use a macro that doesn't use YesNoCancelDialog, i.e. does not run the getBoolean() macro function.
EDIT: as also noted in the ImageJ forum topic, a patch was submitted here.
Until this gets merged and released, you can work around the issue by downgrading ij.jar using Help > Update ImageJ...

java.lang.NoSuchMethodError - okhttp3 (Android)

My app keeps crashing. Can't figure out where the issue is. I'm not even using okttp3 library.
Currently, I'm only using retrofit 1.9 and otto 1.3.8
java.lang.NoSuchMethodError: No virtual method callEnqueue(Lokhttp3/Call;Lokhttp3/Callback;Z)V in class Lokhttp3/internal/Internal; or its super classes (declaration of 'okhttp3.internal.Internal' appears in /data/app/com.myproj.sample-2/base.apk)
at okhttp3.ws.WebSocketCall.enqueue(WebSocketCall.java:108)
at io.socket.engineio.client.transports.WebSocket.doOpen(WebSocket.java:73)
at io.socket.engineio.client.Transport$1.run(Transport.java:75)
at io.socket.thread.EventThread.exec(EventThread.java:50)
at io.socket.engineio.client.Transport.open(Transport.java:70)
at io.socket.engineio.client.Socket.probe(Socket.java:458)
at io.socket.engineio.client.Socket.onOpen(Socket.java:471)
at io.socket.engineio.client.Socket.onHandshake(Socket.java:512)
at io.socket.engineio.client.Socket.onPacket(Socket.java:485)
at io.socket.engineio.client.Socket.access$900(Socket.java:30)
at io.socket.engineio.client.Socket$5.call(Socket.java:299)
at io.socket.emitter.Emitter.emit(Emitter.java:117)
at io.socket.engineio.client.Transport.onPacket(Transport.java:127)
at io.socket.engineio.client.transports.Polling$2.call(Polling.java:124)
at io.socket.engineio.parser.Parser.decodePayload(Parser.java:251)
at io.socket.engineio.client.transports.Polling._onData(Polling.java:134)
at io.socket.engineio.client.transports.Polling.onData(Polling.java:106)
at io.socket.engineio.client.transports.PollingXHR$5$1.run(PollingXHR.java:113)
at io.socket.thread.EventThread$2.run(EventThread.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Solved it with the help of this post.
Just add the following to your gradle dependecies.
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:okhttp-ws:3.4.1'
Try these dependencies :
implementation 'com.shopify.mobilebuysdk:buy3:3.2.3'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
Hope this may help you.

Spock throwing NoClassDefFoundError: org/junit/internal/AssumptionViolatedException

java.lang.NoClassDefFoundError:
org/junit/internal/AssumptionViolatedException at
org.spockframework.runtime.JUnitSupervisor.error(JUnitSupervisor.java:92)
at
org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:318)
at
org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:297)
at
org.spockframework.runtime.BaseSpecRunner.runSpec(BaseSpecRunner.java:90)
at
org.spockframework.runtime.BaseSpecRunner.run(BaseSpecRunner.java:81)
at org.spockframework.runtime.Sputnik.run(Sputnik.java:63) at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I have a simple test case that calls a method,
def 'some test for empty Lists'(){
setup:
List<Object> clauses=new ArrayList<Object>()
when:
String someString=builder.buildString(clauses, "someName", "AND");
then:
noExceptionThrown()
someString==""
}
Assume builder is injected via spring. I can't make out why this happens. It happens only for a few test cases.
Any help is much appreciated :) I use spock 0.6 with groovy 1.8.
The solution for spock 1.0 with jUnit 4.12
As soon as I added hamcrest-core-1.3 to my test classpath the error disappeared.
What was the problem?
I observed the same error described in the question, but I managed to get spock 1.0 groovy 2.4 to work with junit-4.12.
The problem was that junit-4.12 depends on hamcrest.
In fact org.junit.internal.AssumptionViolatedException implements the interface org.hamcrest.SelfDescribing.
I've got the same error with spock tests using a simple Eclipse java project with these versions:
spock-core-1.0-groovy-2.3
junit-4.12
The exception was thrown only when there was a test failures, but was working for the successful ones
I've found that it was a Junit version compatibility matter. i resolved it using junit-4.7 and also tested the following versions:
junit-4.6 => ok
junit-4.5 => ok
junit-4.4 => ko
junit-4.0 => ko
Hope it helps
I had the same compatibility issue while trying to run my spocks in STS:3.6.4 and JBoss Developer Studio Version: 7.1.1.GA.
It was resolved using junit-4.7 instead of junit-4.12
Other instructions can be found at https://code.google.com/p/spock/wiki/GettingStarted#Eclipse

WebSphereApplication NoClassDefFoundError while unmarshalling XML with JAXB

I´ve deployed an EAR on a Websphere Application Server 7. In my code there is a part where I try to unmarshall a XML file into an object. I get this error when trying to do that:
java.lang.NoClassDefFoundError: com.ibm.xtq.bcel.util.SyntheticRepository (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
at com.ibm.xtq.bcel.classfile.JavaClass.<init>(JavaClass.java:109)
at com.ibm.xtq.bcel.classfile.JavaClass.<init>(JavaClass.java:228)
at com.ibm.xtq.bcel.generic.ClassGen.getJavaClass(ClassGen.java:174)
at com.ibm.fcg.bcel.FcgClassGenBCEL.dump2(Unknown Source)
at com.ibm.fcg.bcel.FcgClassGenBCEL.dump(Unknown Source)
at com.ibm.xml.xlxp2.jaxb.unmarshal.codegen.fcg.FCGDeserializationStubGenerator.generate(FCGDeserializationStubGenerator.java:249)
at com.ibm.xml.xlxp2.jaxb.codegen.AbstractGeneratedStubFactory.generateByteCode(AbstractGeneratedStubFactory.java:96)
at com.ibm.xml.xlxp2.jaxb.unmarshal.codegen.fcg.FCGStubFactory.generateStubByteCode(FCGStubFactory.java:46)
at com.ibm.xml.xlxp2.jaxb.codegen.AbstractGeneratedStubFactory.getStubClassConstructor(AbstractGeneratedStubFactory.java:154)
at com.ibm.xml.xlxp2.jaxb.unmarshal.codegen.AbstractGeneratedDeserializationStubFactory.createStub(AbstractGeneratedDeserializationStubFactory.java:58)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationContext.startComplexType(DeserializationContext.java:662)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationContext.handleRootElementEvent(DeserializationContext.java:303)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.JAXBDocumentScanner.produceRootElementEvent(JAXBDocumentScanner.java:186)
at com.ibm.xml.xlxp2.scan.DocumentScanner.scanRootElement(DocumentScanner.java:2234)
at com.ibm.xml.xlxp2.scan.DocumentScanner.scanProlog(DocumentScanner.java:1726)
at com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1316)
at com.ibm.xml.xlxp2.scan.DocumentScanner.parseDocumentEntity(DocumentScanner.java:1168)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.JAXBDocumentScanner.unmarshal(JAXBDocumentScanner.java:125)
at com.ibm.xml.xlxp2.jaxb.unmarshal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:120)
at com.inditex.lois.core.ws.utilidades.services.impl.AdaptadorServiceImpl.transformarXMLenObjeto(AdaptadorServiceImpl.java:137)
As far as I know that class is part of IBM JDK and cannot be found in runtime. Is there anything I have to modify in my ear or, as I guess, its all about configuring/modifiying WAS configuration (or even applying a patch if this is a bug).
Any help? Thanks a lot.
(Sorry for my english :) )
This exception means that the class com.ibm.xtq.bcel.util.SyntheticRepository is found, but failed static initialization. If there is no other message in the log about this, then this is the time to open a PMR with IBM. Static initializers in internal WebSphere code should never fail during normal usage course.
Same here, there is an APAR:
http://www-01.ibm.com/support/docview.wss?uid=swg1IV41639
Problem conclusion
This defect will be fixed in:
6.0.0 SR14
6.0.1 SR6
7.0.0 SR5
.
The fix resolved the AccessControlException. SyntheticRepository
class can be initialized properly, hence NoClassDefFoundError
does not occur.

Resources