What causes elusive: NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint()? - java

Many people have asked for help with this error:
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
at
org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)
at
org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:152)
at
javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
...
But no request I can find ever provides a conclusive answer. Just suggestions to tinker with jars.
I believe that’s because there’s an inconsistency in the structure of Jboss interfaces. Can anyone confirm or correct that?
Here’s my code that throws the above error:
final private Properties env = new Properties() {
{put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
put(Context.PROVIDER_URL, "http-remoting://localhost:9990");
put(Context.SECURITY_PRINCIPAL, "myID");
put(Context.SECURITY_CREDENTIALS, "myPassword");
put("jboss.naming.client.ejb.context", true);
}
};
/****************************************************
* myID & myPassword open the Admin GUI for wildfly *
* on localhost:9990 *
****************************************************/
Context ctx = new InitialContext(this.env);
To determine the required jars I removed all jars from the Build path.
Then I ran my program till all ClassNotFoundException were gone.
First Error
java.lang.ClassNotFoundException:
org.jboss.naming.remote.client.InitialContextFactory]
Added jboss-remote-naming-1.0.7.final.jar to class path
Second Error
java.lang.NoClassDefFoundError:
org/jboss/logging/Logger
Added jboss-logging.jar
Third Error
java.lang.NoClassDefFoundError:
org/xnio/Options
Added xnio-api-3.0.7.ga.jar
Fourth Error
java.lang.NoClassDefFoundError:
org/jboss/remoting3/spi/ConnectionProviderFactory
Added jboss-remoting-3.jar
Fifth Error
java.lang.NoClassDefFoundError:
org/jboss/ejb/client/EJBClientContextIdentifier
Added jboss-ejb-client-1.0.19.final.jar
FINAL AND FATAL ERROR
(Note: All NoClassDefFoundError have been cleared)
java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
Using Eclipse’s Project Explorer I verified:
a. jboss-remoting3.jar has the org.jboss.remoting3.Remoting Class.
b. That Remoting Class has this Method:
public Endpoint createEndpoint (String, Executor, OptionMap)
Note it calls for 3 parameters.
BUT the FINAL FATAL ERROR above calls for
public Endpoint createEndpoint (String, OptionMap)
Note: it calls for 2 parameters. Hence the NoSuchMethodError.
Looking at the top lines in the stack trace, I guess
org.jboss.naming.remote.client.InitialContextFactory.getInitialContext() is trying to call org.jboss.remoting3.Remoting.createEndpoint() using 2 parameters, but org.jboss.remoting3.Remoting only defines createEndpoint() with a 3-paramater signature.
Is that supposed to even be possible?
A jar that says it has the org.jboss.remoting3 package whose Remoting class has a single createEndpoint() method with a 3-parameter signature, and another jar that says it has the org.jboss.remoting3 package whose Remoting class has another createEndpoint() method with a 2-parameter signature?
HELP!
I mean do I need to look through every org.jboss.remoting3 package to find one whose Remoting class has a 2 parameter createEnpoint() method?
Or am I missing something important.
I mean this does explain how many questions have been posted about this error:
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
And explain why there is never a conclusive explanation or solution other than fiddling with jars and build path.
I mean getting an InitialContext from WildFly running on the same PC as the Java program should be a trivial process. But it hasn’t been. Maybe it's because of inconsistencies in the API.

Thanks to Christoph Böhme:
jboss-logging-3.1.4.GA.jar has an org.jboss.remeoting package with a Remoting class that has createEndpoint() with a 0, 2 and 3 parameter signature.
Replacing jboss-remoting-4.0.7.Final.jar with the above jar was all it required to clear the NoSuchMethodError.
Hope that helps others.

Related

java: Error initializing PCKS11 provider getting IOException C_GetFunctionList == NULL

I'm trying to write a Java application for digitally signing documents using a bit4Id miniLector token.
I'm in a Linux development environment.
The token is correctly installed, I can sign my documents also with the app downloaded from the manufacturer, but I have to write a new one for other purposes. The driver used is located at
/usr/lib/x86_64-linux-gnu/engines-1.1/pkcs11.so
I'm stuck with this error:
/usr/lib/jvm/jdk1.8.0_111/bin/java ...
Exception in thread "main" java.security.ProviderException: Initialization failed
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:376)
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:103)
at com.itextpdf.samples.signatures.chapter02.C2_01_SignHelloWorld.main
(C2_01_SignHelloWorld.java:83)
Caused by: java.io.IOException: ERROR: C_GetFunctionList == NULL
at sun.security.pkcs11.wrapper.PKCS11.connect(Native Method)
at sun.security.pkcs11.wrapper.PKCS11.<init>(PKCS11.java:138)
at sun.security.pkcs11.wrapper.PKCS11.getInstance(PKCS11.java:151)
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:313)
... 2 more
The provider is listed in $JAVA_HOME/jre/lib/security/java.security file as:
security.provider.10=sun.security.pkcs11.SunPKCS11
The code behaving this way is this:
String configFile = "/opt/bar/cfg/pkcs11.cfg";
Provider provider = new sun.security.pkcs11.SunPKCS11(configFile); <-- line 83
The needed libraries are all imported by my IDE and I have no compile/link errors.
I didn't find this exact type of error in hours of googling.
If you need any further information let me know, any kind help is very appreciated, thanks.
For visual clarity I add all missing information with respect to the original question here below
Updates
Content of the pkcs11.cfg file:
$ cat /opt/bar/cfg/pkcs11.cfg
name="bit4id miniLector-EVO"
library=/usr/lib/x86_64-linux-gnu/engines-1.1/pkcs11.so
Ok, I got it.
The problem is the driver.
Replacing
/usr/lib/x86_64-linux-gnu/engines-1.1/pkcs11.so
with
/opt/Firma4NG/System/Firma4NG_Linux/Firma4/drivers/mu-x64/libbit4xpki.so
that is one of the manufacturer's driver, now I can go further and, for example, dumping all info about the card:
Information for provider SunPKCS11-bit4id miniLector-EVO
Library info:
cryptokiVersion: 2.20
manufacturerID: bit4id srl
flags: 0
libraryDescription: bit4id PKCS#11
libraryVersion: 1.02
...
This question can be closed.

google-oauth-java-client fails with twitch

basically cross from https://discuss.dev.twitch.tv/t/using-google-oauth-client-java-fails-to-execute-token-request/24191
the exception I get is this:
Exception in thread "main" java.lang.IllegalArgumentException: key scope
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:902)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:362)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:337)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:79)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:73)
at com.google.api.client.http.HttpResponse.parseAs(HttpResponse.java:444)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:346)
at de.cryptearth.oauth.Main.main(Main.java:67)
Caused by: java.lang.IllegalArgumentException: key scope, field private java.lang.String com.google.api.client.auth.oauth2.TokenResponse.scope
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:902)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:453)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:789)
... 7 more
Caused by: java.lang.IllegalArgumentException: expected collection or array type but got class java.lang.String
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:164)
at com.google.api.client.util.Preconditions.checkArgument(Preconditions.java:67)
at com.google.api.client.json.JsonParser.parseValue(JsonParser.java:726)
... 9 more
Any Idea what might could be the issue here?
Well, tried several OAuth libs linked on oaut.net but got none to work, so I ended up in doing it low-level with URLConnection and RegEx parsing.
Side-note: I also tried the other libs on YouTube, but only could Googles own implementation to work on it.
~closed

ServletUnit RequestDispatcher forward() / include() methods AbstractMethodError

I'm doing a java web app with a servlet and I wanted to write some tests to check its functionality (ex. authorization form). I hadn't been using any framework, just bare java in eclipse with tomcat 7.0
I've run into an error while trying to test authorization input. The app would check the login-password pair and then redirect using RequestDispatcher.forward() or RequestDispatcher.include() methods. But when executing them it throws an error with the following stack trace:
java.lang.reflect.Inv­ocationTargetExceptio­n
at su­n.reflect.NativeMetho­dAccessorImpl.invoke0­(Native Method)
at su­n.reflect.NativeMetho­dAccessorImpl.invoke(­Unknown Source)
at su­n.reflect.DelegatingM­ethodAccessorImpl.inv­oke(Unknown Source)
at ja­va.lang.reflect.Metho­d.invoke(Unknown Sour­ce)
at en­tryPoint.Dispatcher.d­ispatch(Dispatcher.ja­va:166)
at en­tryPoint.Dispatcher.s­ervice(Dispatcher.jav­a:49)
at ja­vax.servlet.http.Http­Servlet.service(HttpS­ervlet.java:728)
at co­m.meterware.servletun­it.InvocationContextI­mpl.service(Invocatio­nContextImpl.java:76)
at co­m.meterware.servletun­it.ServletUnitClient.­newResponse(ServletUn­itClient.java:126)
at co­m.meterware.httpunit.­WebClient.createRespo­nse(WebClient.java:64­7)
at co­m.meterware.httpunit.­WebWindow.getResource­(WebWindow.java:220)
at co­m.meterware.httpunit.­WebWindow.getSubframe­Response(WebWindow.ja­va:181)
at co­m.meterware.httpunit.­WebWindow.getResponse­(WebWindow.java:158)
at co­m.meterware.httpunit.­WebWindow.updateWindo­w(WebWindow.java:199)
at co­m.meterware.httpunit.­WebWindow.getSubframe­Response(WebWindow.ja­va:183)
at co­m.meterware.httpunit.­WebWindow.getResponse­(WebWindow.java:158)
at co­m.meterware.httpunit.­WebClient.getResponse­(WebClient.java:122)
at te­st.Authorization.test­AuthCorrectInput_Wron­gPassword(Authorizati­on.java:102)
at su­n.reflect.NativeMetho­dAccessorImpl.invoke0­(Native Method)
at su­n.reflect.NativeMetho­dAccessorImpl.invoke(­Unknown Source)
at su­n.reflect.DelegatingM­ethodAccessorImpl.inv­oke(Unknown Source)
at ja­va.lang.reflect.Metho­d.invoke(Unknown Sour­ce)
at or­g.junit.runners.model­.FrameworkMethod$1.ru­nReflectiveCall(Frame­workMethod.java:45)
at or­g.junit.internal.runn­ers.model.ReflectiveC­allable.run(Reflectiv­eCallable.java:15)
at or­g.junit.runners.model­.FrameworkMethod.invo­keExplosively(Framewo­rkMethod.java:42)
at or­g.junit.internal.runn­ers.statements.Invoke­Method.evaluate(Invok­eMethod.java:20)
at or­g.junit.internal.runn­ers.statements.RunBef­ores.evaluate(RunBefo­res.java:28)
at or­g.junit.runners.Paren­tRunner.runLeaf(Paren­tRunner.java:263)
at or­g.junit.runners.Block­JUnit4ClassRunner.run­Child(BlockJUnit4Clas­sRunner.java:68)
at or­g.junit.runners.Block­JUnit4ClassRunner.run­Child(BlockJUnit4Clas­sRunner.java:47)
at or­g.junit.runners.Paren­tRunner$3.run(ParentR­unner.java:231)
at or­g.junit.runners.Paren­tRunner$1.schedule(Pa­rentRunner.java:60)
at or­g.junit.runners.Paren­tRunner.runChildren(P­arentRunner.java:229)
at or­g.junit.runners.Paren­tRunner.access$000(Pa­rentRunner.java:50)
at or­g.junit.runners.Paren­tRunner$2.evaluate(Pa­rentRunner.java:222)
at or­g.junit.internal.runn­ers.statements.RunBef­ores.evaluate(RunBefo­res.java:28)
at or­g.junit.internal.runn­ers.statements.RunAft­ers.evaluate(RunAfter­s.java:30)
at or­g.junit.runners.Paren­tRunner.run(ParentRun­ner.java:300)
at or­g.eclipse.jdt.interna­l.junit4.runner.JUnit­4TestReference.run(JU­nit4TestReference.jav­a:50)
at or­g.eclipse.jdt.interna­l.junit.runner.TestEx­ecution.run(TestExecu­tion.java:38)
at or­g.eclipse.jdt.interna­l.junit.runner.Remote­TestRunner.runTests(R­emoteTestRunner.java:­467)
at or­g.eclipse.jdt.interna­l.junit.runner.Remote­TestRunner.runTests(R­emoteTestRunner.java:­683)
at or­g.eclipse.jdt.interna­l.junit.runner.Remote­TestRunner.run(Remote­TestRunner.java:390)
at or­g.eclipse.jdt.interna­l.junit.runner.Remote­TestRunner.main(Remot­eTestRunner.java:197)
Caused by: javax.serv­let.ServletException:­ java.lang.AbstractMe­thodError: com.meterw­are.servletunit.Servl­etUnitServletContext.­getClassLoader()Ljava­/lang/ClassLoader;
at or­g.apache.jasper.servl­et.JspServlet.service­(JspServlet.java:343)
at ja­vax.servlet.http.Http­Servlet.service(HttpS­ervlet.java:728)
at co­m.meterware.servletun­it.RequestDispatcherI­mpl.forward(RequestDi­spatcherImpl.java:54)
at co­ntrollers.Auth.index(­Auth.java:78)
... 4­4 more
Caused by: java.lang.­AbstractMethodError: ­com.meterware.servlet­unit.ServletUnitServl­etContext.getClassLoa­der()Ljava/lang/Class­Loader;
at or­g.apache.jasper.compi­ler.TagPluginManager.­init(TagPluginManager­.java:72)
at or­g.apache.jasper.compi­ler.TagPluginManager.­apply(TagPluginManage­r.java:56)
at or­g.apache.jasper.compi­ler.Compiler.generate­Java(Compiler.java:24­0)
at or­g.apache.jasper.compi­ler.Compiler.compile(­Compiler.java:373)
at or­g.apache.jasper.compi­ler.Compiler.compile(­Compiler.java:353)
at or­g.apache.jasper.compi­ler.Compiler.compile(­Compiler.java:340)
at or­g.apache.jasper.JspCo­mpilationContext.comp­ile(JspCompilationCon­text.java:646)
at or­g.apache.jasper.servl­et.JspServletWrapper.­service(JspServletWra­pper.java:357) ­
at or­g.apache.jasper.servl­et.JspServlet.service­JspFile(JspServlet.ja­va:390)
at or­g.apache.jasper.servl­et.JspServlet.service­(JspServlet.java:334)
... 4­7 more
The first block represents an invocation error caught by central controller (Dispatcher) servlet while invoking method in which an AbstractMethodError had been thrown. The second and third ones are about that error.
The code of the test method is as follows:
#Test
publi­c void testAuthIncorr­ectInput_Long() throw­s Exception {
W­ebRequest request = n­ew PostMethodWebReque­st("http://localhost:­8080/CenralReportDL/D­ispatcher?query=auth"­);
S­tring longString = ne­w String();
f­or (int i = 0; i < 52­; i++) {
­ longString­ += "aA_ba";
}
reque­st.setParameter("user­name", longString);
reque­st.setParameter("pass­word", longString);
W­ebResponse response =­ client.getResponse(r­equest);
a­ssertNotNull("No resp­onse received", respo­nse);
}
How can I get rid of this error? Is there a workaround? Should I maybe use some other means of servlet testing?
Also please do not suggest framework-specific testing utils such as strutstest, I want an actual solution for bare java web application.
UPDATE: In response to #JekinKalariya - I had a JasperException before. It complained about files not being in /WEB-INF folder, but due to my project structure they all were in /WebContent/WEB-INF. I was so frustrated because of that I just copied entire folder. Silly thing to do. I deleted it and now I'm back to that JasperException.
UPDATE: Now, I've done some research and found some answers on this issue. Didn't work for me though. I also found a suggestion to change a target runtime to J2EE Preview, which raised a different kind of exception:
com.meterware.httpuni­t.HttpNotFoundExcepti­on: Error on HTTP req­uest: 404 java.lang.C­lassNotFoundException­: org.apache.jasper.s­ervlet.JspServlet [http://localhost/WEB-­INF/jsp/auth.jsp]

Jira OAuth - Unable to create application link

I am trying to create an application which uses jira for authentication. I am using Jira Rest api for the same. In the documentation it says to use the same public key and consumer-key to create application link as given in the doc. This works fine, and I am able to create access-token. But in java code as mentioned in this, I am not sure what should be given for private_key. I tried two methods-
Generated a random private key using rsa and provided it in place of private_key which didn't work. It gave exception telling length too long. I tried for 2048, 1024, 512, 256 and 128 bits. Everything gave same error.
Application link:
Consumer-key: hardcoded-consumer
Consumer Name: hardcoded-consumer
Public Key:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxZDzGUGk6rElyPm0iOua0lWg84nOlhQN1gmTFTIu5WFyQFHZF6OA4HX7xATttQZ6N21yKMakuNdRvEudyN/coUqe89r3Ae+rkEIn4tCxGpJWX205xVF3Cgsn8ICj6dLUFQPiWXouoZ7HG0sPKhCLXXOvUXmekivtyx4bxVFD9Zy4SQ7IHTx0V0pZYGc6r1gF0LqRmGVQDaQSbivigH4mlVwoAO9Tfccf+V00hYuSvntU+B1ZygMw2rAFLezJmnftTxPuehqWu9xS5NVsPsWgBL7LOi3oY8lhzOYjbMKDWM6zUtpOmWJA52cVJW6zwxCxE28/592IARxlJcq14tjwYwIDAQAB
Generated private and public key pair and provided the same in application link and in code respectively. But in this case, I am unable to create access token. It is giving -
Application link:
Consumer-key: hardcoded-consumer
Consumer Name: hardcoded-consumer
Public Key:
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0YjCwIfYoprq/FQO6lb3asXrx LlJFuCvtinTF5p0GxvQGu5O3gYytUvtC2JlYzypSRjVxwxrsuRcP3e641SdASwfr mzyvIgP08N4S0IFzEURkV1wp/IpH7kH41EtbmUmrXSwfNZsnQRE5SYSOhh+LcK2w yQkdgcMv11l4KoBkcwIDAQAB
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.lang.RuntimeException: Failed to obtain request token
at com.atlassian.oauth.client.example.AtlassianOAuthClient.getRequestToken(AtlassianOAuthClient.java:66)
at com.atlassian.oauth.client.example.JIRAOAuthClient.main(JIRAOAuthClient.java:52)
... 6 more
Caused by: net.oauth.OAuthProblemException: signature_invalid
at net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:83)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:260)
at net.oauth.client.OAuthClient.getRequestTokenResponse(OAuthClient.java:190)
at com.atlassian.oauth.client.example.AtlassianOAuthClient.getRequestToken(AtlassianOAuthClient.java:57)
Can someone explain me what should be done? Am I missing something here?
And also what is the difference between shared key, consumer key and public key?
Thanks in advance
The exception occurs due to ending with "/" in JIRA base URL (caused by net.oauth.OAuthProblemException: signature_invalid).
The correct request is:
java -jar rest-oauth-client-1.0.one-jar.jar requestToken https://jira_base_server_url http://your_redirctedUrl
I somehow fixed the issue by using the public that is provided in the documentation and the private key as given in the example
But still, I was unable to create an application link with private and public key generated by me.

Changes to a Lotus Domino xpages java application do not propagate to the server

Using Lotus Domino 8.5.2 Fixpack 3
The title sums it up. I have an xpages application that uses java. It seems that any java changes I make, never become visible on the server. It sounds a dead ringer for a cache issue of some kind. The application runs on the server and I see System.out.println statements in the server log, but do not any of the changes I've made to those statements or any new ones I've added.
The code is set to Rebuild Automatically. Still, it never looks like the server sees the changes. Is there some special way I need to build the database (aside from the typical Rebuild All)? Do I need to reset or restart some process on the domino server for it to see the changes?
Any thoughts or ideas would be greatly appreciated.
EDIT 1
I'm returning to this project and, hence, this question. The specific error message I'm getting is:
[6815810:00012-05659] 03/19/2013 09:27:01 HTTP JVM: Managedbean Calendar could not be created Can't instantiate class: 'calendar.CalendarServices'.. java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: calendar.CalendarServices. For more detailed inform
ation, please consult error-log-0
[6815810:00012-05659] 03/19/2013 09:27:01 HTTP JVM: xml located in /local/notesdata/domino/workspace/logs
[6815810:00012-05659] 03/19/2013 09:27:01 HTTP JVM: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression
I've tried unchecking automatic build and doing a clean --> rebuild all. I've tried signing the nsf again. I've ensured that I'm on the acl. And, as recommended, I've tried the
restart task http
Command via live console. No matter what I do I'm getting this error. The odd thing is that this project is just a copy --> paste (with rename) of another one that works fine. So, the project works...until I change and recompile...
The log that exception above points to wasn't very helpful. It reads:
<CommonBaseEvent creationTime="2013-03-05T09:01:03.254-06:00" globalInstanceId="EL0a04a8b800013d3af27da200000008" msg="Managedbean Calendar could not be created Can&apos;t instantiate class: &apos;calendar.CalendarServices&apos;.. java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: calendar.CalendarServices" severity="50" version="1.0.1">
<extendedDataElements name="CommonBaseEventLogRecord:level" type="noValue">
<children name="CommonBaseEventLogRecord:name" type="string">
<values>SEVERE</values>
</children>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceClassName" type="string">
<values>com.sun.faces.application.ApplicationAssociate</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceMethodName" type="string">
<values>createAndMaybeStoreManagedBeans</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string">
<values>javax.faces.FacesException: Can&apos;t instantiate class: &apos;calendar.CalendarServices&apos;.. java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: calendar.CalendarServices
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:234)
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:291)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:135)
at com.ibm.xsp.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:71)
at com.ibm.xsp.javascript.ServerSideLocalObject.resolveVariable(ServerSideLocalObject.java:97)
at com.ibm.xsp.javascript.ServerSideLocalObject.resolveAttribute(ServerSideLocalObject.java:73)
at com.ibm.xsp.javascript.AbstractLocalObject._get(AbstractLocalObject.java:119)
at com.ibm.xsp.javascript.AbstractLocalObject.getPropertyReference(AbstractLocalObject.java:101)
at com</values>
<values>.ibm.jscript.engine.ProgramContext.findGlobalScopeIdentifier(ProgramContext.java:143)
at com.ibm.jscript.engine.ProgramContext.findIdentifier(ProgramContext.java:134)
at com.ibm.jscript.ASTTree.ASTIdentifier.interpret(ASTIdentifier.java:105)
at com.ibm.jscript.ASTTree.ASTMember.interpret(ASTMember.java:106)
at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:88)
at com.ibm.jscript.ASTTree.ASTArgumentList.interpretArguments(ASTArgumentList.java:63)
at com.ibm.jscript.types.FBSObject.call(FBSObject.java:153)
at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
at com.ibm.jscript.ASTTree.ASTIf.interpret(ASTIf.java:85)
at com.ibm.jscript.ASTTree.ASTTry.interpret(ASTTry.java:109)
at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)</values>
<values>
at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:220)
at com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(JavaScriptMethodBinding.java:111)
at com.ibm.xsp.component.UIViewRootEx.invokePhaseMethodBinding(UIViewRootEx.java:1705)
at com.ibm.xsp.controller.FacesControllerImpl.invokePhaseMethodBinding(FacesControllerImpl.java:444)
at com.ibm.xsp.controller.FacesControllerImpl.access$0(FacesControllerImpl.java:438)
at com.ibm.xsp.controller.FacesControllerImpl$</values>
<values>ViewPhaseListener.afterPhase(FacesControllerImpl.java:506)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:218)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
at com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:219)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:193)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:154)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:86)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:538)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1151)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServl</values>
<values>et(ComponentModule.java:803)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:758)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:527)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1135)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:523)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:352)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:304)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:261)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:291)
Caused by: java.security.PrivilegedActionException: java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: calendar.CalendarServices
at java.security.AccessController</values>
<values>.doPrivileged(AccessController.java:255)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:216)
... 51 more
Caused by: java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: calendar.CalendarServices
at java.beans.Beans.instantiate(Beans.java:194)
at java.beans.Beans.instantiate(Beans.java:75)
at com.sun.faces.config.ManagedBeanFactory$1.run(ManagedBeanFactory.java:222)
at java.security.AccessController.doPrivileged(AccessController.java:251)
... 52 more
</values>
</extendedDataElements>
<sourceComponentId component="Expeditor 6.2" componentIdType="ProductName" instanceId="" location="<server here>" locationType="Hostname" subComponent="com.sun.faces.application.ApplicationImpl" threadId="0" componentType="http://www.w3.org/2001/XMLSchema-instance"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>
As ever, penny for your thoughts.
Also, thank you all for your feedback. I'm sorry I've been away for a bit and neglected this question. I really would like to figure this out.
You didn't mention Project -> Clean so try that first.
I had once similar problem that was caused by an underscore in class or package name.
If the problem exists also for XPages then it's a a general build problem. This can occur at least when developers with different Designer and/or ExtLib versions modify the application. When I had this problem the only way to fix it was to create a new application and copy paste everything there. In our case the other developer never had the problem.
This is just silly. My src folder wasn't on the build path. That was causing all the issues.

Categories

Resources