[jira] [Updated] (SLING-1732) Scripted java servlets contain incorrect debug information

2012-06-19 Thread Stefan Guggisberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Guggisberg updated SLING-1732:
-

Description: 
it's currently impossible to debug scripted java servlets because of 
incompatible source file/java class names.

an example: 

an in-content java source file "/apps/foo/img.GET.java" declares the java class 
"apps.foo.img_GET".
the 'source file' debug attribute of the generated .class file has the value 
"img_GET.java" instead 
of "img.GET.java".

as a result, the source file is not found/displayed when a breakpoint is hit.  

  was:
it's currently impossible to debug scripted java servlets because of 
incompatible source file/java class names.

an example: 

an in-content java source file "/apps/foo/img.GET.java" declares the java class 
"apps.foo.img_GET".
the 'source file' debug attribute of the generated .class file has the value 
"img_GET.java" instead 
of "img.GET.java".

as a result, the source file is not found/displayed when a breakpoint s hit.  


> Scripted java servlets contain incorrect debug information
> --
>
> Key: SLING-1732
> URL: https://issues.apache.org/jira/browse/SLING-1732
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Java 1.0.0
>Reporter: Stefan Guggisberg
>
> it's currently impossible to debug scripted java servlets because of 
> incompatible source file/java class names.
> an example: 
> an in-content java source file "/apps/foo/img.GET.java" declares the java 
> class "apps.foo.img_GET".
> the 'source file' debug attribute of the generated .class file has the value 
> "img_GET.java" instead 
> of "img.GET.java".
> as a result, the source file is not found/displayed when a breakpoint is hit. 
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (SLING-2509) [regression] Compiler generates incorrect debug information

2012-06-13 Thread Stefan Guggisberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-2509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Guggisberg updated SLING-2509:
-

Attachment: SLING-2509.patch

patch that fixes this issue

> [regression] Compiler generates incorrect debug information
> ---
>
> Key: SLING-2509
> URL: https://issues.apache.org/jira/browse/SLING-2509
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Compiler 2.0.2
>Reporter: Stefan Guggisberg
> Attachments: SLING-2509.patch
>
>
> as of SLING-1930, the class files generated by the the compiler contains 
> incorrect debug information.
> the class file "sourceFile" attribute contains "my.package.MyClass.java" 
> instead of "MyClass.java".
> as a consequence debuggers can't resolve the correct source file when a break 
> point is hit in such a class,
> i.e. debugging such classes in impossible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (SLING-2509) [regression] Compiler generates incorrect debug information

2012-06-13 Thread Stefan Guggisberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-2509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Guggisberg updated SLING-2509:
-

Description: 
as of SLING-1930, the class files generated by the the compiler contains 
incorrect debug information.
the class file "sourceFile" attribute contains "my.package.MyClass.java" 
instead of "MyClass.java".

as a consequence debuggers can't resolve the correct source file when a break 
point is hit in such a class,
i.e. debugging such classes in impossible.

> [regression] Compiler generates incorrect debug information
> ---
>
> Key: SLING-2509
> URL: https://issues.apache.org/jira/browse/SLING-2509
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Compiler 2.0.2
>Reporter: Stefan Guggisberg
>
> as of SLING-1930, the class files generated by the the compiler contains 
> incorrect debug information.
> the class file "sourceFile" attribute contains "my.package.MyClass.java" 
> instead of "MyClass.java".
> as a consequence debuggers can't resolve the correct source file when a break 
> point is hit in such a class,
> i.e. debugging such classes in impossible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (SLING-2509) [regression] Compiler generates incorrect debug information

2012-06-13 Thread Stefan Guggisberg (JIRA)
Stefan Guggisberg created SLING-2509:


 Summary: [regression] Compiler generates incorrect debug 
information
 Key: SLING-2509
 URL: https://issues.apache.org/jira/browse/SLING-2509
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons Compiler 2.0.2
Reporter: Stefan Guggisberg




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (SLING-1883) commons.compiler 1.0 causes "Illegal type in constant pool" error when java source code contains Enum types

2010-12-10 Thread Stefan Guggisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970200#action_12970200
 ] 

Stefan Guggisberg commented on SLING-1883:
--

> Version 1.0 has already been released, therefore moving to 2.0

that's not gonna help. version 2.0 is not backwards compatible and 
therefore breaks client code.

> commons.compiler 1.0 causes "Illegal type in constant pool" error when java 
> source code contains Enum types  
> -
>
> Key: SLING-1883
> URL: https://issues.apache.org/jira/browse/SLING-1883
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Compiler 1.0.0
>Reporter: Stefan Guggisberg
> Fix For: Commons Compiler 2.0.0
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1809) Eclipse compiler used in commons.compiler causes "Illegal type in constant pool" with enums

2010-12-03 Thread Stefan Guggisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12966535#action_12966535
 ] 

Stefan Guggisberg commented on SLING-1809:
--

i have verified that this issue is solved by 
explicitly setting the target version, e.g.


String sourceVersion = 
if (sourceVersion != null) {
props.put("org.eclipse.jdt.core.compiler.source", sourceVersion);
props.put("org.eclipse.jdt.core.compiler.compliance", 
sourceVersion);
props.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", 
sourceVersion);
}
CompilerOptions settings = new CompilerOptions(props);

> Eclipse compiler used in commons.compiler causes "Illegal type in constant 
> pool" with enums
> ---
>
> Key: SLING-1809
> URL: https://issues.apache.org/jira/browse/SLING-1809
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Compiler 2.0.0
>Reporter: Bertrand Delacretaz
>
> According to [0] the eclipse compiler can't handle enums in certain 
> environments.
> The trunk org.apache.sling.commons.compiler bundle embeds (eclipse-jdt) 
> core-3.3.0-v_771.jar which exposes this issue. 
> According to [0] the issue should be fixed in v3.5.2, but the central Maven 
> repository does not provide a more recent version than the one we currently 
> use.
> To reproduce the problem, install the compiler and java scripting bundle and 
> create a scripted java servlet that uses enums (example below), at runtime 
> this causes:
> java.lang.VerifyError: 
> (class: enumtest/EnumTest, method: valueOf signature: 
> (Ljava/lang/String;)Lenumtest/EnumTest;) 
> Illegal type in constant pool
> [0] https://bugs.eclipse.org/bugs/show_bug.cgi?id=291985
> Here's the example servlet, store in 
> /apps/JavaScriptingTest2/JavaScriptingTest2.java and use "JavaScriptingTest2" 
> resource type:
> package apps.JavaScriptingTest2;
> import javax.servlet.http.*;
> import java.io.IOException;
> public class JavaScriptingTest2 extends HttpServlet {
> static enum EnumTest { FOO, BAR };
> 
> public void doGet(HttpServletRequest req, HttpServletResponse resp) 
> throws IOException {
> resp.getWriter().write("FOO=" + EnumTest.FOO);
> }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1883) commons.compiler 1.0 causes "Illegal type in constant pool" error when java source code contains Enum types

2010-12-03 Thread Stefan Guggisberg (JIRA)
commons.compiler 1.0 causes "Illegal type in constant pool" error when java 
source code contains Enum types  
-

 Key: SLING-1883
 URL: https://issues.apache.org/jira/browse/SLING-1883
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons Compiler 1.0.0
Reporter: Stefan Guggisberg
 Fix For: Commons Compiler 1.0.0




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1809) Eclipse compiler used in commons.compiler causes "Illegal type in constant pool" with enums

2010-12-01 Thread Stefan Guggisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965733#action_12965733
 ] 

Stefan Guggisberg commented on SLING-1809:
--

the target version is never explicitly set, i.e. it is not related to or 
specific to target "jsr14". 
according to bertrand the issue is easily reproducible.  

> Eclipse compiler used in commons.compiler causes "Illegal type in constant 
> pool" with enums
> ---
>
> Key: SLING-1809
> URL: https://issues.apache.org/jira/browse/SLING-1809
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Compiler 2.0.0
>Reporter: Bertrand Delacretaz
>
> According to [0] the eclipse compiler can't handle enums in certain 
> environments.
> The trunk org.apache.sling.commons.compiler bundle embeds (eclipse-jdt) 
> core-3.3.0-v_771.jar which exposes this issue. 
> According to [0] the issue should be fixed in v3.5.2, but the central Maven 
> repository does not provide a more recent version than the one we currently 
> use.
> To reproduce the problem, install the compiler and java scripting bundle and 
> create a scripted java servlet that uses enums (example below), at runtime 
> this causes:
> java.lang.VerifyError: 
> (class: enumtest/EnumTest, method: valueOf signature: 
> (Ljava/lang/String;)Lenumtest/EnumTest;) 
> Illegal type in constant pool
> [0] https://bugs.eclipse.org/bugs/show_bug.cgi?id=291985
> Here's the example servlet, store in 
> /apps/JavaScriptingTest2/JavaScriptingTest2.java and use "JavaScriptingTest2" 
> resource type:
> package apps.JavaScriptingTest2;
> import javax.servlet.http.*;
> import java.io.IOException;
> public class JavaScriptingTest2 extends HttpServlet {
> static enum EnumTest { FOO, BAR };
> 
> public void doGet(HttpServletRequest req, HttpServletResponse resp) 
> throws IOException {
> resp.getWriter().write("FOO=" + EnumTest.FOO);
> }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1732) Scripted java servlets contain incorrect debug information

2010-09-06 Thread Stefan Guggisberg (JIRA)
Scripted java servlets contain incorrect debug information
--

 Key: SLING-1732
 URL: https://issues.apache.org/jira/browse/SLING-1732
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Affects Versions: Scripting Java 1.0.0
Reporter: Stefan Guggisberg


it's currently impossible to debug scripted java servlets because of 
incompatible source file/java class names.

an example: 

an in-content java source file "/apps/foo/img.GET.java" declares the java class 
"apps.foo.img_GET".
the 'source file' debug attribute of the generated .class file has the value 
"img_GET.java" instead 
of "img.GET.java".

as a result, the source file is not found/displayed when a breakpoint s hit.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1436) org.apache.sling.commons.compiler: update org.eclipse.jdt.core dependency

2010-03-11 Thread Stefan Guggisberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Guggisberg updated SLING-1436:
-

Priority: Minor  (was: Major)

> org.apache.sling.commons.compiler: update org.eclipse.jdt.core dependency
> -
>
> Key: SLING-1436
> URL: https://issues.apache.org/jira/browse/SLING-1436
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Affects Versions: Commons Compiler 1.0.0
>Reporter: Stefan Guggisberg
>Priority: Minor
>
> Commons Compiler currently uses org.eclipse.jdt.core v3.2.0.666 for java 
> compilation.
> this version can't handle java 6-specific features such as @Override 
> annotations for implementations of interface methods.
> AFAIK java 6 language features should be supported by org.eclipse.jdt.core as 
> of v3.3.X.X, e.g.
> http://repo1.maven.org/maven2/org/eclipse/jdt/core/3.3.0-v_771/core-3.3.0-v_771.jar

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1436) org.apache.sling.commons.compiler: update org.eclipse.jdt.core dependency

2010-03-11 Thread Stefan Guggisberg (JIRA)
org.apache.sling.commons.compiler: update org.eclipse.jdt.core dependency
-

 Key: SLING-1436
 URL: https://issues.apache.org/jira/browse/SLING-1436
 Project: Sling
  Issue Type: Improvement
  Components: Commons
Affects Versions: Commons Compiler 1.0.0
Reporter: Stefan Guggisberg


Commons Compiler currently uses org.eclipse.jdt.core v3.2.0.666 for java 
compilation.

this version can't handle java 6-specific features such as @Override 
annotations for implementations of interface methods.

AFAIK java 6 language features should be supported by org.eclipse.jdt.core as 
of v3.3.X.X, e.g.
http://repo1.maven.org/maven2/org/eclipse/jdt/core/3.3.0-v_771/core-3.3.0-v_771.jar

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1184) JcrJavaCompiler: add support for complementary classloader

2009-11-11 Thread Stefan Guggisberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Guggisberg updated SLING-1184:
-

Attachment: org.apache.sling.jcr.compiler.JcrJavaCompiler.patch

patch with suggested improvement

> JcrJavaCompiler: add support for complementary classloader
> --
>
> Key: SLING-1184
> URL: https://issues.apache.org/jira/browse/SLING-1184
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Stefan Guggisberg
>Priority: Minor
> Attachments: org.apache.sling.jcr.compiler.JcrJavaCompiler.patch
>
>
> i suggest to add the following signature to the 
> o.a.sling.jcr.compiler.JcrJavaCompiler service:
> boolean compile(String[] srcFiles, String outputDir,
>ErrorHandler errorHandler, boolean generateDebug,
>String javaVersion, ClassLoader 
> complementaryClassLoader)
> throws Exception;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-1184) JcrJavaCompiler: add support for complementary classloader

2009-11-11 Thread Stefan Guggisberg (JIRA)
JcrJavaCompiler: add support for complementary classloader
--

 Key: SLING-1184
 URL: https://issues.apache.org/jira/browse/SLING-1184
 Project: Sling
  Issue Type: Improvement
  Components: Commons
Reporter: Stefan Guggisberg
Priority: Minor


i suggest to add the following signature to the 
o.a.sling.jcr.compiler.JcrJavaCompiler service:

boolean compile(String[] srcFiles, String outputDir,
   ErrorHandler errorHandler, boolean generateDebug,
   String javaVersion, ClassLoader 
complementaryClassLoader)
throws Exception;


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.