2013-03-08 2 views
0

CQ5의 CRXDE에서 샘플 번들을 만들었습니다. the tutorial에 주어진대로 과정은 낱말에 지켜졌다.CQ 번들 예외가 발생합니다. 형식 만 가져올 수 있습니다.

하지만 페이지를 실행하면, 그냥 예외

An error occurred at line: 6 in the generated java file 
    Only a type can be imported. com.mycompany.test.HelloWorld resolves to a package 

는 JSP를 throw은 다음과 같습니다 :

<%@ page import="com.mycompany.test.HelloWorld"%><% 
%><%@ include file="/libs/foundation/global.jsp"%><% 
%><% HelloWorld hello = new HelloWorld();%><% 
%> 
<html> 
<body> 
<b><%= hello.getString() %></b><br> 
</body> 
</html> 

HelloWorld.java는 다음과 같다 :

패키지 닷컴 .mycompany.test;

public class HelloWorld { 
    public String getString(){ 
    return "Say Hello to my little friend !!"; 
    } 
} 

여기

답변

2

잘못 귀하는 .bnd 파일에 아래 줄이 포함되어 있는지 확인 할 수 알아낼 수 없습니다. 존재하지 않는 경우 추가 한 다음 번들을 다시 빌드 할 수 있습니다.

Export-Package: * 
Import-Package: * 
Private-Package: * 
+0

Gee 고마워 ... 잘됐다 !! –

1

코드가 클래스에 표시되지 않으면이 오류가 발생합니다.

확인
1. 펠릭스 (/ 시스템/콘솔/번들)에서 귀하의 번들 활성 상태에있는 (안에서 해결/설치).
.2. 번들에서 com.mycompany 패키지를 내 보냈습니다. * 또는 *