java error running CMB version 2.2.36

107 views
Skip to first unread message

Chris Herssens

unread,
Oct 4, 2013, 8:39:01 AM10/4/13
to cmb-use...@googlegroups.com
Hello,

I try to compile and run CMB. 
After downloading CMB from github and compile it, I get the follow error

Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/HttpConstraintElement
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:788)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:447)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.comcast.cmb.common.controller.CMB.main(CMB.java:57)


Does someone known what this error means and how to solve it.

Regards,

Chris

boriwo

unread,
Oct 4, 2013, 2:51:00 PM10/4/13
to cmb-use...@googlegroups.com
Hi Chris,

I just downloaded a fresh copy from github, ran the maven build and unpacked the tar file to launch cmb via the cmb.sh script. It works fine fro me (see log below) provided you have redis and cassandra properly configured. What exactly are the steps you are taking to run cmb? Are you running via cmb.sh or from within an IDE like Eclipse? Are all the dependent jars available in your classpath?

Example log output for successful launch:

~/Development/cmbbuild/cmb/target/cmb$ ./bin/cmb.sh
config:lib/activation-1.1.jar:lib/aws-java-sdk-1.5.7.jar:lib/cassandra-thrift-1.0.6.jar:lib/cmb-2.2.37.jar:lib/commons-codec-1.6.jar:lib/commons-collections-3.2.1.jar:lib/commons-lang-2.4.jar:lib/commons-logging-1.1.1.jar:lib/commons-pool-1.5.3.jar:lib/ezmorph-1.0.6.jar:lib/google-collections-1.0.jar:lib/guava-r09.jar:lib/hamcrest-core-1.1.jar:lib/hector-core-1.0-5.jar:lib/httpasyncclient-4.0-beta3.jar:lib/httpclient-4.2.2.jar:lib/httpclient-cache-4.2.2.jar:lib/httpcore-4.2.3.jar:lib/httpcore-nio-4.2.3.jar:lib/httpmime-4.2.2.jar:lib/jackson-annotations-2.1.1.jar:lib/jackson-core-2.1.2.jar:lib/jackson-core-asl-1.4.3.jar:lib/jackson-databind-2.1.2.jar:lib/jackson-mapper-asl-1.5.1.jar:lib/javax.servlet-3.0.0.v201112011016.jar:lib/jcommon-1.0.16.jar:lib/jedis-2.1.0.jar:lib/jetty-continuation-8.1.10.v20130312.jar:lib/jetty-http-8.1.10.v20130312.jar:lib/jetty-io-8.1.10.v20130312.jar:lib/jetty-security-8.1.10.v20130312.jar:lib/jetty-server-8.1.10.v20130312.jar:lib/jetty-servlet-8.1.10.v20130312.jar:lib/jetty-util-8.1.10.v20130312.jar:lib/jetty-webapp-8.1.10.v20130312.jar:lib/jetty-xml-8.1.10.v20130312.jar:lib/jfreechart-1.0.13.jar:lib/jolokia-core-1.1.3.jar:lib/jolokia-jvm-1.1.3-agent.jar:lib/json-20090211.jar:lib/json-simple-1.1.jar:lib/junit-4.9.jar:lib/libthrift-0.6.1.jar:lib/log4j-1.2.16.jar:lib/mail-1.4.3.jar:lib/netty-3.2.7.Final.jar:lib/servlet-api-2.5.jar:lib/slf4j-api-1.7.2.jar:lib/slf4j-log4j12-1.7.2.jar:lib/speed4j-0.9.jar:lib/stax-1.2.0.jar:lib/stax-api-1.0.1.jar:lib/tools.jar:lib/uuid-3.2.0.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar
INFO: No access restrictor found, access to all MBean is allowed
Jolokia: Agent started with URL http://localhost:7777/jolokia/
2013-10-04 11:45:16,256 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CMBProperties - event=loading_cmb_properties file=/Users/bwolf200/Development/cmbbuild/cmb/target/cmb/./config/cmb.properties
2013-10-04 11:45:16,265 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  Util - event=init_log4j file=./config/log4j.properties
2013-10-04 11:45:16,430 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  Server - jetty-8.1.10.v20130312
2013-10-04 11:45:16,640 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  StandardDescriptorProcessor - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2013-10-04 11:45:16,739 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  AbstractConnector - Started SelectChann...@0.0.0.0:6059
2013-10-04 11:45:16,739 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CMB - event=launched_cqs_service_endpoint port=6059 max_request_length=524288
2013-10-04 11:45:16,779 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CassandraHostRetryService - Downed Host Retry service started with queue size -1 and retry delay 10s
2013-10-04 11:45:16,800 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  JmxMonitor - Registering JMX me.prettyprint.cassandra.service_cmb:ServiceType=hector,MonitorType=hector
2013-10-04 11:45:16,807 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CQSControllerServlet - event=ping version=2.2.37 ip=172.20.4.206 port=6059
2013-10-04 11:45:16,902 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CQSLongPollReceiver - event=longpoll_receiver_service_listening port=5555
2013-10-04 11:45:16,909 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CQSLongPollSender - event=longpoll_sender_service_initialized
2013-10-04 11:45:16,909 [CACSVLO-12805.local] [Thread-16] [8f900ddb-054b-48ac-aacf-77f284a66956] INFO  CQSLongPollSender$LongPollSenderThread - event=reloading_active_cqs_api_server_list
2013-10-04 11:45:16,909 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  Server - jetty-8.1.10.v20130312
2013-10-04 11:45:16,936 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  StandardDescriptorProcessor - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2013-10-04 11:45:16,952 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  AbstractConnector - Started SelectChann...@0.0.0.0:6061
2013-10-04 11:45:16,952 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CMB - event=launched_cns_service_endpoint port=6061 max_request_length=524288
2013-10-04 11:45:16,954 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CNSPublisher - event=startup version=2.2.37 ip=172.20.4.206 io_mode=SYNC
2013-10-04 11:45:16,954 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CNSPublisher - modes=[Producer, Consumer]
2013-10-04 11:45:16,990 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  RedisCachedCassandraPersistence - event=initialize_redis
2013-10-04 11:45:17,002 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  RedisCachedCassandraPersistence - event=initialize_redis pools_size=1 max_active=100 server_list=localhost:6379
2013-10-04 11:45:17,201 [CACSVLO-12805.local] [main] [8011f513-b486-4a05-85dd-e9c08f01a7af] INFO  CNSEndpointPublisherJobProducer - event=initialize

Chris Herssens

unread,
Oct 5, 2013, 1:20:58 PM10/5/13
to cmb-use...@googlegroups.com
Maven generates a target directory. When I move the lib directory from the target directory to cmb directory and copy the cmb.jar file into that directory, I get this error.
If I un-tar the generated cmb-distribution-2.2.37.tar.gz file then everything works fine.


Regards,

Chris

boriwo

unread,
Oct 8, 2013, 5:21:03 PM10/8/13
to cmb-use...@googlegroups.com
If you recreate the same structure you find in the tar things should work without exception - after all there would be no difference between the two. Try to check for extra / unnecessary jars in your lib folder: If you have different versions of the same libs it can cause problems, or if you have a seconds version of the servlet api jar, for example. Also, make sure to use the same version of Java for compiling and running.
Reply all
Reply to author
Forward
0 new messages