Hello,
I am developing a webwork action that has a reading a xlsx file to use this POI. In implementing the action get the following errors:
[WARNING] [talledLocalContainer] GRAVE: Servlet.service() para servlet action lanz¾ excepci¾n
[WARNING] [talledLocalContainer] java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/felix/framework/ModuleImpl$ModuleClassLoader) previously initiated loading for a different type with name "javax/servlet/http/HttpServletRequest"
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.defineClass1(Native Method)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
[WARNING] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1829)
[WARNING] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)
[WARNING] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
[WARNING] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
The pom.xml is:
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>atlassian-jira</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-func-tests</artifactId>
<version>${jira.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.core</groupId>
<artifactId>atlassian-core</artifactId>
<version>4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
Thank you very much!
Patri.
Thank you very much, it worked but I have another problem. Reading the xlsx file with POI gives the following error:
[INFO] [talledLocalContainer] Warning: Caught exception attempting to use SAX to load a SAX XMLReader
[INFO] [talledLocalContainer] Warning: Exception was: java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
[INFO] [talledLocalContainer] Warning: I will print the stack trace then carry on using the default SAX parser
[INFO] [talledLocalContainer] java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
[INFO] [talledLocalContainer] at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
[INFO] [talledLocalContainer] at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
[INFO] [talledLocalContainer] at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:74)
[INFO] [talledLocalContainer] at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:647)
[INFO] [talledLocalContainer] at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:530)
[INFO] [talledLocalContainer] at org.dom4j.io.SAXReader.read(SAXReader.java:309)
[INFO] [talledLocalContainer] at org.dom4j.io.SAXReader.read(SAXReader.java:261)
Thank you very much!
Patri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The scope for the servlet API should be provided, not the default, which is compile.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you explain why?
I am getting java.lang.LinkageError with my own library and trying to figure out where it comes from. Im suspecting the scope of dependency for my own library might be wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the library, is it one that is also included in jira itself?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no it is my own library which is a simple maven project.
actually, i have already found a workaround. let me tell you the whole story...
i have developed this library a while ago. I have pulled in the dependency in my jira plugin. Then i was able to use that library as it seemed. However, one of the classes failed to load at runtime (just one class, most classes were loading without problems) with LinkageError telling me that there were multiple classes of this type on classpath.
now i have solved this problem by instantiating this class manually instead of using constructor injection as i was used to. This solved the problem.
So i guess, it may be related to OSGi or Spring dependency management. Not sure if it is a bug or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.