Skip to main content

looking for jsf-api.jar

7 replies [Last post]
katergo
Offline
Joined: 2005-11-10

Hi,

I've installed glassfish build 26 on solaris x86
I've installed netbeans 5.0- beta 2
I've configured netbeans so as it uses glassfish

Then I've created the Ajax Auto Completion Custom Project of the Java BLue Prints

When I Try to compile I get this :

/net/wotan/export/workspace1/mdardenn/N1UI/ajaxtest/textfield-jsf/components/textfield/src/java/com/sun/j2ee/blueprints/bpcatalog/ajax/components/AjaxPhaseListener.java:15: package javax.faces.context does not exist
import javax.faces.context.FacesContext;

so it seems that there not the good jars.

then looking at glassfish lib I find

jsf-impl.jar but no jsf-api.jar, so the question is where to find them or is it as bug ?

Thanks for the replies

Manfred

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ludo
Offline
Joined: 2003-06-10

I just tried to see if I could reproduce this with a glasfish server and I could not:
Se the build log:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: C:\Documents and Settings\ludo\textfield-jsf\build\web\WEB-INF\classes
init:
deps-jar:
Created dir: C:\Documents and Settings\ludo\textfield-jsf\components\textfield\build\jar
Created dir: C:\Documents and Settings\ludo\textfield-jsf\components\textfield\build\ear-module
Compiling 7 source files to C:\Documents and Settings\ludo\textfield-jsf\components\textfield\build\jar
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 2 files to C:\Documents and Settings\ludo\textfield-jsf\components\textfield\build\jar\META-INF
compile:
Copying 1 file to C:\Documents and Settings\ludo\textfield-jsf\components\textfield\build\jar\com\sun\j2ee\blueprints\bpcatalog\ajax\components
Copying 1 file to C:\Documents and Settings\ludo\textfield-jsf\components\textfield\build\jar\com\sun\j2ee\blueprints\bpcatalog\ajax\components
library-inclusion-in-archive:
Created dir: C:\Documents and Settings\ludo\textfield-jsf\components\textfield\dist
Building jar: C:\Documents and Settings\ludo\textfield-jsf\components\textfield\dist\textfield.jar
dist:
Copying 5 files to C:\Documents and Settings\ludo\textfield-jsf\build\web
library-inclusion-in-archive:
library-inclusion-in-manifest:
Compiling 2 source files to C:\Documents and Settings\ludo\textfield-jsf\build\web\WEB-INF\classes
Copying 1 file to C:\Documents and Settings\ludo\textfield-jsf\build\web\WEB-INF\classes
compile:
compile-jsps:
Created dir: C:\Documents and Settings\ludo\textfield-jsf\dist
Building jar: C:\Documents and Settings\ludo\textfield-jsf\dist\textfield-jsf.war
do-dist:
dist:
BUILD SUCCESSFUL (total time: 7 seconds)

And I see the javaee.jar in the libraries of my web app.

So please, check you environment again, and let us know.
If your environment is correct, I'll need more info to address the issue :-)

Thanks,
Ludo

katergo
Offline
Joined: 2005-11-10

Hi,

The project.properties for the component is this one (and it referencing com.sun.aas.installRoot and not javaee)

so which property should I use ?

(changing with com.sun.aas.installRoot does not work)

build.classes.dir=${build.dir}/jar
build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
build.dir=build
build.ear.classes.dir=${build.dir}/ear-module
build.generated.dir=${build.dir}/generated
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
components.dir=${build.classes.dir}/com/sun/j2ee/blueprints/bpcatalog/ajax/components
debug.classpath=${javac.classpath}:${build.classes.dir}
debug.test.classpath=\
${run.test.classpath}
dist.dir=dist
dist.ear.jar=${dist.dir}/textfield.jar
dist.jar=${dist.dir}/textfield.jar
dist.javadoc.dir=${dist.dir}/javadoc
j2ee.platform=1.4
j2ee.platform.classpath=${com.sun.aas.installRoot}/lib/j2ee.jar
j2ee.server.type=J2EE
jar.compress=false
jar.name=textfield.jar
javac.classpath=\
${com.sun.aas.installRoot}/lib/jsf-impl.jar:\
${com.sun.aas.installRoot}/lib/jsf-api.jar
javac.debug=true
javac.deprecation=false
javac.source=${default.javac.source}
javac.target=${default.javac.target}
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.preview=true
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
lib.dir=../../lib
meta.inf=${source.root}/conf
meta.inf.excludes=sun-cmp-mappings.xml
platform.active=default_platform
resource.dir=setup
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.root=src
src.dir=${source.root}/java
test.src.dir=test

qouyang
Offline
Joined: 2005-02-01

The jsf APIs are bundled inside of the javaee.jar, which contains all public APIs supported by the Java EE 5.0 platform.

In your installation directory,

$S1AS_HOME/lib/javaee.jar

Thanks,
Q^2

amyroh
Offline
Joined: 2004-05-06

Hi Manfred,

In your BluePrints app, you should change jsf-api.jar to javaee.jar to work.

For examples,

should be changed to

Hope this helps.
Amy

ludo
Offline
Joined: 2003-06-10

You should not do that I think.
If GlassFish Server is the target for this web app (Check this in the web project Properties, in the run node: select the correct server target).
When picking GlassFish as a target, javaee.jar is part of the web project classpath.
To check this, expand the Libraries node on the web project, exapnd the node that has the name of the server target.
check if javaee.jar is there. It should be there for Glassfish server target.
let me know,
Ludo

amyroh
Offline
Joined: 2004-05-06

My suggestion doesn't involve NetBeans. I was getting jsf classes not found error for BluePrints tabbedview app after switching to glassfish so I fixed it in that app. However, other BluePrints apps might still have jsf-api references.

Using netbeans, this might not even be needed like ludo says.

katergo
Offline
Joined: 2005-11-10

Hi Ludo,

On the Run target I have :

Server Sun Java Appplication Server
J2EE Version : 1.4
Context_Path /textfield.jsf

When I want to list the librairies in the textfiled-jsf properties I got an array out of bound exeception :

so it seems that it does not even find a jar !

java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(String.java:1768)
at org.netbeans.modules.web.project.ui.customizer.WebClassPathUi$ClassPathListCellRenderer.getFileRefName(WebClassPathUi.java:249)
at org.netbeans.modules.web.project.ui.customizer.WebClassPathUi$ClassPathListCellRenderer.getDisplayName(WebClassPathUi.java:155)
at org.netbeans.modules.web.project.ui.customizer.WebClassPathUi$ClassPathListCellRenderer.access$100(WebClassPathUi.java:77)
at org.netbeans.modules.web.project.ui.customizer.WebClassPathUi$ClassPathTableCellItemRenderer.getTableCellRendererComponent(WebClassPathUi.java:271)
at javax.swing.JTable.prepareRenderer(JTable.java:3919)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1669)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1571)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1494)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:742)
at javax.swing.JComponent.paint(JComponent.java:1005)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JViewport.paint(JViewport.java:728)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
[catch] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)