I have closed auto commit, set MANUAL_IMMEDIATE, but it also produces null point exception
This is the exception:
(java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.String, java.lang.String>>,org.springframework.kafka.support.Acknowledgment)' threw exception; nested exception is java.lang.NullPointerException; nested exception is java.lang.NullPointerException
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.decorateException(KafkaMessageListenerContainer.java:1311) [spring-kafka-2.2.5.RELEASE.jar!/:2.2.5.RELEASE]
2.2.x is no longer supported, and 2.2.5 is 2 1/2 years old.
See the project page for supported versions.
That was a bug in 2.2.5 - it implies that some code threw a ListenerExecutionFailedException with no cause; I don't see that happening in framework code (but I haven't looked extensively), perhaps your code is throwing it?
When reporting problems like this, you must show code, configuration, logs and the full stack trace.
Try upgrading to a supported version - 2.3.14, 2.5.15, 2.6.10, or 2.7.6 - the newer the better.
Related
Bundle version 1.3.1
| Symfony version 3.3
| PHP version 7.1.9
Expected behavior
After installing the different bundles (JMSTranslationBundle, JMSDIExtraBundle, checking if i had sensio/framework-extra-bundle), and after i made the right configuration in config.yml and routing_dev.yml, the right behavior should be that the /_trans lead me to a translation interface (working), and change nothing else.
Actual behavior
Getting on a route different from /_trans return Call to a member function has() on null with error 500. Therefore, the whole site is dead, except the translation UI.
Steps to reproduce
Install JMSTranslationBundle, then when asked, install JMSDIExtraBundle to get the web ui
After that, test the /_trans. This should work. But when you get to your others routes, they return 500 error
I have exactly the same issue (Sf 3.3.9/PHP 7.1.9). I have to remove the line related to "JMSDiExtraBundle" in AppKernel to make my app works again. This is the only workaround I found, not very efficient.
Very low trace log information, this is what I have:
Stack Trace:
Logs:
CRITICAL 19:56:59 php Call to a member function has() on null
CRITICAL 19:56:59 request Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Call to a member function has() on null" at /Users/stephanfo/PhpstormProjects/openbuy/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php line 233
Exception:
Any help would be helpful.
Thanks,
Stef.
Why Guice 3.0 throws this exception instead of a formatted message for wrong configurated components (#Inject is missing for example)?
Exception in thread "main" com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 16640
at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at com.google.inject.internal.util.$StackTraceElements.forMember(StackTraceElements.java:53)
at com.google.inject.internal.Errors.formatInjectionPoint(Errors.java:716)
at com.google.inject.internal.Errors.formatSource(Errors.java:678)
at com.google.inject.internal.Errors.format(Errors.java:555)
at com.google.inject.ConfigurationException.getMessage(ConfigurationException.java:70)
at java.lang.Throwable.getLocalizedMessage(Throwable.java:391)
at java.lang.Throwable.toString(Throwable.java:480)
at java.lang.String.valueOf(String.java:2982)
at java.io.PrintStream.println(PrintStream.java:821)
at java.lang.Throwable$WrappedPrintStream.println(Throwable.java:748)
at java.lang.Throwable.printStackTrace(Throwable.java:655)
at java.lang.Throwable.printStackTrace(Throwable.java:643)
at java.lang.Throwable.printStackTrace(Throwable.java:634)
at hu.daniel.hari.exercises.cleanarchitecture.payrollcasestudy.adapters.primary.ui.impl.swing._2.SwingUIMain2.<init>(SwingUIMain2.java:40)
at hu.daniel.hari.exercises.cleanarchitecture.payrollcasestudy.adapters.primary.ui.impl.swing._2.SwingUIMain2.main(SwingUIMain2.java:17)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 16640
at com.google.inject.internal.asm.$ClassReader.readClass(Unknown Source)
at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
at com.google.inject.internal.util.$LineNumbers.<init>(LineNumbers.java:62)
at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:36)
at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:33)
at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
My initating code is:
Injector injector = Guice.createInjector(new SwingUIModule(useCaseFactory));
injector.getInstance(MainFrameUI.class).show();
We have faced this issue and it turned out that it is not Guice 3 issue at all (in our case). Fact is, though, that due to poor Exception handling in Guice 3 we got the same error message as the author.
TL/DR
The source of our problem was NoClassDefFoundError: Could not initialize class ... exception that was thrown in a static block in one of our classes.
It turned out, that we had excluded too many classes during fat-jar building, and simply there were some classes missing. Unfortunately, with Guice 3, we received only $ComputationException: java.lang.ArrayIndexOutOfBoundsException: ... message, to help us out.
My point is, that it might be, that Guice 3 is not the source of your problem.
Full version
We have a project (A) that we include as a dependency in project (B) that is running on Spark Cluster
Project A, was using log4j 2, and spark-hive (used in Project B) for some reason does not like when it has extra logging frameworks in the classpath, so we excluded it in sbt-assembly:
ExclusionRule(organization = "org.apache.logging.log4j"),
In project A, we have a class that has, lets say some code like this (java):
static {
this.defaultMarker = MarkerManager.getMarker("abc")
}
And MarkerManager is from org.apache.logging.log4j, so this class is missing in fat-jar of project B.
We run it on the cluster, where some class that is supposed to be #injected uses the class with static block.
Boom! $ComputationException: java.lang.ArrayIndexOutOfBoundsException
I decided to initialize all classes manually, without Guice only to find out that it was not Guice fault.
Fix the ExclusionRule and it all works with Guice 3 again.
I think the issue is with how Guice 3 and below handles lambda expressions. You might have to upgrade to Guice 4 to fix this as mentioned here.
In http://localhost:8000/checkout/shipping I got an error
CRITICAL - Uncaught PHP Exception
Symfony\Component\Form\Exception\UnexpectedTypeException: "Expected
argument of type "Sylius\Component\Core\Model\ShippingMethod",
"string" given" at
/home/krzysztof/Dokumenty/praca/smartbyte/sylius/src/Sylius/Bundle/ResourceBundle/Form/DataTransformer/ObjectToIdentifierTransformer.php
line 58
and the $value of transform method is an empty string.
It's strange because I got this error only on my project version, and on contribute version everything is ok, despite the version of sylius is in both the same (latest commit). Moreover I don't overwrite ShippingMethod so I don't now why this strange behaviour happens.
Today, I found the same error.
But just days ago everything worked. I often update the project from the git (master branch) and by composer. Therefore I started to look for errors in the last commit. After half a day with the debugger I found no critical changes in the last Sylius commits.
I drew attention to the version of Symfony. It's: 2.8.3. I rolled up to 2.8.0 and the problem has been resolved. I did not understand what was the cause of the error. But the fact remains - selection the delivery method form of Sylius with Symfony v2.8.3 is not working.
I hope this helps.
When i add to apache-karaf-3.0.3\etc\system.properties the property karaf.lock.level=50
the following exception is thrown:
java.lang.RuntimeException: Error installing bundle listed in startup.properties with url: mvn:org.ops4j.pax.url/pax-url-aether/2.3.0 and startlevel: 5
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:392)
at org.apache.karaf.main.Main.launch(Main.java:245)
at org.apache.karaf.main.Main.main(Main.java:167)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.url.mvn [1]: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:389)
... 2 more
same result when configuring the failover mechanism as described in the documentation. http://karaf.apache.org/manual/latest/users-guide/failover.html
karaf.lock=true
karaf.lock.class=org.apache.karaf.main.lock.DefaultJDBCLock
karaf.lock.level=50
karaf.lock.delay=10
karaf.lock.jdbc.url=jdbc:mysql://localhost/something
karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
karaf.lock.jdbc.user=aUser
karaf.lock.jdbc.password=aUnsecurePassword
karaf.lock.jdbc.table=KARAF_LOCK
karaf.lock.jdbc.clustername=karaf
karaf.lock.jdbc.timeout=30
the driver is dropped to apache-karaf-3.0.3\lib\ext
when karaf.lock.level is removed or set to greater than 0 and lower than 5 it seems to work.
when i set the same lock.level.property to 50 in a 2.3.3 installation of karaf everything seems to work just fine.
does anyone know what changed there from 3.x.x to 2.3.3 or what could cause the problem.
best regards and thank you for your time :D
I was trying to redeploy a servlet I had recently undeployed but kept getting a org.apache.catalina.LifecycleException. Tomcat wasn't able to load the context properly.
This is what triggered the search:
FAIL - Unable to delete [/var/lib/tomcat7/conf/Catalina/localhost/app.xml].
The continued presence of this file may cause problems.
Here are the errors from the log catalina.out, rearranged to fit the column:
WARNING: Calling stop() on failed component [{0}] to trigger clean-up
did not complete.
org.apache.catalina.LifecycleException:
An invalid Lifecycle transition was attempted ([after_stop]) for
component [org.apache.catalina.startup.FailedContext#13150fc] in state
[FAILED]
WARNING: Error while removing context [/app]
java.lang.ClassCastException:
org.apache.catalina.startup.FailedContext cannot be cast to
org.apache.catalina.core.StandardContext
Scrolling back up, I noticed a whole list of SEVERE errors, beginning with:
SEVERE: Parse error in context.xml for /app
org.xml.sax.SAXParseException;
systemId: file:/etc/tomcat7/Catalina/localhost/app.xml/;
lineNumber: 1;
columnNumber: 1;
Content is not allowed in prolog.
This is not related to Cannot Undeploy a web-app completely in Tomcat 7 or Installing JSTL results in org.xml.sax.SAXParseException: Content is not allowed in prolog, though I wasted quite some time looking through these. Everything seemed to be as it should be, so I was stumped. Eventually, I solved it myself. My answer is below.
It turns out that I had deployed
/path/to/servlet/web/
as the XML Configuration file instead of
/path/to/servlet/website.xml
as Tomcat had been expecting.
A quick check in the saved form content of my other browser revealed this kickself error, so I am posting a Q and A here in the hope that this could save someone some time.
Please be careful when deploying manually, people.