Reply
Member
Posts: 1
Registered: ‎03-08-2012

[ERROR] Integration Post Direct Method + Java

I mounted the whole environment described in https://developer.authorize.net/integration/fifteenminutes/java however, when running on my screen returns the following error message: org.apache.jasper.JasperException: Unable to compile class for JSP:
 
Here's the complete code:

type Exception report

message

description The server encountered an internal error () That Prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 33 in the jsp file: / dpm /.. / Common / helper.jsp
Merchant can not be resolved to a type
30: / * NO NEED TO EDIT BELOW HERE * /
31:
32: / / create the merchant
33: static Merchant sandboxMerchant Merchant.createMerchant = (Environment.SANDBOX,
34: apiLoginID, transactionKey);
35:
36: / **


An error occurred at line: 33 in the jsp file: / dpm /.. / Common / helper.jsp
Merchant can not be resolved
30: / * NO NEED TO EDIT BELOW HERE * /
31:
32: / / create the merchant
33: static Merchant sandboxMerchant Merchant.createMerchant = (Environment.SANDBOX,
34: apiLoginID, transactionKey);
35:
36: / **


An error occurred at line: 33 in the jsp file: / dpm /.. / Common / helper.jsp
Environment.SANDBOX can not be resolved to a type
30: / * NO NEED TO EDIT BELOW HERE * /
31:
32: / / create the merchant
33: static Merchant sandboxMerchant Merchant.createMerchant = (Environment.SANDBOX,
34: apiLoginID, transactionKey);
35:
36: / **


An error occurred at line: 39 in the jsp file: / dpm /.. / Common / helper.jsp
Order can not be resolved to a type
36: / **
37: * Creates an order passed in from form data.
38 * /
39: public Order createOrder (Map <String, String[]> requestMap) {
40: Order order Order.createOrder = ();
41: order.setDescription ("Coffee");
42:


An error occurred at line: 40 in the jsp file: / dpm /.. / Common / helper.jsp
Order can not be resolved to a type
37: * Creates an order passed in from form data.
38 * /
39: public Order createOrder (Map <String, String[]> requestMap) {
40: Order order Order.createOrder = ();
41: order.setDescription ("Coffee");
42:
43: try {


An error occurred at line: 40 in the jsp file: / dpm /.. / Common / helper.jsp
Order can not be resolved
37: * Creates an order passed in from form data.
38 * /
39: public Order createOrder (Map <String, String[]> requestMap) {
40: Order order Order.createOrder = ();
41: order.setDescription ("Coffee");
42:
43: try {


An error occurred at line: 45 in the jsp file: / dpm /.. / Common / helper.jsp
OrderItem can not be resolved to a type
42:
43: try {
44: order.setInvoiceNumber (Long.toString (System.currentTimeMillis ()));
45: OrderItem coffeeOrderItem OrderItem.createOrderItem = ();
46: coffeeOrderItem.setItemQuantity (new BigDecimal (1:00));
47:
48: if (requestMap.containsKey ("size")) {


An error occurred at line: 45 in the jsp file: / dpm /.. / Common / helper.jsp
OrderItem can not be resolved
42:
43: try {
44: order.setInvoiceNumber (Long.toString (System.currentTimeMillis ()));
45: OrderItem coffeeOrderItem OrderItem.createOrderItem = ();
46: coffeeOrderItem.setItemQuantity (new BigDecimal (1:00));
47:
48: if (requestMap.containsKey ("size")) {


An error occurred at line: 72 in the jsp file: / dpm /.. / Common / helper.jsp
ShippingCharges can not be resolved to a type
69: break;
70: default: break;
71:}
72: ShippingCharges shippingCharges ShippingCharges.createShippingCharges = ();
73: shippingCharges.setTaxExempt (false);
74: shippingCharges.setTaxItemName ("California Tax (9.5%)");
75: shippingCharges.setTaxAmount (coffeeOrderItem.getItemPrice (). Multiply (BigDecimal new (0095)));


An error occurred at line: 72 in the jsp file: / dpm /.. / Common / helper.jsp
ShippingCharges can not be resolved
69: break;
70: default: break;
71:}
72: ShippingCharges shippingCharges ShippingCharges.createShippingCharges = ();
73: shippingCharges.setTaxExempt (false);
74: shippingCharges.setTaxItemName ("California Tax (9.5%)");
75: shippingCharges.setTaxAmount (coffeeOrderItem.getItemPrice (). Multiply (BigDecimal new (0095)));


An error occurred at line: 26 in the jsp file: / dpm / helper.jsp
net.authorize.sim.Result can not be resolved to a type
23: * @ param result
24: * @ return string containing the URL.
25 * /
26: public String createReceiptRedirectUrl (net.authorize.sim.Result result) {
27: receiptUrlBuffer StringBuffer = new StringBuffer (orderReceiptUrl);
28:
29: try {


An error occurred at line: 34 in the jsp file: / dpm / helper.jsp
ResponseField.TRANSACTION_TYPE can not be resolved to a type
31: receiptUrlBuffer.append ("");
32: receiptUrlBuffer.append ("notes"). Append ("="). Append (result.getResponseMap (). Get ("notes"));
33: receiptUrlBuffer.append ("&");
34:
35: receiptUrlBuffer.append ("&");
36:
37: receiptUrlBuffer.append ("&");


An error occurred at line: 34 in the jsp file: / dpm / helper.jsp
ResponseField.TRANSACTION_TYPE can not be resolved to a type
31: receiptUrlBuffer.append ("");
32: receiptUrlBuffer.append ("notes"). Append ("="). Append (result.getResponseMap (). Get ("notes"));
33: receiptUrlBuffer.append ("&");
34:
35: receiptUrlBuffer.append ("&");
36:
37: receiptUrlBuffer.append ("&");


An error occurred at line: 36 in the jsp file: / dpm / helper.jsp
ResponseField.RESPONSE_CODE can not be resolved to a type
33: receiptUrlBuffer.append ("&");
34:
35: receiptUrlBuffer.append ("&");
36:
37: receiptUrlBuffer.append ("&");
38:
39: receiptUrlBuffer.append ("&");


An error occurred at line: 38 in the jsp file: / dpm / helper.jsp
ResponseField.RESPONSE_REASON_CODE can not be resolved to a type
35: receiptUrlBuffer.append ("&");
36:
37: receiptUrlBuffer.append ("&");
38:
39: receiptUrlBuffer.append ("&");
40: receiptUrlBuffer.append (ResponseField.RESPONSE_REASON_TEXT.getFieldName ()). Append ("=");
41 String responseText result.getResponseMap = (). Get (ResponseField.RESPONSE_REASON_TEXT.getFieldName ());


An error occurred at line: 40 in the jsp file: / dpm / helper.jsp
ResponseField.RESPONSE_REASON_TEXT can not be resolved to a type
37: receiptUrlBuffer.append ("&");
38:
39: receiptUrlBuffer.append ("&");
40: receiptUrlBuffer.append (ResponseField.RESPONSE_REASON_TEXT.getFieldName ()). Append ("=");
41 String responseText result.getResponseMap = (). Get (ResponseField.RESPONSE_REASON_TEXT.getFieldName ());
42: receiptUrlBuffer.append (responseText! = null? URLEncoder.encode (responseText, "UTF-8"): responseText);
43:


An error occurred at line: 41 in the jsp file: / dpm / helper.jsp
ResponseField.RESPONSE_REASON_TEXT can not be resolved to a type
38:
39: receiptUrlBuffer.append ("&");
40: receiptUrlBuffer.append (ResponseField.RESPONSE_REASON_TEXT.getFieldName ()). Append ("=");
41 String responseText result.getResponseMap = (). Get (ResponseField.RESPONSE_REASON_TEXT.getFieldName ());
42: receiptUrlBuffer.append (responseText! = null? URLEncoder.encode (responseText, "UTF-8"): responseText);
43:
44: if (result.isApproved ()) {


An error occurred at line: 45 in the jsp file: / dpm / helper.jsp
ResponseField.TRANSACTION_ID can not be resolved to a type
42: receiptUrlBuffer.append (responseText! = null? URLEncoder.encode (responseText, "UTF-8"): responseText);
43:
44: if (result.isApproved ()) {
45:
46:}
47:}
48:} catch (UnsupportedEncodingException e) {}


An error occurred at line: 45 in the jsp file: / dpm / helper.jsp
ResponseField.TRANSACTION_ID can not be resolved to a type
42: receiptUrlBuffer.append (responseText! = null? URLEncoder.encode (responseText, "UTF-8"): responseText);
43:
44: if (result.isApproved ()) {
45:
46:}
47:}
48:} catch (UnsupportedEncodingException e) {}


An error occurred at line: 56 in the jsp file: / dpm / helper.jsp
Order can not be resolved to a type
53: / **
54: * Display the Silent Order POST form for an auth_capture.
55 * /
56: public String displayAuthCaptureSilentOrderPostForm (Order order) {
57: responseBuffer StringBuffer = new StringBuffer ();
58:
59: / / create transaction sandbox


An error occurred at line: 60 in the jsp file: / dpm / helper.jsp
net.authorize.sim.Transaction can not be resolved to a type
57: responseBuffer StringBuffer = new StringBuffer ();
58:
59: / / create transaction sandbox
60: net.authorize.sim.Transaction sandboxAuthCaptureTransaction sandboxMerchant.createSIMTransaction = (
61: TransactionType.AUTH_CAPTURE, 1, order.getTotalAmount ());
62: sandboxAuthCaptureTransaction.setOrder (order);
63: sandboxAuthCaptureTransaction.setMerchantDefinedField ("notes", "extra hot please");


An error occurred at line: 60 in the jsp file: / dpm / helper.jsp
sandboxMerchant can not be resolved
57: responseBuffer StringBuffer = new StringBuffer ();
58:
59: / / create transaction sandbox
60: net.authorize.sim.Transaction sandboxAuthCaptureTransaction sandboxMerchant.createSIMTransaction = (
61: TransactionType.AUTH_CAPTURE, 1, order.getTotalAmount ());
62: sandboxAuthCaptureTransaction.setOrder (order);
63: sandboxAuthCaptureTransaction.setMerchantDefinedField ("notes", "extra hot please");


An error occurred at line: 61 in the jsp file: / dpm / helper.jsp
TransactionType.AUTH_CAPTURE can not be resolved to a type
58:
59: / / create transaction sandbox
60: net.authorize.sim.Transaction sandboxAuthCaptureTransaction sandboxMerchant.createSIMTransaction = (
61: TransactionType.AUTH_CAPTURE, 1, order.getTotalAmount ());
62: sandboxAuthCaptureTransaction.setOrder (order);
63: sandboxAuthCaptureTransaction.setMerchantDefinedField ("notes", "extra hot please");
64:


An error occurred at line: 133 in the jsp file: / dpm / helper.jsp
TextButton can not be resolved to a type
130: sandboxAuthCaptureTransaction.setRelayResponseUrl (relayResponseUrl);
131: sandboxAuthCaptureTransaction.setShowPaymentForm (false);
132:
133: TextButton submitButton TextButton.createButton = ("buy_button", "BUY");
134: submitButton.setCssClass ("submit buy");
135: responseBuffer.append (sandboxAuthCaptureTransaction.createForm (
136: "dpm_form", "dpm_form_id" submitButton));


An error occurred at line: 133 in the jsp file: / dpm / helper.jsp
TextButton can not be resolved
130: sandboxAuthCaptureTransaction.setRelayResponseUrl (relayResponseUrl);
131: sandboxAuthCaptureTransaction.setShowPaymentForm (false);
132:
133: TextButton submitButton TextButton.createButton = ("buy_button", "BUY");
134: submitButton.setCssClass ("submit buy");
135: responseBuffer.append (sandboxAuthCaptureTransaction.createForm (
136: "dpm_form", "dpm_form_id" submitButton));


An error occurred at line: 19 in the jsp file: / dpm / review.jsp
Order can not be resolved to a type
16: <h1> Your Store </ h1>
17: <h2> Order </ h2>
18: <%
19: Order order = createOrder (request.getParameterMap ());
20: if (order! = Null) {
21:%>
22: <table>


An error occurred at line: 19 in the jsp file: / dpm / review.jsp
The method createOrder (Map) is undefined for the type review_jsp
16: <h1> Your Store </ h1>
17: <h2> Order </ h2>
18: <%
19: Order order = createOrder (request.getParameterMap ());
20: if (order! = Null) {
21:%>
22: <table>


An error occurred at line: 31 in the jsp file: / dpm / review.jsp
OrderItem can not be resolved to a type
28: </ tfoot>
29: <tbody>
30: <%
31: for (OrderItem OrderItem: order.getOrderItems ()) {
32:%>
33: <tr>
34: <td> <% = sanitizeString (orderItem.getItemName ())%> </ td>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError (DefaultErrorHandler.java: 92)
org.apache.jasper.compiler.ErrorDispatcher.javacError (ErrorDispatcher.java: 330)
org.apache.jasper.compiler.JDTCompiler.generateClass (JDTCompiler.java: 439)
org.apache.jasper.compiler.Compiler.compile (Compiler.java: 349)
org.apache.jasper.compiler.Compiler.compile (Compiler.java: 327)
org.apache.jasper.compiler.Compiler.compile (Compiler.java: 314)
org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java: 592)
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 326)
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java: 313)
org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 260)
javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.
Administrator
Posts: 591
Registered: ‎08-21-2009

Re: [ERROR] Integration Post Direct Method + Java

It looks as if not all of the SDK is being loaded.  You will want to make sure that you have all of the SDK available, not only the components under SIM. You are most likely directly importing net.authorize.sim.* as instructed by the quickstart guide, but the files within that section import components from other parts of the SDK.