This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230196 - ClassNotFoundException: Log4J is forbidden
Summary: ClassNotFoundException: Log4J is forbidden
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.4
Hardware: All All
: P4 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 231529 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-23 17:23 UTC by alied
Modified: 2016-07-07 08:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 200875


Attachments
stacktrace (6.93 KB, text/plain)
2013-05-23 17:23 UTC, alied
Details
stacktrace (6.93 KB, text/plain)
2013-05-24 22:33 UTC, alied
Details
stacktrace (493 bytes, text/plain)
2013-08-27 07:16 UTC, davti
Details
stacktrace (961 bytes, text/plain)
2013-12-29 01:27 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2013-05-23 17:23:29 UTC
Build: NetBeans IDE Dev (Build 201305212300)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Windows 7

User Comments:
alied: pasted a jpql query in the jpql editor.
BTW, it keeps saying "Hint: You need to build the project to get the correct results to your query." on the down panel.




Stacktrace: 
java.lang.ClassNotFoundException: Log4J is forbidden
   at org.netbeans.modules.j2ee.persistence.util.CustomClassLoader.loadClass(CustomClassLoader.java:128)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
   at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:83)
   at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:53)
   at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
   at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
Comment 1 alied 2013-05-23 17:23:31 UTC
Created attachment 134825 [details]
stacktrace
Comment 2 alied 2013-05-24 22:33:59 UTC
Created attachment 134885 [details]
stacktrace

opening the jpql query console
Comment 3 Jaroslav Tulach 2013-06-04 06:17:14 UTC
Exception comes from 

java.lang.ClassNotFoundException: Log4J is forbidden
   at org.netbeans.modules.j2ee.persistence.util.CustomClassLoader.loadClass(CustomClassLoader.java:128)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
Comment 4 Sergey Petrov 2013-06-04 09:20:45 UTC
Hint is ok, it's replaced with data after query execution and can't be replaced because of the issue.

there was some reasons to prohibit log4j classes loading, but in my opinion it may better just to skip them rather then throw something, can you provide project example?
Comment 5 Sergey Petrov 2013-06-04 09:59:18 UTC
I was wrong regarding return null, cl should either return class or throw classnot found and related code shuld handle this exception.
But I may need additional information to evaluate the issue, I tried to create a project with hibernate provider and run some simple jpql with success.
Pleasse provide some steps.
Comment 6 Sergey Petrov 2013-06-11 09:36:36 UTC
exception seems valid but without additional details it's hard to decide on issue fix, to P4 for now.
Comment 7 Sergey Petrov 2013-07-08 16:05:21 UTC
*** Bug 231529 has been marked as a duplicate of this bug. ***
Comment 8 davti 2013-08-27 07:16:12 UTC
Created attachment 139284 [details]
stacktrace

run JPQL query
Comment 9 Exceptions Reporter 2013-12-29 01:27:26 UTC
Created attachment 143500 [details]
stacktrace

When try to execute a simple jpql query in a database oracle 11g
Comment 10 Martin Balin 2016-07-07 08:55:39 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss