Running version 3.2 I am getting an error
[WARN] liquibase - schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
When I look for http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd it is not there, although http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd is.
I came accross this https://liquibase.jira.com/browse/CORE-1840, which I interpret to say you dont need access to the internet to get dbchangelog-3.2.xsd. It doesnt seem to help when the internet is available but the .xsd is not there.
I have reverted back to 3.1 but would like to know the root cause of my 3.2 problem.
Updating the liquibase version to the latest solved my problem
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.6.3</version>
</dependency>
I solved it by distributing the schema with my application and referring to it locally (relative path). In the example below I have the schema file in the same folder as the changelog.
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog-3.1.xsd">
<!-- all the things -->
</databaseChangeLog>
Liquibase does not looking for xsd in Internet. http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd will be replaced to path to java recources
More detailed info can be find here
I fixed the issue following what found here.
The solution works only for the one using maven-liquibase-plugin.
You have to run liquibase migration with the following option -Dprefer.internal.xsd=true:
mvn -Dprefer.internal.xsd=true liquibase:update
Check your changlog.xml file headers having xsd document version.
If it doesn't match it will during spring boot:run
Related
I am using Apache Tika( tika-app 1.17) in wildfly modules.
While I start extracting PDF it always throws the error:
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.pdfbox.pdmodel.font.PDFont
For other file extensions it works fine.
Things I have tried out dependencies in apache-tika module.xml to PDFbox
Explicitly loaded org.apache.pdfbox from standalone.xml
I have also tried with the below structure
app1.war->(WEB-INF)lib-->app.jar->lib-->tika-app-1.17.jar
I have also jboss-deployment-structure.xml where
<dependencies>
<module name="com.company.tika" />
</dependencies>
is mentioned as a module dependency.
In MANIFEST.MF of the jar also, I have dependency to com.company.tika
Nothing seems to work.
Any suggestions or help would be thankful.
Thanks in Advance
Dwai
I could resolve the issue. The problem was the minor version of pdfbox, fontbox and jempbox were not the same. Hence the PDFFont was not initialized, because internally it needs to load the classes of fontbox also and probably there was a mismatch in the version id of the classes
setting SOLR_JAVA_STACK_SIZE='-Xss256M' only and not making any changes to libs solved this issue for me
I had similar problem.
Under linux i just install missing library pdfbox by:
apt-get install libpdfbox-java
and restart solr server
After this modification i need to change solr start parameter in ./bin/solr
from
SOLR_JAVA_STACK_SIZE='-Xss256kb'
to
SOLR_JAVA_STACK_SIZE='-Xss256M'
because i had error
java.lang.StackOverflowErrorjava.lang.RuntimeException: java.lang.StackOverflowError
of course i restart solr server again.
I hope, it help you reolve this problem.
I am getting below error when performing an update using liquibase maven update goal.
liquibase.exception.ChangeLogParseException: Error parsing line 4459 column 108 of db.changelogdiff.xml: cvc-complex-type.3.2.2: Attribute 'objectQuotingStrategy' is not allowed to appear in element 'changeSet'.
The diff generated changelog file(using jenkins + Maven) has objectQuotingStrategy as a changeset attribute. This results in above error.
I am using Liquibase-maven plugin 3.5, My jenkins is 2.0
---Solved--
The xsi:schemaLocation in my changelog xml was pointing to old version. Corrected to latest version which solved the issue. Thanks Gile for the headsup :-)
Your diff generated changelog file has been done according to
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
but it seems liquibase maven update is parsing it according to
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd
or older, that still doesn't allow attribute 'objectQuotingStrategy' in element 'changeSet.
So I would double-check liquibase-core version in pom.xml , eventually upgrading from MVN repository.
I m trying to encrypt my XMl with this call:
XMlCipher.martial(Document context,ReferenceList referenceList)
for this the Project is referencing the xmlsec-1.5.3.jar
I'm able to build and deploy the code successfully on weblogic server , but post execution I'm getting the below error in logs.
Caused by: java.lang.NoSuchMethodError:
org.apache.xml.security.encryption.XMLCipher.martial(Lorg/w3c/dom/Document;Lorg/apache/xml/security/encryption/ReferenceList;)Lorg/w3c/dom/Element;
at com.ally.util.encryption.EncryptionUtil.generateEncryptedXML(EncryptionUtil.java:381)
at com.ally.util.encryption.EncryptionUtil.getEnryptedXMLDocument(EncryptionUtil.java:443)
at com.ally.partner.fis.acctinq.FISSoapHandler.getFISEncryptedHeader(FISSoapHandler.java:154)
This kind of error is ALWAYS caused by having more than one reference of the XMlCipher on your classpath. It could be a duplicate xmlsec.jar or another instance of the XMlCipher in a different jar.
You have a few options to debug the problem:
Edit your war file to remove the duplicate jar and/or different version of the XMlCipher class
Connect to your weblogic managed server with jconsole and look at the classpath. See if you notice another instance of the xmlsec.jar being included
You may need to tell weblogic to prefer the instance of the class that lives within your .war/.ear file by specifying the following in your weblogic.xml:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.apache.xml.security.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
See the docs for more details and similar questions like: Weblogic 10.3.1.0 is using com.bea.core.apache.commons.net_1.0.0.0_1-4-1.jar... I want to use commons-net-2.0.jar from my code
I realize you didn't mention the use of Maven or SoapUI, but I was receiving a similar exception (java.lang.NoSuchMethodError: org.apache.xml.security.encryption.XMLCipher.setSecureValidation) when attempting to use the soapui-maven-plugin and wanted to post my solution to hopefully help.
The fix for me was to add an xml-security dependency to the soapui-maven-plugin inside the pom.xml like so:
<!-- To run, enter this command from the module directory: mvn soapui:test -->
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.1.1</version>
<dependencies>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.5.2</version>
</dependency>
</dependencies>
<configuration>
<projectFile>src/test/soap-ui/your-soapui-xml-file.xml</projectFile>
</configuration>
</plugin>
</plugins>
In my case, I didn't have an xml security dependency anywhere else in my project.
In other cases, it seems like some may be experiencing this error due to having multiple xml security dependencies throughout their project (and they are conflicting, like one answer is already alluding to). So, if the above fix doesn't work for you in that scenario, you may need to look into which dependencies in your project are including xml security and deciding which one you want to include and which one you want to exclude (e.g. using Maven's exclusion or provided scope markings in the given pom).
I've got a problem with "javax.el.CompositeELResolver" which is used by TomEE's "javaee-api-6.0-5.jar".
Version information and svn-repository here:
http://mvnrepository.com/artifact/org.apache.geronimo.specs/geronimo-el_2.2_spec/1.0.2
Source of class CompositeELResolver here:
http://svn.apache.org/viewvc/geronimo/specs/tags/geronimo-el_2.2_spec-1.0.2/src/main/java/javax/el/CompositeELResolver.java?view=log
In the "invoke" method I get a null pointer exception because the for-loop iterates through the whole resolvers-array which has got fields with value "null". I suppose this is not avoidable because of the "add" method that doubles the array size if required but does not initialize any values. Shouldn't there be a check if the resolver is "null" in the "invoke" method before using it?
For comparison I ran my application with another javax.el implementation and it's working properly:
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
</dependency>
Am I wrong with my supposition?
I found a similar-sounding issue here:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50293
Is it possible that multi-threading causes my problem?
Solved.
TomEE uses version 1.0.2 of http://mvnrepository.com/artifact/org.apache.geronimo.specs/geronimo-el_2.2_spec
The bug is fixed in version 1.0.4
Based on the fixed geronimo el spec 1.0.4 version it is easy to fix the javaee-api-6.0-5.jar package.
Just download the newest jar file from here http://mvnrepository.com/artifact/org.apache.geronimo.specs/geronimo-el_2.2_spec/1.0.4
and change the javax.el package in javaee-api-6.0-5.jar with the files comes from geronimo el 2.2 spec 1.0.4 jar files
I did it using mc under linux browse the content and copy from one to another. And I tested and works perfect.
Of course you can do it with jar utils as well :-)
It was strange for me that this problem did not exist in 32 bit windows environment but only in 64 bit linux environment. Anyhow the fix solves the problem.
Hope that there will be a javaee-api-6.0-6.jar soon :-)
I am getting the following error in the browser window :
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE
I have included the resource file in the struts-config.xml using
And my resource file is stored as WEB-INF/classes/Application.properties file.
Well this is an old post, but my answer can help, I guess...
I personally wasted some time to make work a poject that had been developped under Tomcat 5.5 under Tomcat 7.
Note : You should name your ressource file : "ApplicationResources"...
There is several reasons why it wouldn't work, but the most common answer I found on the net was : put the line
<message-resources parameter="ApplicationResources" null="false" />
in your "struts-config.xml".
In my case, this line was already present, and this was the contrary : I had to remove it and replace at the "web.xml" file level by :
<context-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</context-param>
in the "servlet" tag.
I'm sorry that I don't have a valuable explanation for this, but my application behaves just fine now.
Does anyone has (an explanation) ?
This happened to me because I was converting my project to maven and my resources directory was not correct.
I had struts-config.xml like this:
<message-resources parameter="messages.appResources" null="false"/>
My pom.xml was like this:
<resource>
<directory>src/main/resources</directory>
</resource>
But my messages folder was in my project root. So I moved it to:
${project.basedir}/src/main/resources/messages
Make sur that you are using the same version of the DTD in the header of struts-config.xml:
I had this error when using two differents versions:
//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
and the Pb was solved once the correction made:
An XML might be missing...
In which context is your application running ? Tomcat ? JBoss ?
Try including xalan and xerces dependencies.
The following solved my problem:
In Struts Config, include:
(At the top)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
<message-resources
parameter="common.properties.Common" /> (or the path to your resources file)
This error seems to be caused by a lack of a path to message-resource in struts-config.xml
and the DOCTYPE definition at the top of the same.
you should put this line in your struts-config.xml
< message-resources parameter="ApplicationResources" null="false" key="ApplicationResources" />
In my case problem was fixed after delete all unnecessary attributes from message-resources element in struts-config.xml file. Just like following:
<message-resources parameter="ApplicationResources"/>