Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11438 (closed)

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

Bug: SVGRasterizer and OpenJDK

Reported by: bpindelski Owned by: bpindelski
Priority: blocker Milestone: OMERO-4.4.9
Component: Services Version: 4.4.8
Keywords: n.a. Cc: cblackburn, cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: Blocker 4.4.9 (1)


When running the Python integration tests from OmeroPy, bfpixelsstoreexternal.py and bfpixelsstoreexternal.py fail with a ClassNotFound? exception related to com/sun/image/codec/jpeg/JPEGCodec. This is caused by the fact that the computer didn't have Oracle JDK installed (CentOS node with OpenJDK). Ideally we would have some fallback mechanism. If Melissa decides that the BF code doesn't need changing, then Colin could probably conditionally exclude the tests using Python decorators.

Change History (19)

comment:1 Changed 8 years ago by mlinkert

What is the complete stack trace?

comment:2 Changed 8 years ago by bpindelski

Hi Melissa. The stacktrace follows, but I now think that it was my oversight to assign the ticket to you.
The error messages stems from SVGRasterizer, which is an OMERO.server class.
Re-assigning to Josh for evaluation.

def getThumbnailByLongestSide(self, size, _ctx=None):
1389	>       return _M_omero.api.ThumbnailStore._op_getThumbnailByLongestSide.invoke(self, ((size, ), _ctx))
1390	E       InternalException: exception ::omero::InternalException
1391	E       {
1392	E           serverStackTrace = ome.conditions.InternalException:  Wrapped Exception: (java.lang.NoClassDefFoundError):
1393	E       com/sun/image/codec/jpeg/JPEGCodec
1394	E               at org.apache.batik.ext.awt.image.codec.jpeg.JPEGImageWriter.writeImage(Unknown Source)
1395	E               at org.apache.batik.transcoder.image.JPEGTranscoder.writeImage(Unknown Source)
1396	E               at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
1397	E               at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
1398	E               at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
1399	E               at ome.services.SVGRasterizer.createJPEG(SVGRasterizer.java:116)
1400	E               at ome.services.ThumbnailBean.compressInProgressImageToStream(ThumbnailBean.java:503)
1401	E               at ome.services.ThumbnailBean.retrieveThumbnailDirect(ThumbnailBean.java:1122)
1402	E               at ome.services.ThumbnailBean.retrieveThumbnail(ThumbnailBean.java:1026)
1403	E               at ome.services.ThumbnailBean.retrieveThumbnailAndUpdateMetadata(ThumbnailBean.java:1003)
1404	E               at ome.services.ThumbnailBean.getThumbnailByLongestSide(ThumbnailBean.java:1079)
1405	E               at sun.reflect.GeneratedMethodAccessor1724.invoke(Unknown Source)
1406	E               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1407	E               at java.lang.reflect.Method.invoke(Method.java:601)
1408	E               at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
1409	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
1410	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
1411	E               at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
1412	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1413	E               at ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:182)
1414	E               at ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:166)
1415	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1416	E               at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
1417	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1418	E               at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:241)
1419	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1420	E               at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
1421	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1422	E               at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
1423	E               at $Proxy90.getThumbnailByLongestSide(Unknown Source)
1424	E               at sun.reflect.GeneratedMethodAccessor1724.invoke(Unknown Source)
1425	E               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1426	E               at java.lang.reflect.Method.invoke(Method.java:601)
1427	E               at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
1428	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
1429	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
1430	E               at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:98)
1431	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1432	E               at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
1433	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1434	E               at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
1435	E               at $Proxy90.getThumbnailByLongestSide(Unknown Source)
1436	E               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1437	E               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
1438	E               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1439	E               at java.lang.reflect.Method.invoke(Method.java:601)
1440	E               at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
1441	E               at ome.services.throttling.Callback.run(Callback.java:56)
1442	E               at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
1443	E               at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:149)
1444	E               at ome.services.blitz.impl.ThumbnailStoreI.getThumbnailByLongestSide_async(ThumbnailStoreI.java:94)
1445	E               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1446	E               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
1447	E               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1448	E               at java.lang.reflect.Method.invoke(Method.java:601)
1449	E               at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
1450	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
1451	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
1452	E               at omero.cmd.CallContext.invoke(CallContext.java:59)
1453	E               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
1454	E               at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
1455	E               at $Proxy91.getThumbnailByLongestSide_async(Unknown Source)
1456	E               at omero.api._ThumbnailStoreTie.getThumbnailByLongestSide_async(_ThumbnailStoreTie.java:136)
1457	E               at omero.api._ThumbnailStoreDisp.___getThumbnailByLongestSide(_ThumbnailStoreDisp.java:431)
1458	E               at omero.api._ThumbnailStoreDisp.__dispatch(_ThumbnailStoreDisp.java:720)
1459	E               at IceInternal.Incoming.invoke(Incoming.java:159)
1460	E               at Ice.ConnectionI.invokeAll(ConnectionI.java:2357)
1461	E               at Ice.ConnectionI.dispatch(ConnectionI.java:1208)
1462	E               at Ice.ConnectionI.message(ConnectionI.java:1163)
1463	E               at IceInternal.ThreadPool.run(ThreadPool.java:302)
1464	E               at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
1465	E               at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
1466	E               at java.lang.Thread.run(Thread.java:722)
1467	E       
1468	E           serverExceptionClass = ome.conditions.InternalException
1469	E           message =  Wrapped Exception: (java.lang.NoClassDefFoundError):
1470	E       com/sun/image/codec/jpeg/JPEGCodec
1471	E       }

comment:3 Changed 8 years ago by bpindelski

  • Cc jamoore removed
  • Owner changed from mlinkert to jamoore
  • Summary changed from Bug: JPEGCodec and OpenJDK to Bug: SVGRasterizer and OpenJDK

comment:4 Changed 8 years ago by bpindelski

  • Component changed from Bio-Formats to Services

comment:5 Changed 8 years ago by bpindelski

The version of OpenJDK on the node running the tests at the time the error happened:

java version "1.7.0_05-icedtea"
OpenJDK Runtime Environment (rhel-2.2.1.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)

comment:6 Changed 8 years ago by jamoore

  • Owner changed from jamoore to bpindelski

Passing to Blazej for confirmation of the version of OpenJDK used. Hopefully, it's an old version and this is the same problem as before.

comment:7 Changed 8 years ago by bpindelski

A quick google for "openjdk 7 JPEGCodec" indicates that this class has been removed from OpenJDK 7 and that javax.imageio is a substitute. We support Java 1.6 and up, so this will need a more general decision.

comment:8 Changed 8 years ago by jamoore

But the user of that class is the batik jar itself, so perhaps an upgrade? Blazej: are you willing to give that a try?

comment:9 Changed 8 years ago by bpindelski

Josh: Yes, it is batik that is using the JPEG transcoder. Upgrading should hopefully be easy given that there are any tests I could run to verify nothing breaks. Else I will have to work with images in the clients...

comment:10 Changed 8 years ago by bpindelski

  • Status changed from new to accepted

comment:11 Changed 8 years ago by bpindelski

Josh: After some investigating, it seems we aren't the only people having troubles with Batik, OpenJDK and JPEG: http://batik.2283329.n4.nabble.com/Patch-Request-for-Batik-Rasterizer-td3017426.html, https://issues.apache.org/bugzilla/show_bug.cgi?id=46513. Java SE 7 and JDK 7 retired the com.sun.image.jpeg.codec package: http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#incompatibilities. Batik has been updated to use javax.imageio, but on trunk: http://svn.apache.org/viewvc?view=revision&revision=1396431. We are on version 1.7, so the most up-to-date stable. I could try building 1.8-dev locally, but is that something we want in the codebase?

comment:12 Changed 8 years ago by jamoore

  • Cc cxallan added

Considering it's used for exactly one feature, the impact is likely minimal. Ultimately, we must have a timeclock-icon-solution for newer Javas. Full stop.

comment:13 Changed 8 years ago by cxallan

If 1.8-dev is going to work consistently with Java6 and Java7 across the board then I'd say go for it Blazej. Evaluation certainly required of course.

comment:15 Changed 8 years ago by bpindelski

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:16 Changed 8 years ago by Blazej Pindelski <bpindelski@…>

(In [78aca6cbd6b43b8490f5c8c1fa196b2a2da05859/ome.git] on branch develop) Update batik to 1.8-dev (see #11438).

The batik JAR has been built from
r1522564. The JDK version was:
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot?(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

comment:17 Changed 8 years ago by Josh Moore <josh@…>

(In [bd79fbc3328c48c8cb6ee9fff808240657987e84/ome.git] on branch develop) Merge pull request #1519 from bpindelski/rebased/develop/batik-18

Update batik to 1.8-prerelease (see #11438) (rebased onto develop)

comment:18 Changed 8 years ago by Blazej Pindelski <bpindelski@…>

(In [720c7bd1e3af048468825d313f3991072d3f6452/ome.git]on branches master, dev_4_4) Update batik to 1.8-dev (see #11438).

The batik JAR has been built from
r1522564. The JDK version was:
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot?(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

comment:19 Changed 8 years ago by Josh Moore <josh@…>

(In [012979665db85cd7019debd5eab954cf4b9ac5b0/ome.git]on branches master, dev_4_4) Merge pull request #1492 from bpindelski/batik-18

Update batik to 1.8-prerelease (see #11438)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.100463 sec.)

We're Hiring!