-
1. Re: "Package does not exist" exception in ear deployment
sfcoy Nov 20, 2012 5:30 PM (in response to mrojasaquino1)You basic structure looks correct and it should work.
How are you building your application?
Are you deploying from eclipse? Eclipse will sometimes put things where they do not belong.
-
2. Re: "Package does not exist" exception in ear deployment
mrojasaquino1 Nov 20, 2012 5:36 PM (in response to sfcoy)Hi Stephen.
I'm building my ear with ant. Additional info: the JARs in the ear/lib directory are packaged using ant too, as some of them are from our own classes and others are from repackaging several third party libraries.
Regards.
-
3. Re: "Package does not exist" exception in ear deployment
sfcoy Nov 20, 2012 5:40 PM (in response to mrojasaquino1)Please show:
- The output of jar -tf myapp.ear
- The complete stack trace
-
4. Re: "Package does not exist" exception in ear deployment
mrojasaquino1 Nov 20, 2012 6:16 PM (in response to sfcoy)I'm attaching a file with the begining of the stack trace and the output of jar tf
Stack Trace:
-----------------------------------------------------------
16:54:56.557 stderr.write: net.sf.dynamicreports.report.exception.DRException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: [28]
16:54:56.564 stderr.write: //MyApp/utils/Report_1353452095884_552672.java:4: package net.sf.jasperreports.engine does not exist [28]
16:54:56.565 stderr.write: import net.sf.jasperreports.engine.*; [28]
16:54:56.565 stderr.write: ^ [28]
16:54:56.565 stderr.write: //MyApp/utils/Report_1353452095884_552672.java:5: package net.sf.jasperreports.engine.fill does not exist [28]
16:54:56.566 stderr.write: import net.sf.jasperreports.engine.fill.*; [28]
16:54:56.566 stderr.write: ^ [28]
16:54:56.566 stderr.write: //MyApp/utils/Report_1353452095884_552672.java:18: cannot find symbol [28]
16:54:56.568 stderr.write: symbol: class JREvaluator [28]
16:54:56.573 stderr.write: public class Report_1353452095884_552672 extends JREvaluator [28]
16:54:56.574 stderr.write: ^ [28]
16:54:56.575 stderr.write: symbol : class JRFillParameter [28]
16:54:56.575 stderr.write: location: class Report_1353452095884_552672 [28]
16:54:56.575 stderr.write: private JRFillParameter parameter_REPORT_LOCALE = null; [28]
16:54:56.576 stderr.write: ^ [28]
16:54:56.576 stderr.write: //MyApp/utils/Report_1353452095884_552672.java:26: cannot find symbol [28]
16:54:56.580 stderr.write: symbol : class JRFillParameter [28]
16:54:56.581 stderr.write: location: class Report_1353452095884_552672 [28]
16:54:56.581 stderr.write: private JRFillParameter parameter_CUSTOM_VALUES = null; [28]
16:54:56.583 stderr.write: ^ [28]
16:54:56.592 stderr.write: //MyApp/utils/Report_1353452095884_552672.java:27: cannot find symbol [28]
16:54:56.592 stderr.write: symbol : class JRFillParameter [28]
16:54:56.592 stderr.write: location: class Report_1353452095884_552672 [28]
16:54:56.593 stderr.write: private JRFillParameter parameter_JASPER_REPORT = null; [28]
16:54:56.595 stderr.write: ^ [28]
16:54:56.597 stderr.write: //MyApp/utils/Report_1353452095884_552672.java:28: cannot find symbol [28]
16:54:56.598 stderr.write: symbol : class JRFillParameter [28]
16:54:56.599 stderr.write: location: class Report_1353452095884_552672 [28]
16:54:56.601 stderr.write: private JRFillParameter parameter_REPORT_VIRTUALIZER = null; [28]
16:54:56.601 stderr.write: ^ [28]
repeats the same several times ....
-----------------------------------------------------------
jar tf myapp.ear
META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml
lib/
MyApp.war
MyAppMonitor.war
lib/MainJar.jar
lib/MyAppSLib.jar
lib/ij.jar
lib/myapp_c3p0.jar
lib/myapp_commons.jar
lib/myapp_jasper.jar
lib/myapp_struts.jar
lib/myapp_utils.jar
lib/myapp_ws.jar
lib/oracle.jar
lib/postgresql.jar
liverebel.xml
I've modified the names of my wars and some jars due to company policies.
The JasperReports and DynamicReports classes are contained un myapp_jasper.jar. The classes that use those functionality are contained in MyApp.ear/WEB-INF/classes. Funny thing is that database access seems to be working ok as well as my bussiness logic classes contained in MainJar.jar when invoked from MyApp.ear/WEB-INF/classes too.
Regards.
-
5. Re: "Package does not exist" exception in ear deployment
sfcoy Nov 20, 2012 6:28 PM (in response to mrojasaquino1)Have a look at jar tf myapp_jasper.jar and ensure that it is correctly repackaged.
-
6. Re: "Package does not exist" exception in ear deployment
mrojasaquino1 Nov 20, 2012 6:40 PM (in response to sfcoy)Well, it seems to include all the classes from JasperReports and DynamicReports, "jar tf" doesn't complain and several other reports (not involving DynamicReports) seem to be working.
-
7. Re: "Package does not exist" exception in ear deployment
mrojasaquino1 May 9, 2013 10:03 AM (in response to mrojasaquino1)Well, it seems that someone else is having the same problem as I, as in the statistics this post seems to be getting several hits. The solution that worked for me was disabling the JDT compiler included in JBoss 7.1.1, as it clashes with the one included in our deployment, and as we're not using JSPs disablen JBoss' JDT is not an issue.
To do this I've commented out the Jasper JDT part in the jboss/modules/org/jboss/as/web/main/module.xml:
<resources>
<resource-root path="jboss-as-web-7.1.1.Final.jar"/>
<!--resource-root path="jasper-jdt-7.0.3.Final.jar"/-->
<resource-root path="jbossweb-7.0.13.Final.jar"/>
<!-- Insert resources here -->
</resources>Maybe there is a better solution, but in the mean time this is the one that worked for us.
Regards.
-
8. Re: "Package does not exist" exception in ear deployment
stanlysunil Feb 4, 2016 1:14 AM (in response to mrojasaquino1)I have tried the suggested workaround provided. Jasper is working fine now. But I am getting other exception, Jsp compilation getting failed.
java.lang.IllegalStateException: JBWEB004000: No Java compiler available
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:242)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:601)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:242)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)